Local initialisation is now done in codegen.

Change-Id: Idbc19b2e4f71adf3b6674ac2ae6064b7ea347fff
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
Erik Verbruggen 2013-05-13 08:57:33 +02:00 committed by Lars Knoll
parent 6f8a7cdc3c
commit 2bd6e240a3
2 changed files with 1 additions and 2 deletions

View File

@ -2604,6 +2604,7 @@ V4IR::Function *Codegen::defineFunction(const QString &name, AST::Node *ast,
function->LOCAL(local);
unsigned t = entryBlock->newTemp();
(*it).index = t;
entryBlock->MOVE(entryBlock->TEMP(t), entryBlock->CONST(V4IR::UndefinedType, 0));
}
} else {
if (!_env->isStrict) {

View File

@ -178,8 +178,6 @@ void CallContext::initCallContext(ExecutionEngine *engine, FunctionObject *funct
uint argc = argumentCount;
locals = (Value *)(this + 1);
if (function->varCount)
std::fill(locals, locals + function->varCount, Value::undefinedValue());
if (needsOwnArguments()) {
Value *args = arguments;