renaming callsBeforeTrampoline to cbt
This commit is contained in:
parent
690e3a423c
commit
6d3a945478
|
@ -198,11 +198,11 @@ EOF
|
|||
(define (default-assemble-basic-block a-basic-block blockht entry-points function-entry-and-exit-names op)
|
||||
(cond
|
||||
[(set-contains? function-entry-and-exit-names (BasicBlock-name a-basic-block))
|
||||
(fprintf op "var ~a=function(M){if(--M.callsBeforeTrampoline<0){throw ~a;}\n"
|
||||
(fprintf op "var ~a=function(M){if(--M.cbt<0){throw ~a;}\n"
|
||||
(assemble-label (make-Label (BasicBlock-name a-basic-block)))
|
||||
(assemble-label (make-Label (BasicBlock-name a-basic-block))))]
|
||||
[else
|
||||
(fprintf op "var ~a=function(M){--M.callsBeforeTrampoline<0;\n"
|
||||
(fprintf op "var ~a=function(M){--M.cbt<0;\n"
|
||||
(assemble-label (make-Label (BasicBlock-name a-basic-block))))])
|
||||
(assemble-block-statements (BasicBlock-name a-basic-block)
|
||||
(BasicBlock-stmts a-basic-block)
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
module-requires))
|
||||
(let ([module-body-text
|
||||
(format "
|
||||
if(--M.callsBeforeTrampoline<0) { throw arguments.callee; }
|
||||
if(--M.cbt<0) { throw arguments.callee; }
|
||||
var modrec = M.modules[~s];
|
||||
var exports = {};
|
||||
modrec.isInvoked = true;
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
// I'd personally love for this to be a macro and avoid the
|
||||
// extra function call here.
|
||||
var finalizeClosureCall = function (MACHINE) {
|
||||
MACHINE.callsBeforeTrampoline--;
|
||||
MACHINE.cbt--;
|
||||
var returnArgs = [].slice.call(arguments, 1);
|
||||
|
||||
// clear out stack space
|
||||
|
@ -323,7 +323,7 @@
|
|||
return makeClosure(name,
|
||||
arity,
|
||||
function(M) {
|
||||
--M.callsBeforeTrampoline;
|
||||
--M.cbt;
|
||||
M.val = f(M);
|
||||
M.env.length -= M.argcount;
|
||||
return M.control.pop().label(M);
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
|
||||
|
||||
var defaultCurrentPrintImplementation = function defaultCurrentPrintImplementation(MACHINE) {
|
||||
if(--MACHINE.callsBeforeTrampoline < 0) {
|
||||
if(--MACHINE.cbt < 0) {
|
||||
throw defaultCurrentPrintImplementation;
|
||||
}
|
||||
var oldArgcount = MACHINE.argcount;
|
||||
|
@ -211,7 +211,7 @@
|
|||
// The MACHINE
|
||||
|
||||
var Machine = function() {
|
||||
this.callsBeforeTrampoline = STACK_LIMIT_ESTIMATE;
|
||||
this.cbt = STACK_LIMIT_ESTIMATE; // calls before trampoline
|
||||
this.val = undefined; // value register
|
||||
this.proc = undefined; // procedure register
|
||||
this.argcount = undefined; // argument count
|
||||
|
@ -446,7 +446,7 @@
|
|||
Machine.prototype.trampoline = function(initialJump) {
|
||||
var thunk = initialJump;
|
||||
var startTime = (new Date()).valueOf();
|
||||
this.callsBeforeTrampoline = STACK_LIMIT_ESTIMATE;
|
||||
this.cbt = STACK_LIMIT_ESTIMATE;
|
||||
this.params.numBouncesBeforeYield =
|
||||
this.params.maxNumBouncesBeforeYield;
|
||||
this.running = true;
|
||||
|
@ -478,7 +478,7 @@
|
|||
// The running flag is set to false.
|
||||
if (typeof(e) === 'function') {
|
||||
thunk = e;
|
||||
this.callsBeforeTrampoline = STACK_LIMIT_ESTIMATE;
|
||||
this.cbt = STACK_LIMIT_ESTIMATE;
|
||||
|
||||
if (this.params.numBouncesBeforeYield-- < 0) {
|
||||
recomputeMaxNumBouncesBeforeYield(
|
||||
|
@ -671,7 +671,7 @@
|
|||
|
||||
var si_popgoto = function(n, gotoTargetThunk) {
|
||||
return function(M) {
|
||||
--M.callsBeforeTrampoline;
|
||||
--M.cbt;
|
||||
M.env.length-=n;
|
||||
return gotoTargetThunk()(M);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user