diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-11 16:07:54 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-11-12 12:13:54 +0100 |
commit | 9bad6eea0f30f6a6c1878c2773dc39071cb41584 (patch) | |
tree | 2306235d1db4f4abce697de2564a935229517bfd /src/qml/jit/qv4assembler_p.h | |
parent | 345a5ee67bf80f7c18869fe080bf7dd7cf4a0d90 (diff) |
Change signature or runtime methods to take an engine pointer
This makes a lot more sense in the long term and is the
more maintainable solution, once the GC starts moving
objects around in memory
Change-Id: I8f327c0f5b5b0af38c5fe1a217852ee8c4a5c2fc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jit/qv4assembler_p.h')
-rw-r--r-- | src/qml/jit/qv4assembler_p.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h index 1de7da37b4..a4105550c6 100644 --- a/src/qml/jit/qv4assembler_p.h +++ b/src/qml/jit/qv4assembler_p.h @@ -101,27 +101,27 @@ struct ExceptionCheck { }; // push_catch and pop context methods shouldn't check for exceptions template <> -struct ExceptionCheck<QV4::ExecutionContext *(*)(QV4::ExecutionContext *)> { +struct ExceptionCheck<void (*)(QV4::ExecutionEngine *)> { enum { NeedsCheck = 0 }; }; template <typename A> -struct ExceptionCheck<QV4::ExecutionContext *(*)(QV4::ExecutionContext *, A)> { +struct ExceptionCheck<void (*)(A, QV4::NoThrowEngine)> { enum { NeedsCheck = 0 }; }; template <> -struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowContext *)> { +struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowEngine *)> { enum { NeedsCheck = 0 }; }; template <typename A> -struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowContext *, A)> { +struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowEngine *, A)> { enum { NeedsCheck = 0 }; }; template <typename A, typename B> -struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowContext *, A, B)> { +struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowEngine *, A, B)> { enum { NeedsCheck = 0 }; }; template <typename A, typename B, typename C> -struct ExceptionCheck<void (*)(QV4::NoThrowContext *, A, B, C)> { +struct ExceptionCheck<void (*)(QV4::NoThrowEngine *, A, B, C)> { enum { NeedsCheck = 0 }; }; @@ -797,8 +797,7 @@ public: const RegisterInformation &fpRegistersToSave); void checkException() { - loadPtr(Address(ContextRegister, qOffsetOf(QV4::Heap::ExecutionContext, engine)), ScratchRegister); - load32(Address(ScratchRegister, qOffsetOf(QV4::ExecutionEngine, hasException)), ScratchRegister); + load32(Address(EngineRegister, qOffsetOf(QV4::ExecutionEngine, hasException)), ScratchRegister); Jump exceptionThrown = branch32(NotEqual, ScratchRegister, TrustedImm32(0)); if (catchBlock) addPatch(catchBlock, exceptionThrown); @@ -1226,7 +1225,8 @@ template <typename T> inline bool prepareCall(T &, Assembler *) template <> inline bool prepareCall(RelativeCall &relativeCall, Assembler *as) { - as->loadPtr(Assembler::Address(Assembler::ContextRegister, qOffsetOf(QV4::Heap::ExecutionContext, lookups)), + as->loadPtr(Assembler::Address(Assembler::EngineRegister, qOffsetOf(QV4::ExecutionEngine, current)), Assembler::ScratchRegister); + as->loadPtr(Assembler::Address(Assembler::ScratchRegister, qOffsetOf(QV4::Heap::ExecutionContext, lookups)), relativeCall.addr.base); return true; } @@ -1236,7 +1236,8 @@ template <> inline bool prepareCall(LookupCall &lookupCall, Assembler *as) // IMPORTANT! See generateLookupCall in qv4isel_masm_p.h for details! // same as prepareCall(RelativeCall ....) : load the table from the context - as->loadPtr(Assembler::Address(Assembler::ContextRegister, qOffsetOf(QV4::Heap::ExecutionContext, lookups)), + as->loadPtr(Assembler::Address(Assembler::EngineRegister, qOffsetOf(QV4::ExecutionEngine, current)), Assembler::ScratchRegister); + as->loadPtr(Assembler::Address(Assembler::ScratchRegister, qOffsetOf(QV4::Heap::ExecutionContext, lookups)), lookupCall.addr.base); // pre-calculate the indirect address for the lookupCall table: if (lookupCall.addr.offset) |