mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1093573 part 5 - Baseline-compile JSOP_GENERATOR. r=wingo
This commit is contained in:
parent
41cf2228a5
commit
60aac04766
@ -3235,3 +3235,24 @@ BaselineCompiler::emit_JSOP_REST()
|
||||
frame.push(R0);
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef JSObject *(*CreateGeneratorFn)(JSContext *, BaselineFrame *);
|
||||
static const VMFunction CreateGeneratorInfo = FunctionInfo<CreateGeneratorFn>(jit::CreateGenerator);
|
||||
|
||||
bool
|
||||
BaselineCompiler::emit_JSOP_GENERATOR()
|
||||
{
|
||||
MOZ_ASSERT(frame.stackDepth() == 0);
|
||||
|
||||
masm.loadBaselineFramePtr(BaselineFrameReg, R0.scratchReg());
|
||||
|
||||
prepareVMCall();
|
||||
pushArg(R0.scratchReg());
|
||||
if (!callVM(CreateGeneratorInfo))
|
||||
return false;
|
||||
|
||||
masm.tagValue(JSVAL_TYPE_OBJECT, ReturnReg, R0);
|
||||
frame.push(R0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -173,6 +173,7 @@ namespace jit {
|
||||
_(JSOP_MOREITER) \
|
||||
_(JSOP_ISNOITER) \
|
||||
_(JSOP_ENDITER) \
|
||||
_(JSOP_GENERATOR) \
|
||||
_(JSOP_CALLEE) \
|
||||
_(JSOP_SETRVAL) \
|
||||
_(JSOP_RETRVAL) \
|
||||
|
@ -829,6 +829,12 @@ DebugEpilogue(JSContext *cx, BaselineFrame *frame, jsbytecode *pc, bool ok)
|
||||
return ok;
|
||||
}
|
||||
|
||||
JSObject *
|
||||
CreateGenerator(JSContext *cx, BaselineFrame *frame)
|
||||
{
|
||||
return GeneratorObject::create(cx, frame);
|
||||
}
|
||||
|
||||
bool
|
||||
StrictEvalPrologue(JSContext *cx, BaselineFrame *frame)
|
||||
{
|
||||
|
@ -706,6 +706,8 @@ bool DebugPrologue(JSContext *cx, BaselineFrame *frame, jsbytecode *pc, bool *mu
|
||||
bool DebugEpilogue(JSContext *cx, BaselineFrame *frame, jsbytecode *pc, bool ok);
|
||||
bool DebugEpilogueOnBaselineReturn(JSContext *cx, BaselineFrame *frame, jsbytecode *pc);
|
||||
|
||||
JSObject *CreateGenerator(JSContext *cx, BaselineFrame *frame);
|
||||
|
||||
bool StrictEvalPrologue(JSContext *cx, BaselineFrame *frame);
|
||||
bool HeavyweightFunPrologue(JSContext *cx, BaselineFrame *frame);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user