Commit graph

4827 commits

Author SHA1 Message Date
Hendiadyoin1
1341f4438d LibJS: Save scheduled jumps when entering unwind contexts
These are then restored upon `ContinuePendingUnwind`.
This stops us from forgetting where we needed to jump when we do extra
try-catches in finally blocks.

Co-Authored-By: Jesús "gsus" Lapastora <cyber.gsuscode@gmail.com>
2023-10-30 13:10:08 +01:00
Hendiadyoin1
4da5b8ec67 LibJS: Reset scheduled-jump flag when throwing an exception
Otherwise we might attempt to follow the scheduled jump later
2023-10-30 13:10:08 +01:00
Hendiadyoin1
f5645e3c9c LibJS: Use static unwind mappings for unwind related functions 2023-10-30 13:10:08 +01:00
Hendiadyoin1
73f347b75c LibJS: Create static unwind mappings for BasicBlocks
This is currently only used in the bytecode dump to annotate to where
unwinds lead per block, but will be hooked up to the virtual machine in
the next commit.
2023-10-30 13:10:08 +01:00
Andreas Kling
0c6d094a7e LibJS/JIT: Stop logging JIT success by default (but still log failure) 2023-10-30 07:11:43 +01:00
Zaggy1024
dfaf645302 LibJS: Add an inline JIT fast path when ToNumeric has nothing to do
In most cases, this op will do nothing, as it is running on an the
accumulator while it already contains a number. Let's avoid doing that
native call.
2023-10-30 07:10:54 +01:00
Simon Wanner
a2b0154661 LibJS/JIT: Compile the AsyncIteratorClose instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
ac59e982a9 LibJS/JIT: Compile the CopyObjectExcludingProperties instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
9494fbe670 LibJS/JIT: Compile the PutByValueWithThis instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
847889343f LibJS/JIT: Compile the New##ErrorName instructions 2023-10-30 07:10:24 +01:00
Simon Wanner
fd059d4e4a LibJS/JIT: Compile the JumpUndefined instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
a16082c6a5 LibJS/JIT: Compile the HasPrivateId instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
712c89dacf LibJS/JIT: Compile the GetNewTarget instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
19045d6431 LibJS/JIT: Compile the GetMethod instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
06ea4cfc4f LibJS/JIT: Compile the DeleteVariable instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
cd18bc9d55 LibJS/JIT: Compile the GetImportMeta instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
c0c40110c1 LibJS/JIT: Compile the ImportCall instruction 2023-10-30 07:10:24 +01:00
Simon Wanner
ac43d3f6db LibJS/JIT: Compile the PutPrivateById instruction 2023-10-29 22:57:19 +01:00
Simon Wanner
81697549b7 LibJS/JIT: Compile the PutByIdWithThis instruction 2023-10-29 22:57:19 +01:00
Simon Wanner
38d5d7979b LibJS/JIT: Compile the DeleteByIdWithThis instruction 2023-10-29 22:57:19 +01:00
Simon Wanner
b53277110e LibJS/JIT: Compile the GetByValueWithThis instruction 2023-10-29 22:57:19 +01:00
Simon Wanner
569ca57e22 LibJS/JIT: Compile the GetByIdWithThis instruction 2023-10-29 22:57:19 +01:00
Simon Wanner
ad81f49b02 LibJS/JIT: Compile the ResolveSuperBase instruction 2023-10-29 22:57:19 +01:00
Simon Wanner
4e9edb8c53 LibJS/JIT: Compile the GetPrivateById instruction 2023-10-29 22:57:19 +01:00
Simon Wanner
4ce2878394 LibJS/JIT: Compile the GetObjectPropertyIterator instruction 2023-10-29 22:57:19 +01:00
Simon Wanner
ad81bf47bb LibJS: Move GetObjectPropertyIterator impl to CommonImplementations 2023-10-29 22:57:19 +01:00
Jakub Berkop
6a7b9b85a4 LibJS/JIT: Compile the DeleteByValueWithThis instruction 2023-10-29 21:51:46 +01:00
Jakub Berkop
0776404e03 LibJS/JIT: Compile the DeleteByValue instruction 2023-10-29 21:51:46 +01:00
Jakub Berkop
f5fcd4596c LibJS/JIT: Compile the DeleteById instruction 2023-10-29 21:51:46 +01:00
Simon Wanner
40064d872f LibJS/JIT: Compile the Append instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
516bb01082 LibJS/Bytecode: Move Append impl to CommonImplementations 2023-10-29 17:36:09 +01:00
Simon Wanner
3dc5c8d28e LibJS/JIT: Compile the IteratorToArray instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
5179ff5fc9 LibJS/Bytecode: Move IteratorToArray impl to CommonImplementations 2023-10-29 17:36:09 +01:00
Simon Wanner
c697ff61f6 LibJS/JIT: Compile the IteratorClose instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
233502a10c LibJS/JIT: Compile the IteratorResultValue instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
e7fdf9c7e5 LibJS/JIT: Compile the ThrowIfNullish instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
9e2edc3085 LibJS/JIT: Compile the ThrowIfNotObject instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
39deb365d2 LibJS/JIT: Compile the IteratorResultDone instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
045a1386d8 LibJS/JIT: Compile the IteratorNext instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
661dbbc83d LibJS/Bytecode: Move object_to_iterator to CommonImplementations 2023-10-29 17:36:09 +01:00
Simon Wanner
4f8f8b7792 LibJS/JIT: Compile the GetIterator instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
d416cef9bb LibJS/Bytecode: Move iterator_to_object to CommonImplementations 2023-10-29 17:36:09 +01:00
Simon Wanner
d247744a3e LibJS/JIT: Compile the SuperCallWithArgumentArray instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
1eee110575 LibJS: Move SuperCallWithArgumentArray impl to CommonImplementations 2023-10-29 17:36:09 +01:00
Simon Wanner
09dce5f1bd LibJS/JIT: Compile the BlockDeclarationInstantiation instruction 2023-10-29 17:36:09 +01:00
Simon Wanner
a28d6291ad LibJS/JIT: Generate switch cases using X macro 2023-10-29 17:36:09 +01:00
Simon Wanner
f89bfb3f27 LibJS/JIT: Declare compile_* methods using X macro 2023-10-29 17:36:09 +01:00
Zaggy1024
56e8f52cb3 LibJIT/LibJS: Remove jump_if_***() in favor of jump_if()
The `jump_if()` function implements all the conditions already in use
and more, so let's avoid encouraging more wrapper functions.
2023-10-29 17:11:04 +01:00
iliadsh
4f3945024a LibJS/JIT: Add fast path for Add Int32, Int32
This uses the 32-bit registers to perform the addition and bail if the
overflow flag (OF) is set.
2023-10-29 08:02:00 +01:00
Simon Wanner
4b23a7dfb4 LibJS/JIT: Compile the NewClass bytecode instruction 2023-10-29 07:44:11 +01:00