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:
rogerl%netscape.com
2000-06-14 23:28:38 +00:00
parent 13c4b90ec8
commit 4be5f4c80d
2 changed files with 2 additions and 0 deletions

View File

@@ -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);