aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QtQml: Add some consistency to QV4::RegExpUlf Hermann2024-12-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The RegExp JIT should behave the same as the V4 JIT. In particular, it should honor the same JIT call threshold and not second guess any manually set thresholds. To do this we need to store the match count in 32 bits. In turn we can store the 5 flags we may have in 8 bits. To make this safe, pass typed flags to the initialization functions. Also, consider the flags when calculating hash values. Finally, in the init() function, we don't need to initialize members to zero, since that is already guaranteed by the memory manager. And we can delete the flagsAsString() method since it's unused. This requires shuffling some #includes into the places where they actually belong. [ChangeLog][QtQml] The JavaScript regular expression engine now honors QV4_JIT_CALL_THRESHOLD for its own JIT. If QV4_JIT_CALL_THRESHOLD is not set, it uses the JIT after 3 interpreted matches for any regular expression, rather than the previous 5. Matching a regular expression on a string longer than 1024 bytes counts as 3 matches. This is to retain the default behavior of JIT'ing regular expressions right away when encountering long strings. Task-number: QTBUG-131957 Change-Id: I269ccea55d34b191ef18d7cd5fccd4cad8aec7cd Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Properly enforce signatures of AOT-compiled functionsUlf Hermann2024-04-261-9/+18
| | | | | | | | | | | | | Pass the metatypes of the contained types rather than the stored types. [ChangeLog][QtQml][Important Behavior Changes] The AOT compiled code for type-annotated JavaScript functions does not let you pass or return values of the wrong type anymore. Fixes: QTBUG-119885 Change-Id: I685d398c0745d32a999a3abd76c622a2c0d6651f Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Prepare for white allocation during gc(3/9): FunctionFabian Kosmale2024-03-051-6/+6
| | | | | | | | | | | | | | | | Function(Data) keeps references to two heap-items; use the newly introduced wrapper classes to ensure writes always go through the WriteBarrier. Provide a "mark" function in ExecutableCompilationUnit so that the wrapper can actually pick it up - the existing function there was called markObjects. We don't rename the existing function to keep the diff minimal. Provide a mark function in Function for the same reason. Task-number: QTBUG-121910 Change-Id: Ib56eb2f3f2315036ce43273c9ebc629d10458e9a Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* QtQml: Move engine-specific data out of base compilation unitUlf Hermann2024-01-081-2/+3
| | | | | | | | | | We want to re-use the base compilation unit for different engines. To do that, we cannot have data in there that belongs to a specific engine. Pick-to: 6.7 Task-number: QTBUG-120189 Change-Id: I8e43e7ec6c1cd33249dc4ed15fec16babc6d06fb Reviewed-by: Fabian Kosmale <[email protected]>
* QML: Improve the JS-to-JS type check when enforcing signaturesUlf Hermann2023-06-261-1/+9
| | | | | | | | | We do not have to coerce via the C++ type. Rather, we match the JavaScript representations of the types and coerce as needed. Task-number: QTBUG-113527 Change-Id: Id5c30cd46293f2d7aedd699f141a9fe19511b622 Reviewed-by: Fabian Kosmale <[email protected]>
* Undeprecate AOTCompiledFunctionUlf Hermann2023-05-231-3/+3
| | | | | | | We're going to call the JavaScript-typed functions a different name. Change-Id: If92c3fb1b16b1b0bd7d009e7dd712ae6405e1232 Reviewed-by: Fabian Kosmale <[email protected]>
* V4: Use an enum to categorize functions and rename aotFunctionUlf Hermann2022-09-291-4/+5
| | | | | | | | We want to use the aotFunction member also for typed JavaScript functions. Change-Id: Iad6d12ebed3ad3069832484137ed8e4d9e7a7cf4 Reviewed-by: Fabian Kosmale <[email protected]>
* QV4::Function: Reduce nFormals to 16 bitsUlf Hermann2022-09-231-1/+1
| | | | | | | | | | | This saves some space due to better alignment. We cannot have more bits in the compilation unit anyway. If we were to get a signal with more formal parameters than that, we just produce an error now. Change-Id: I02c329590b2d18337eca7441529b5cd4e19349f7 Reviewed-by: Fabian Kosmale <[email protected]>
* Remove some dead codeUlf Hermann2022-09-231-3/+0
| | | | | | | We don't have synthetic AOT functions anymore. Change-Id: I501199ea49160537ab932a157aebc6366d72033b Reviewed-by: Fabian Kosmale <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <[email protected]>
* Replace synthetic AOT functions with property-to-property bindingsUlf Hermann2022-05-241-14/+0
| | | | | | | | | Those should be more efficient and make your feet attract fewer projectiles. Fixes: QTBUG-103588 Change-Id: I8b25b9edb1edf5e112dbcba5bba898646d29ae2b Reviewed-by: Fabian Kosmale <[email protected]>
* DelegateModel: Use actual bindings for required propertiesUlf Hermann2022-04-111-1/+18
| | | | | | | | | | | | | Tracking the change signals is brittle and error prone. We have bindings for this case. Let's use them. We can construct a synthetic QV4::Function that contains its own QQmlJSAotFunction. In order to pass the property index to the function we generalize the "index" property of QQmlJSAotFunction to contain any extra data the function may want to use. If there is no compilation unit, we pass that instead. Fixes: QTBUG-91649 Change-Id: I0758bcc4964a48c6818d18bfb0972e67dbc16a1f Reviewed-by: Fabian Kosmale <[email protected]>
* When binding signals, run the outer function to get the nested oneUlf Hermann2021-08-171-0/+1
| | | | | | | | | | | | | | | The outer function may perform important tasks like setting up a call context with a "this" member for the nested function. In particular, arrow functions retain their original "this" member, no matter where they are executed later. We can detect this condition while generating the compilation unit. If the outer function is not a simple wrapper that only returns the inner function, execute it when binding a signal. Fixes: QTBUG-95659 Pick-to: 6.2 Change-Id: I7dfef2c78378588e6bfc4bedde7889c7f2ce03ef Reviewed-by: Yuya Nishihara <[email protected]> Reviewed-by: Maximilian Goldstein <[email protected]>
* Eliminate JS call frame from metatypes callsUlf Hermann2021-06-101-3/+4
| | | | | | | | If we call an AOT-compiled function we never need the JavaScript call frame. We can just skip its setup and save some overhead. Change-Id: I39dc2ca6eea5b5a66f3b87b642a310534cecf6cd Reviewed-by: Fabian Kosmale <[email protected]>
* Do QMetaType-style call in QQmlPropertyBinding::evaluateUlf Hermann2021-06-021-1/+1
| | | | | | | | | | | | | | | | We already have a void* and metatype available. There is no need to convert, unless we have bound arguments. The call() itself will convert as necessary anyway. However, we do need to figure out whether the returned value was undefined. Pass this information up from the actual call. This reverts commit 8ac705247430ff6fbbc25a9db20c0e7dc572abe7. The original commit 3a4e013f0058952c94ed3414aafbf96216efff8d was correct. We were just missing the value type conversions in metaTypeFromJS(). Change-Id: Ic4b2ebf1eb3fb2e5a50a045be774dd02d0fed7c6 Reviewed-by: Fabian Kosmale <[email protected]>
* Revert "Do QMetaType-style call in QQmlPropertyBinding::evaluate"Ivan Solovev2021-05-251-1/+1
| | | | | | | | | | This reverts commit 3a4e013f0058952c94ed3414aafbf96216efff8d. The patch seems to break the tests in QtPositioning (see QTBUG-93983 for some more details) Task-number: QTBUG-93983 Change-Id: Ie2caa8418f06add1c24d9f3d3d137e51e94908c2 Reviewed-by: Fabian Kosmale <[email protected]>
* Do QMetaType-style call in QQmlPropertyBinding::evaluateUlf Hermann2021-05-201-1/+1
| | | | | | | | | | | | | | We already have a void* and metatype available. There is no need to convert, unless we have bound arguments. The call() itself will convert as necessary anyway. However, we do need to figure out whether the returned value was undefined. Pass this information up from the actual call. Change-Id: Icfa69e946adf80d18110a158f5bab906674b7381 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Andrei Golubev <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* Optimize stack frame setup for AOT compiled functionsUlf Hermann2021-03-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When called via the metaobject system, parameters and return values are passed as void*, with accompanying type information in the form of QMetaType. The same format is expected when calling an AOT compiled function. Previously, we would first convert all the parameters to QV4::Value, just to convert them back the moment we notice that there is an AOT compiled function. This is wasteful. This change provides a second call infrastructure that accepts void* and QMetaType as parameter and return value format, and passes them as-is all the way to any AOT compiled functions. If there is no AOT compiled function, the conversion is done when detecting this, rather than when initiating the call. This also passes the information "ignore return value" all the way down to the actual function call. If the caller is not interested in the return value, we don't have to marshal it back at all. For now, we only add the extra "callWithMetaTypes" vtable entry to ArrowFunction. However, other callables could also receive variants optimized for calling with void*/int rather than V4 values. This required changing the way how function arguments are stored in the property cache. We squeeze the return type into QQmlPropertyCacheMethodArguments now, and we use QMetaType instead of integers. In turn, we remove some unused bits. Change-Id: I946e603e623d9d985c54d3a15f6f4b7c7b7d8c60 Reviewed-by: Fabian Kosmale <[email protected]>
* QML: Warn about usage of injected signal parametersUlf Hermann2021-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | You should declare functions with formal parameters if you want to use parameters passed by the signal. We need to generate two different warnings because there are two code paths by which such parameters are injected. If we compile with qmlcachegen, it simply inserts a lookup instruction in to the byte code. This lookup then triggers our special hack expressly made for signal parameters. If we don't compile using qmlcachegen, a function declaration with formal parameters is synthesized. We mark those formal parameters as injected and warn if we see one of them used. [ChangeLog][QML][Important Behavior Changes] The automatic injection of signal parameters into signal handlers is deprecated. This is because we cannot determine the names of the signal parameters at compile time. Furthermore, also for human readers it is difficult to discern between arguments, context properties, properties of the current object, and properties of the root object of the component. Requiring the signal parameters to be explicitly named resolves some of this confusion. You can turn the deprecation warning off using the "qt.qml.compiler" and "qt.qml.context" logging categories. Task-number: QTBUG-89943 Pick-to: 6.1 Change-Id: If0a5082adb735a73efd793868b3a55bc7d694cbe Reviewed-by: Mitch Curtis <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Andrei Golubev <[email protected]>
* Add support for binding ahead-of-time compiled bindings to QPropertiesSimon Hausmann2020-04-221-2/+5
| | | | | | | | | | When the ahead-of-time built binding returns the same type as the QProperty, then we can connect them directly with a small shim and pass through the context and scope objects. Change-Id: I9cb49d1fa35490a4ccb06965397674d5534c067d Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* Split compiler and runtime more clearlyUlf Hermann2019-07-111-0/+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 <[email protected]>
* Make QV4::Function::runtimeString() constUlf Hermann2019-07-101-2/+2
| | | | | | | | And use it more often. Change-Id: I980663c2b0375d278d8796f2d3bc41cf7241bf16 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Simon Hausmann <[email protected]>
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-8/+25
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <[email protected]>
* Remove tracing JIT infrastructureUlf Hermann2019-04-291-25/+0
| | | | | | | | The tracing JIT won't be finished. Therefore, remove the parts that have already been integrated. Change-Id: If72036be904bd7fc17ba9bcba0a317f8ed6cb30d Reviewed-by: Erik Verbruggen <[email protected]>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-211-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4bytecodehandler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4instr_moth.cpp src/qml/compiler/qv4instr_moth_p.h src/qml/jit/qv4baselinejit.cpp src/qml/jit/qv4baselinejit_p.h src/qml/jsruntime/qv4function.cpp src/qml/jsruntime/qv4vme_moth.cpp Change-Id: I8fb4d6f19677bcec0a4593b250f2eda5ae85e3d2
| * Remove dead compile time QML context/scope property and id object codeSimon Hausmann2019-03-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | After enabling lookups in QML files, we can remove all the code that tries to deal with (type) compile time detection of access to id objects and properties of the scope/context object. This also allows removing quite a bit of run-time code paths and even byte code instructions. Task-number: QTBUG-69898 Change-Id: I7b26d7983393594a3ef56466d3e633f1822b76f4 Reviewed-by: Ulf Hermann <[email protected]>
* | V4: Collect trace information in the interpreterErik Verbruggen2019-01-251-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | V4: Generate function tables on 64bit windowsUlf Hermann2018-12-031-1/+4
|/ | | | | | | | | | | | | | In order for global exception handlers to be called reliably, the runtime needs to unwind through JIT-generated code. This can be facilitated by installing a "function table" for each JITed function that specifies "use the frame pointer". Also make sure to generate a function table for JIT'ed regular expressions. Those were forgotten also in the linux case. Fixes: QTBUG-50061 Change-Id: Ib0b8ae9356ed80afe1cab017e36efa4ccbe73f90 Reviewed-by: Simon Hausmann <[email protected]>
* Fix super property accessLars Knoll2018-08-311-0/+1
| | | | | | | | | 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 <[email protected]>
* Refactor initialization code for JS stack framesLars Knoll2018-07-031-4/+1
| | | | | | | | | Move code into qv4stackframe_p.h, so that it can be re-used from different places. Clean up VME::exec and the generatorfunctions using this. Change-Id: Ib4f7eceeb5f55d98dd6ccf2584d13a3b864caea1 Reviewed-by: Simon Hausmann <[email protected]>
* Move the C++ and JS stack frame definitions into it's own fileLars Knoll2018-07-031-5/+3
| | | | | Change-Id: I86e89e07197aec6071809c2d32bd5c98cb7ac6f6 Reviewed-by: Simon Hausmann <[email protected]>
* Minor cleanup with bytecode pointer typesSimon Hausmann2018-05-281-1/+1
| | | | | | | | | | | | Even though we consider the bytecode to be a sequence of unsigned bytes, we store it as const char * (so unsigned except on arm) everywhere, because that makes it convenient to work with QByteArray's constData(). By using const char * consistently we can get rid of at least one more reinterpret_cast. Change-Id: I7a803e4201381c39eec2fdc6497d9bf36a1c2b6b Reviewed-by: Lars Knoll <[email protected]>
* Remove unused QV4::Function::code memberSimon Hausmann2018-05-281-3/+1
| | | | | | | | Since commit 831ddc54932d2681712ca9fa3e94484ae11d59f7 we always call the interpreter entry function when calling into JS. Change-Id: Ieeb549f6d144f02f0a919759fd31541a7f636f83 Reviewed-by: Lars Knoll <[email protected]>
* Add Generator supportLars Knoll2018-05-031-0/+1
| | | | | | | | | | | | | Add support for ES6 generators. Those are currently always executed in the interpreter (we never JIT them), to simplify the initial implementation. Most functionality, except for 'yield *' expressions are supported. 'yield *' will have to wait until we support for(... of ...) Change-Id: I7c059d1e3b301cbcb79e3746b4bec346738fd426 Reviewed-by: Simon Hausmann <[email protected]>
* Cleanup handling of with() statementsLars Knoll2018-05-021-1/+0
| | | | | | | | | | | Add a CompilerContext for with, whose only purpose it is to trigger variable lookup by name. This avoids looking up variables declared inside the with() {} block by name and we do not lookup variables outside the with block by name neither anymore. Change-Id: I52e9fb2daa9601f9e5102714c002dc506ad5ed23 Reviewed-by: Simon Hausmann <[email protected]>
* Add support for arrow functionsLars Knoll2018-04-261-0/+1
| | | | | | | | | | | | | Arrow parameter lists are tricky and require some reparsing by the standard to avoid conflicts in the parser with expression statements. Add an IsArrowFunction flag to the CompiledData::Function. This information is required in the runtime, when creating Function objects, as it does influence their behaviour in subtle ways. Change-Id: I298801b091f98e30a9269d3c77d9ff94e519dabc Reviewed-by: Simon Hausmann <[email protected]>
* garbage collect InternalClassLars Knoll2018-04-121-1/+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 <[email protected]>
* Handle function expressions as signal handlersErik Verbruggen2018-03-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two ways to use function expressions on the right-hand side of bindings: property var somethingPressed somethingPressed: function() { /* ..press something else.. */ } signal buttonPressed onButtonPressed: function() { /* ..handle buttonPress.. */ } In the former case, it declares a property that holds a function. So on initialization, the right-hand side of the binding returns a closure that gets assigned to the property 'somethingPressed'. In the latter case, the signal handler is explicitly marked as a function for clarity. So, the handler should not be returning the closure, but the handler should *be* the closure. In general, it is not possible to detect if the left-hand side is a property or a signal handler when generating QML cache files ahead of time. So for this case, we mark the function as only returning a closure. Then when instantiating the object, we check if it is a signal handler, and if the handler is marked as only returning a closure. If so, we set that closure to be the signal handler. Task-number: QTBUG-57043 Task-number: QTBUG-50328 Change-Id: I3008ddd847e30b7d0adef07344a326f84d85f1ba Reviewed-by: Simon Hausmann <[email protected]>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-02-021-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Done-with: Lars Knoll <[email protected]> Done-with: Ulf Hermann <[email protected]> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-241-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Use potentially intercepted URL as ID for compilation unitsUlf Hermann2017-12-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We generally have to pass a URL and a file name everywhere because the logical URL might be something else than the actual file being loaded. For example a QQmlFileSelector might modify the URL to be loaded for a specific file. This resulting URL, however, should not be used to resolve further URLs defined in the file loaded that way. As we need to access QQmlTypeLoader::m_url as string more often now, cache it and avoid frequent translations between QUrl and QString. Furthermore, QQmlDataBlob's URLs are changed to follow the same semantics. The finalUrl is the one that should be used to resolve further URLs, the url is the one used to load the content, and subject to any redirects or interceptions. This changes the semantics of URL redirects. Previously a redirected URL was used as the base URL for furher URL resolution. This doesn't work because redirection occurs after interception and interception should not influence the resolution of further URLs. We now use the original URL as base URL for resolution of further URLs and rely on the server to redirect those, too. Task-number: QTBUG-61209 Change-Id: I93822f820bed2515995de3cb118099218b510ca4 Reviewed-by: Michael Brasser <[email protected]>
* | | V4: Only start JITting after a minimum of 3 callsErik Verbruggen2017-12-141-0/+1
| | | | | | | | | | | | | | | | | | Change-Id: I748e06041f3085980ce48391ba2d829a9d86a727 Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* | | V4: Add a baseline JITErik Verbruggen2017-11-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | | Cut out one more C++ layer when doing JS function callsLars Knoll2017-11-131-4/+4
| | | | | | | | | | | | | | | Change-Id: I0e2ac30b7e6d77fe41deb84a97b0a7f220437c6a Reviewed-by: Simon Hausmann <[email protected]>
* | | Finally get rid of the QV4::Function pointer in the contextLars Knoll2017-11-131-8/+0
| | | | | | | | | | | | | | | Change-Id: Iad6018f67faa956d385087865fca9d73419e363e Reviewed-by: Simon Hausmann <[email protected]>
* | | Get rid of the unusued canUseSimpleCall flagLars Knoll2017-11-071-3/+0
| | | | | | | | | | | | | | | Change-Id: I5230342db4647bd95793475f751213f0725d6965 Reviewed-by: Erik Verbruggen <[email protected]>
* | | Get rid of the hack for named expressionsLars Knoll2017-09-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Instead simply use the pointer to the FunctionObject we have in the CallData now. Change-Id: I6d7ed8af22e89e0217bef427110611b661ac7965 Reviewed-by: Simon Hausmann <[email protected]>
* | | CleanupsLars Knoll2017-09-011-10/+1
| | | | | | | | | | | | | | | Change-Id: Iba5a238c98617f99049dc0e529e642b924e42755 Reviewed-by: Simon Hausmann <[email protected]>
* | | Move CallContext construction into a interpreter instructionLars Knoll2017-09-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow us to further cut down on function call overhead. To make this work, introduce a proper distinction between EvalCode and GlobalCode and use the correct compilation mode in all places. Change-Id: I070621142159b7416026347c9239200c5ed7a56b Reviewed-by: Simon Hausmann <[email protected]>
* | | Use the context member in CallDataLars Knoll2017-09-011-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Store the current context in the context member instead of passing it along as arguments. Change-Id: If3dd0d32eddb2a02bcbf65fe6e8d15142403170e Reviewed-by: Simon Hausmann <[email protected]>