diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-04-05 16:23:22 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-04-05 20:39:09 +0200 |
commit | 3b73dd08e0cb705dc57f6cce8b528c36aad40bcc (patch) | |
tree | 6a8feac3b99b719d91f95d2660ba5bdd6168c6a4 /src/v4/qv4context.cpp | |
parent | 8da2e2af2634fbba0920a6296ad470c491ae00f7 (diff) |
Move arguments out of ExecutionContext and into CallContext
Change-Id: Ic826e3e71eac9171fa113dec79db7c69982f2386
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/v4/qv4context.cpp')
-rw-r--r-- | src/v4/qv4context.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/v4/qv4context.cpp b/src/v4/qv4context.cpp index 1ce278860d..21a5763c7d 100644 --- a/src/v4/qv4context.cpp +++ b/src/v4/qv4context.cpp @@ -138,10 +138,6 @@ void GlobalContext::init(ExecutionEngine *eng) outer = 0; lookups = 0; global = 0; - - // ### remove - arguments = 0; - argumentCount = 0; } void WithContext::init(ExecutionContext *p, Object *with) @@ -155,10 +151,6 @@ void WithContext::init(ExecutionContext *p, Object *with) lookups = p->lookups; withObject = with; - - // ### remove - arguments = 0; - argumentCount = 0; } void CatchContext::init(ExecutionContext *p, String *exceptionVarName, const Value &exceptionValue) @@ -173,10 +165,6 @@ void CatchContext::init(ExecutionContext *p, String *exceptionVarName, const Val this->exceptionVarName = exceptionVarName; this->exceptionValue = exceptionValue; - - // ### remove - arguments = 0; - argumentCount = 0; } void CallContext::initCallContext(ExecutionEngine *engine) @@ -284,11 +272,11 @@ void ExecutionContext::mark() outer->mark(); thisObject.mark(); - for (unsigned arg = 0, lastArg = argumentCount; arg < lastArg; ++arg) - arguments[arg].mark(); if (type == Type_CallContext || type == Type_QmlContext) { VM::CallContext *c = static_cast<CallContext *>(this); + for (unsigned arg = 0, lastArg = c->argumentCount; arg < lastArg; ++arg) + c->arguments[arg].mark(); for (unsigned local = 0, lastLocal = c->variableCount(); local < lastLocal; ++local) c->locals[local].mark(); c->function->mark(); |