QmlJS: Speed up ValueOwner construction.
* Don't build all default values (including the global object)
separately for each ValueOwner instance.
* Instead, keep all global, immutable values in a single, shared
instance.
While refactoring, some cases where we *modified* the global object had
to be removed:
* C++ context properties no longer get injected into the global object,
instead they now have their own scope just above the global one.
* The Qt object's prototype no longer gets modified in Link. Instead,
it's now a reference to the "Qt" object provided in a qmltypes file.
* The whole concept of a function 'Activation' that could potentially
affect the global object was removed.
Change-Id: Id382faf965efa747fcc7a9b0bc2c90429d84d61b
Reviewed-by:
Leandro Melo <leandro.melo@nokia.com>
Showing
- src/libs/qmljs/qmljsevaluate.cpp 4 additions, 4 deletionssrc/libs/qmljs/qmljsevaluate.cpp
- src/libs/qmljs/qmljsinterpreter.cpp 25 additions, 122 deletionssrc/libs/qmljs/qmljsinterpreter.cpp
- src/libs/qmljs/qmljsinterpreter.h 4 additions, 42 deletionssrc/libs/qmljs/qmljsinterpreter.h
- src/libs/qmljs/qmljslink.cpp 4 additions, 8 deletionssrc/libs/qmljs/qmljslink.cpp
- src/libs/qmljs/qmljsscopechain.cpp 16 additions, 0 deletionssrc/libs/qmljs/qmljsscopechain.cpp
- src/libs/qmljs/qmljsscopechain.h 4 additions, 0 deletionssrc/libs/qmljs/qmljsscopechain.h
- src/libs/qmljs/qmljsvalueowner.cpp 340 additions, 498 deletionssrc/libs/qmljs/qmljsvalueowner.cpp
- src/libs/qmljs/qmljsvalueowner.h 15 additions, 58 deletionssrc/libs/qmljs/qmljsvalueowner.h
Loading
Please register or sign in to comment