Mercurial > urweb
diff src/c/urweb.c @ 970:8371d12ae63f
Hopefully complete refactoring of Jscomp to output ASTs; partial implementation of interpreter in runtime system (demo/alert works)
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 22 Sep 2009 12:23:21 -0400 |
parents | 53b9aeac676c |
children | 733f67bb64e7 |
line wrap: on
line diff
--- a/src/c/urweb.c Tue Sep 22 09:53:05 2009 -0400 +++ b/src/c/urweb.c Tue Sep 22 12:23:21 2009 -0400 @@ -1286,12 +1286,12 @@ 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 @@ 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;