Ported built-in exception getter to new calling convention
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 14 Feb 2013 15:04:15 +0000 (16:04 +0100)
committerLars Knoll <lars.knoll@digia.com>
Thu, 14 Feb 2013 19:29:14 +0000 (20:29 +0100)
Change-Id: Ica14229cfa280afba2003b3b50930c2986aa2f23
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/v4/llvm_runtime.cpp
src/v4/moth/qv4vme_moth.cpp
src/v4/qmljs_runtime.cpp
src/v4/qmljs_runtime.h
src/v4/qv4isel_masm.cpp

index 36b10db..50fc220 100644 (file)
@@ -486,7 +486,7 @@ void __qmljs_llvm_delete_exception_handler(ExecutionContext *context)
 
 void __qmljs_llvm_get_exception(ExecutionContext *context, Value *result)
 {
-    *result = __qmljs_get_exception(context);
+    __qmljs_get_exception(context, result);
 }
 
 void __qmljs_llvm_foreach_iterator_object(ExecutionContext *context, Value *result, Value *in)
index f26af33..5d62d4d 100644 (file)
@@ -276,7 +276,7 @@ VM::Value VME::operator()(QQmlJS::VM::ExecutionContext *context, const uchar *co
     MOTH_END_INSTR(CallBuiltinDeleteExceptionHandler)
 
     MOTH_BEGIN_INSTR(CallBuiltinGetException)
-        VALUE(instr.result) = __qmljs_get_exception(context);
+        __qmljs_get_exception(context, VALUEPTR(instr.result));
     MOTH_END_INSTR(CallBuiltinGetException)
 
     MOTH_BEGIN_INSTR(CallBuiltinPushScope)
index 733f165..b8625bb 100644 (file)
@@ -1013,9 +1013,9 @@ void __qmljs_delete_exception_handler(ExecutionContext *context)
     context->engine->unwindStack.pop_back();
 }
 
-Value __qmljs_get_exception(ExecutionContext *context)
+void __qmljs_get_exception(ExecutionContext *context, Value *result)
 {
-    return context->engine->exception;
+    *result = context->engine->exception;
 }
 
 void __qmljs_builtin_typeof(ExecutionContext *ctx, Value *result, const Value &value)
index 503a987..2d7fe89 100644 (file)
@@ -217,7 +217,7 @@ void __qmljs_throw(Value value, ExecutionContext *context);
 // actually returns a jmp_buf *
 Q_V4_EXPORT void *__qmljs_create_exception_handler(ExecutionContext *context);
 void __qmljs_delete_exception_handler(ExecutionContext *context);
-Value __qmljs_get_exception(ExecutionContext *context);
+void __qmljs_get_exception(ExecutionContext *context, Value *result);
 
 // binary operators
 typedef void (*BinOp)(ExecutionContext *ctx, Value *result, const Value &left, const Value &right);
index 29fbf37..f304074 100644 (file)
@@ -591,7 +591,7 @@ void InstructionSelection::callBuiltinDeleteExceptionHandler()
 
 void InstructionSelection::callBuiltinGetException(IR::Temp *result)
 {
-    generateFunctionCall(result, __qmljs_get_exception, Assembler::ContextRegister);
+    generateFunctionCall(Assembler::Void, __qmljs_get_exception, Assembler::ContextRegister, Assembler::PointerToValue(result));
 }
 
 void InstructionSelection::callBuiltinForeachIteratorObject(IR::Temp *arg, IR::Temp *result)