aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compiler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move qv4string{_p.h|.cpp} out of the devtoolsUlf Hermann2019-05-101-1/+0
| | | | | | | | The only thing we actually need is toArrayIndex() and that is a static method. We provide it in a separate file. Change-Id: I86b11e3d81a319202a0babacd17d87e7816ac88a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove tracing JIT infrastructureUlf Hermann2019-04-291-1/+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>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-211-48/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-44/+1
| | | | | | | | | | | | | | | | | | | | | | 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 <ulf.hermann@qt.io>
| * Implement dummy QML lookups for "global" variablesSimon Hausmann2019-03-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resolving names in the context of QML bindings, we now direct runtime access to QQmlContextWrapper::resolveQmlPropertyLookupGetter. At the moment this does basically the same as Runtime::method_loadName, which we called earlier. However this now provides the opportunity to optimize lookups in the QML context in a central place. When performing a call on a scope or context object property, we also did not use a CallName() instruction - which would have gotten the thisObject wrong - but instead we use a dedicated CallScopeObjectProperty and CallContextObjectProperty instruction. These rely on identifying these properties at compile time, which goes away with lookups (and also doesn't work when using ahead-of-time compilation). Therefore the qml context property lookup is using a getPropertyAndBase style signature and Runtime::method_callQmlContextPropertyLookup uses that. For the tests to pass, some error expectations need adjusting. In particular the compile-time detection of write attempts to id objects is now delayed to the run-time. The old code path is still there and will be removed separately in the next commit (as it is massive). Task-number: QTBUG-69898 Change-Id: Iad1ff93d3758c4db984a7c2d003beee21ed2275c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | V4: Generate labels for backward jumpsErik Verbruggen2019-01-311-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When analyzing the bytecode from top-to-bottom in a single pass, we don't know when a jump back to previously seen code occurs. For example, in the baseline JIT we would already have generated code for some bytecode when we see a jump back (like at the end of a loop body), and we can't go back and insert a label to jump to. As JavaScript has no goto's, the only backward jumps are at the end of loops, so there are very few cases where we need to actually generate labels. This was previously handled by analyzing the bytecode twice: once to collect all jump targets, and then second pass over the bytecode to do the actual JITting (which would use the jump targets to insert labels). We can now do that with one single pass. So the trade-off is to store 4 bytes more per function plus 4 bytes for each loop, instead of having to analyze all functions only to find where all jumps are each time that function is JITted. Change-Id: I3abfcb69f65851a397dbd4a9762ea5e9e57495f6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | V4: Collect trace information in the interpreterErik Verbruggen2019-01-251-1/+1
|/ | | | | | | | | | | | | | | 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>
* Create proper template objects for tagged templatesLars Knoll2018-11-051-3/+50
| | | | | | | | 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>
* Fix error reporting when imports or re-exports in modules failSimon Hausmann2018-10-111-0/+2
| | | | | | | | Collect the location of the import/export statement and include it in the exception thrown. Change-Id: I7966dfd53ed67d2d7087acde2dd8ff67c64cb044 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* properly align string table in compiled dataRolf Eike Beer2018-09-141-1/+3
| | | | | Change-Id: Ie6534d5443ad046211620c4e0b586d189d0adbef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* use WTF::roundUpToMultipleOf() instead of open coding itRolf Eike Beer2018-09-131-10/+7
| | | | | | Change-Id: I3d6bbfcf02748e03c653763175c1904b4c2c8604 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* make pointer operations more explicit when building string tableRolf Eike Beer2018-09-101-3/+4
| | | | | Change-Id: Iff8a45cecc63751f0daae5844f89cf452619d58d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* avoid duplicate offset calculations when building string tableRolf Eike Beer2018-09-071-3/+3
| | | | | Change-Id: I5bfc46b9d9cdc3bde35f60de75cb8e9e51b0b0ec Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement the dead temporal zoneSimon Hausmann2018-08-281-0/+5
| | | | | | | | | | | | | | With const and let it is possible to access the declared member before initialization. This is expected to throw a type reference error at run-time. We initialize such variables with the empty value when entering their scope and check upon access for that. For locals we place the lexically scoped variables at the end. For register allocated lexical variables we group them into one batch and remember the index/size. Change-Id: Icb493ee0de0525bb682e1bc58981a4dfd33f750e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup RegExpObjectLars Knoll2018-08-151-0/+2
| | | | | | | | | | | Move properties from RegExpObject to getters in RegExp.prototype to be compliant with the JS spec. Implement support for the sticky flags ('y') and correctly parse the flags in the RegExp constructor. Change-Id: I5cf05d14e8139cf30d46235b8d466fb96084fcb7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix module dependency handlingSimon Hausmann2018-08-141-0/+17
| | | | | | | | | | | | | | | | | | | | | The evaluation of a module can have side-effects by modifying the global object or objects in it. Therefore even a seemingly empty import such as import "./foo.js" needs to be listed in the module requests. It's also important that they are evaluated in the order of declaration. Therefore we collect all module requests separately - even those that don't have import variables to process. This patch also ensures that the export and import declarations are visited in the correct order, by unifying both AST nodes to be hooked into the statement list. The fact that we connect the module list items into a statement list is solely an artifact of re-using defineFunction() which takes a StatementList as body. Change-Id: I75dc357b2aecfc324d9a9fe66952eff1ec1dfd8a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Enable unicode regular expressionsLars Knoll2018-08-101-0/+2
| | | | | | | Add support for the 'u' flag for regular expressions. Change-Id: I409054eaa9c50183619752d14f2638f5a38c0ea7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add initial basic support for ES6 modulesSimon Hausmann2018-08-091-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The entry point from the parsing perspective into modules is not QV4::Script but QV4::ExecutionEngine::compileModule. For convenience, the ESModule AST node gets a body, which is the statement list connected between the ModuleItemList items that are not import/export declarations. The QV4::Module allocates a call context where the exported variables are stored as named locals. This will also become the module namespace object. The imports in turn is an array of value pointers that point into the locals array of the context of the imported modules. The default module loading in ExecutionEngine assumes the accessibility of module urls via QFile (so local file system or resource). This is what qmljs also uses and QJSEngine as well via public API in the future. The test runner compiles the modules manually and injects them, because they need to be compiled together with the test harness code. The QML type loader will the mechanism for injection in the future for module imports from .qml files. Change-Id: I93be9cfe54c651fdbd08c5e1d22d58f47284e54f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Reduce memory consumption when loading AOT generated cache filesSimon Hausmann2018-08-011-4/+1
| | | | | | | | | | | | | | | | | Separate the qml data (objects/imports) from the general compilation unit data. It's only the former that needs to be re-generated as part of the type re-compilation and by separating it we can allocate memory just for that and keep using the mmap'ed general unit data for everything else (including byte code). Another upside of this change is that it allows eliminating the recently introduced concept of a backing unit again. Saves ~149K RAM with the QQC1 gallery. Task-number: QTBUG-69588 Change-Id: Ie88a4286feb7e2f472f58a28fa5dd6ff0a91c4b6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify loading of ahead-of-time created QML cache filesSimon Hausmann2018-07-311-0/+2
| | | | | | | | | | | Consolidate the old "createUnitData" code that used to be a virtual function into the one call site and avoid a malloc that way. By the way of that, the string table gets a guard to prevent accidental registerString() calls at a later point. Change-Id: Ia3f8d3e874b7733822e6942e411c940ec60d95a5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Optimize memory consumption of ahead-of-time compile cache filesSimon Hausmann2018-07-311-2/+12
| | | | | | | | | | | | | | | When loading a pre-compiled cache file, the strings contained therein will remain available in memory since commit 7dcada48d2435e8ceb0cc8a6771f79b76979e11f. While for aot built cache files we may have to add new strings (for example for signal handler parameters), we can re-use the existing strings by omitting them from the intermediately created string table. This saves ~283K RAM with qtquickcontrols1 gallery. Task-number: QTBUG-69588 Change-Id: I8ea807f6dea4cc35d8b7e5f7329809ed1cd12880 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Shrink CompiledData::Function by 8 bytesSimon Hausmann2018-07-311-2/+2
| | | | | | | | | | | | We can express the offset to the line number table relative to the locals. Saves ~1.4k with examples/quickcontrols/extras/flat/Content.qml and ~11K RAM with the gallery. Task-number: QTBUG-69588 Change-Id: I802928102b4291e05ff1462226d22303f8a6d35b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Shrink CompiledData::Binding by 8 bytesSimon Hausmann2018-07-311-0/+15
| | | | | | | | | | | | | Move the translation data out into a separately indexed table, which allows to shrunk the value union down to 4 bytes, together with the previous commit. Saves ~4k with examples/quickcontrols/extras/flat/Content.qml and ~37K RAM with the gallery. Task-number: QTBUG-69588 Change-Id: Ia5016b072320ebb6b8fcfbb4dad128d53c901c74 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Shrink the size of CompiledData::Function by 16 bytesSimon Hausmann2018-07-301-6/+6
| | | | | | | | | | | | | | It was previously 68 bytes but rounded up to 72 to be multiple of 8. After removing the rarely used qml offset table properties and calculating them on the fly instead, the data structure shrinks to 56 bytes. Saves 2.8K on examples/quickcontrols/extras/flat/Content.qml and about ~22K RAM on the gallery. Task-number: QTBUG-69588 Change-Id: I13d1efae7fa1dff96674d937ffbad002c2f703c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add debug code for dumping unit statsSimon Hausmann2018-07-301-1/+12
| | | | | | | This is useful for profiling the sizes of cache files. Change-Id: I831d0a20c4eda3d707221a61fa7290857605c7fb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Try to load QML cache from CacheLocation if side-by-side failsThiago Macieira2018-07-271-4/+1
| | | | | | | | | This could happen if the .qmlc file is stale or corrupt for some reason. In that case, we should try to load a cache file from the user's CacheLocation. Change-Id: Id2be776c7ae0467c9d9ffffd1543204272a531d1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Various fixes for class supportLars Knoll2018-06-261-13/+26
| | | | | | | | | | | | | | | | Add support for a default constructor if none is given. Fix support for computed method names, by unifying the handling between static and non static methods. Fix our table generation, so that we write UINT_MAX as the string index for undefined strings and not a reference to the empty string, as that can actually be a valid method name. Add support for getter and setter methods in classes. Change-Id: If52c57d6a67424b0218b86339b95aed9d0351e47 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add basic support for EcmaScript classesYulong Bai2018-06-261-6/+64
| | | | | | | | | | | | | | | | Most of the class creation is done inside the runtime in the CreateClass method. Added a corresponding instruction to the interpreter and jit. The compiled data now contains an array of classes containing the compile time generated layout of the class. Currently, classes without an explicit constructor and classes with inheritance are not supported. Done-with: Yulong Bai <yulong.bai@qt.io> Change-Id: I0185dcc1e3b0b8f44deff74e44a8262fc646aa9e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix creation of object literalsLars Knoll2018-06-041-20/+4
| | | | | | | | | | | | | | | | 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>
* Speed up string handling from QML cache filesSimon Hausmann2018-05-161-0/+5
| | | | | | | | | | | | | | | | | | | Currently when extracting a string from a compilation unit, we copy the data. This happens for example when instantiating objects and setting string properties and it also happens when creating the JS runtime strings from the compilation unit. Since QML cache files that are mapped into memory from disk, we can avoid the copy by keeping the files mapped and making sure that the in-memory representation is compatible with QStringData. This optimization is limited to little-endian architectures. Task-number: QTBUG-63068 Change-Id: I2450aacd3bf1eda3e5be4264149b23f0281d8b4e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Cleanup handling of with() statementsLars Knoll2018-05-021-6/+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 <simon.hausmann@qt.io>
* Rework catch context handlingLars Knoll2018-05-021-2/+10
| | | | | | | | | | | | Remove the need for a specialized catch context, instead use a regular block context, that also captures the catched variable. This also removes the need to do lookups by name inside a catch expression. Change-Id: I8b037add7f423922e2a76b4c0da646ca7e25813a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for proper lexical scopingLars Knoll2018-05-021-6/+46
| | | | | | | | | | | | | This is still to some extend work in progress as lexically scoped for loops won't yet do the right thing. let and const variables are still accessible before they are declared, and the global scope doesn't yet have a proper context for lexically declared variables. Change-Id: Ie39f74a8fccdaead437fbf07f9fc228a444c26ed Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Split out the generation of indices for locals and registersLars Knoll2018-05-021-1/+1
| | | | | Change-Id: I0e98ccba9ae3026cd8bfdc4cae100f280b5aa22c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Added support for generator functions and yield expressions to the ASTLars Knoll2018-04-271-0/+2
| | | | | | | | | Some smaller changes to the codegen are included as well to ensure that we catch all uses of generators and properly throw an unimplemented error on them for now. Change-Id: Ib915a0e862e128644ff00dfe989507783c912c66 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix length property of Function objectsLars Knoll2018-04-261-0/+1
| | | | | | | | | | | According to ES6, the length property is the number of required arguments, ie. the number of arguments until the first arg that has adefault parameter. Also fix a crash when parsing a parameterlist with a trailing comma. Change-Id: I4f6b2be4feae7b513388be66b43b160bb3cc77f1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for arrow functionsLars Knoll2018-04-261-0/+2
| | | | | | | | | | | | | 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 <simon.hausmann@qt.io>
* Tighten QML cache version checkingSimon Hausmann2018-03-201-0/+4
| | | | | | | | | | | | | Don't just include the "compile hash" of QtQml in the dependencies hash of QML files but use a dedicated field in the data structure, that we will also fill in when generating cache files ahead of time. This ensures that AOT generated cache files are considered invalid even when switching between different sha1s of declarative. Task-number: QTBUG-66986 Change-Id: I3d8ee103fd1a33a5b4c4576b3a2703fcd09712dd Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Handle function expressions as signal handlersErik Verbruggen2018-03-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-02-021-0/+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-0/+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
| | * Use potentially intercepted URL as ID for compilation unitsUlf Hermann2017-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <michael.brasser@live.com>
* | | Minor data structure cleanupSimon Hausmann2018-01-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The cache files are architecture and ABI independent, so we can remove any associated field/code as well as the workaround for Android. Change-Id: Ia52a5be886fc22a2105460e003e7a76af7dc1818 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Get rid of the unusued canUseSimpleCall flagLars Knoll2017-11-071-2/+0
| | | | | | | | | | | | | | | Change-Id: I5230342db4647bd95793475f751213f0725d6965 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into HEADLars Knoll2017-10-221-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4isel_moth_p.h src/qml/compiler/qv4ssa.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm_p.h src/qml/jit/qv4regalloc.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexp.cpp src/qml/jsruntime/qv4regexp_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp tests/auto/qml/qml.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp Change-Id: I1577e195c736f3414089036b957a01cb91a3ca23
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-09-201-1/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
| | * Get rid of the root object index variableSimon Hausmann2017-09-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to the parent commit to remove the variable that is really a constant (zero). Change-Id: I8fc20027c5c7b871269b814cb8b93636e94be267 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Get rid of the hack for named expressionsLars Knoll2017-09-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Instead simply use the pointer to the FunctionObject we have in the CallData now. Change-Id: I6d7ed8af22e89e0217bef427110611b661ac7965 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove the codeRefs in the Moth::CompilationUnitLars Knoll2017-08-301-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no point in allocating that vector of byte arrays, if we can directly embed those int the CompiledData and reference it from there. Change-Id: I8fc92b1efaca5a9646f40fc84a2ac4191c8f3444 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix line number mapping to work with non increasing line numbersLars Knoll2017-08-291-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The old map assumed that line numbers are always increasing, something that isn't always true. So move to a format where we map blocks of bytecode to a line number instead. Change-Id: I1cd9dd1329d415122cd3d560294ef53007f879f8 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>