diff options
-rw-r--r-- | src/v4/qv4context.cpp | 36 | ||||
-rw-r--r-- | src/v4/qv4context.h | 2 |
2 files changed, 0 insertions, 38 deletions
diff --git a/src/v4/qv4context.cpp b/src/v4/qv4context.cpp index 274b2eb6..c34dcc00 100644 --- a/src/v4/qv4context.cpp +++ b/src/v4/qv4context.cpp @@ -100,7 +100,6 @@ bool ExecutionContext::setMutableBinding(ExecutionContext *scope, String *name, // ### throw if scope->strict is true, and it would change an immutable binding if (type == Type_CallContext) { CallContext *c = static_cast<CallContext *>(this); - assert(function); for (unsigned int i = 0; i < c->function->varCount; ++i) if (c->function->varList[i]->isEqualTo(name)) { c->locals[i] = value; @@ -121,41 +120,6 @@ bool ExecutionContext::setMutableBinding(ExecutionContext *scope, String *name, return false; } -Value ExecutionContext::getBindingValue(ExecutionContext *scope, String *name, bool strict) const -{ - Q_UNUSED(strict); - assert(function); - - if (type == Type_CallContext) { - assert(function); - const CallContext *c = static_cast<const CallContext *>(this); - for (unsigned int i = 0; i < function->varCount; ++i) - if (c->function->varList[i]->isEqualTo(name)) - return c->locals[i]; - for (int i = (int)c->function->formalParameterCount - 1; i >= 0; --i) - if (c->function->formalParameterList[i]->isEqualTo(name)) - return c->arguments[i]; - } - - if (activation) { - bool hasProperty = false; - Value v = activation->get(scope, name, &hasProperty); - if (hasProperty) - return v; - } - assert(false); -} - -bool ExecutionContext::deleteBinding(ExecutionContext *scope, String *name) -{ - if (activation) - activation->deleteProperty(scope, name); - - if (scope->strictMode) - scope->throwTypeError(); - return false; -} - String * const *ExecutionContext::formals() const { return type == Type_CallContext ? static_cast<const CallContext *>(this)->function->formalParameterList : 0; diff --git a/src/v4/qv4context.h b/src/v4/qv4context.h index a1da174c..ff375fea 100644 --- a/src/v4/qv4context.h +++ b/src/v4/qv4context.h @@ -110,8 +110,6 @@ struct ExecutionContext void createMutableBinding(String *name, bool deletable); bool setMutableBinding(ExecutionContext *scope, String *name, const Value &value); - Value getBindingValue(ExecutionContext *scope, String *name, bool strict) const; - bool deleteBinding(ExecutionContext *ctx, String *name); void wireUpPrototype(); |