diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-05 14:01:34 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-05 14:01:34 -0500 |
commit | 6b9b07746ffdd3e3cec6e81287f1334038a41092 (patch) | |
tree | 27acc16bb8d3b12293fbbae8b833d7ff2e731aa9 /lib/js | |
parent | 97c20e02541006584c5c2da552dffce23ef18f38 (diff) |
Represent FFI function names as strings, to deal with cross-file recursion
Diffstat (limited to 'lib/js')
-rw-r--r-- | lib/js/urweb.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 98b615c0..863271d9 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -505,6 +505,7 @@ function eh(x) { function ts(x) { return x.toString() } function bs(b) { return (b ? "True" : "False") } +function id(x) { return x; } function sub(s, i) { return s.charAt(i); } function suf(s, i) { return s.substring(i); } function slen(s) { return s.length; } @@ -1049,10 +1050,10 @@ function exec1(env, stack, e) { break; case "f": if (e.a == null) - e = {c: "c", v: e.f()}; + e = {c: "c", v: (eval(e.f))()}; else { var args = []; - stack = cons({c: "f", f: e.f, args: args, pos: 0, a: e.a.next}, stack); + stack = cons({c: "f", f: eval(e.f), args: args, pos: 0, a: e.a.next}, stack); if (!e.a.data.c) alert("[2] fr.f = " + e.f + "; 0 = " + e.a.data); e = e.a.data; } |