diff options
author | 2009-09-22 12:23:21 -0400 | |
---|---|---|
committer | 2009-09-22 12:23:21 -0400 | |
commit | cd9a791612f456a9ba679b6848cf58f81665ac10 (patch) | |
tree | d6335ce5fefb5a16ea33ad1fe8316ea38ae06e22 /src/c/urweb.c | |
parent | 70423cce32b060fd58212422082fd4f9e89105b0 (diff) |
Hopefully complete refactoring of Jscomp to output ASTs; partial implementation of interpreter in runtime system (demo/alert works)
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r-- | src/c/urweb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index cd33a790..855841e1 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -1286,12 +1286,12 @@ uw_Basis_int uw_Basis_new_client_source(uw_context ctx, uw_Basis_string s) { int len; size_t s_len = strlen(s); - uw_check_script(ctx, 12 + INTS_MAX + s_len); - sprintf(ctx->script.front, "var s%d=sc(%n", ctx->source_count, &len); + uw_check_script(ctx, 18 + INTS_MAX + s_len); + sprintf(ctx->script.front, "var s%d=sc(exec(%n", ctx->source_count, &len); ctx->script.front += len; strcpy(ctx->script.front, s); ctx->script.front += s_len; - strcpy(ctx->script.front, ");"); + strcpy(ctx->script.front, "));"); ctx->script.front += 2; return ctx->source_count++; @@ -1301,12 +1301,12 @@ uw_unit uw_Basis_set_client_source(uw_context ctx, uw_Basis_int n, uw_Basis_stri int len; size_t s_len = strlen(s); - uw_check_script(ctx, 6 + INTS_MAX + s_len); - sprintf(ctx->script.front, "sv(s%d,%n", (int)n, &len); + uw_check_script(ctx, 12 + INTS_MAX + s_len); + sprintf(ctx->script.front, "sv(s%d,exec(%n", (int)n, &len); ctx->script.front += len; strcpy(ctx->script.front, s); ctx->script.front += s_len; - strcpy(ctx->script.front, ");"); + strcpy(ctx->script.front, "));"); ctx->script.front += 2; return uw_unit_v; |