aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4global_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QV4 Engine: Remove MSVC special casingFabian Kosmale2020-12-151-15/+0
| | | | | | | | | | | This patch removes a workaround for old versions of MSVC; we should be able to rely on the standard library nowadays. Original-patch-by: Alexander Neumann Fixes: QTBUG-89203 Change-Id: I8047565000fc7e4e3b8ac28584ff4a479b648274 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit fb4de27768935393744cbd67e9789d325e70e742)
* Implement URLSearchParamsMaximilian Goldstein2020-05-061-0/+1
| | | | | | | | | | Implements URLSearchParams (https://url.spec.whatwg.org/#urlsearchparams), completing our implementation of the URL object. Still needs the for..of iterator to get implemented. Change-Id: Iad33ed2f3fe0b2598ca2b0b21a4743f5f7dc19fd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Implement URL objectMaximilian Goldstein2020-04-081-0/+1
| | | | | | | | | Implements the JavaScript URL object (https://url.spec.whatwg.org/#api). Except that it does not currently implement the searchParams field. Task-number: QTBUG-54988 Change-Id: I19abc69e075cbf84bd15e6791be195ce16f3fe73 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Split compiler and runtime more clearlyUlf Hermann2019-07-111-12/+1
| | | | | | | | Provide different export macros and different top level headers for each, don't include runtime headers from compiler sources. Change-Id: I7dc3f8c95839a00a871ba045ec65af87123154be Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Split QV4::Value into a static and a dynamic partUlf Hermann2019-05-311-4/+0
| | | | | | | | The static part can be used for compilation and won't resolve managed objects. This allows us to remove all the remaining V4_BOOTSTRAP. Change-Id: Id2f6feb64c48beb2a407697881aea8c0d791a532 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove tracing JIT infrastructureUlf Hermann2019-04-291-14/+0
| | | | | | | | The tracing JIT won't be finished. Therefore, remove the parts that have already been integrated. Change-Id: If72036be904bd7fc17ba9bcba0a317f8ed6cb30d Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
* Transform V4_ENABLE_JIT into a featureUlf Hermann2019-04-251-45/+1
| | | | | | | | | | | | | | | | This way you can enable or disable the JIT when configuring Qt. The conditions for the availability of the JIT have also been cleaned up. There is no reason anymore to artificially restrict availability on x86 and x86_64. The reason for the existence of those clauses are old problems on windows that have been fixed by now. However, on arm and arm64, we need a specialization of the cacheFlush() function for each OS to be supported. Therefore, restrict to the systems for which such a specialization exists. iOS and tvOS are technically supported and you can enable the JIT via the feature flag now. Due to Apple's policy we disable it by default, though. Change-Id: I5fe2a2bf6799b2d11b7ae7c7a85962bcbf44f919 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-171-1/+2
|\ | | | | | | | | | | | | Conflicts: tests/auto/qml/qv4assembler/tst_qv4assembler.cpp Change-Id: I9d31c982881a617099354bf8acceb76332f11496
| * V4: Only enable the JIT on ARM on specific known OSesMartin Storsjö2019-04-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On all other architectures, the JIT is only enabled for explicitly mentioned OSes. This fixes build errors for Windows on 32 bit ARM, about the cacheFlush function being unimplemented for that target. This keeps all other OSes enabled that are mentioned in conditionals for other architectures, except for windows. Change-Id: I8c29a9399a05a57d23b4fee506c3d04859a08a76 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | V4: Collect trace information in the interpreterErik Verbruggen2019-01-251-0/+14
|/ | | | | | | | | | | | | | | Collect type information about values used in a function. These include all parameters, and the results of many bytecode instructions. For array loads/stores, it also tracks if the access is in-bounds of a SimpleArrayData. Collection is only enabled when the qml-tracing feature is turned on while configuring. In subsequent patches this is used to generated optimized JITted code. Change-Id: I63985c334c3fdc55fca7fb4addfe3e535989aac5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make sure JIT is disabled when building for ILP32 ABIDmitry Shachnev2019-01-091-1/+1
| | | | | | | Change-Id: Id8d06ed3708fdb9d1470fd3f83c3069138988074 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QML Engine: Support for JavaScript PromisesValery Kotov2018-10-111-0/+6
| | | | | | | Support for JavaScript Promises. Change-Id: I90ce328b35f3bdf3fd666a8829f22b5d56b6f861 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor deletion of propertiesLars Knoll2018-09-271-0/+1
| | | | | | | | | | | | | In line with the previous commit, allow entries with a valid PropertyKey, but invalid attributes in the InternalClass. Those entries mark a deleted property. This cleans up/unifies some of the code in the internal class implementation and allows re-using the slot if a deleted property gets added again. Change-Id: I1bada697486e3cafce7689bae87b7f884200dd99 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Correctly create methods for functions in object literalsLars Knoll2018-08-311-0/+1
| | | | | | | | | | Methods behave slightly different than normal functions as they have a home object and define how super property access is being done. To implement this correctly, we need to create these methods during object initialization time. Change-Id: Ib3f670c8790b882c6472de786938ca4f0b73f66f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for WeakSetLars Knoll2018-08-281-0/+2
| | | | | Change-Id: I5cee2bf0c6a45ad2c14b52e1a4fc5ef015e01042 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement support for WeakMapLars Knoll2018-08-281-0/+4
| | | | | Change-Id: Id23e80fe5918ba7dc897568123bf3db4d35e9092 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Split PlatformAssemblerCommon (and base classes) in its own fileErik Verbruggen2018-08-271-1/+10
| | | | | | | | This makes it easier to re-use them later on, without inheriting all extra stuff that the baseline JIT needs. Change-Id: I9368b16017b8b9d99f8c005a5b47ec9f9ed09fb0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement support for SharedArrayBufferLars Knoll2018-08-251-0/+2
| | | | | | | | We'll still need to hook this up with Worker threads to become useful. Change-Id: Iedae7307edd76368aeba163731856ebe9b32c6b6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Introduce a PropertyKey class that inherits from ValueLars Knoll2018-07-021-0/+1
| | | | | | | | | | | This will replace Identifier over the next few commits. The advantage of PropertyKey is that it can be stored on the JS stack, so that a GC run won't accidentally clean up the string/symbol referenced by the key. Change-Id: Ib4daa4616bcfa537e6d371ef7c7740bc7727a50d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix creation of object literalsLars Knoll2018-06-041-0/+6
| | | | | | | | | | | | | | | | Our method to create object literals wasn't compliant with the ES7 spec, as we would in some cases re-order the properties. This violated the spec which required properties to be created in order, so that for-of would also iterate over them in creation order. As a nice side effect, this simplifies the code and gets a couple of test cases using computed property names to pass. Task-number: QTBUG-62512 Change-Id: I6dfe004357c5d46a0890027f4fd9e2d1e1a2a17a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move interpreter loop into it's own functionLars Knoll2018-05-021-0/+1
| | | | | | | This will be required to make Generators work properly Change-Id: I1262d8694674ea3436f496fae30668a939327ab7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Partial Symbol supportLars Knoll2018-05-021-0/+5
| | | | | | | | | Added basic infrastructure to create symbols and convert them back to strings. In addition, storing and retrieving of symbol based properties in Objects works. Change-Id: I185f7aa46e7afa19db5a801102142892e03b7bf1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Garbage collect identifiersLars Knoll2018-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | Implemented by storing a backpointer to the Heap object in the identifier. Since identifiers now point back to their originating String or Symbol, we can now easily mark all identifiers that are still in use and collect those that aren't. Since Identifiers are 64bit also add support for holding an array index in there. With that an identifier can describe any kind of property that can be accessed in an object. This helps speed up and simplify some code paths. To make this possible, we need to register all IdentifierHash instances with the identifier table, so that we can properly mark those identifiers. Change-Id: Icadbaf5712ab9d252d4e71aa4a520e86b14cd2a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor variable resolvingLars Knoll2018-05-021-0/+5
| | | | | | | | | | Move variable resolving into the context, and avoid creating ExecutionContext's whereever we can. This prepares things for block scoping, where this becomes rather important to be able to achieve decent performance. Change-Id: Idf3d3c12cf348a2c3da01989c26c8529ceb36c12 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-271-1/+1
|\ | | | | | | Change-Id: I280d42b8926c0cada1f35d322b80aaf2b0ef0a73
| * Enable JIT on INTEGRITY ARM64Kimmo Ollila2018-04-261-1/+1
| | | | | | | | | | | | | | | | This patch enables JIT on INTEGRITY s820Am and other ARM64 builds Change-Id: I2fa130f41a6c5bc6aa86bcfd5a01c2d431300561 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Nikola Velinov <nvelinov@ghs.com>
* | garbage collect InternalClassLars Knoll2018-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internal classes are now allocated and collected through the GC. As they are important to the deletion of other objects (because of the vtable pointer living inside the internal class), they need to get destroyed after regular objects have been sweeped. Achieve this by using a separate block allocator for internal class objects. Our lookups do often contain pointers to internal classes, so those need to be marked as well, so we don't accidentally collect them. Change-Id: I4762b054361c70c31f79f920f669ea0e8551601f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Optimize MM::allocManaged()Lars Knoll2018-04-121-0/+2
|/ | | | | | | | We can manage without calls to changeVTable() here, as the set of classes allocated with this is rather limited. Change-Id: I804e4850b91c61ebbca8a04edbe51deac911928d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add additional check for support JIT compilation on ARM platformMikhail Svetkin2018-03-221-0/+5
| | | | | | | | | | JIT compilation is require hardware with FPU double precision. On ARM platform we can check it via __ARM_FP (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0774g/chr1383660321827.html) Change-Id: I8f3a00e639cebe65d874cb085d97aa8f1cc18a4f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-02-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/compiler/qqmlirbuilder.cpp src/qml/compiler/qqmlirbuilder_p.h src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4compilercontext_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/compiler/qv4jsir_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtimecodegen.cpp src/qml/jsruntime/qv4script.cpp src/qml/jsruntime/qv4script_p.h src/qml/qml/qqmltypeloader.cpp src/quick/items/qquickanimatedimage.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp tests/auto/qml/qmlplugindump/qmlplugindump.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp tools/qmljs/qmljs.cpp Done-with: Shawn Rutledge <shawn.rutledge@qt.io> Done-with: Lars Knoll <lars.knoll@qt.io> Done-with: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-241-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/debugger/qqmlprofiler_p.h src/qml/jsruntime/qv4engine.cpp src/qml/memory/qv4mm.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlobjectcreator_p.h src/qml/types/qqmldelegatemodel.cpp src/quick/items/qquickitem_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/BLACKLIST tests/benchmarks/qml/holistic/tst_holistic.cpp Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
| | * Enable JIT on QNX7 for ARM64Samuli Piippo2018-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove abs(long) definition, since the #ifdef check no longer works with QNX7 and QNX < 6.6 is no longer supported. [ChangeLog][Qml] Enabled ARM64 JIT for QNX7 Change-Id: Ife02f3edb508eddaf15da65954496265366e232d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Enable JIT on QNX for X86_64Adam Treat2018-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Qml] Enabled x86-64 JIT for QNX Change-Id: I41eeff4c3ff687e096098982614a739af8d697f9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Get rid of BuiltinFunctionLars Knoll2018-01-151-1/+0
| | | | | | | | | | | | | | | | | | | | | It's now unused. Change-Id: Id2941c212d488c9b0933fa06aac9922b9db13a05 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove code for older versions and streamline #ifdefs. Remove the helpers macros Q_STATIC_ASSERT_FOR_SANE_COMPILERS and V4_ASSERT_IS_TRIVIAL. Task-number: QTBUG-40658 Task-number: QTBUG-51673 Change-Id: Ifa4fab653b10ce7858739adef08364cddc6507cf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | V4: Add a baseline JITErik Verbruggen2017-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch add a JIT back in for all platforms that supported JITting before, with the exception of MIPS. Change-Id: I51bc5ce3a2ac40e0510bd72a563af897c5b60343 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Refactor Call/Construct instructionsLars Knoll2017-11-071-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Give them a pointer to argc and argv instead of a pointer to a full callData. Like this we can construct the callData at the end of the JS stack and avoid the need to create an additional copy in VME::exec(). This also opens up the option of completely avoiding all copies for calls into runtime methods. Also make sure that the calldata we pass into other functions is always at the top of the JS stack. Change-Id: I3d0eb49f7bfd7adb9ddabb213422087c66e5a520 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Re-enable the YarrJITErik Verbruggen2017-08-281-3/+0
| | | | | | | | | | | | | | | | | | | | | This makes a huge difference for regexp evaluation. Change-Id: I6b466f60280583c85d34be8734e8fef209b7b989 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix frame handlingLars Knoll2017-08-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix some regressions introduced by change 1ae1eaf59e0475a2dc9c5e22e53e9be19d0f2feb. Change-Id: I24c1db78634e3beb1ab090325b60e70f788f92a7 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Don't store the current line number in the ExecutionContextLars Knoll2017-08-041-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead modify our StackFrame struct to hold the QV4::Function and have a linked list of those for the frames. Change-Id: I8676e16bc51a5ba6cf25a5b3423576d44e8a926a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Get rid of the GlobalContext and WithContext classesLars Knoll2017-07-051-2/+0
| | | | | | | | | | | | | | | | | | | | | They are just ExecutionContext's. Change-Id: Id543934740b0e54172e469935513847224b19e79 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Split up qv4codegen into several filesLars Knoll2017-07-031-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Get rid of IR::Module and IR::FunctionLars Knoll2017-06-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Don't use the ISel's anymoreLars Knoll2017-06-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Move the code that generates the CompilationUnit over to Codegen, and don't use the ISel's at all anymore when compiling JS/QML. Change-Id: Iba89082c386c3d3fd58ac25a4651c5d39178cc5c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Always use the interpreter for nowLars Knoll2017-06-201-0/+3
|/ / | | | | | | | | | | | | The JIT doesn't work currently. Change-Id: I511f4bac7f0c2c114fb328753fde3ed51b0ed42a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-021-7/+3
|\| | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| * Merge remote-tracking branch 'origin/5.8' into 5.9Simon Hausmann2017-04-271-7/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qtqmlglobal.h src/qtqmlglobal_p.h src/jsruntime/qv4global_p.h src/qml/compiler/compiler.pri src/qml/compiler/qv4ssa.cpp src/qmldevtools/qtqmldevtoolsglobal_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I55c5d015b2cb1053b83b9c61caaf004fb49ee486
| | * fix QtQmlDevTools in framework builds in a better wayOswald Buddenhagen2017-04-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6767fcfaf basically gave up and gave the module an own set of headers. however, we now have improved infrastructure for borrowing headers. while this may look uglier, the maintenance burden is lower, and it's consistent with other bootstrapped modules. Change-Id: I6ddcbbc01fa085a3c6bf333b03a9fdfc19061836 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into HEADSimon Hausmann2017-03-231-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4context.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/memory/qv4mmdefs_p.h Change-Id: I9966750b7cd9106b78e4c4779f12b95a481cca40
| * | Complete transition to standard layout classes for JIT accessSimon Hausmann2017-03-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the Runtime function pointer array into EngineBase so that we can eliminate the last use of qOffsetOf. For improved cache locality the memory manager point is now also located in the EngineBase. Change-Id: I0b3cf44c726aa4fb8db1206cc414a56c2f522a84 Task-number: QTBUG-58666 Reviewed-by: Lars Knoll <lars.knoll@qt.io>