mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add generic recorder hooks that are called before and after all opcodes as we trace. We might want to instead just move to pre_OP and post_OP.
This commit is contained in:
parent
dd7be4a81c
commit
db7e41ed40
@ -6905,7 +6905,8 @@ js_Interpret(JSContext *cx)
|
||||
|
||||
#define RECORD(x) \
|
||||
JS_BEGIN_MACRO \
|
||||
if (!JS_TRACE_MONITOR(cx).recorder->record_##x()) { \
|
||||
TraceRecorder* r = JS_TRACE_MONITOR(cx).recorder; \
|
||||
if (!r->before_OP(x) || !r->record_##x() || !r->after_OP(x)) { \
|
||||
js_AbortRecording(cx, #x); \
|
||||
ENABLE_TRACER(0); \
|
||||
} \
|
||||
|
@ -3002,3 +3002,13 @@ bool TraceRecorder::record_JSOP_HOLE()
|
||||
stack(0, lir->insImm(JSVAL_HOLE));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TraceRecorder::before_OP(jsbytecode op)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TraceRecorder::after_OP(jsbytecode op)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -211,6 +211,9 @@ public:
|
||||
bool loopEdge();
|
||||
void stop();
|
||||
|
||||
bool before_OP(jsbytecode op);
|
||||
bool after_OP(jsbytecode op);
|
||||
|
||||
#define OPDEF(op,val,name,token,length,nuses,ndefs,prec,format) \
|
||||
bool record_##op();
|
||||
# include "jsopcode.tbl"
|
||||
|
Loading…
Reference in New Issue
Block a user