Commit Graph

140 Commits

Author SHA1 Message Date
Qt Forward Merge Bot 7a349710cc Merge remote-tracking branch 'origin/5.12' into 5.13
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
2019-03-21 10:59:45 +01:00
Simon Hausmann 5cfccf3089 Remove dead compile time QML context/scope property and id object code
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>
2019-03-20 09:16:52 +00:00
Simon Hausmann c9e6251cc8 Implement dummy QML lookups for "global" variables
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>
2019-03-20 09:16:02 +00:00
Erik Verbruggen 3f2efbd1b9 V4: Generate labels for backward jumps
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>
2019-01-31 09:19:13 +00:00
Erik Verbruggen 784a55a15d V4: Collect trace information in the interpreter
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>
2019-01-25 10:26:13 +00:00
Lars Knoll b1f07986c3 Create proper template objects for tagged templates
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>
2018-11-05 21:15:39 +00:00
Simon Hausmann a4852b1ee7 Fix error reporting when imports or re-exports in modules fail
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>
2018-10-11 14:40:18 +00:00
Rolf Eike Beer 6ed9a0817a properly align string table in compiled data
Change-Id: Ie6534d5443ad046211620c4e0b586d189d0adbef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-14 14:57:37 +00:00
Rolf Eike Beer 624ced39e9 use WTF::roundUpToMultipleOf() instead of open coding it
Change-Id: I3d6bbfcf02748e03c653763175c1904b4c2c8604
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-09-13 12:47:15 +00:00
Rolf Eike Beer 8415875d28 make pointer operations more explicit when building string table
Change-Id: Iff8a45cecc63751f0daae5844f89cf452619d58d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-10 07:18:52 +00:00
Rolf Eike Beer 1a6b225090 avoid duplicate offset calculations when building string table
Change-Id: I5bfc46b9d9cdc3bde35f60de75cb8e9e51b0b0ec
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-07 14:13:15 +00:00
Simon Hausmann bead103138 Implement the dead temporal zone
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>
2018-08-28 17:50:41 +00:00
Lars Knoll a1964f0b8e Cleanup RegExpObject
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>
2018-08-15 14:24:23 +00:00
Simon Hausmann 929ef25efd Fix module dependency handling
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>
2018-08-14 17:45:51 +00:00
Lars Knoll 886d463061 Enable unicode regular expressions
Add support for the 'u' flag for regular expressions.

Change-Id: I409054eaa9c50183619752d14f2638f5a38c0ea7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-10 14:16:12 +00:00
Simon Hausmann 82da798499 Add initial basic support for ES6 modules
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>
2018-08-09 13:18:39 +00:00
Simon Hausmann e99038b24d Reduce memory consumption when loading AOT generated cache files
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>
2018-08-01 09:42:06 +00:00
Simon Hausmann c549d9c4e5 Simplify loading of ahead-of-time created QML cache files
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>
2018-07-31 17:08:31 +00:00
Simon Hausmann 8237f645a3 Optimize memory consumption of ahead-of-time compile cache files
When loading a pre-compiled cache file, the strings contained therein
will remain available in memory since commit
7dcada48d2. 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>
2018-07-31 17:08:08 +00:00
Simon Hausmann 41076956f7 Shrink CompiledData::Function by 8 bytes
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>
2018-07-31 07:28:52 +00:00
Simon Hausmann 2ee5331d8a Shrink CompiledData::Binding by 8 bytes
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>
2018-07-31 07:28:47 +00:00
Simon Hausmann 7c1c016ced Shrink the size of CompiledData::Function by 16 bytes
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>
2018-07-30 19:46:51 +00:00
Simon Hausmann 88bdcd0b7f Add debug code for dumping unit stats
This is useful for profiling the sizes of cache files.

Change-Id: I831d0a20c4eda3d707221a61fa7290857605c7fb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-07-30 19:46:34 +00:00
Thiago Macieira 447e2e0246 Try to load QML cache from CacheLocation if side-by-side fails
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>
2018-07-27 04:56:14 +00:00
Lars Knoll e9b3bdb96e Various fixes for class support
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>
2018-06-26 10:04:11 +00:00
Yulong Bai 74f4065caa Add basic support for EcmaScript classes
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>
2018-06-26 10:03:56 +00:00
Lars Knoll bdb8cf49da Fix creation of object literals
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>
2018-06-04 13:02:32 +00:00
Simon Hausmann 7dcada48d2 Speed up string handling from QML cache files
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>
2018-05-16 09:08:22 +00:00
Lars Knoll 2c23299ecd Cleanup handling of with() statements
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>
2018-05-02 14:17:55 +00:00
Lars Knoll 922e6f42b4 Rework catch context handling
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>
2018-05-02 14:17:51 +00:00
Lars Knoll 20d30b6b3a Add support for proper lexical scoping
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>
2018-05-02 14:17:46 +00:00
Lars Knoll 9934514db7 Split out the generation of indices for locals and registers
Change-Id: I0e98ccba9ae3026cd8bfdc4cae100f280b5aa22c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-05-02 14:17:25 +00:00
Lars Knoll c3ad706c6f Added support for generator functions and yield expressions to the AST
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>
2018-04-27 08:11:00 +00:00
Lars Knoll a1e5364b49 Fix length property of Function objects
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>
2018-04-26 20:27:05 +00:00
Lars Knoll c68dc99c92 Add support for arrow functions
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>
2018-04-26 20:26:51 +00:00
Simon Hausmann 80592dcf0d Tighten QML cache version checking
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>
2018-03-20 09:44:15 +00:00
Erik Verbruggen 22b13921f8 Handle function expressions as signal handlers
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>
2018-03-20 09:38:27 +00:00
Liang Qi a9a9fa0c47 Merge remote-tracking branch 'origin/5.10' into dev
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
2018-02-02 15:59:32 +01:00
Liang Qi 2570b801c7 Merge remote-tracking branch 'origin/5.9' into 5.10
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
2018-01-24 09:34:11 +01:00
Simon Hausmann 1ab5d14615 Minor data structure cleanup
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>
2018-01-22 09:21:38 +00:00
Ulf Hermann 52bc4fbfba Use potentially intercepted URL as ID for compilation units
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>
2017-12-21 16:02:50 +00:00
Lars Knoll 07980a0346 Get rid of the unusued canUseSimpleCall flag
Change-Id: I5230342db4647bd95793475f751213f0725d6965
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2017-11-07 07:24:29 +00:00
Lars Knoll aceb0d0cd2 Merge remote-tracking branch 'origin/dev' into HEAD
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
2017-10-22 12:26:28 +02:00
Lars Knoll 55a671ea73 Merge remote-tracking branch 'origin/5.9' into 5.10
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
2017-09-20 14:27:41 +02:00
Simon Hausmann ebda8170a6 Get rid of the root object index variable
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>
2017-09-08 12:46:41 +00:00
Lars Knoll 020ad3d259 Get rid of the hack for named expressions
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>
2017-09-02 07:12:22 +00:00
Lars Knoll 260a24800d Remove the codeRefs in the Moth::CompilationUnit
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>
2017-08-30 08:09:13 +00:00
Lars Knoll 77e0602021 Fix line number mapping to work with non increasing line numbers
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>
2017-08-29 10:42:35 +00:00
Lars Knoll 4e0174a88e Move line number information into a side table
Don't emit any Line instructions anymore, and instead store
the info in a side table in the compiled data, where it can
be looked up on demand.

Change-Id: Idcaf3bf4ee4129fd62f9e717bf1277dc6a34fe19
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2017-08-25 12:05:59 +00:00
Lars Knoll f1aff1f2d4 Merge remote-tracking branch 'origin/dev' into wip/new-backend
Change-Id: Iff06429f948ac6cdec77a9e5bb8c5375c56fe705
2017-08-22 17:17:57 +02:00