diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-18 14:01:42 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-21 10:42:15 +0000 |
commit | 713ea747c25d10322510f21c8bce45d35b308b20 (patch) | |
tree | 8e1446c75dc823447b110558eb88056cba539a0e /src/qml/compiler/qv4compilercontrolflow_p.h | |
parent | 625fb43d68c84e0384b756f6e3d53f2a8a90ff04 (diff) |
Store the actual string for name in Reference
Delay desolving the name to an index until we actually need
it. This avoids storing strings that are never used in the string
table.
Change-Id: I935a2d07c03234097b4cf6cfe98231528ac3b15c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilercontrolflow_p.h')
-rw-r--r-- | src/qml/compiler/qv4compilercontrolflow_p.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compilercontrolflow_p.h b/src/qml/compiler/qv4compilercontrolflow_p.h index 354015a542..13716fe29f 100644 --- a/src/qml/compiler/qv4compilercontrolflow_p.h +++ b/src/qml/compiler/qv4compilercontrolflow_p.h @@ -370,10 +370,9 @@ struct ControlFlowCatch : public ControlFlowUnwind // exceptions inside the try block go here exceptionLabel.link(); - Reference name = Reference::fromName(cg, catchExpression->name.toString()); Moth::StackSlot savedContextReg = Moth::StackSlot::createRegister(generator()->newRegister()); Instruction::PushCatchContext pushCatch; - pushCatch.name = name.unqualifiedNameIndex; + pushCatch.name = cg->registerString(catchExpression->name.toString()); pushCatch.reg = savedContextReg; generator()->addInstruction(pushCatch); // clear the unwind temp for exceptions, we want to resume normal code flow afterwards |