All ExecutionContexts (except for CatchContext) have or can have
some sort of activation object. Unify them in one pointer in
the ExecutionContext class, and unify it's handling where it's
actually the same.
Change-Id: I6750999ddbd5d1d74235ef4b34dcd7546c432541
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This also changes the Result, so its members cannot be overwritten by
accident.
Change-Id: Id3679cb668da74468cbe17853cb13340683f11c0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is needed to properly register permanent/temporary dependencies
This patch also removes related interpreter instructions that should
have changed, but were not used.
Change-Id: Ie53c4611766680734c02e328b7f2c752cae150e0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Calculate more exactly which variables can
be referenced from an inner context, and convert
all the non escaping ones to temporaries on the
stack.
Change-Id: I0e33e85b0f6f426ef2812b8ecccee1870492b7b5
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This only worked by chance before, as they always for the
same temp indices.
Change-Id: Ib2c8b912fa1dee8b1f12c8f9d895bc023bc265d3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
And changed the namespace of those classes to
QV4::Compiler.
ScanFunctions should over time also move into its
own file.
Change-Id: If084acea4a9a20b9c79ad47dac19e02dc720e098
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This helps determine whether those variables can live
on the JS stack or need to go into the ExecutionContext
Change-Id: I791632b7fe9fd8788af7564844b5d368c3e0b91c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Remove an unused function, and rename some variables.
Change-Id: I47491d40b0a3cee430e284bd4cc9df9b07d7d0b3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Remove all files from the old compiler pipeline that are now
unused. This includes the whole IR, JIT code generation,
and the old Moth Isel.
Change-Id: I50d06abfbcf0e9755a54ed94638f8bb74f9512b1
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Fold the stuff from IR::Function into QQmlJS::Context, and
add a QQmlJS::Module class to replace the last pieces of the old
IR.
Change-Id: Ic02a6738a4f1db67a0ddf97b6c93ca32be81789d
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Get rid of the filename argument for JSCodeGen.
Change-Id: I4510a36374f8e98ac1d77edb2391d2413def3a46
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Part of refactoring and streamlining this code base.
Change-Id: I324d35d1f0a74c5908b40243ffa2b247ce924304
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This was only causing us to create mutable bindings for
variables that already existed, thus leading to an
expensive noop.
Change-Id: I6ed8ee891f8ec16c59e5fc43ed9eb155cb4b64ac
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
At least this and argc need to be present and have correct values.
Change-Id: I35a841cf008947e62f9309c407b5cd47fdcf4b41
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Also merge VME::exec and VME::run together, so there is one less frame
on the stack.
Change-Id: I7268e0b1f16fc75766c0c9b7b5e14b9885e6fe7c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It'd be way better to store line numbers in a IP->line table, instead
of putting Line instructions into the bytecode.
Change-Id: Ie20abf356612a0692507a7e079ba87d711707eb9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Differences:
- push parameters on the stack, including space for CallData members
- call instructions calculate the argument start
- use temp space above the calldata to evaluate arguments
- fewer temporaries are needed when a call is done while generating the
arguments of another call
- when calling the function, the js stack space above the callData is
not used, allowing for optimizations in the future
- Array and ObjectLiteral use the same mechanism
Change-Id: Id100fa06f12cc9d941b0f90b0b81b8270a8e4f5d
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Correctly add the scope and context object dependencies,
and pass the correct index into LoadIdObject.
Change-Id: Idc0d5b229fca40dad6a0ecd4988b4f150db4c0a2
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
- change temp/local/formal printing to match the old IR style
- add some commas to CallBuiltinDefineObjectLiteral
Change-Id: I24b945512969ac1a829e69e3153c433b09215305
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Make sure all libs and tests compile again after
the latest changes.
Change-Id: I749d3d2d0109cc97df2ecec93809ea8a1b3014a9
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Don't compile the JIT and related code into libQtQml
anymore.
Change-Id: Ieb0ec33c964d09b121ede4097fe4218b147c673d
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>