trying to add enough to the web implementation to run conform. Hitting an error that I didn't see in the simulator; investigating
This commit is contained in:
parent
91f244526e
commit
432d850370
22
runtime.js
22
runtime.js
|
@ -185,6 +185,28 @@ var Primitives = (function() {
|
||||||
return typeof(firstArg) === 'string';
|
return typeof(firstArg) === 'string';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'symbol->string': function(arity, returnLabel) {
|
||||||
|
var firstArg = MACHINE.env[MACHINE.env.length-1];
|
||||||
|
return firstArg;
|
||||||
|
},
|
||||||
|
|
||||||
|
'box': function(arity, returnLabel) {
|
||||||
|
var firstArg = MACHINE.env[MACHINE.env.length-1];
|
||||||
|
return [firstArg];
|
||||||
|
},
|
||||||
|
|
||||||
|
'set-box!': function(arity, returnLabel) {
|
||||||
|
var firstArg = MACHINE.env[MACHINE.env.length-1];
|
||||||
|
var secondArg = MACHINE.env[MACHINE.env.length-2];
|
||||||
|
firstArg[0] = secondArg;
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
|
||||||
|
'void': function(arity, returnLabel) {
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
'call/cc': new Closure(callCCEntry,
|
'call/cc': new Closure(callCCEntry,
|
||||||
1,
|
1,
|
||||||
[],
|
[],
|
||||||
|
|
|
@ -144,5 +144,5 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#;(test (read (open-input-file "tests/conform/program0.sch"))
|
(test (read (open-input-file "tests/conform/program0.sch"))
|
||||||
(port->string (open-input-file "tests/conform/expected0.txt")))
|
(port->string (open-input-file "tests/conform/expected0.txt")))
|
Loading…
Reference in New Issue
Block a user