зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1171945: IonMonkey - Part 5: Make it possible to use BaselineDebugMode in ionmonkey context, r=jandem
This commit is contained in:
Родитель
28cddc291c
Коммит
bcce8e03e1
|
@ -41,18 +41,30 @@ namespace jit {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class DebugModeOSRVolatileStub
|
class DebugModeOSRVolatileStub
|
||||||
{
|
{
|
||||||
|
ICStubCompiler::Engine engine_;
|
||||||
T stub_;
|
T stub_;
|
||||||
BaselineFrame* frame_;
|
BaselineFrame* frame_;
|
||||||
uint32_t pcOffset_;
|
uint32_t pcOffset_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
DebugModeOSRVolatileStub(ICStubCompiler::Engine engine, BaselineFrame* frame,
|
||||||
|
ICFallbackStub* stub)
|
||||||
|
: engine_(engine),
|
||||||
|
stub_(static_cast<T>(stub)),
|
||||||
|
frame_(frame),
|
||||||
|
pcOffset_(stub->icEntry()->pcOffset())
|
||||||
|
{ }
|
||||||
|
|
||||||
DebugModeOSRVolatileStub(BaselineFrame* frame, ICFallbackStub* stub)
|
DebugModeOSRVolatileStub(BaselineFrame* frame, ICFallbackStub* stub)
|
||||||
: stub_(static_cast<T>(stub)),
|
: engine_(ICStubCompiler::Engine::Baseline),
|
||||||
|
stub_(static_cast<T>(stub)),
|
||||||
frame_(frame),
|
frame_(frame),
|
||||||
pcOffset_(stub->icEntry()->pcOffset())
|
pcOffset_(stub->icEntry()->pcOffset())
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
bool invalid() const {
|
bool invalid() const {
|
||||||
|
if (engine_ == ICStubCompiler::Engine::IonMonkey)
|
||||||
|
return false;
|
||||||
MOZ_ASSERT(!frame_->isHandlingException());
|
MOZ_ASSERT(!frame_->isHandlingException());
|
||||||
ICEntry& entry = frame_->script()->baselineScript()->icEntryFromPCOffset(pcOffset_);
|
ICEntry& entry = frame_->script()->baselineScript()->icEntryFromPCOffset(pcOffset_);
|
||||||
return stub_ != entry.fallbackStub();
|
return stub_ != entry.fallbackStub();
|
||||||
|
|
|
@ -861,7 +861,7 @@ DoBinaryArithFallback(JSContext* cx, BaselineFrame* frame, ICBinaryArith_Fallbac
|
||||||
RootedScript script(cx, SharedStubScript(frame, stub_));
|
RootedScript script(cx, SharedStubScript(frame, stub_));
|
||||||
|
|
||||||
// This fallback stub may trigger debug mode toggling.
|
// This fallback stub may trigger debug mode toggling.
|
||||||
DebugModeOSRVolatileStub<ICBinaryArith_Fallback*> stub(frame, stub_);
|
DebugModeOSRVolatileStub<ICBinaryArith_Fallback*> stub(engine, frame, stub_);
|
||||||
|
|
||||||
jsbytecode* pc = stub->icEntry()->pc(script);
|
jsbytecode* pc = stub->icEntry()->pc(script);
|
||||||
JSOp op = JSOp(*pc);
|
JSOp op = JSOp(*pc);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче