diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-02 21:10:13 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-05 22:23:25 +0100 |
commit | 90338de17a56304eace1f64661a9aac21fe4d29c (patch) | |
tree | 0960479c21e3d6f49c60ad7e90ae5fbdf9595ef2 /src/qml/compiler/qv4instr_moth_p.h | |
parent | b5f76295659dd49d46b306b66807f44841fca992 (diff) |
Move conversion of this object into generated code
When a non strict mode function uses the this object, we
need to make sure it's being correctly converted into a
object before being accessed. So far this was being done
by ScriptFunction::call. Move this into the generated code to
avoid overhead for methods not using 'this', and simplify our
ScriptFunction::call() implementation.
Change-Id: I739f4a89d29ed8082ce59e48d1523776224fc29d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 854b9a3a8d..9aaab2f105 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -95,6 +95,7 @@ QT_BEGIN_NAMESPACE F(CallBuiltinDefineArray, callBuiltinDefineArray) \ F(CallBuiltinDefineObjectLiteral, callBuiltinDefineObjectLiteral) \ F(CallBuiltinSetupArgumentsObject, callBuiltinSetupArgumentsObject) \ + F(CallBuiltinConvertThisToObject, callBuiltinConvertThisToObject) \ F(CreateValue, createValue) \ F(CreateProperty, createProperty) \ F(CreateActivationProperty, createActivationProperty) \ @@ -471,6 +472,9 @@ union Instr MOTH_INSTR_HEADER Param result; }; + struct instr_callBuiltinConvertThisToObject { + MOTH_INSTR_HEADER + }; struct instr_createValue { MOTH_INSTR_HEADER quint32 argc; @@ -704,6 +708,7 @@ union Instr instr_callBuiltinDefineArray callBuiltinDefineArray; instr_callBuiltinDefineObjectLiteral callBuiltinDefineObjectLiteral; instr_callBuiltinSetupArgumentsObject callBuiltinSetupArgumentsObject; + instr_callBuiltinConvertThisToObject callBuiltinConvertThisToObject; instr_createValue createValue; instr_createProperty createProperty; instr_createActivationProperty createActivationProperty; |