Mark top-level execution as 'script' rather than function - to handle
vars correctly. git-svn-id: svn://10.0.0.236/trunk@72249 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -102,6 +102,7 @@ static JSValue print(const JSValues &argv)
|
||||
static void genCode(World &world, Context &cx, StmtNode *p)
|
||||
{
|
||||
ICodeGenerator icg(&world);
|
||||
icg.isScript();
|
||||
Register ret = NotARegister;
|
||||
while (p) {
|
||||
ret = icg.genStmt(p);
|
||||
|
||||
Reference in New Issue
Block a user