Bug 1171945: IonMonkey - Part 5: Make it possible to use BaselineDebugMode in ionmonkey context, r=jandem

This commit is contained in:
Hannes Verschore 2015-08-19 15:15:55 +02:00
Родитель 28447d2354
Коммит 6cbf77a87c
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -41,18 +41,30 @@ namespace jit {
template <typename T>
class DebugModeOSRVolatileStub
{
ICStubCompiler::Engine engine_;
T stub_;
BaselineFrame* frame_;
uint32_t pcOffset_;
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)
: stub_(static_cast<T>(stub)),
: engine_(ICStubCompiler::Engine::Baseline),
stub_(static_cast<T>(stub)),
frame_(frame),
pcOffset_(stub->icEntry()->pcOffset())
{ }
bool invalid() const {
if (engine_ == ICStubCompiler::Engine::IonMonkey)
return false;
MOZ_ASSERT(!frame_->isHandlingException());
ICEntry& entry = frame_->script()->baselineScript()->icEntryFromPCOffset(pcOffset_);
return stub_ != entry.fallbackStub();

Просмотреть файл

@ -861,7 +861,7 @@ DoBinaryArithFallback(JSContext* cx, BaselineFrame* frame, ICBinaryArith_Fallbac
RootedScript script(cx, SharedStubScript(frame, stub_));
// 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);
JSOp op = JSOp(*pc);