ref: 424f7161be70d3e19938430d6281dedbec4d27ac
parent: fdd94dc5ddb48d9998a33e4154fa76a11be3515e
author: Tor Andersson <[email protected]>
date: Wed Jan 22 10:17:17 EST 2014
Remove incorrect eval result hack.
--- a/jsparse.c
+++ b/jsparse.c
@@ -945,24 +945,13 @@
js_Ast *jsP_parse(js_State *J, const char *filename, const char *source)
{
- js_Ast *p, *last;
+ js_Ast *p;
jsY_initlex(J, filename, source);
-
next(J);
p = script(J);
-
if (p)
jsP_foldconst(p);
-
- /* patch up global and eval code to return value of last expression */
- last = p;
- if (last) {
- while (last->b)
- last = last->b;
- if (last->a->type >= AST_IDENTIFIER && last->a->type < STM_BLOCK)
- last->a = STM1(RETURN, last->a);
- }
return p;
}