diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-06-29 14:17:27 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-06-29 12:19:59 +0000 |
commit | 45bba2e13d231c1b06061c7b1433c7055106815b (patch) | |
tree | 714f7cf9ec73263381a86a8e1c59780d57a81833 /src/qml/jsruntime/qv4script.cpp | |
parent | eb43d44928f9e75549e8228450f89560a536dd62 (diff) |
Get rid of inheritedLocals in the codegen
This was only causing us to create mutable bindings for
variables that already existed, thus leading to an
expensive noop.
Change-Id: I6ed8ee891f8ec16c59e5fc43ed9eb155cb4b64ac
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4script.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index 53adb09273..3394a93fe5 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -117,20 +117,11 @@ void Script::parse() return; } - QStringList inheritedLocals; - if (inheritContext) { - Scoped<CallContext> ctx(valueScope, scope); - if (ctx) { - for (Identifier * const *i = ctx->variables(), * const *ei = i + ctx->variableCount(); i < ei; ++i) - inheritedLocals.append(*i ? (*i)->string : QString()); - } - } - QV4::Compiler::JSUnitGenerator jsGenerator(&module); RuntimeCodegen cg(v4, &jsGenerator, strictMode); if (inheritContext) cg.setUseFastLookups(false); - cg.generateFromProgram(sourceFile, sourceCode, program, &module, QQmlJS::Codegen::EvalCode, inheritedLocals); + cg.generateFromProgram(sourceFile, sourceCode, program, &module, QQmlJS::Codegen::EvalCode); if (v4->hasException) return; |