More debug info
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 9 Oct 2012 07:06:12 +0000 (09:06 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Tue, 9 Oct 2012 07:06:12 +0000 (09:06 +0200)
qv4isel_masm.cpp
qv4isel_masm_p.h

index b83cac5..7ac0080 100644 (file)
@@ -624,20 +624,20 @@ int InstructionSelection::prepareVariableArguments(IR::ExprList* args)
     return argc;
 }
 
-void InstructionSelection::callRuntimeMethod(ActivationMethod method, IR::Temp *result, IR::Expr *base, IR::ExprList *args)
+void InstructionSelection::callRuntimeMethodImp(const char* name, ActivationMethod method, IR::Temp *result, IR::Expr *base, IR::ExprList *args)
 {
     IR::Name *baseName = base->asName();
     assert(baseName != 0);
 
     int argc = prepareVariableArguments(args);
-    generateFunctionCall(method, ContextRegister, result, identifier(*baseName->id), baseAddressForCallArguments(), TrustedImm32(argc));
+    generateFunctionCallImp(name, method, ContextRegister, result, identifier(*baseName->id), baseAddressForCallArguments(), TrustedImm32(argc));
     checkExceptions();
 }
 
-void InstructionSelection::callRuntimeMethod(BuiltinMethod method, IR::Temp *result, IR::ExprList *args)
+void InstructionSelection::callRuntimeMethodImp(const char* name, BuiltinMethod method, IR::Temp *result, IR::ExprList *args)
 {
     int argc = prepareVariableArguments(args);
-    generateFunctionCall(method, ContextRegister, result, baseAddressForCallArguments(), TrustedImm32(argc));
+    generateFunctionCallImp(name, method, ContextRegister, result, baseAddressForCallArguments(), TrustedImm32(argc));
     checkExceptions();
 }
 
index 20c3647..1b5b7b3 100644 (file)
@@ -221,8 +221,10 @@ private:
 
     typedef void (*ActivationMethod)(VM::Context *, VM::Value *result, VM::String *name, VM::Value *args, int argc);
     typedef void (*BuiltinMethod)(VM::Context *, VM::Value *result, VM::Value *args, int argc);
-    void callRuntimeMethod(ActivationMethod method, IR::Temp *result, IR::Expr *base, IR::ExprList *args);
-    void callRuntimeMethod(BuiltinMethod method, IR::Temp *result, IR::ExprList *args);
+    void callRuntimeMethodImp(const char* name, ActivationMethod method, IR::Temp *result, IR::Expr *base, IR::ExprList *args);
+    void callRuntimeMethodImp(const char* name, BuiltinMethod method, IR::Temp *result, IR::ExprList *args);
+#define callRuntimeMethod(function, ...) \
+    callRuntimeMethodImp(isel_stringIfy(function), function, __VA_ARGS__)
 
     struct CallToLink {
         Call call;