Age | Commit message (Collapse) | Author |
|
These were missed in 565a880ce5a14bac817c73916e91ebfa04c8b99b.
This wasn't an issue because these tests don't pledge/unveil anything,
so they could happily dlopen() the library at runtime. But this is now
needed in order to migrate LibUnicode towards weak symbols instead.
|
|
The spec has a note stating that resolve binding will always return a
reference whose [[ReferencedName]] field is name. However this is not
correct as the underlying method GetIdentifierReference may throw on
env.HasBinding(name) thus it can throw. However, there are some
scenarios where it cannot throw because the reference is known to exist
in that case we use MUST with a comment.
|
|
Previously we might swallow invalid unicode point which would skip valid
ascii characters. This could be dangerous as we might skip a '"' thus
not closing a string where we should.
This might have been exploitable as it would not have been clear what
code gets executed when looking at a script.
Another approach to this would be simply replacing all invalid
characters with the replacement character (this is what v8 does). But
our lexer and parser are currently not set up for such a change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also update get_function_name() to use ThrowCompletionOr, but this is
not a standard AO and should be refactored out of existence eventually.
|
|
Also fixes that it tried to make substrings past the end of the source
if we overran the source length.
|
|
This is as the spec would require you to do it and necessary for changes
to come in the following commits.
|
|
Instead of creating a Parser and Lexer manually in test-js, we now
use either JS::Script::parse() or JS::SourceTextModule::parse()
to load tests.
|
|
|
|
This should fix the flaky tests of test-js.
It also fixes the tests when running with the -g flag since the values
will not be garbage collected too soon.
|
|
In a module strict mode should be enabled at the start of parsing and we
allow import and export statements.
|
|
Split out the functionality to gather multiple tests from the filesystem
and run them in turn into Test::TestRunner, and leave the JavaScript
specific test harness logic in Test::JS::TestRunner and friends.
|
|
This adds component declarations so that users can select to not build
certain parts of the OS.
|
|
|
|
This is an implementation of the following optional optimization:
https://tc39.es/ecma262/#sec-weakref-execution
|
|
Fixes #7566.
|
|
|
|
The TestRunner objects at the end of test-js are destroyed after the
if/else that chooses whether to run the 262 parser tests or the standard
tests. Accessing TestRunner::the() after the lifetime of the TestRunners
ends is UB, so return the Test::Counts from run() instead. Also, fix the
destructor of TestRunner to set s_the to nullptr so that if anyone tries
this type of shenanigains again, they'll get a crash :^).
|
|
...and make it an enum class so people don't omit "OpenMode".
|
|
When these were moved, there was a copy paste bug in the install
directives of both of these binaries.
|
|
|