More BACKTRACK support, more 32-bit support, more more.

This commit is contained in:
Jeff Parsons 2015-01-21 17:19:58 -08:00 committed by jeffpar
commit d6b4b9c438
12 changed files with 1155 additions and 876 deletions

View file

@ -108,7 +108,7 @@ var TYPEDARRAYS = false; // (typeof ArrayBuffer !== 'undefined');
/**
* @define {boolean}
*
* Enable backtracking (disabled in compiled versions). Backtracking is a mechanism that allows us to tag
* Enables backtracking (disabled in compiled versions). Backtracking is a mechanism that allows us to tag
* every byte of incoming data and follow the flow of that data.
*/
var BACKTRACK = true;
@ -116,7 +116,7 @@ var BACKTRACK = true;
/**
* @define {boolean}
*
* Enable instruction sampling (a work-in-progress). This was used briefly as an internal debugging aid, to
* Enables instruction sampling (a work-in-progress). This was used briefly as an internal debugging aid, to
* periodically record EIP values in a fixed-length sampling buffer, halting execution once the sampling buffer
* was full, and then compare those sampled EIP values to corresponding EIP values on subsequent runs, to look
* for deviations. In theory, every run is supposed to be absolutely identical, even if you interrupt execution
@ -124,6 +124,15 @@ var BACKTRACK = true;
*/
var SAMPLER = false;
/**
* @define {boolean}
*
* Enables 80386 support. My preference continues to be one "binary" that supports all implemented CPUs, but
* I'm providing this to enable a slimmed-down binary, at least until 80386 support is actually finished; at the
* moment, there's just a lot of scaffolding that bloats the compiled version without adding real functionality.
*/
var I386 = true;
if (typeof module !== 'undefined') {
global.PCJSCLASS = PCJSCLASS;
global.DEBUGGER = DEBUGGER;
@ -133,6 +142,7 @@ if (typeof module !== 'undefined') {
global.TYPEDARRAYS = TYPEDARRAYS;
global.BACKTRACK = BACKTRACK;
global.SAMPLER = SAMPLER;
global.I386 = I386;
/*
* TODO: When we're "required" by Node, should we return anything via module.exports?
*/