Add very preliminary nesting for trees. This is disabled by default. To enable set TRACEMONKEY=nesting in the environment.

This commit is contained in:
Andreas Gal
2008-08-08 15:26:31 -07:00
parent 5adaa97018
commit 84a8dc97f7
5 changed files with 59 additions and 37 deletions

View File

@@ -303,20 +303,13 @@ builtin_CloseIterator(JSContext* cx, jsval v)
}
GuardRecord* FASTCALL
builtin_CallTree(InterpState* outer, Fragment* f)
builtin_CallTree(InterpState* state, Fragment* f)
{
/* current we can't deal with inner trees that have globals so report an error */
if (((TreeInfo*)f->vmprivate)->globalSlots.length())
return NULL;
InterpState state;
state.ip = f->ip;
state.sp = outer->sp;
state.rp = outer->rp;
state.gp = outer->gp;
state.cx = outer->cx;
JS_ASSERT(!((TreeInfo*)f->vmprivate)->globalSlots.length());
union { NIns *code; GuardRecord* (FASTCALL *func)(InterpState*, Fragment*); } u;
u.code = f->code();
return u.func(&state, NULL);
return u.func(state, NULL);
}
#define LO ARGSIZE_LO