aboutsummaryrefslogtreecommitdiffstats
path: root/qv4isel_masm.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-11-18 23:33:06 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-19 10:33:35 +0100
commita2676884804fb523ee586f1ebc6a11353ec79fcb (patch)
tree485f9b97affb19a3a24c914f83159765d74b9f55 /qv4isel_masm.cpp
parent4f1dfd1e260c238a0f8b1e3c7338431fa2972b90 (diff)
Better handling of contexts and environments
Make the ExecutionContext standard compliant. Move most of it's members into a new DeclarativeEnvironment data structure that contains locals and arguments. Change-Id: I094f559168810dbd3717d677fe28750076015976 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'qv4isel_masm.cpp')
-rw-r--r--qv4isel_masm.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp
index 90b3cb968d..8a8e663e93 100644
--- a/qv4isel_masm.cpp
+++ b/qv4isel_masm.cpp
@@ -180,10 +180,12 @@ InstructionSelection::Pointer InstructionSelection::loadTempAddress(RegisterID r
int32_t offset = 0;
if (t->index < 0) {
const int arg = -t->index - 1;
- loadPtr(Address(ContextRegister, offsetof(ExecutionContext, arguments)), reg);
+ loadPtr(Address(ContextRegister, offsetof(ExecutionContext, variableEnvironment)), reg);
+ loadPtr(Address(reg, offsetof(DeclarativeEnvironment, arguments)), reg);
offset = arg * sizeof(Value);
} else if (t->index < _function->locals.size()) {
- loadPtr(Address(ContextRegister, offsetof(ExecutionContext, locals)), reg);
+ loadPtr(Address(ContextRegister, offsetof(ExecutionContext, variableEnvironment)), reg);
+ loadPtr(Address(reg, offsetof(DeclarativeEnvironment, locals)), reg);
offset = t->index * sizeof(Value);
} else {
const int arg = _function->maxNumberOfArguments + t->index - _function->locals.size();