fixing bug in the assembler; it didn't see the target from PushControlFrame
This commit is contained in:
parent
4a60a852e7
commit
55d84eec95
|
@ -171,7 +171,7 @@ EOF
|
|||
[(PopEnvironment? stmt)
|
||||
empty]
|
||||
[(PushControlFrame? stmt)
|
||||
empty]
|
||||
(list (PushControlFrame-label stmt))]
|
||||
[(PopControlFrame? stmt)
|
||||
empty])
|
||||
(loop (rest stmts))))]))))
|
||||
|
|
|
@ -99,6 +99,14 @@ var Primitives = (function() {
|
|||
'null?': function(arity, returnLabel) {
|
||||
var firstArg = MACHINE.env[MACHINE.env.length-1];
|
||||
return firstArg === NULL;
|
||||
},
|
||||
'add1': function(arity, returnLabel) {
|
||||
var firstArg = MACHINE.env[MACHINE.env.length-1];
|
||||
return firstArg + 1;
|
||||
},
|
||||
'sub1': function(arity, returnLabel) {
|
||||
var firstArg = MACHINE.env[MACHINE.env.length-1];
|
||||
return firstArg - 1;
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue
Block a user