aboutsummaryrefslogtreecommitdiffstats
path: root/qv4isel_masm.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-11-24 22:07:02 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-25 10:20:25 +0100
commit87b31798170233b92f13ba4d39e0278fdf61e10e (patch)
tree8d2a106262de90fad6556985bb519f817641ccbd /qv4isel_masm.cpp
parent2bd3fa3fc27379a78e8cca0e66eda800729ed8c9 (diff)
Support for the with statement
Add the with object (list) to the environment, and check properties there if it's available. Generate IR statements implementing with() support. Add two new builtin methods to enter and leave a with scope. Implement support for the builtin's in masm. Make sure exception handling works across with scopes. Change-Id: I8257a16cfccc91a1acedfd740ade711b016b33fd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'qv4isel_masm.cpp')
-rw-r--r--qv4isel_masm.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp
index 3bd4049547..270209a37f 100644
--- a/qv4isel_masm.cpp
+++ b/qv4isel_masm.cpp
@@ -264,6 +264,15 @@ void InstructionSelection::callActivationProperty(IR::Call *call, IR::Temp *resu
generateFunctionCall(result, __qmljs_foreach_next_property_name, arg);
}
break;
+ case IR::Name::builtin_push_with: {
+ IR::Temp *arg = call->args->expr->asTemp();
+ assert(arg != 0);
+ generateFunctionCall(Void, __qmljs_builtin_push_with, arg, ContextRegister);
+ }
+ break;
+ case IR::Name::builtin_pop_with:
+ generateFunctionCall(Void, __qmljs_builtin_pop_with, ContextRegister);
+ break;
}
}