mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -51,7 +51,7 @@ struct TestError {
|
|||
ByteString harness_file;
|
||||
};
|
||||
|
||||
using ScriptOrModuleProgram = Variant<JS::NonnullGCPtr<JS::Script>, JS::NonnullGCPtr<JS::SourceTextModule>>;
|
||||
using ScriptOrModuleProgram = Variant<GC::Ref<JS::Script>, GC::Ref<JS::SourceTextModule>>;
|
||||
|
||||
template<typename ScriptType>
|
||||
static Result<ScriptOrModuleProgram, TestError> parse_program(JS::Realm& realm, StringView source, StringView filepath)
|
||||
|
@ -147,7 +147,7 @@ static Result<StringView, TestError> read_harness_file(StringView harness_file)
|
|||
return cache->value.view();
|
||||
}
|
||||
|
||||
static Result<JS::NonnullGCPtr<JS::Script>, TestError> parse_harness_files(JS::Realm& realm, StringView harness_file)
|
||||
static Result<GC::Ref<JS::Script>, TestError> parse_harness_files(JS::Realm& realm, StringView harness_file)
|
||||
{
|
||||
auto source_or_error = read_harness_file(harness_file);
|
||||
if (source_or_error.is_error())
|
||||
|
@ -161,7 +161,7 @@ static Result<JS::NonnullGCPtr<JS::Script>, TestError> parse_harness_files(JS::R
|
|||
harness_file
|
||||
};
|
||||
}
|
||||
return program_or_error.release_value().get<JS::NonnullGCPtr<JS::Script>>();
|
||||
return program_or_error.release_value().get<GC::Ref<JS::Script>>();
|
||||
}
|
||||
|
||||
enum class StrictMode {
|
||||
|
@ -216,8 +216,8 @@ static Result<void, TestError> run_test(StringView source, StringView filepath,
|
|||
auto vm = MUST(JS::VM::create());
|
||||
vm->set_dynamic_imports_allowed(true);
|
||||
|
||||
JS::GCPtr<JS::Realm> realm;
|
||||
JS::GCPtr<JS::Test262::GlobalObject> global_object;
|
||||
GC::Ptr<JS::Realm> realm;
|
||||
GC::Ptr<JS::Test262::GlobalObject> global_object;
|
||||
auto root_execution_context = MUST(JS::Realm::initialize_host_defined_realm(
|
||||
*vm,
|
||||
[&](JS::Realm& realm_) -> JS::GlobalObject* {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue