renamed val to v

This commit is contained in:
Danny Yoo 2011-09-15 00:03:24 -04:00
parent a107d83827
commit 7de6e18d3f
4 changed files with 19 additions and 19 deletions

View File

@ -85,7 +85,7 @@
[(eq? target 'proc)
"M.p"]
[(eq? target 'val)
"M.val"]
"M.v"]
[(eq? target 'argcount)
"M.a"]
[(EnvLexicalReference? target)
@ -281,7 +281,7 @@
[(eq? name 'proc)
"M.p"]
[(eq? name 'val)
"M.val"]
"M.v"]
[(eq? name 'argcount)
"M.a"])))

View File

@ -113,7 +113,7 @@
[(InstallContinuationMarkEntry!? op)
(string-append "M.installContinuationMarkEntry("
"M.c[M.c.length-1].pendingContinuationMarkKey,"
"M.val);")]
"M.v);")]
[(RaiseContextExpectedValuesError!? op)
(format "RT.raiseContextExpectedValuesError(M,~a);"

View File

@ -68,14 +68,14 @@
MACHINE.e.length -= MACHINE.a;
if (returnArgs.length === 1) {
MACHINE.val = returnArgs[0];
MACHINE.v = returnArgs[0];
return MACHINE.c.pop().label(MACHINE);
} else if (returnArgs.length === 0) {
MACHINE.a = 0;
return MACHINE.c.pop().label.mvr(MACHINE);
} else {
MACHINE.a = returnArgs.length;
MACHINE.val = returnArgs.shift();
MACHINE.v = returnArgs.shift();
MACHINE.e.push.apply(MACHINE.e, returnArgs.reverse());
return MACHINE.c.pop().label.mvr(MACHINE);
}
@ -148,7 +148,7 @@
MACHINE.captureContinuationMarks())));
}
var oldVal = MACHINE.val;
var oldVal = MACHINE.v;
var oldArgcount = MACHINE.a;
var oldProc = MACHINE.p;
@ -157,8 +157,8 @@
plt.runtime.PAUSE(
function (restart) {
MACHINE.params['currentErrorHandler'] = oldErrorHandler;
var returnValue = MACHINE.val;
MACHINE.val = oldVal;
var returnValue = MACHINE.v;
MACHINE.v = oldVal;
MACHINE.a = oldArgcount;
MACHINE.p = oldProc;
succ(returnValue);
@ -168,11 +168,11 @@
plt.runtime.PAUSE(
function (restart) {
MACHINE.params['currentErrorHandler'] = oldErrorHandler;
var returnValues = [MACHINE.val], i;
var returnValues = [MACHINE.v], i;
for (i = 0; i < MACHINE.a - 1; i++) {
returnValues.push(MACHINE.e.pop());
}
MACHINE.val = oldVal;
MACHINE.v = oldVal;
MACHINE.a = oldArgcount;
MACHINE.p = oldProc;
succ.apply(null, returnValues);
@ -189,7 +189,7 @@
MACHINE.p = v;
MACHINE.params['currentErrorHandler'] = function (MACHINE, e) {
MACHINE.params['currentErrorHandler'] = oldErrorHandler;
MACHINE.val = oldVal;
MACHINE.v = oldVal;
MACHINE.a = oldArgcount;
MACHINE.p = oldProc;
fail(e);
@ -246,7 +246,7 @@
}
success(result);
} else if (isClosure(proc)) {
oldVal = MACHINE.val;
oldVal = MACHINE.v;
oldArgcount = MACHINE.a;
oldProc = MACHINE.p;
@ -254,8 +254,8 @@
var afterGoodInvoke = function (MACHINE) {
plt.runtime.PAUSE(function (restart) {
MACHINE.params['currentErrorHandler'] = oldErrorHandler;
var returnValue = MACHINE.val;
MACHINE.val = oldVal;
var returnValue = MACHINE.v;
MACHINE.v = oldVal;
MACHINE.a = oldArgcount;
MACHINE.p = oldProc;
success(returnValue);
@ -264,12 +264,12 @@
afterGoodInvoke.mvr = function (MACHINE) {
plt.runtime.PAUSE(function (restart) {
MACHINE.params['currentErrorHandler'] = oldErrorHandler;
var returnValues = [MACHINE.val];
var returnValues = [MACHINE.v];
var i;
for (i = 0; i < MACHINE.a - 1; i++) {
returnValues.push(MACHINE.e.pop());
}
MACHINE.val = oldVal;
MACHINE.v = oldVal;
MACHINE.a = oldArgcount;
MACHINE.p = oldProc;
success.apply(null, returnValues);
@ -285,7 +285,7 @@
MACHINE.p = proc;
MACHINE.params['currentErrorHandler'] = function (MACHINE, e) {
MACHINE.params['currentErrorHandler'] = oldErrorHandler;
MACHINE.val = oldVal;
MACHINE.v = oldVal;
MACHINE.a = oldArgcount;
MACHINE.p = oldProc;
fail(e);
@ -324,7 +324,7 @@
arity,
function(M) {
--M.cbt;
M.val = f(M);
M.v = f(M);
M.e.length -= M.a;
return M.c.pop().label(M);
},

View File

@ -212,7 +212,7 @@
var Machine = function() {
this.cbt = STACK_LIMIT_ESTIMATE; // calls before trampoline
this.val = undefined; // value register
this.v = undefined; // value register
this.p = undefined; // procedure register
this.a = undefined; // argument count
this.e = []; // environment