aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/ecmascripttests
Commit message (Collapse)AuthorAgeFilesLines
* Update tests/auto/qml/ecmascripttests/test262Jani Heikkinen2019-02-081-0/+0
| | | | | | Task-number: QTBUG-73454 Change-Id: I12925ce49cc18f4bb6908a5515fc476b32a222dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Correctly scope unwind handlers for try blocksLars Knoll2019-01-301-3/+44
| | | | | | | | | | | | | Make sure the unwind handler is always reset when leaving the try block. This exposes a couple of failures in the ECMAScript test suite that were before passing by pure luck. Task-number: QTBUG-72858 Change-Id: I014b1e37c2beff136ecd53a665a2f10933f7e12c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Ensure our builtin constructors are subclassableLars Knoll2018-11-221-5/+0
| | | | | | | | | Respect the newTarget passed into those constructors and make sure we set up the proto chain correctly. Change-Id: I3d12c7dbef4b33660a6715d73e9fb0f89105167a Fixes: QTBUG-71138 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Properly mark variables as unresolved when accessed from evalLars Knoll2018-11-161-1/+0
| | | | | | | | | If we can't resolve the variable and are executing eval code, we need to look it up by name, and not generate a lookup in the global object. Change-Id: I693b3b714651911f72620160bfc463d6dbb00820 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Create proper template objects for tagged templatesLars Knoll2018-11-051-7/+1
| | | | | | | | If a tagged template gets evaluated multiple times, the underlying template object is shared. Change-Id: Ie2f476fbc93d5991322ce1087c42719a8d8333ae Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Correctly read files with a \0 in themLars Knoll2018-11-052-3/+2
| | | | | | | | At least one test case uses this, so let's make sure we read them correctly. Change-Id: I9f4ea7785b5a400cd6f0b210a6a98975bbbaf7ce Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Create proper template objectsLars Knoll2018-11-021-16/+0
| | | | | | | | | Create the proper template object for a tagged template. This fixes quite a few use cases (esp. String.raw), but is not yet 100% spec compliant. Change-Id: I69eaee22c384c0d1bd2c6c56ad711d29521b0b86 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML Engine: Support for JavaScript PromisesValery Kotov2018-10-112-146/+0
| | | | | | | Support for JavaScript Promises. Change-Id: I90ce328b35f3bdf3fd666a8829f22b5d56b6f861 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* ES7: Implement Tail Position Calls in the runtimeErik Verbruggen2018-10-051-31/+0
| | | | | Change-Id: If1629109722496b3fd10b36b2376548440f2fee9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix test262 submodule sha1Simon Hausmann2018-09-241-0/+0
| | | | | | | | Commit e436fb3569603bca8ad0a71fef67c03d2920aedc accidentally reverted Jani's fix in commit bf07bdcdf97473f1239ff965c7de795ec6caca42. Change-Id: Ie1b5fff4944ea0918f85b28b2dca51c419f24f5d Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Better inheritance structure for functionsLars Knoll2018-09-231-2/+0
| | | | | | | | Give Arrow functions their own representation. This also prepares for further optimizations especially for the instanceof operator. Change-Id: I1f70c0271169a237e1acdeb7fe855be957ba2ea5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Store InternalClass::nameMap in a MemberDataLars Knoll2018-09-161-0/+0
| | | | | | | | | | This helps make that memory known to the GC as well, and makes marking of internal classes much more efficient, as we don't mark the property keys repeatedly (even if they are shared between different internal classes) Change-Id: Ibb7e5383672d7657926bd08bf13f73f7680a9f31 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Bump tests262 submodule to include .gitattributes fixJani Heikkinen2018-09-101-0/+0
| | | | | | Task-number: QTBUG-70450 Change-Id: Iece912a4184f28290d7a40f3d83253efd81559d2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement OwnPropertyKeys for TypedArrayLars Knoll2018-09-101-6/+0
| | | | | Change-Id: I85d6cfa4b4652863cfafad4810176d99dccdabc9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a small bug in virtualHasPropertyLars Knoll2018-09-091-1/+0
| | | | | | | | | It should call hasProperty() on the proto if the property wasn't found locally, instead of looping and calling getOwnProperty, as this leads to subtly differences with Proxy objects. Change-Id: I088b0522c621999b7991f9194f46eaa9f6e15206 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Include symbols in getOwnPropertyKeysLars Knoll2018-09-091-2/+0
| | | | | | | And fix getOwnPropertySymbols and getOwnPropertyDescriptors. Change-Id: Ie0e4c3d308ffe8a904e9a6ab9242b2cda59d779f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Proxy.revokable creates an object with an anonymous revoke functionLars Knoll2018-09-091-1/+0
| | | | | Change-Id: Iaed36da1284e6545a88eaa17d23fa2862fc611be Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix ownKey iteration over Proxy objectsLars Knoll2018-09-091-4/+0
| | | | | Change-Id: I045a4844c06df9232cc8b04485ab0a39bb990e3f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix some bugs in Proxy::virtualGetOwnPropertyLars Knoll2018-09-081-3/+0
| | | | | Change-Id: I28c32f2bfdac8848baf82905fb04790f29451805 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix spec compliance of Object::virtualGet()Lars Knoll2018-09-081-1/+0
| | | | | Change-Id: I9c07a6b08e9029b893c28e7a945f839c0f0dda8d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Skip all realm related testsLars Knoll2018-09-082-105/+14
| | | | | | | | We don't support realms currently, and it's unclear whether we'll ever need the support. Change-Id: I023f84d477f374b3cef2590a78542c0c9408a144 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement IsCompatiblePropertyDescriptor and use it in ProxyLars Knoll2018-09-081-3/+0
| | | | | Change-Id: I40bc5ce2858ebfe1afb04a7957a53114b37ef50f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix toNumber conversions for hex, octal and binary stringsLars Knoll2018-09-081-3/+0
| | | | | Change-Id: Ifb7159a3307c96b27530e001ab13bcd6ddd03d09 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix test failures in NumberLars Knoll2018-09-081-9/+0
| | | | | Change-Id: I0743e9d7fdda0be7a8bb4f9fe3b8e195722c1c90 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a corner case in Math.max()Lars Knoll2018-09-071-1/+0
| | | | | Change-Id: I9dffaec95b01757fb21466617d055def2edeeb30 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix Date.Utc()Lars Knoll2018-09-071-6/+0
| | | | | Change-Id: Iefba82adbf8f7b944079d165054e9dfe4461ac77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't evaluate the switch expression inside the switch blockLars Knoll2018-09-071-2/+0
| | | | | Change-Id: I6cbe0610b65c9f9d7381bc1c70ae17e10486d5c3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a smaller bug in IteratorCloseLars Knoll2018-09-071-1/+0
| | | | | | | Throw the correct error in all cases Change-Id: Ic8f146cf13db605cb54cb8c96aaf0b3a1b9cca96 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for yield*Lars Knoll2018-09-071-45/+0
| | | | | Change-Id: I5b054b59519ed825459a5b0b0a7cd2c6fc8a3797 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Throw a type error when trying to destructure null or undefinedLars Knoll2018-09-071-4/+0
| | | | | Change-Id: Id1bba1a729124bccb8a90dcf40252fe5c69d27a3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix exception handling while destructuringLars Knoll2018-09-071-12/+0
| | | | | | | | | | | | | | | When an exception happens during destructuring, IteratorClose needs to be called, unless the exception happened inside the IteratorNext call (in that case the iterator is assumed to be invalid and we shouldn't call close on it). Implement this, by ensuring that we set the done return variable of IteratorNext to true whenever IteratorNext throws an exception. IteratorClose will check the done state and not do anything in that case. Change-Id: I73a27f855f2c4d3134b8cc8980e64bf797d03886 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Some fixes when unwinding inside for-of loopsLars Knoll2018-09-071-8/+2
| | | | | | | | This is not perfect yet, as the two regressions in TestExpectations show, but it's an improvement over the current situation. Change-Id: I82c0ef0f69619562037c573bea1026abc53c1ab3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix new.target access from eval()Lars Knoll2018-09-071-3/+0
| | | | | Change-Id: I1855eb303225d1784b019f8eebab0ad8bf2cdf5e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* fix accesses to this in arrow functionsLars Knoll2018-09-051-4/+0
| | | | | Change-Id: I4c0cfc3a120fc0b246760886b576e92d3f7623ff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a couple of internals in TypedArraysLars Knoll2018-09-041-15/+0
| | | | | | | | Handle property keys that are numeric strings, and implement getOwnProperty. Change-Id: I4c7ed21b6429b07f02a28bce537bcb7934a993d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement defineOwnProperty for TypedArraysLars Knoll2018-09-041-9/+0
| | | | | Change-Id: I2e7aa05a340d54e2f34ec4e59a69f3ce66be75d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix subclassing of ArrayBuffer and TypedArraysLars Knoll2018-09-041-8/+0
| | | | | Change-Id: I481974c224f7fdb4df6b641e8dd550add96b4c08 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Throw a reference error if the super constructor is not calledLars Knoll2018-09-041-24/+0
| | | | | | | And return the correct this object from the subclass constructor. Change-Id: I8d68f07c3080f8c5ff8b10ad2cc85e017bf710d8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Arrow and generator functions don't have a prototype propertyLars Knoll2018-09-041-1/+0
| | | | | Change-Id: Icbc25f1f723fe45a8c265f1b4bdf5f3fad3c4775 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Member functions should not have a prototype propertyLars Knoll2018-09-041-6/+0
| | | | | Change-Id: I19eb4012c8fee51a7e5bf264d11ab5337ac2a88d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't define a prototype property for most functionsLars Knoll2018-09-041-16/+0
| | | | | | | | Only functions that are constructors should have a prototype property. Change-Id: Ifcf6f8b6c38de055d871d57ada38a23432974263 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Always generate a context if an inner function uses superLars Knoll2018-09-041-6/+0
| | | | | Change-Id: I4215c215a28da6855d946dec8727c0c4f0acb933 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix accessing of arguments inside eval and arrow functionsLars Knoll2018-09-041-1/+0
| | | | | Change-Id: I1df6389a1fa6f1c3fc257df3075cea0c0af6a9cf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Throw type error if this is uninitialized when accessing superLars Knoll2018-08-311-2/+0
| | | | | Change-Id: I028e198d46a2ec1c55f5dd4cce8dd868ed3e8202 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix thisObject when calling super propertiesLars Knoll2018-08-311-4/+0
| | | | | Change-Id: Ia520d43ea2c29c16cfc8ffc86a32187a78848502 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix super property accessLars Knoll2018-08-311-1/+0
| | | | | | | | | Super properties work in a rather special way by accessing a 'home object' on the function object, and reading from it's prototype. Change-Id: I666334c9c27048c6c2ba6770dd8c9f56aecbee14 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix internalPutLars Knoll2018-08-311-14/+1
| | | | | | | Fix spec compliancy of the put() method. Change-Id: Iab4f4040cc7308d0c8d9f2eed239af98b7c2eee2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* A reference to a super property can have side effectsLars Knoll2018-08-291-7/+0
| | | | | Change-Id: Iaf33e4ac3412f8b2e02058f77193938690733f24 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Throw a type error if the super class is not a constructorLars Knoll2018-08-291-2/+0
| | | | | Change-Id: I1cf83c73ea1b628f44845e1b9ea324d3e069c344 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Pass the correct new.target to super callsLars Knoll2018-08-291-3/+0
| | | | | Change-Id: I648e173a156ffd47564192ecdcb81a03281fdcb4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>