diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-02-15 02:16:43 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-24 20:41:40 +0100 |
commit | c78d1052c2509646c8cf13b460a8d098de836ad0 (patch) | |
tree | b32bb074293b87996596789ec259f9170887298c /src/qml/compiler/qv4instr_moth_p.h | |
parent | 00be968679152105fece89c3243a457b52d3f268 (diff) |
Clean up object literal handling with integral indices
* Object literals with array indices are now created with one
run-time call, instead of an initial one for non-integral keys
followed by sub-sequent define_builtin_property calls.
* Cleaned up propert name retrieval. Instead of using a visitor,
it's easier to define a virtual method on the PropertyName type. The visitor
doesn't buy us much as it's not possible to recurse within property names, and
this way we can use it also from the function scanner to correctly determine
the number of arguments needed for object literal initalizations.
* Similarly the duplicated/common name member for all property assignments
has been moved into PropertyName, for convenient access without AST casts.
* Removed now unused builtin_define_property/settergetter functions from IR,
run-time and moth.
Change-Id: I90d54c81ea5f3f500f4f4a9c14f7caf5135e7f9f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index bca878d648..08c523ce56 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -95,8 +95,6 @@ QT_BEGIN_NAMESPACE F(CallBuiltinTypeofName, callBuiltinTypeofName) \ F(CallBuiltinTypeofValue, callBuiltinTypeofValue) \ F(CallBuiltinDeclareVar, callBuiltinDeclareVar) \ - F(CallBuiltinDefineGetterSetter, callBuiltinDefineGetterSetter) \ - F(CallBuiltinDefineProperty, callBuiltinDefineProperty) \ F(CallBuiltinDefineArray, callBuiltinDefineArray) \ F(CallBuiltinDefineObjectLiteral, callBuiltinDefineObjectLiteral) \ F(CallBuiltinSetupArgumentsObject, callBuiltinSetupArgumentsObject) \ @@ -481,19 +479,6 @@ union Instr int varName; bool isDeletable; }; - struct instr_callBuiltinDefineGetterSetter { - MOTH_INSTR_HEADER - int name; - Param object; - Param getter; - Param setter; - }; - struct instr_callBuiltinDefineProperty { - MOTH_INSTR_HEADER - int name; - Param object; - Param value; - }; struct instr_callBuiltinDefineArray { MOTH_INSTR_HEADER quint32 argc; @@ -503,6 +488,8 @@ union Instr struct instr_callBuiltinDefineObjectLiteral { MOTH_INSTR_HEADER int internalClassId; + int arrayValueCount; + int arrayGetterSetterCount; quint32 args; Param result; }; @@ -768,8 +755,6 @@ union Instr instr_callBuiltinTypeofName callBuiltinTypeofName; instr_callBuiltinTypeofValue callBuiltinTypeofValue; instr_callBuiltinDeclareVar callBuiltinDeclareVar; - instr_callBuiltinDefineGetterSetter callBuiltinDefineGetterSetter; - instr_callBuiltinDefineProperty callBuiltinDefineProperty; instr_callBuiltinDefineArray callBuiltinDefineArray; instr_callBuiltinDefineObjectLiteral callBuiltinDefineObjectLiteral; instr_callBuiltinSetupArgumentsObject callBuiltinSetupArgumentsObject; |