mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
1. Fix !JS_THREADED_INTERP bugs in BRANCH and recording switch case generation.
2. Rename TraceRecorder op methods to record_JSOP_xxx to avoid shadowing JSOP_* enumerators used inside jsopcode.h macros -- death to ::JSOP_*! 3. Added atoms TraceRecorder member for giant literal pool scripts. 4. Condition assert in TraceRecorder::test_property_cache_direct_slot to avoid false positive when executing function code accessing a global.
This commit is contained in:
parent
3cd4d74f76
commit
a17263a036
@ -2758,7 +2758,8 @@ js_Interpret(JSContext *cx)
|
||||
MONITOR_BRANCH(); \
|
||||
CHECK_BRANCH(); \
|
||||
} \
|
||||
DO_NEXT_OP(0); \
|
||||
op = (JSOp) *regs.pc; \
|
||||
DO_OP(); \
|
||||
JS_END_MACRO
|
||||
|
||||
/*
|
||||
@ -6903,20 +6904,20 @@ js_Interpret(JSContext *cx)
|
||||
|
||||
#ifdef JS_TRACER
|
||||
|
||||
#define RECORD(x) \
|
||||
JS_BEGIN_MACRO \
|
||||
if (!JS_TRACE_MONITOR(cx).recorder->x()) { \
|
||||
js_AbortRecording(cx, #x); \
|
||||
ENABLE_TRACER(0); \
|
||||
} \
|
||||
#define RECORD(x) \
|
||||
JS_BEGIN_MACRO \
|
||||
if (!JS_TRACE_MONITOR(cx).recorder->record_##x()) { \
|
||||
js_AbortRecording(cx, #x); \
|
||||
ENABLE_TRACER(0); \
|
||||
} \
|
||||
JS_END_MACRO
|
||||
|
||||
#if JS_THREADED_INTERP
|
||||
# define OPDEF(x,val,name,token,length,nuses,ndefs,prec,format) \
|
||||
# define OPDEF(x,val,name,token,length,nuses,ndefs,prec,format) \
|
||||
R_##x: RECORD(x); goto L_##x;
|
||||
#else
|
||||
# define OPDEF(x,val,name,token,length,nuses,ndefs,prec,format) \
|
||||
x: RECORD(x); op = (JSOp)((uintN)op - 256); goto do_op;
|
||||
# define OPDEF(x,val,name,token,length,nuses,ndefs,prec,format) \
|
||||
case 256 + x: RECORD(x); op = x; goto do_op;
|
||||
#endif
|
||||
#include "jsopcode.tbl"
|
||||
#undef OPDEF
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -112,6 +112,7 @@ class TraceRecorder {
|
||||
char* entryTypeMap;
|
||||
struct JSStackFrame* entryFrame;
|
||||
struct JSFrameRegs entryRegs;
|
||||
JSAtom** atoms;
|
||||
nanojit::Fragment* fragment;
|
||||
VMFragmentInfo* fragmentInfo;
|
||||
nanojit::LirBuffer* lirbuf;
|
||||
@ -207,7 +208,7 @@ public:
|
||||
void stop();
|
||||
|
||||
#define OPDEF(op,val,name,token,length,nuses,ndefs,prec,format) \
|
||||
bool op();
|
||||
bool record_##op();
|
||||
# include "jsopcode.tbl"
|
||||
#undef OPDEF
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user