renamed proc to p
This commit is contained in:
parent
e0f2502b18
commit
a107d83827
|
@ -14,7 +14,7 @@
|
|||
(define (assemble-op-expression op)
|
||||
(cond
|
||||
[(GetCompiledProcedureEntry? op)
|
||||
"M.proc.label"]
|
||||
"M.p.label"]
|
||||
|
||||
[(MakeCompiledProcedure? op)
|
||||
(format "new RT.Closure(~a,~a,[~a],~a)"
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
(format "~a=~a;"
|
||||
(cond
|
||||
[(eq? target 'proc)
|
||||
"M.proc"]
|
||||
"M.p"]
|
||||
[(eq? target 'val)
|
||||
"M.val"]
|
||||
[(eq? target 'argcount)
|
||||
|
@ -279,7 +279,7 @@
|
|||
(let ([name (Reg-name a-reg)])
|
||||
(cond
|
||||
[(eq? name 'proc)
|
||||
"M.proc"]
|
||||
"M.p"]
|
||||
[(eq? name 'val)
|
||||
"M.val"]
|
||||
[(eq? name 'argcount)
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
",")))]
|
||||
|
||||
[(InstallClosureValues!? op)
|
||||
"M.e.push.apply(M.e,M.proc.closedVals);"]
|
||||
"M.e.push.apply(M.e,M.p.closedVals);"]
|
||||
|
||||
[(RestoreEnvironment!? op)
|
||||
"M.e=M.e[M.e.length-2].slice(0);"]
|
||||
|
@ -98,7 +98,7 @@
|
|||
","))]
|
||||
|
||||
[(SetFrameCallee!? op)
|
||||
(format "M.c[M.c.length-1].proc=~a;"
|
||||
(format "M.c[M.c.length-1].p=~a;"
|
||||
(assemble-oparg (SetFrameCallee!-proc op)))]
|
||||
|
||||
[(SpliceListIntoStack!? op)
|
||||
|
|
|
@ -486,7 +486,7 @@ EOF
|
|||
"M.c.push(new RT.Frame());"]
|
||||
|
||||
[(PushControlFrame/Call? stmt)
|
||||
(format "M.c.push(new RT.CallFrame(~a,M.proc));"
|
||||
(format "M.c.push(new RT.CallFrame(~a,M.p));"
|
||||
(let: ([label : (U Symbol LinkedLabel) (PushControlFrame/Call-label stmt)])
|
||||
(cond
|
||||
[(symbol? label)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
// as well as the function being called.
|
||||
var CallFrame = function(label, proc) {
|
||||
this.label = label;
|
||||
this.proc = proc;
|
||||
this.p = proc;
|
||||
|
||||
// The set of continuation marks.
|
||||
this.marks = [];
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
|
||||
var oldVal = MACHINE.val;
|
||||
var oldArgcount = MACHINE.a;
|
||||
var oldProc = MACHINE.proc;
|
||||
var oldProc = MACHINE.p;
|
||||
|
||||
var oldErrorHandler = MACHINE.params['currentErrorHandler'];
|
||||
var afterGoodInvoke = function (MACHINE) {
|
||||
|
@ -160,7 +160,7 @@
|
|||
var returnValue = MACHINE.val;
|
||||
MACHINE.val = oldVal;
|
||||
MACHINE.a = oldArgcount;
|
||||
MACHINE.proc = oldProc;
|
||||
MACHINE.p = oldProc;
|
||||
succ(returnValue);
|
||||
});
|
||||
};
|
||||
|
@ -174,7 +174,7 @@
|
|||
}
|
||||
MACHINE.val = oldVal;
|
||||
MACHINE.a = oldArgcount;
|
||||
MACHINE.proc = oldProc;
|
||||
MACHINE.p = oldProc;
|
||||
succ.apply(null, returnValues);
|
||||
});
|
||||
};
|
||||
|
@ -186,12 +186,12 @@
|
|||
for (i = 0; i < arguments.length - 2; i++) {
|
||||
MACHINE.e.push(arguments[arguments.length - 1 - i]);
|
||||
}
|
||||
MACHINE.proc = v;
|
||||
MACHINE.p = v;
|
||||
MACHINE.params['currentErrorHandler'] = function (MACHINE, e) {
|
||||
MACHINE.params['currentErrorHandler'] = oldErrorHandler;
|
||||
MACHINE.val = oldVal;
|
||||
MACHINE.a = oldArgcount;
|
||||
MACHINE.proc = oldProc;
|
||||
MACHINE.p = oldProc;
|
||||
fail(e);
|
||||
};
|
||||
MACHINE.trampoline(v.label);
|
||||
|
@ -248,7 +248,7 @@
|
|||
} else if (isClosure(proc)) {
|
||||
oldVal = MACHINE.val;
|
||||
oldArgcount = MACHINE.a;
|
||||
oldProc = MACHINE.proc;
|
||||
oldProc = MACHINE.p;
|
||||
|
||||
oldErrorHandler = MACHINE.params['currentErrorHandler'];
|
||||
var afterGoodInvoke = function (MACHINE) {
|
||||
|
@ -257,7 +257,7 @@
|
|||
var returnValue = MACHINE.val;
|
||||
MACHINE.val = oldVal;
|
||||
MACHINE.a = oldArgcount;
|
||||
MACHINE.proc = oldProc;
|
||||
MACHINE.p = oldProc;
|
||||
success(returnValue);
|
||||
});
|
||||
};
|
||||
|
@ -271,7 +271,7 @@
|
|||
}
|
||||
MACHINE.val = oldVal;
|
||||
MACHINE.a = oldArgcount;
|
||||
MACHINE.proc = oldProc;
|
||||
MACHINE.p = oldProc;
|
||||
success.apply(null, returnValues);
|
||||
});
|
||||
};
|
||||
|
@ -282,12 +282,12 @@
|
|||
for (i = 0; i < arguments.length - 4; i++) {
|
||||
MACHINE.e.push(arguments[arguments.length - 1 - i]);
|
||||
}
|
||||
MACHINE.proc = proc;
|
||||
MACHINE.p = proc;
|
||||
MACHINE.params['currentErrorHandler'] = function (MACHINE, e) {
|
||||
MACHINE.params['currentErrorHandler'] = oldErrorHandler;
|
||||
MACHINE.val = oldVal;
|
||||
MACHINE.a = oldArgcount;
|
||||
MACHINE.proc = oldProc;
|
||||
MACHINE.p = oldProc;
|
||||
fail(e);
|
||||
};
|
||||
MACHINE.trampoline(proc.label);
|
||||
|
|
|
@ -1150,7 +1150,7 @@
|
|||
checkList(M, 'apply', M.a - 1);
|
||||
M.spliceListIntoStack(M.a - 1);
|
||||
if (baselib.arity.isArityMatching(proc.racketArity, M.a)) {
|
||||
M.proc = proc;
|
||||
M.p = proc;
|
||||
if (baselib.functions.isPrimitiveProcedure(proc)) {
|
||||
return finalizeClosureCall(M, proc(M));
|
||||
} else {
|
||||
|
|
|
@ -213,7 +213,7 @@
|
|||
var Machine = function() {
|
||||
this.cbt = STACK_LIMIT_ESTIMATE; // calls before trampoline
|
||||
this.val = undefined; // value register
|
||||
this.proc = undefined; // procedure register
|
||||
this.p = undefined; // procedure register
|
||||
this.a = undefined; // argument count
|
||||
this.e = []; // environment
|
||||
this.c = []; // control: Arrayof (U Frame CallFrame PromptFrame)
|
||||
|
@ -384,8 +384,8 @@
|
|||
|
||||
if (tracedCalleeKey !== null &&
|
||||
control[i] instanceof CallFrame &&
|
||||
control[i].proc !== null) {
|
||||
kvLists.push([[tracedCalleeKey, control[i].proc]]);
|
||||
control[i].p !== null) {
|
||||
kvLists.push([[tracedCalleeKey, control[i].p]]);
|
||||
}
|
||||
}
|
||||
return new baselib.contmarks.ContinuationMarkSet(kvLists);
|
||||
|
@ -656,11 +656,11 @@
|
|||
|
||||
|
||||
var checkClosureAndArity = function(M) {
|
||||
if(!(M.proc instanceof Closure)){
|
||||
raiseOperatorIsNotClosure(M,M.proc);
|
||||
if(!(M.p instanceof Closure)){
|
||||
raiseOperatorIsNotClosure(M,M.p);
|
||||
}
|
||||
if(!isArityMatching(M.proc.racketArity,M.a)) {
|
||||
raiseArityMismatchError(M, M.proc,M.a);
|
||||
if(!isArityMatching(M.p.racketArity,M.a)) {
|
||||
raiseArityMismatchError(M,M.p,M.a);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user