| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
qv4bytecodegenerator.cpp:99:19: error: ‘instructionsAsInts[3]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
Change-Id: I940917d6763842499b18fffd1513ff143fc502bb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Fixes clang develop-builds
Change-Id: If262d7038fc36bcec281be4c218b3cf3d4ae4deb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ie1b18dd00705b1913572b87c6968a63438e7a90c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Ensure that the integer arguments for widely encoded instructions are
always encoded as little endian.
Change-Id: Iccd45aefb20b20d76fe1618d6706435142b202b9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Once we have identified that an instruction needs to be encoded in wide
format, we do not inspect the remaining arguments any further.
Change-Id: I0164acedc68b28bd95f9aab0c0fd1702a59de90d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to the difference of sign of the char type, byte code is encoded
differently on x86-64 than if it was on ARM and it also is decoded
differently. The problem at hand here was that negative jumps were
encoded as two-byte instructions (opcode and negative offset as byte) on
x86-64 when qmlcachegen is run. At run-time the negative offset was read
into a char type and consequently interpreted as a positive jump,
leading to crashes.
The explicit use of qint8 as signed byte type in encoding/decoding
sensitive parts avoids the decoding issue and should also result in
consistent encoding.
The added auto-test is (among other configurations) run in the CI under
qemu, which means the x86-64 host-built qmlcachegen will generate byte
code and the tst_qmlcachegen ARM binary will run under qemu and
reproduce this scenario.
Task-number: QTBUG-65521
Change-Id: I615628f53475dad38a41095c6e7ffea0c34d58ac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Debug instructions are used to trigger break points and are added for
every source line.
We also need to insert Debug instructions before Ret, so that we can
step out. We also need to assign line numbers to the entry and return
points of "abbreviated" QML functions (by simulating lbrace and
rbrace) so that we can set break points on them. The line numbers on Ret
need to be negative, so that you cannot (accidentally) set break points
on them. A typical signal handler or binding in QML consists of only one
line and if you set a break point on that line, you want it to hit only
once, when entering the function. If the line numbers on Ret were
positive, it would be hit again on exit. Some of the tests in
tst_qqmldebugjs implicitly check for that.
Also the new interpreter does something on the left brace, so a
function actually starts there, not on the first statement.
Change-Id: Id9dfb20e35696b420d0950deab988f7cc5197bfc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
The complaint from GCC was that a static array InstrInfo::argumentCount)
cannot be in a union.
Change-Id: Ibd8dad478dc95853004fb2a871d5883d4dc73dcc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only keep 1 byte and 4 byte wide instructions. As this gives
less than 256 distinct instructions, those can now again be
encoded in 1 byte, dropping the Wide and XWide prefix instructions.
This gives us 95% of the size savings that we had before, by
being able to encode the full instruction in one byte, while
bringing back pretty much all of the speed lost through the
compression.
Change-Id: I9ec978d43314ed304ca0ee5546035d2b581b6dc3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: If95a5733594a1beaa41063249a364988190844c5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I90daee5388f5aba5a5c1cd643379adc9a8e05039
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
And add proper decoding for the prefixed instructions to the
VME and bytecode dumper.
We still only generate XWide instructions, that will get fixed
in the next change.
Change-Id: I6d2dc6a0a4f706044038274ca79e019a6c9bb7d9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
As a first step, use only one byte for the instruction type.
Change-Id: I762a05233c277a7144472793bc71e41d9e8e82cb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Instead add it to the unencoded instruction vector
Change-Id: I7e88d808bb94f75aecdf9d3ed9bace2055c1da5d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Don't use the old instruction structures in the VME anymore,
instead directly decode into scoped registers.
Change-Id: Ie03ebad98050ebfd9eb9cc7e9273e5db92884a89
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is big enough for generated bytecode, and gives more uniform
sizing in our instructions (everything's an int), that will simplify
moving over to a compressed instruction stream.
Change-Id: Ieb13c5db84348f11c3297c08dca640bb9ec5f224
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
All escaping arguments will still be loaded/stored from/to the CallData,
but this is not the common case. In a subsequent patch we can make the
caller prepare the stack frame, and for the common case we don't even
need to copy arguments around.
Change-Id: I3fbb6fe575a564d05a9fd5dcc0c8f4129eac3bc2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: Ib7839ac09f520aaff3fadfdb37ea63d85a257bfd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I9f4a5a8470c1abc6b07a28c71fdad0d208e1fea1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
Remove all files from the old compiler pipeline that are now
unused. This includes the whole IR, JIT code generation,
and the old Moth Isel.
Change-Id: I50d06abfbcf0e9755a54ed94638f8bb74f9512b1
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: Id9ab6f3e9f5ae1c1bedb0b34bf1fac6abfe0bbfc
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
| |
It'd be way better to store line numbers in a IP->line table, instead
of putting Line instructions into the bytecode.
Change-Id: Ie20abf356612a0692507a7e079ba87d711707eb9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Differences:
- push parameters on the stack, including space for CallData members
- call instructions calculate the argument start
- use temp space above the calldata to evaluate arguments
- fewer temporaries are needed when a call is done while generating the
arguments of another call
- when calling the function, the js stack space above the callData is
not used, allowing for optimizations in the future
- Array and ObjectLiteral use the same mechanism
Change-Id: Id100fa06f12cc9d941b0f90b0b81b8270a8e4f5d
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I67f8397686a439cede37b52863d32dc194bee23f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I02d57d2cbb4ae56c0c4626d96cbdf9935b366579
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: I7d7845a9d8d147bd363c0f60df41066fab355272
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
| |
Those Labels can be linked to a code location further ahead.
Change-Id: I82f1a719654162db0e0abb46df602ee2e01154da
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ifcd57713e1cfa9514d3955e26f739a359cdaa8e5
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Add Label and Jump classes to facilitate the handling, and
resolve them to proper offsets at finalize() time.
Change-Id: Ic140a3ceb848fb29657a1b156c97b806db6dc434
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
| |
And a commented out finalize() call to the bytecodegenerator
Change-Id: Iaaf8981ee658e19b6816589d4340a8e5744764b7
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
Use the generator to store the list of instructions, labels
and patches. The finalize() method can then create the
final bytecode out of that list.
Change-Id: If2ea3118ed6e8744545bb918ecc4bbc87d6a3ff1
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|