Clean up object literal handling with integral indices
authorSimon Hausmann <simon.hausmann@digia.com>
Sat, 15 Feb 2014 01:16:43 +0000 (02:16 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 24 Feb 2014 19:41:40 +0000 (20:41 +0100)
commitc78d1052c2509646c8cf13b460a8d098de836ad0
treeb32bb074293b87996596789ec259f9170887298c
parent00be968679152105fece89c3243a457b52d3f268
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>
18 files changed:
src/qml/compiler/qv4codegen.cpp
src/qml/compiler/qv4codegen_p.h
src/qml/compiler/qv4compiler.cpp
src/qml/compiler/qv4compiler_p.h
src/qml/compiler/qv4instr_moth_p.h
src/qml/compiler/qv4isel_moth.cpp
src/qml/compiler/qv4isel_moth_p.h
src/qml/compiler/qv4isel_p.cpp
src/qml/compiler/qv4isel_p.h
src/qml/compiler/qv4jsir.cpp
src/qml/compiler/qv4jsir_p.h
src/qml/jit/qv4isel_masm.cpp
src/qml/jit/qv4isel_masm_p.h
src/qml/jit/qv4regalloc.cpp
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4runtime_p.h
src/qml/jsruntime/qv4vme_moth.cpp
src/qml/parser/qqmljsast_p.h