Hendiadyoin1
fafe498238
LibJS: Expose some internals of Instructions
...
These will be needed in the future to allow optimization passes to check
against these
2022-12-03 15:25:05 +00:00
Hendiadyoin1
fd6e75fd01
LibJS: Add a way to replace references to registers in Bytecode
2022-12-03 15:25:05 +00:00
Hendiadyoin1
f5e7fa4d0e
LibJS: Make Register comparable
2022-12-03 15:25:05 +00:00
Hendiadyoin1
186237aec8
LibJS: Don't try to merge blocks not ending in Jumps
2022-12-03 17:07:30 +03:30
Hendiadyoin1
192897c269
LibJS: Remeber which instruction terminated a block
2022-12-03 17:07:30 +03:30
Hendiadyoin1
8c4717fc6e
LibJS: Add a debug_position helper to the Bytecode Interpreter
...
This also changes argument_list_evaluation's dbgln to use it.
2022-12-03 17:07:30 +03:30
Hendiadyoin1
b86f1c2fe7
LibJS: Restore cached current_block on return in Bytecode
...
Otherwise debug prints will show the wrong block until we preform a jump
2022-12-03 17:07:30 +03:30
Hendiadyoin1
a00c421d61
LibJS: Handle FinishUnwind in GenerateCFG
2022-12-03 17:07:30 +03:30
Hendiadyoin1
6998b72d22
LibJS: Mark FinishUnwind as a terminator
2022-12-03 17:07:30 +03:30
Hendiadyoin1
ded7545db1
LibJS: Use a switch statement in GenerateCFG
2022-12-03 17:07:30 +03:30
Hendiadyoin1
7697e09660
LibJS: Don't mark blocks for unification multiple times
...
This would cause a UAF otherwise
2022-12-03 17:07:30 +03:30
Idan Horowitz
2e806dab07
LibJS: Implement Set.prototype.isDisjointFrom
2022-12-02 13:09:15 +01:00
Idan Horowitz
3470f33a0f
LibJS: Implement Set.prototype.isSupersetOf
2022-12-02 13:09:15 +01:00
Idan Horowitz
e29be4eaa8
LibJS: Implement Set.prototype.isSubsetOf
2022-12-02 13:09:15 +01:00
Idan Horowitz
e359eeabe8
LibJS: Implement Set.prototype.symmetricDifference
2022-12-02 13:09:15 +01:00
Idan Horowitz
be8329d5f6
LibJS: Implement Set.prototype.difference
2022-12-02 13:09:15 +01:00
Idan Horowitz
9e693304ff
LibJS: Implement Set.prototype.intersection
2022-12-02 13:09:15 +01:00
Idan Horowitz
fee65f6453
LibJS: Implement Set.prototype.union
2022-12-02 13:09:15 +01:00
Idan Horowitz
8e1df36588
LibJS: Implement the Set Methods proposal abstract operations
2022-12-02 13:09:15 +01:00
Linus Groh
b0e7d59b8b
LibJS: Throw on conversion from TimeZone to Calendar and vice versa
...
This is a normative change in the Temporal spec.
See: 2084e77
2022-12-02 02:04:13 +01:00
Linus Groh
ca038c1a4e
LibJS: Align Temporal.{Calendar,TimeZone} id getters with toString
...
This is a normative change in the Temporal spec.
See: 0bb391a
2022-12-02 02:04:13 +01:00
Timothy Flynn
c21e9a415d
LibJS: Add missing spec link on String.prototype.toWellFormed
...
Missed in commit 3ee5217adc
.
2022-12-01 11:17:02 -05:00
Timothy Flynn
3ee5217adc
LibJS: Implement String.prototype.toWellFormed
2022-12-01 17:03:55 +01:00
Timothy Flynn
0bb46235a7
LibJS: Implement String.prototype.isWellFormed
2022-12-01 17:03:55 +01:00
Linus Groh
24237ae5bf
LibJS: Add FIXME to removed SplitMatch AO
2022-12-01 13:32:47 +01:00
Linus Groh
e960f9549e
LibJS: Sort String.prototype methods in spec order
...
This is similar to these previous changes in LibJS:
- 999ad734ec
- f19c4ab693
- 5f5bcd549e
2022-12-01 13:32:47 +01:00
Timothy Flynn
69f6fbdf99
LibJS: Replace CreateDataPropertyOrThrow with Set in TypedArray toSorted
...
This was an errant transcription in 4dbb2c2d44
.
2022-11-30 23:27:51 +01:00
Timothy Flynn
34e328e580
LibJS: Allow TypedArrays to become detached while sorting
...
This is a normative change in the Change Array by Copy proposal. See:
17d8b54
2022-11-30 23:27:51 +01:00
Timothy Flynn
31d315001c
LibJS: Allocate concrete TypedArrays with a preallocated base TypedArray
...
TypedArray constructors/prototypes are currently allocating within their
C++ constructor when trying to access the intrinsic base TypedArray. To
prevent this, construct these objects with an already-allocated base
TypedArray.
2022-11-30 13:05:57 -05:00
Timothy Flynn
c0952e3670
LibJS: Do not allocate in Set's constructor
...
We are currently allocating in Set's constructor to create the set's
underlying Map. This can cause GC to occur before the member is actually
initialized, thus we will crash in Set::visit_edges trying to visit a
member that does not exist.
Instead, create the Map in Set::initialize, where we can allocate. Also
change Map to be stored as a normal JS heap-allocated object, rather
than as a stack variable.
2022-11-30 13:05:57 -05:00
davidot
d218a68296
LibJS: Allow CallExpressions as lhs of assignments in most cases
...
Although not quite like the spec says the web reality is that a lhs
target of CallExpression should not give a SyntaxError but only a
ReferenceError once executed.
2022-11-30 08:05:37 +01:00
davidot
8319d7ac06
LibJS: Fix that constant declaration in for loop was mutable in body
2022-11-30 08:05:37 +01:00
Timothy Flynn
675e5bfdce
LibJS: Allow specifying only roundingIncrement in NumberFormat options
...
This is a normative change in the Intl.NumberFormat v3 spec. See:
a260aa3
2022-11-29 10:24:44 +01:00
davidot
ab19d7c99d
LibJS: Enable commented out tests in Math.asin
2022-11-28 13:10:21 +01:00
davidot
bf1b2d63c6
LibJS: Add spec comments and check for edge cases in Math.tanh
2022-11-28 13:10:21 +01:00
davidot
8de8742b7c
LibJS: Add spec comments and check for edge cases in Math.sinh
2022-11-28 13:10:21 +01:00
davidot
4306462a95
LibJS: Add spec comments and check for edge cases in Math.log10
2022-11-28 13:10:21 +01:00
davidot
eda90b54d4
LibJS: Add spec comments and check for edge cases in Math.log2
2022-11-28 13:10:21 +01:00
davidot
4813385c9a
LibJS: Add spec comments and check for edge cases in Math.log
2022-11-28 13:10:21 +01:00
davidot
d4e5644df8
LibJS: Add spec comments and check for edge cases in Math.atanh
2022-11-28 13:10:21 +01:00
davidot
c565cbd30c
LibJS: Add spec comments and check for edge cases in Math.atanh
2022-11-28 13:10:21 +01:00
davidot
68aeeea5d2
LibJS: Add spec comments and check for edge cases in Math.asinh
2022-11-28 13:10:21 +01:00
davidot
6bdf021b0c
LibJS: Add spec comments and check for edge cases in Math.asin
2022-11-28 13:10:21 +01:00
davidot
cf4daa3941
LibJS: Add spec comments and check for edge cases in Math.acosh
2022-11-28 13:10:21 +01:00
Kyle Lanmon
31290c8527
LibSyntax: Teach each highlighter about it's comment syntax
2022-11-27 18:28:43 -07:00
davidot
2c26ee89ac
LibJS: Remove m_first_invalid_property_range from ObjectExpression
...
This was state only used by the parser to output an error with
appropriate location. This shrinks the size of ObjectExpression from
120 bytes down to just 56. This saves roughly 2.5 MiB when loading
twitter.
2022-11-27 12:31:37 +01:00
davidot
3acbd96851
LibJS: Remove is_use_strict_directive for all StringLiterals
...
This value was only used in the parser so no need to have this in every
string literal in the ast.
2022-11-27 12:31:37 +01:00
davidot
0c4befd811
LibJS: Use the source offset to sort imports in module
...
Using source offsets directly means we don't have to synthesize any
SourceRanges and circumvents that SourceRange returns invalid values for
the last range of a file.
2022-11-27 00:51:36 +00:00
davidot
1dc9769f7d
LibJS: No longer assume there is a cycle root when module failed before
...
This issue could be triggered by evaluating a module twice. If it failed
during evaluation the cycle root was never set but that status is
evaluated. This failed in step 3 of Evaluate which assumes it has a
cycle root. This is a spec issue see:
https://github.com/tc39/ecma262/issues/2823
To fix this we check if the module itself has a top level capability
first before going to the cycle root.
Co-authored-by: Jamie Mansfield <jmansfield@cadixdev.org>
2022-11-27 00:51:36 +00:00
davidot
d87676de8a
LibJS: Remove already resolved FIXME
...
We wouldn't want someone to be disappointed when trying to fix this :^).
2022-11-27 00:51:36 +00:00