aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-03-18 09:12:42 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-19 08:14:50 +0100
commitcfd3eda076e81d56f985c830663ae93317b6ef8b (patch)
treeb46fd616bfbe5170fd65198a561f19d7a5f37c0e /src/qml/jit
parent4606bd668375770b8f9d84b1739c8a17cfc928d7 (diff)
Fixes to for...in statement
Properly convert the argument to an object if it's not null or undefined as mandated by the standard. Add a similar test case for the with statement. Change-Id: Idd8e245e8dae4803eb0e2010e3d43bb912670444 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jit')
-rw-r--r--src/qml/jit/qv4isel_masm.cpp4
-rw-r--r--src/qml/jit/qv4isel_masm_p.h2
-rw-r--r--src/qml/jit/qv4regalloc.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 5e51b84cd5..d30d69e68f 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -474,12 +474,12 @@ void InstructionSelection::callBuiltinPushCatchScope(const QString &exceptionNam
generateFunctionCall(Assembler::ContextRegister, Runtime::pushCatchScope, Assembler::ContextRegister, s);
}
-void InstructionSelection::callBuiltinForeachIteratorObject(IR::Temp *arg, IR::Temp *result)
+void InstructionSelection::callBuiltinForeachIteratorObject(IR::Expr *arg, IR::Temp *result)
{
Q_ASSERT(arg);
Q_ASSERT(result);
- generateFunctionCall(result, Runtime::foreachIterator, Assembler::ContextRegister, Assembler::Reference(arg));
+ generateFunctionCall(result, Runtime::foreachIterator, Assembler::ContextRegister, Assembler::PointerToValue(arg));
}
void InstructionSelection::callBuiltinForeachNextPropertyname(IR::Temp *arg, IR::Temp *result)
diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h
index 62891e4273..0e8db93e85 100644
--- a/src/qml/jit/qv4isel_masm_p.h
+++ b/src/qml/jit/qv4isel_masm_p.h
@@ -89,7 +89,7 @@ protected:
virtual void callBuiltinReThrow();
virtual void callBuiltinUnwindException(IR::Temp *);
virtual void callBuiltinPushCatchScope(const QString &exceptionName);
- virtual void callBuiltinForeachIteratorObject(IR::Temp *arg, IR::Temp *result);
+ virtual void callBuiltinForeachIteratorObject(IR::Expr *arg, IR::Temp *result);
virtual void callBuiltinForeachNextPropertyname(IR::Temp *arg, IR::Temp *result);
virtual void callBuiltinPushWithScope(IR::Temp *arg);
virtual void callBuiltinPopScope();
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp
index 72ec66d1c2..506fd8df6d 100644
--- a/src/qml/jit/qv4regalloc.cpp
+++ b/src/qml/jit/qv4regalloc.cpp
@@ -207,7 +207,7 @@ protected: // IRDecoder
virtual void callBuiltinReThrow() {}
virtual void callBuiltinUnwindException(IR::Temp *) {}
virtual void callBuiltinPushCatchScope(const QString &) {};
- virtual void callBuiltinForeachIteratorObject(IR::Temp *, IR::Temp *) {}
+ virtual void callBuiltinForeachIteratorObject(IR::Expr *, IR::Temp *) {}
virtual void callBuiltinForeachNextProperty(IR::Temp *, IR::Temp *) {}
virtual void callBuiltinForeachNextPropertyname(IR::Temp *, IR::Temp *) {}
virtual void callBuiltinPushWithScope(IR::Temp *) {}