Add CallTree builtin.
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#include "nanojit/avmplus.h"
|
||||
#include "nanojit/nanojit.h"
|
||||
|
||||
using namespace avmplus;
|
||||
using namespace nanojit;
|
||||
|
||||
jsdouble FASTCALL builtin_dmod(jsdouble a, jsdouble b)
|
||||
@@ -301,6 +302,20 @@ builtin_CloseIterator(JSContext* cx, jsval v)
|
||||
return js_CloseIterator(cx, v);
|
||||
}
|
||||
|
||||
GuardRecord* FASTCALL
|
||||
builtin_CallTree(InterpState* outer, Fragment* f)
|
||||
{
|
||||
InterpState state;
|
||||
state.ip = f->ip;
|
||||
state.sp = outer->sp;
|
||||
state.rp = outer->rp;
|
||||
state.gp = outer->gp;
|
||||
state.cx = outer->cx;
|
||||
union { NIns *code; GuardRecord* (FASTCALL *func)(InterpState*, Fragment*); } u;
|
||||
u.code = f->code();
|
||||
return u.func(&state, NULL);
|
||||
}
|
||||
|
||||
#define LO ARGSIZE_LO
|
||||
#define F ARGSIZE_F
|
||||
#define Q ARGSIZE_Q
|
||||
|
||||
Reference in New Issue
Block a user