This was disabled by accident. We do however not get many simple calls
currently, as this would require turning locals into temps in the
current architecture.
This will get fixed with a better approach to allocating contexts
in the slightly longer term.
Change-Id: Ie9b88e6d5668caec5b5c25ab18540d39bf4e8dc2
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Specifically when creating an object from an object literal.
Change-Id: I2f29be5d977ac2e5a0a634229ae899356e568ebd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... instead of undefined. Also massages the bytecode dumper a bit to
make debugging easier.
Change-Id: Ief1a9330196b20e97717174a945cd5a6432e05ce
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When the "this" in store is a non-temp, we can't compare the base to
the source value's Param. What needs to be checked is not the base, but
the "b" value, which hold a (possibly loaded) value.
Change-Id: I43ed77db70a3f075b40f01dd66f16a0046467ce1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
These have to be loaded in the right order, as the load might
trigger some side effects.
Change-Id: I5a987bf90c7c9376de609ce24b00436cbf78168d
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Make sure '[[1, 2], 3]' produces the correct result.
Change-Id: I95efcf4cab20badfffd31429a57fb73cdf241518
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Use a switch statement so we cover all cases of Reference types.
Fixes a crash for 'delete this'.
Change-Id: Ib3575fb2176cd9493211a716132d2f768e0f0ac7
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
If one argument of a function call was itself calling a function
(or an object/array literal), we'd override the arguments of the
outer function call.
Change-Id: I41bc93c1217283f22b02e881f96b04286a4c7e7e
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Fix all exception handling related test failures
in test262.
Change-Id: Iba50238627c31705a4878b43abbb8f20f0ecee88
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Implement QML support in Reference. Implement the
fallbackNameLookup() method for QML, and emit
bytecode to load the qml context and imported script
temps in beginFunctionBodyHook()
Change-Id: I7e052f10ec064097ab1c1f51d776622a4176ce99
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This is still not ideal and creates too many move
instructions, but at least it avoids repeated loads
and stores into temps to the largest part.
Change-Id: I5286a6598461b229aa12cf88b711922e69f46b70
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This is required so the this object gets set up correctly.
crypto.js passes now :)
Change-Id: I995ffe40b3fee6d8a7b1f9e2d7a9887cd8a87275
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Set locals to undefined and declare them for global code
Change-Id: I41848f1463fa402a3c2b1f67117be86cc0d697a1
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Add a couple of using directives to avoid lots
of the repeated prefixing of common types.
Change-Id: Ie2bbe366ecb49d24cb951d445d9d6796b7e2554b
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Should be folded into the commit that added them
Change-Id: I1d0c5bc5d83e0e8c25b63a9eb2e903299715e966
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Implement exception handling, and make it conformant
with the spec.
Change-Id: I6d8222617180f96f628f18e11444488e50e5c043
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Replace Loop and ScopeAndFinally with a single ControlFlow
data structure, that can deal with non local control flow.
The control flow data structure can do required cleanup
of internal scopes (for catch or with), emit finally
statements and dispatch to the right continuation.
Also implemented support for the with statement again.
Change-Id: I8bb5414151d0312cb28f8d10e99f8d2b64484100
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Always use Call/CreateValue instructions, by loading the
reference into a temp if required.
Change-Id: I0103cec91224f405129e6a770ce7483141c5c1a8
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This folds the jumps generated by e.g. && and || expressions directly
into the jump to the start/end of the loop.
Change-Id: I53f8cb6eb6b995b7418b57ada59c17d3a556935a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>