summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Meta/Lagom/Fuzzers/FuzzilliJs.cpp4
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp38
-rw-r--r--Tests/LibWasm/test-wasm.cpp8
-rw-r--r--Userland/Applications/Spreadsheet/JSIntegration.cpp14
-rw-r--r--Userland/Applications/Spreadsheet/JSIntegration.h14
-rw-r--r--Userland/Libraries/LibJS/Forward.h10
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayConstructor.h8
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp68
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayPrototype.h68
-rw-r--r--Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp20
-rw-r--r--Userland/Libraries/LibJS/Runtime/AtomicsObject.h20
-rw-r--r--Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/BigIntConstructor.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/BigIntPrototype.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/BooleanPrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/BooleanPrototype.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp20
-rw-r--r--Userland/Libraries/LibJS/Runtime/ConsoleObject.h20
-rw-r--r--Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp46
-rw-r--r--Userland/Libraries/LibJS/Runtime/DataViewPrototype.h48
-rw-r--r--Userland/Libraries/LibJS/Runtime/DateConstructor.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/DateConstructor.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/DatePrototype.cpp80
-rw-r--r--Userland/Libraries/LibJS/Runtime/DatePrototype.h80
-rw-r--r--Userland/Libraries/LibJS/Runtime/ErrorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ErrorPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/FunctionPrototype.cpp10
-rw-r--r--Userland/Libraries/LibJS/Runtime/FunctionPrototype.h10
-rw-r--r--Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/GlobalObject.cpp24
-rw-r--r--Userland/Libraries/LibJS/Runtime/GlobalObject.h24
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/Intl.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp18
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h28
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/IteratorPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/JSONObject.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/JSONObject.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapPrototype.cpp20
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapPrototype.h22
-rw-r--r--Userland/Libraries/LibJS/Runtime/MathObject.cpp70
-rw-r--r--Userland/Libraries/LibJS/Runtime/MathObject.h70
-rw-r--r--Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/NumberConstructor.h8
-rw-r--r--Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/NumberPrototype.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp44
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectConstructor.h44
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp24
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectPrototype.h24
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp14
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromiseConstructor.h16
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromisePrototype.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/ProxyConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ProxyConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ReflectObject.cpp26
-rw-r--r--Userland/Libraries/LibJS/Runtime/ReflectObject.h26
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp24
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpPrototype.h26
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetPrototype.cpp16
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetPrototype.h18
-rw-r--r--Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringConstructor.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringConstructor.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringPrototype.cpp92
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringPrototype.h92
-rw-r--r--Userland/Libraries/LibJS/Runtime/SymbolConstructor.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/SymbolConstructor.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/SymbolPrototype.h8
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp48
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h48
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp32
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h32
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp12
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h12
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp32
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h32
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp18
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/Now.h18
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp50
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h50
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp62
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h62
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp20
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h20
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp30
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h30
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp34
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h34
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp12
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h12
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp72
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h72
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp64
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h64
-rw-r--r--Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/WeakMapPrototype.h8
-rw-r--r--Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/WeakRefPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/WeakSetPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/WeakSetPrototype.h6
-rw-r--r--Userland/Libraries/LibTest/JavaScriptTestRunner.h4
-rw-r--r--Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Bindings/CSSNamespace.h4
-rw-r--r--Userland/Libraries/LibWeb/Bindings/LocationObject.cpp22
-rw-r--r--Userland/Libraries/LibWeb/Bindings/LocationObject.h26
-rw-r--r--Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Bindings/NavigatorObject.h4
-rw-r--r--Userland/Libraries/LibWeb/Bindings/WindowObject.cpp74
-rw-r--r--Userland/Libraries/LibWeb/Bindings/WindowObject.h76
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp4
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h4
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp6
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h6
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp8
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h8
-rw-r--r--Userland/Services/WebContent/ConsoleGlobalObject.cpp2
-rw-r--r--Userland/Services/WebContent/ConsoleGlobalObject.h2
-rw-r--r--Userland/Utilities/js.cpp28
180 files changed, 1486 insertions, 1480 deletions
diff --git a/Meta/Lagom/Fuzzers/FuzzilliJs.cpp b/Meta/Lagom/Fuzzers/FuzzilliJs.cpp
index 95bf3cf4e4..7afc6dea57 100644
--- a/Meta/Lagom/Fuzzers/FuzzilliJs.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzilliJs.cpp
@@ -125,7 +125,7 @@ public:
virtual void initialize_global_object() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(fuzzilli);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(fuzzilli);
};
TestRunnerGlobalObject::TestRunnerGlobalObject()
@@ -136,7 +136,7 @@ TestRunnerGlobalObject::~TestRunnerGlobalObject()
{
}
-JS_DEFINE_NATIVE_FUNCTION(TestRunnerGlobalObject::fuzzilli)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TestRunnerGlobalObject::fuzzilli)
{
if (!vm.argument_count())
return JS::js_undefined();
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp
index 7315cf81e5..b2a2b6c7d4 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp
@@ -1435,7 +1435,7 @@ static void generate_function(SourceGenerator& generator, IDL::Function const& f
}
function_generator.append(R"~~~(
-JS_DEFINE_NATIVE_FUNCTION(@class_name@::@function.name:snakecase@)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@class_name@::@function.name:snakecase@)
{
)~~~");
@@ -2551,7 +2551,7 @@ private:
auto function_generator = generator.fork();
function_generator.set("function.name:snakecase", make_input_acceptable_cpp(function.name.to_snakecase()));
function_generator.append(R"~~~(
- JS_DECLARE_NATIVE_FUNCTION(@function.name:snakecase@);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(@function.name:snakecase@);
)~~~");
}
@@ -2782,24 +2782,24 @@ private:
auto function_generator = generator.fork();
function_generator.set("function.name:snakecase", make_input_acceptable_cpp(function.name.to_snakecase()));
function_generator.append(R"~~~(
- JS_DECLARE_NATIVE_FUNCTION(@function.name:snakecase@);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(@function.name:snakecase@);
)~~~");
}
if (interface.has_stringifier) {
auto stringifier_generator = generator.fork();
stringifier_generator.append(R"~~~(
- JS_DECLARE_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
)~~~");
}
if (interface.pair_iterator_types.has_value()) {
auto iterator_generator = generator.fork();
iterator_generator.append(R"~~~(
- JS_DECLARE_NATIVE_FUNCTION(entries);
- JS_DECLARE_NATIVE_FUNCTION(for_each);
- JS_DECLARE_NATIVE_FUNCTION(keys);
- JS_DECLARE_NATIVE_FUNCTION(values);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(entries);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(for_each);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(keys);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(values);
)~~~");
}
@@ -2807,12 +2807,12 @@ private:
auto attribute_generator = generator.fork();
attribute_generator.set("attribute.name:snakecase", attribute.name.to_snakecase());
attribute_generator.append(R"~~~(
- JS_DECLARE_NATIVE_FUNCTION(@attribute.name:snakecase@_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(@attribute.name:snakecase@_getter);
)~~~");
if (!attribute.readonly) {
attribute_generator.append(R"~~~(
- JS_DECLARE_NATIVE_FUNCTION(@attribute.name:snakecase@_setter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(@attribute.name:snakecase@_setter);
)~~~");
}
}
@@ -3189,7 +3189,7 @@ static @fully_qualified_name@* impl_from(JS::VM& vm, JS::GlobalObject& global_ob
}
attribute_generator.append(R"~~~(
-JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::@attribute.getter_callback@)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@prototype_class@::@attribute.getter_callback@)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -3227,7 +3227,7 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::@attribute.getter_callback@)
if (!attribute.readonly) {
attribute_generator.append(R"~~~(
-JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::@attribute.setter_callback@)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@prototype_class@::@attribute.setter_callback@)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -3279,7 +3279,7 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::@attribute.setter_callback@)
stringifier_generator.set("attribute.cpp_getter_name", interface.stringifier_attribute->to_snakecase());
stringifier_generator.append(R"~~~(
-JS_DEFINE_NATIVE_FUNCTION(@class_name@::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@class_name@::to_string)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -3310,7 +3310,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::to_string)
if (interface.pair_iterator_types.has_value()) {
auto iterator_generator = generator.fork();
iterator_generator.append(R"~~~(
-JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::entries)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@prototype_class@::entries)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -3319,7 +3319,7 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::entries)
return wrap(global_object, @iterator_name@::create(*impl, Object::PropertyKind::KeyAndValue));
}
-JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::for_each)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@prototype_class@::for_each)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -3346,7 +3346,7 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::for_each)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::keys)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@prototype_class@::keys)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -3355,7 +3355,7 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::keys)
return wrap(global_object, @iterator_name@::create(*impl, Object::PropertyKind::Key));
}
-JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::values)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@prototype_class@::values)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -3545,7 +3545,7 @@ public:
virtual ~@prototype_class@() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(next);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(next);
};
} // namespace Web::Bindings
@@ -3652,7 +3652,7 @@ static @fully_qualified_name@* impl_from(JS::VM& vm, JS::GlobalObject& global_ob
return &static_cast<@wrapper_class@*>(this_object)->impl();
}
-JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::next)
+JS_DEFINE_OLD_NATIVE_FUNCTION(@prototype_class@::next)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
diff --git a/Tests/LibWasm/test-wasm.cpp b/Tests/LibWasm/test-wasm.cpp
index e7d6237fc6..9847092750 100644
--- a/Tests/LibWasm/test-wasm.cpp
+++ b/Tests/LibWasm/test-wasm.cpp
@@ -62,8 +62,8 @@ public:
~WebAssemblyModule() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(get_export);
- JS_DECLARE_NATIVE_FUNCTION(wasm_invoke);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_export);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(wasm_invoke);
static HashMap<Wasm::Linker::Name, Wasm::ExternValue> const& spec_test_namespace()
{
@@ -159,7 +159,7 @@ void WebAssemblyModule::initialize(JS::GlobalObject& global_object)
define_native_function("invoke", wasm_invoke, 1, JS::default_attributes);
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyModule::get_export)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyModule::get_export)
{
auto name = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
auto this_value = vm.this_value(global_object);
@@ -193,7 +193,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyModule::get_export)
return {};
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyModule::wasm_invoke)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyModule::wasm_invoke)
{
auto address = static_cast<unsigned long>(TRY_OR_DISCARD(vm.argument(0).to_double(global_object)));
Wasm::FunctionAddress function_address { address };
diff --git a/Userland/Applications/Spreadsheet/JSIntegration.cpp b/Userland/Applications/Spreadsheet/JSIntegration.cpp
index 463973d8e9..cf0a9f00f8 100644
--- a/Userland/Applications/Spreadsheet/JSIntegration.cpp
+++ b/Userland/Applications/Spreadsheet/JSIntegration.cpp
@@ -169,7 +169,7 @@ void SheetGlobalObject::visit_edges(Visitor& visitor)
}
}
-JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::get_real_cell_contents)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SheetGlobalObject::get_real_cell_contents)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -206,7 +206,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::get_real_cell_contents)
return JS::js_string(vm, cell->data());
}
-JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::set_real_cell_contents)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SheetGlobalObject::set_real_cell_contents)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -245,7 +245,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::set_real_cell_contents)
return JS::js_null();
}
-JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::parse_cell_name)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SheetGlobalObject::parse_cell_name)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -276,7 +276,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::parse_cell_name)
return object;
}
-JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::current_cell_position)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SheetGlobalObject::current_cell_position)
{
if (vm.argument_count() != 0) {
vm.throw_exception<JS::TypeError>(global_object, "Expected no arguments to current_cell_position()");
@@ -304,7 +304,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::current_cell_position)
return object;
}
-JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::column_index)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SheetGlobalObject::column_index)
{
if (vm.argument_count() != 1) {
vm.throw_exception<JS::TypeError>(global_object, "Expected exactly one argument to column_index()");
@@ -337,7 +337,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::column_index)
return JS::Value((i32)column_index.value());
}
-JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::column_arithmetic)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SheetGlobalObject::column_arithmetic)
{
if (vm.argument_count() != 2) {
vm.throw_exception<JS::TypeError>(global_object, "Expected exactly two arguments to column_arithmetic()");
@@ -397,7 +397,7 @@ void WorkbookObject::visit_edges(Visitor& visitor)
visitor.visit(&sheet.global_object());
}
-JS_DEFINE_NATIVE_FUNCTION(WorkbookObject::sheet)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WorkbookObject::sheet)
{
if (vm.argument_count() != 1) {
vm.throw_exception<JS::TypeError>(global_object, "Expected exactly one argument to sheet()");
diff --git a/Userland/Applications/Spreadsheet/JSIntegration.h b/Userland/Applications/Spreadsheet/JSIntegration.h
index 8bd1e09a40..264fb7af01 100644
--- a/Userland/Applications/Spreadsheet/JSIntegration.h
+++ b/Userland/Applications/Spreadsheet/JSIntegration.h
@@ -32,12 +32,12 @@ public:
virtual JS::ThrowCompletionOr<bool> internal_set(JS::PropertyName const&, JS::Value value, JS::Value receiver) override;
virtual void initialize_global_object() override;
- JS_DECLARE_NATIVE_FUNCTION(get_real_cell_contents);
- JS_DECLARE_NATIVE_FUNCTION(set_real_cell_contents);
- JS_DECLARE_NATIVE_FUNCTION(parse_cell_name);
- JS_DECLARE_NATIVE_FUNCTION(current_cell_position);
- JS_DECLARE_NATIVE_FUNCTION(column_index);
- JS_DECLARE_NATIVE_FUNCTION(column_arithmetic);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_real_cell_contents);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_real_cell_contents);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(parse_cell_name);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(current_cell_position);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(column_index);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(column_arithmetic);
private:
virtual void visit_edges(Visitor&) override;
@@ -54,7 +54,7 @@ public:
virtual void initialize(JS::GlobalObject&) override;
- JS_DECLARE_NATIVE_FUNCTION(sheet);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sheet);
private:
virtual void visit_edges(Visitor&) override;
diff --git a/Userland/Libraries/LibJS/Forward.h b/Userland/Libraries/LibJS/Forward.h
index 76249f8eae..a10569b2d5 100644
--- a/Userland/Libraries/LibJS/Forward.h
+++ b/Userland/Libraries/LibJS/Forward.h
@@ -6,12 +6,18 @@
#pragma once
-#define JS_DECLARE_NATIVE_FUNCTION(name) \
+#define JS_DECLARE_OLD_NATIVE_FUNCTION(name) \
static JS::Value name(JS::VM&, JS::GlobalObject&)
-#define JS_DEFINE_NATIVE_FUNCTION(name) \
+#define JS_DEFINE_OLD_NATIVE_FUNCTION(name) \
JS::Value name([[maybe_unused]] JS::VM& vm, [[maybe_unused]] JS::GlobalObject& global_object)
+#define JS_DECLARE_NATIVE_FUNCTION(name) \
+ static JS::ThrowCompletionOr<JS::Value> name(JS::VM&, JS::GlobalObject&)
+
+#define JS_DEFINE_NATIVE_FUNCTION(name) \
+ JS::ThrowCompletionOr<JS::Value> name([[maybe_unused]] JS::VM& vm, [[maybe_unused]] JS::GlobalObject& global_object)
+
// NOTE: Proxy is not included here as it doesn't have a prototype - m_proxy_constructor is initialized separately.
#define JS_ENUMERATE_NATIVE_OBJECTS_EXCLUDING_TEMPLATES \
__JS_ENUMERATE(AggregateError, aggregate_error, AggregateErrorPrototype, AggregateErrorConstructor, void) \
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
index 858007d550..3ed0d1f64b 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
@@ -65,7 +65,7 @@ Value ArrayBufferConstructor::construct(FunctionObject& new_target)
}
// 25.1.4.1 ArrayBuffer.isView ( arg ), https://tc39.es/ecma262/#sec-arraybuffer.isview
-JS_DEFINE_NATIVE_FUNCTION(ArrayBufferConstructor::is_view)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayBufferConstructor::is_view)
{
auto arg = vm.argument(0);
if (!arg.is_object())
@@ -78,7 +78,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayBufferConstructor::is_view)
}
// 25.1.4.3 get ArrayBuffer [ @@species ], https://tc39.es/ecma262/#sec-get-arraybuffer-@@species
-JS_DEFINE_NATIVE_FUNCTION(ArrayBufferConstructor::symbol_species_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayBufferConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h
index 045425a46a..2e3eb81728 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h
@@ -24,9 +24,9 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(is_view);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_view);
- JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp
index a5a5ad768b..329cd4adcd 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp
@@ -35,7 +35,7 @@ ArrayBufferPrototype::~ArrayBufferPrototype()
}
// 25.1.5.3 ArrayBuffer.prototype.slice ( start, end ), https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice
-JS_DEFINE_NATIVE_FUNCTION(ArrayBufferPrototype::slice)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayBufferPrototype::slice)
{
auto* array_buffer_object = TRY_OR_DISCARD(typed_this_value(global_object));
// FIXME: Check for shared buffer
@@ -103,7 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayBufferPrototype::slice)
}
// 25.1.5.1 get ArrayBuffer.prototype.byteLength, https://tc39.es/ecma262/#sec-get-arraybuffer.prototype.bytelength
-JS_DEFINE_NATIVE_FUNCTION(ArrayBufferPrototype::byte_length_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayBufferPrototype::byte_length_getter)
{
auto* array_buffer_object = TRY_OR_DISCARD(typed_this_value(global_object));
// FIXME: Check for shared buffer
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h
index 7dead0a111..ea812a63e0 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h
@@ -20,8 +20,8 @@ public:
virtual ~ArrayBufferPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(slice);
- JS_DECLARE_NATIVE_FUNCTION(byte_length_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(slice);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(byte_length_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
index d8567e2c97..f50c2e207e 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
@@ -89,7 +89,7 @@ Value ArrayConstructor::construct(FunctionObject& new_target)
}
// 23.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] ), https://tc39.es/ecma262/#sec-array.from
-JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::from)
{
auto constructor = vm.this_value(global_object);
@@ -200,14 +200,14 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from)
}
// 23.1.2.2 Array.isArray ( arg ), https://tc39.es/ecma262/#sec-array.isarray
-JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::is_array)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::is_array)
{
auto value = vm.argument(0);
return Value(TRY_OR_DISCARD(value.is_array(global_object)));
}
// 23.1.2.3 Array.of ( ...items ), https://tc39.es/ecma262/#sec-array.of
-JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::of)
{
auto this_value = vm.this_value(global_object);
Value array;
@@ -230,7 +230,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::of)
}
// 23.1.2.5 get Array [ @@species ], https://tc39.es/ecma262/#sec-get-array-@@species
-JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::symbol_species_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.h b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.h
index 6bc6f33510..e28dcea2e5 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.h
@@ -24,11 +24,11 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
- JS_DECLARE_NATIVE_FUNCTION(is_array);
- JS_DECLARE_NATIVE_FUNCTION(of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_array);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(of);
- JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp
index 47b9df9271..b47b496fa7 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.cpp
@@ -36,7 +36,7 @@ ArrayIteratorPrototype::~ArrayIteratorPrototype()
// 23.1.5.2.1 %ArrayIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
// FIXME: This seems to be CreateArrayIterator (https://tc39.es/ecma262/#sec-createarrayiterator) instead of %ArrayIteratorPrototype%.next.
-JS_DEFINE_NATIVE_FUNCTION(ArrayIteratorPrototype::next)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayIteratorPrototype::next)
{
auto* iterator = TRY_OR_DISCARD(typed_this_value(global_object));
auto target_array = iterator->array();
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.h b/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.h
index 852c798c85..dde774fcbd 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayIteratorPrototype.h
@@ -20,7 +20,7 @@ public:
virtual ~ArrayIteratorPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(next);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(next);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
index e969cdab06..70c34c2b61 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp
@@ -154,7 +154,7 @@ static Object* array_species_create(GlobalObject& global_object, Object& origina
}
// 23.1.3.7 Array.prototype.filter ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-array.prototype.filter
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::filter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::filter)
{
auto callback_function = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -216,7 +216,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::filter)
}
// 23.1.3.12 Array.prototype.forEach ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-array.prototype.foreach
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::for_each)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::for_each)
{
auto callback_function = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -261,7 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::for_each)
}
// 23.1.3.18 Array.prototype.map ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-array.prototype.map
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::map)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::map)
{
auto callback_function = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -312,7 +312,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::map)
}
// 23.1.3.20 Array.prototype.push ( ...items ), https://tc39.es/ecma262/#sec-array.prototype.push
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::push)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::push)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *this_object));
@@ -330,7 +330,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::push)
}
// 23.1.3.31 Array.prototype.unshift ( ...items ), https://tc39.es/ecma262/#sec-array.prototype.unshift
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::unshift)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::unshift)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *this_object));
@@ -364,7 +364,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::unshift)
}
// 23.1.3.19 Array.prototype.pop ( ), https://tc39.es/ecma262/#sec-array.prototype.pop
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::pop)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::pop)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *this_object));
@@ -380,7 +380,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::pop)
}
// 23.1.3.24 Array.prototype.shift ( ), https://tc39.es/ecma262/#sec-array.prototype.shift
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::shift)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::shift)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *this_object));
@@ -407,7 +407,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::shift)
}
// 23.1.3.30 Array.prototype.toString ( ), https://tc39.es/ecma262/#sec-array.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::to_string)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto join_function = TRY_OR_DISCARD(this_object->get(vm.names.join));
@@ -417,7 +417,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::to_string)
}
// 23.1.3.29 Array.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-array.prototype.tolocalestring
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::to_locale_string)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -446,7 +446,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::to_locale_string)
}
// 23.1.3.15 Array.prototype.join ( separator ), https://tc39.es/ecma262/#sec-array.prototype.join
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::join)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::join)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -479,7 +479,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::join)
}
// 23.1.3.1 Array.prototype.concat ( ...items ), https://tc39.es/ecma262/#sec-array.prototype.concat
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::concat)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::concat)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -563,7 +563,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::concat)
}
// 23.1.3.25 Array.prototype.slice ( start, end ), https://tc39.es/ecma262/#sec-array.prototype.slice
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::slice)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::slice)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -621,7 +621,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::slice)
}
// 23.1.3.14 Array.prototype.indexOf ( searchElement [ , fromIndex ] ), https://tc39.es/ecma262/#sec-array.prototype.indexof
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::index_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::index_of)
{
auto search_element = vm.argument(0);
auto from_index = vm.argument(1);
@@ -693,7 +693,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::index_of)
}
// 23.1.3.21 Array.prototype.reduce ( callbackfn [ , initialValue ] ), https://tc39.es/ecma262/#sec-array.prototype.reduce
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::reduce)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::reduce)
{
auto callback_function = vm.argument(0);
auto initial_value = vm.argument(1);
@@ -781,7 +781,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::reduce)
}
// 23.1.3.22 Array.prototype.reduceRight ( callbackfn [ , initialValue ] ), https://tc39.es/ecma262/#sec-array.prototype.reduceright
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::reduce_right)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::reduce_right)
{
auto callback_function = vm.argument(0);
auto initial_value = vm.argument(1);
@@ -869,7 +869,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::reduce_right)
}
// 23.1.3.23 Array.prototype.reverse ( ), https://tc39.es/ecma262/#sec-array.prototype.reverse
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::reverse)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::reverse)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *this_object));
@@ -1017,7 +1017,7 @@ static void array_merge_sort(VM& vm, GlobalObject& global_object, FunctionObject
}
// 23.1.3.27 Array.prototype.sort ( comparefn ), https://tc39.es/ecma262/#sec-array.prototype.sort
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::sort)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::sort)
{
auto callback = vm.argument(0);
if (!callback.is_undefined() && !callback.is_function()) {
@@ -1061,7 +1061,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::sort)
}
// 23.1.3.17 Array.prototype.lastIndexOf ( searchElement [ , fromIndex ] ), https://tc39.es/ecma262/#sec-array.prototype.lastindexof
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::last_index_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::last_index_of)
{
auto search_element = vm.argument(0);
auto from_index = vm.argument(1);
@@ -1129,7 +1129,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::last_index_of)
}
// 23.1.3.13 Array.prototype.includes ( searchElement [ , fromIndex ] ), https://tc39.es/ecma262/#sec-array.prototype.includes
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::includes)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::includes)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *this_object));
@@ -1160,7 +1160,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::includes)
}
// 23.1.3.8 Array.prototype.find ( predicate [ , thisArg ] ), https://tc39.es/ecma262/#sec-array.prototype.find
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::find)
{
auto predicate = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -1201,7 +1201,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find)
}
// 23.1.3.9 Array.prototype.findIndex ( predicate [ , thisArg ] ), https://tc39.es/ecma262/#sec-array.prototype.findindex
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_index)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::find_index)
{
auto predicate = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -1242,7 +1242,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_index)
}
// 1 Array.prototype.findLast ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/index.html#sec-array.prototype.findlast
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_last)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::find_last)
{
auto predicate = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -1283,7 +1283,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_last)
}
// 2 Array.prototype.findLastIndex ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/index.html#sec-array.prototype.findlastindex
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_last_index)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::find_last_index)
{
auto predicate = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -1324,7 +1324,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_last_index)
}
// 23.1.3.26 Array.prototype.some ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-array.prototype.some
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::some)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::some)
{
auto callback_function = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -1371,7 +1371,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::some)
}
// 23.1.3.5 Array.prototype.every ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-array.prototype.every
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::every)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::every)
{
auto callback_function = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -1418,7 +1418,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::every)
}
// 23.1.3.28 Array.prototype.splice ( start, deleteCount, ...items ), https://tc39.es/ecma262#sec-array.prototype.splice
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::splice)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::splice)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -1514,7 +1514,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::splice)
}
// 23.1.3.6 Array.prototype.fill ( value [ , start [ , end ] ] ), https://tc39.es/ecma262/#sec-array.prototype.fill
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::fill)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::fill)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -1555,7 +1555,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::fill)
}
// 23.1.3.32 Array.prototype.values ( ), https://tc39.es/ecma262/#sec-array.prototype.values
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::values)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::values)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -1563,7 +1563,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::values)
}
// 23.1.3.16 Array.prototype.entries ( ), https://tc39.es/ecma262/#sec-array.prototype.entries
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::entries)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::entries)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -1571,7 +1571,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::entries)
}
// 23.1.3.16 Array.prototype.keys ( ), https://tc39.es/ecma262/#sec-array.prototype.keys
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::keys)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::keys)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -1620,7 +1620,7 @@ static size_t flatten_into_array(GlobalObject& global_object, Object& new_array,
}
// 23.1.3.10 Array.prototype.flat ( [ depth ] ), https://tc39.es/ecma262/#sec-array.prototype.flat
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::flat)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::flat)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -1643,7 +1643,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::flat)
}
// 23.1.3.11 Array.prototype.flatMap ( mapperFunction [ , thisArg ] ), https://tc39.es/ecma262/#sec-array.prototype.flatmap
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::flat_map)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::flat_map)
{
auto mapper_function = vm.argument(0);
auto this_arg = vm.argument(1);
@@ -1675,7 +1675,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::flat_map)
}
// 23.1.3.3 Array.prototype.copyWithin ( target, start [ , end ] ), https://tc39.es/ecma262/#sec-array.prototype.copywithin
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::copy_within)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::copy_within)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *this_object));
@@ -1741,7 +1741,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::copy_within)
}
// 1.1 Array.prototype.at ( index ), https://tc39.es/proposal-relative-indexing-method/#sec-array.prototype.at
-JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::at)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayPrototype::at)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *this_object));
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.h b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.h
index f58557cd2c..9e85e1e08e 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.h
@@ -20,40 +20,40 @@ public:
virtual ~ArrayPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(filter);
- JS_DECLARE_NATIVE_FUNCTION(for_each);
- JS_DECLARE_NATIVE_FUNCTION(map);
- JS_DECLARE_NATIVE_FUNCTION(pop);
- JS_DECLARE_NATIVE_FUNCTION(push);
- JS_DECLARE_NATIVE_FUNCTION(shift);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(unshift);
- JS_DECLARE_NATIVE_FUNCTION(join);
- JS_DECLARE_NATIVE_FUNCTION(concat);
- JS_DECLARE_NATIVE_FUNCTION(slice);
- JS_DECLARE_NATIVE_FUNCTION(index_of);
- JS_DECLARE_NATIVE_FUNCTION(reduce);
- JS_DECLARE_NATIVE_FUNCTION(reduce_right);
- JS_DECLARE_NATIVE_FUNCTION(reverse);
- JS_DECLARE_NATIVE_FUNCTION(sort);
- JS_DECLARE_NATIVE_FUNCTION(last_index_of);
- JS_DECLARE_NATIVE_FUNCTION(includes);
- JS_DECLARE_NATIVE_FUNCTION(find);
- JS_DECLARE_NATIVE_FUNCTION(find_index);
- JS_DECLARE_NATIVE_FUNCTION(find_last);
- JS_DECLARE_NATIVE_FUNCTION(find_last_index);
- JS_DECLARE_NATIVE_FUNCTION(some);
- JS_DECLARE_NATIVE_FUNCTION(every);
- JS_DECLARE_NATIVE_FUNCTION(splice);
- JS_DECLARE_NATIVE_FUNCTION(fill);
- JS_DECLARE_NATIVE_FUNCTION(values);
- JS_DECLARE_NATIVE_FUNCTION(flat);
- JS_DECLARE_NATIVE_FUNCTION(flat_map);
- JS_DECLARE_NATIVE_FUNCTION(at);
- JS_DECLARE_NATIVE_FUNCTION(keys);
- JS_DECLARE_NATIVE_FUNCTION(entries);
- JS_DECLARE_NATIVE_FUNCTION(copy_within);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(filter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(for_each);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(map);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(pop);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(push);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(shift);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(unshift);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(join);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(concat);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(slice);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(index_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(reduce);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(reduce_right);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(reverse);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sort);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(last_index_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(includes);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(find);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(find_index);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(find_last);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(find_last_index);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(some);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(every);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(splice);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(fill);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(values);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(flat);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(flat_map);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(at);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(keys);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(entries);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(copy_within);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp b/Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp
index bfb3b5801c..13f3c06f1e 100644
--- a/Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/AtomicsObject.cpp
@@ -162,7 +162,7 @@ void AtomicsObject::initialize(GlobalObject& global_object)
}
// 25.4.3 Atomics.add ( typedArray, index, value ), https://tc39.es/ecma262/#sec-atomics.add
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::add)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::add)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
@@ -180,7 +180,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::add)
}
// 25.4.4 Atomics.and ( typedArray, index, value ), https://tc39.es/ecma262/#sec-atomics.and
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::and_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::and_)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
@@ -278,7 +278,7 @@ static ThrowCompletionOr<Value> atomic_compare_exchange_impl(GlobalObject& globa
}
// 25.4.5 Atomics.compareExchange ( typedArray, index, expectedValue, replacementValue ), https://tc39.es/ecma262/#sec-atomics.compareexchange
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::compare_exchange)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::compare_exchange)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
@@ -294,7 +294,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::compare_exchange)
}
// 25.4.6 Atomics.exchange ( typedArray, index, value ), https://tc39.es/ecma262/#sec-atomics.exchange
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::exchange)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::exchange)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
@@ -312,7 +312,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::exchange)
}
// 25.4.7 Atomics.isLockFree ( size ), https://tc39.es/ecma262/#sec-atomics.islockfree
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::is_lock_free)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::is_lock_free)
{
auto size = TRY_OR_DISCARD(vm.argument(0).to_integer_or_infinity(global_object));
if (size == 1)
@@ -327,7 +327,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::is_lock_free)
}
// 25.4.8 Atomics.load ( typedArray, index ), https://tc39.es/ecma262/#sec-atomics.load
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::load)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::load)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
@@ -346,7 +346,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::load)
}
// 25.4.9 Atomics.or ( typedArray, index, value ), https://tc39.es/ecma262/#sec-atomics.or
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::or_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::or_)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
@@ -364,7 +364,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::or_)
}
// 25.4.10 Atomics.store ( typedArray, index, value ), https://tc39.es/ecma262/#sec-atomics.store
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::store)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::store)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
@@ -391,7 +391,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::store)
}
// 25.4.11 Atomics.sub ( typedArray, index, value ), https://tc39.es/ecma262/#sec-atomics.sub
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::sub)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::sub)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
@@ -409,7 +409,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::sub)
}
// 25.4.14 Atomics.xor ( typedArray, index, value ), https://tc39.es/ecma262/#sec-atomics.xor
-JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::xor_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(AtomicsObject::xor_)
{
auto* typed_array = typed_array_from(global_object, vm.argument(0));
if (!typed_array)
diff --git a/Userland/Libraries/LibJS/Runtime/AtomicsObject.h b/Userland/Libraries/LibJS/Runtime/AtomicsObject.h
index 2b55f9671b..84b891f396 100644
--- a/Userland/Libraries/LibJS/Runtime/AtomicsObject.h
+++ b/Userland/Libraries/LibJS/Runtime/AtomicsObject.h
@@ -19,16 +19,16 @@ public:
virtual ~AtomicsObject() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(add);
- JS_DECLARE_NATIVE_FUNCTION(and_);
- JS_DECLARE_NATIVE_FUNCTION(compare_exchange);
- JS_DECLARE_NATIVE_FUNCTION(exchange);
- JS_DECLARE_NATIVE_FUNCTION(is_lock_free);
- JS_DECLARE_NATIVE_FUNCTION(load);
- JS_DECLARE_NATIVE_FUNCTION(or_);
- JS_DECLARE_NATIVE_FUNCTION(store);
- JS_DECLARE_NATIVE_FUNCTION(sub);
- JS_DECLARE_NATIVE_FUNCTION(xor_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(add);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(and_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(compare_exchange);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(exchange);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_lock_free);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(load);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(or_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(store);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sub);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(xor_);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
index 1fc8c1a215..cc72c0c518 100644
--- a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
@@ -66,13 +66,13 @@ Value BigIntConstructor::construct(FunctionObject&)
}
// 21.2.2.1 BigInt.asIntN ( bits, bigint ), https://tc39.es/ecma262/#sec-bigint.asintn
-JS_DEFINE_NATIVE_FUNCTION(BigIntConstructor::as_int_n)
+JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntConstructor::as_int_n)
{
TODO();
}
// 21.2.2.2 BigInt.asUintN ( bits, bigint ), https://tc39.es/ecma262/#sec-bigint.asuintn
-JS_DEFINE_NATIVE_FUNCTION(BigIntConstructor::as_uint_n)
+JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntConstructor::as_uint_n)
{
TODO();
}
diff --git a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.h b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.h
index ad8b510636..6f447642f1 100644
--- a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.h
@@ -24,8 +24,8 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(as_int_n);
- JS_DECLARE_NATIVE_FUNCTION(as_uint_n);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(as_int_n);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(as_uint_n);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp b/Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp
index cacaf41d20..16cbc9d70d 100644
--- a/Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/BigIntPrototype.cpp
@@ -48,7 +48,7 @@ static ThrowCompletionOr<BigInt*> this_bigint_value(GlobalObject& global_object,
}
// 21.2.3.3 BigInt.prototype.toString ( [ radix ] ), https://tc39.es/ecma262/#sec-bigint.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(BigIntPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntPrototype::to_string)
{
auto* bigint = TRY_OR_DISCARD(this_bigint_value(global_object, vm.this_value(global_object)));
double radix = 10;
@@ -63,13 +63,13 @@ JS_DEFINE_NATIVE_FUNCTION(BigIntPrototype::to_string)
}
// 21.2.3.2 BigInt.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-bigint.prototype.tolocalestring
-JS_DEFINE_NATIVE_FUNCTION(BigIntPrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntPrototype::to_locale_string)
{
return to_string(vm, global_object);
}
// 21.2.3.4 BigInt.prototype.valueOf ( ), https://tc39.es/ecma262/#sec-bigint.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(BigIntPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntPrototype::value_of)
{
return TRY_OR_DISCARD(this_bigint_value(global_object, vm.this_value(global_object)));
}
diff --git a/Userland/Libraries/LibJS/Runtime/BigIntPrototype.h b/Userland/Libraries/LibJS/Runtime/BigIntPrototype.h
index c19c03fb66..4351a168bf 100644
--- a/Userland/Libraries/LibJS/Runtime/BigIntPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/BigIntPrototype.h
@@ -19,9 +19,9 @@ public:
virtual ~BigIntPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/BooleanPrototype.cpp b/Userland/Libraries/LibJS/Runtime/BooleanPrototype.cpp
index 609557caf8..e25beb3fef 100644
--- a/Userland/Libraries/LibJS/Runtime/BooleanPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/BooleanPrototype.cpp
@@ -31,7 +31,7 @@ BooleanPrototype::~BooleanPrototype()
}
// 20.3.3.2 Boolean.prototype.toString ( ), https://tc39.es/ecma262/#sec-boolean.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(BooleanPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(BooleanPrototype::to_string)
{
auto this_value = vm.this_value(global_object);
if (this_value.is_boolean())
@@ -46,7 +46,7 @@ JS_DEFINE_NATIVE_FUNCTION(BooleanPrototype::to_string)
}
// 20.3.3.3 Boolean.prototype.valueOf ( ), https://tc39.es/ecma262/#sec-boolean.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(BooleanPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(BooleanPrototype::value_of)
{
auto this_value = vm.this_value(global_object);
if (this_value.is_boolean())
diff --git a/Userland/Libraries/LibJS/Runtime/BooleanPrototype.h b/Userland/Libraries/LibJS/Runtime/BooleanPrototype.h
index 9b5683c874..0e6d65e199 100644
--- a/Userland/Libraries/LibJS/Runtime/BooleanPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/BooleanPrototype.h
@@ -19,8 +19,8 @@ public:
virtual ~BooleanPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp b/Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp
index 06778dd99f..f486f35290 100644
--- a/Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ConsoleObject.cpp
@@ -39,61 +39,61 @@ ConsoleObject::~ConsoleObject()
}
// 1.1.6. log(...data), https://console.spec.whatwg.org/#log
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::log)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::log)
{
return global_object.console().log();
}
// 1.1.3. debug(...data), https://console.spec.whatwg.org/#debug
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::debug)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::debug)
{
return global_object.console().debug();
}
// 1.1.5. info(...data), https://console.spec.whatwg.org/#info
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::info)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::info)
{
return global_object.console().info();
}
// 1.1.9. warn(...data), https://console.spec.whatwg.org/#warn
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::warn)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::warn)
{
return global_object.console().warn();
}
// 1.1.4. error(...data), https://console.spec.whatwg.org/#error
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::error)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::error)
{
return global_object.console().error();
}
// 1.1.8. trace(...data), https://console.spec.whatwg.org/#trace
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::trace)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::trace)
{
return global_object.console().trace();
}
// 1.2.1. count(label), https://console.spec.whatwg.org/#count
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::count)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::count)
{
return global_object.console().count();
}
// 1.2.2. countReset(label), https://console.spec.whatwg.org/#countreset
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::count_reset)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::count_reset)
{
return global_object.console().count_reset();
}
// 1.1.2. clear(), https://console.spec.whatwg.org/#clear
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::clear)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::clear)
{
return global_object.console().clear();
}
// 1.1.1. assert(condition, ...data), https://console.spec.whatwg.org/#assert
-JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::assert_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleObject::assert_)
{
return global_object.console().assert_();
}
diff --git a/Userland/Libraries/LibJS/Runtime/ConsoleObject.h b/Userland/Libraries/LibJS/Runtime/ConsoleObject.h
index 5f43c4eed9..71a34f2f3a 100644
--- a/Userland/Libraries/LibJS/Runtime/ConsoleObject.h
+++ b/Userland/Libraries/LibJS/Runtime/ConsoleObject.h
@@ -19,16 +19,16 @@ public:
virtual ~ConsoleObject() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(log);
- JS_DECLARE_NATIVE_FUNCTION(debug);
- JS_DECLARE_NATIVE_FUNCTION(info);
- JS_DECLARE_NATIVE_FUNCTION(warn);
- JS_DECLARE_NATIVE_FUNCTION(error);
- JS_DECLARE_NATIVE_FUNCTION(trace);
- JS_DECLARE_NATIVE_FUNCTION(count);
- JS_DECLARE_NATIVE_FUNCTION(count_reset);
- JS_DECLARE_NATIVE_FUNCTION(clear);
- JS_DECLARE_NATIVE_FUNCTION(assert_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(log);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(debug);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(info);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(warn);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(error);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(trace);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(count);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(count_reset);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(clear);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(assert_);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp b/Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp
index f5d8523bd5..2a925e260b 100644
--- a/Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp
@@ -130,125 +130,125 @@ static Value set_view_value(GlobalObject& global_object, Value request_index, Va
}
// 25.3.4.5 DataView.prototype.getBigInt64 ( byteOffset [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.getbigint64
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_big_int_64)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_big_int_64)
{
return get_view_value<i64>(global_object, vm.argument(0), vm.argument(1));
}
// 25.3.4.6 DataView.prototype.getBigUint64 ( byteOffset [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.getbiguint64
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_big_uint_64)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_big_uint_64)
{
return get_view_value<u64>(global_object, vm.argument(0), vm.argument(1));
}
// 25.3.4.7 DataView.prototype.getFloat32 ( byteOffset [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.getfloat32
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_float_32)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_float_32)
{
return get_view_value<float>(global_object, vm.argument(0), vm.argument(1));
}
// 25.3.4.8 DataView.prototype.getFloat64 ( byteOffset [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.getfloat64
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_float_64)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_float_64)
{
return get_view_value<double>(global_object, vm.argument(0), vm.argument(1));
}
// 25.3.4.9 DataView.prototype.getInt8 ( byteOffset ), https://tc39.es/ecma262/#sec-dataview.prototype.getint8
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_int_8)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_int_8)
{
return get_view_value<i8>(global_object, vm.argument(0), Value(true));
}
// 25.3.4.10 DataView.prototype.getInt16 ( byteOffset [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.getint16
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_int_16)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_int_16)
{
return get_view_value<i16>(global_object, vm.argument(0), vm.argument(1));
}
// 25.3.4.11 DataView.prototype.getInt32 ( byteOffset [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.getint32
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_int_32)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_int_32)
{
return get_view_value<i32>(global_object, vm.argument(0), vm.argument(1));
}
// 25.3.4.12 DataView.prototype.getUint8 ( byteOffset ), https://tc39.es/ecma262/#sec-dataview.prototype.getuint8
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_uint_8)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_uint_8)
{
return get_view_value<u8>(global_object, vm.argument(0), Value(true));
}
// 25.3.4.13 DataView.prototype.getUint16 ( byteOffset [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.getuint16
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_uint_16)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_uint_16)
{
return get_view_value<u16>(global_object, vm.argument(0), vm.argument(1));
}
// 25.3.4.14 DataView.prototype.getUint32 ( byteOffset [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.getuint32
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::get_uint_32)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::get_uint_32)
{
return get_view_value<u32>(global_object, vm.argument(0), vm.argument(1));
}
// 25.3.4.15 DataView.prototype.setBigInt64 ( byteOffset, value [ , littleEndian ] ), https://tc39.es/ecma262/#sec-dataview.prototype.setbigint64
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_big_int_64)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_big_int_64)
{
return set_view_value<i64>(global_object, vm.argument(0), vm.argument(2), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_big_uint_64)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_big_uint_64)
{
return set_view_value<u64>(global_object, vm.argument(0), vm.argument(2), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_float_32)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_float_32)
{
return set_view_value<float>(global_object, vm.argument(0), vm.argument(2), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_float_64)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_float_64)
{
return set_view_value<double>(global_object, vm.argument(0), vm.argument(2), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_int_8)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_int_8)
{
return set_view_value<i8>(global_object, vm.argument(0), Value(true), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_int_16)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_int_16)
{
return set_view_value<i16>(global_object, vm.argument(0), vm.argument(2), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_int_32)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_int_32)
{
return set_view_value<i32>(global_object, vm.argument(0), vm.argument(2), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_uint_8)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_uint_8)
{
return set_view_value<u8>(global_object, vm.argument(0), Value(true), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_uint_16)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_uint_16)
{
return set_view_value<u16>(global_object, vm.argument(0), vm.argument(2), vm.argument(1));
}
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_uint_32)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::set_uint_32)
{
return set_view_value<u32>(global_object, vm.argument(0), vm.argument(2), vm.argument(1));
}
// 25.3.4.1 get DataView.prototype.buffer, https://tc39.es/ecma262/#sec-get-dataview.prototype.buffer
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::buffer_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::buffer_getter)
{
auto* data_view = TRY_OR_DISCARD(typed_this_value(global_object));
return data_view->viewed_array_buffer();
}
// 25.3.4.2 get DataView.prototype.byteLength, https://tc39.es/ecma262/#sec-get-dataview.prototype.bytelength
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::byte_length_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::byte_length_getter)
{
auto* data_view = TRY_OR_DISCARD(typed_this_value(global_object));
if (data_view->viewed_array_buffer()->is_detached()) {
@@ -259,7 +259,7 @@ JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::byte_length_getter)
}
// 25.3.4.3 get DataView.prototype.byteOffset, https://tc39.es/ecma262/#sec-get-dataview.prototype.byteoffset
-JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::byte_offset_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DataViewPrototype::byte_offset_getter)
{
auto* data_view = TRY_OR_DISCARD(typed_this_value(global_object));
if (data_view->viewed_array_buffer()->is_detached()) {
diff --git a/Userland/Libraries/LibJS/Runtime/DataViewPrototype.h b/Userland/Libraries/LibJS/Runtime/DataViewPrototype.h
index 4c098f4290..fe554db9ac 100644
--- a/Userland/Libraries/LibJS/Runtime/DataViewPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/DataViewPrototype.h
@@ -20,30 +20,30 @@ public:
virtual ~DataViewPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(get_big_int_64);
- JS_DECLARE_NATIVE_FUNCTION(get_big_uint_64);
- JS_DECLARE_NATIVE_FUNCTION(get_float_32);
- JS_DECLARE_NATIVE_FUNCTION(get_float_64);
- JS_DECLARE_NATIVE_FUNCTION(get_int_8);
- JS_DECLARE_NATIVE_FUNCTION(get_int_16);
- JS_DECLARE_NATIVE_FUNCTION(get_int_32);
- JS_DECLARE_NATIVE_FUNCTION(get_uint_8);
- JS_DECLARE_NATIVE_FUNCTION(get_uint_16);
- JS_DECLARE_NATIVE_FUNCTION(get_uint_32);
- JS_DECLARE_NATIVE_FUNCTION(set_big_int_64);
- JS_DECLARE_NATIVE_FUNCTION(set_big_uint_64);
- JS_DECLARE_NATIVE_FUNCTION(set_float_32);
- JS_DECLARE_NATIVE_FUNCTION(set_float_64);
- JS_DECLARE_NATIVE_FUNCTION(set_int_8);
- JS_DECLARE_NATIVE_FUNCTION(set_int_16);
- JS_DECLARE_NATIVE_FUNCTION(set_int_32);
- JS_DECLARE_NATIVE_FUNCTION(set_uint_8);
- JS_DECLARE_NATIVE_FUNCTION(set_uint_16);
- JS_DECLARE_NATIVE_FUNCTION(set_uint_32);
-
- JS_DECLARE_NATIVE_FUNCTION(buffer_getter);
- JS_DECLARE_NATIVE_FUNCTION(byte_length_getter);
- JS_DECLARE_NATIVE_FUNCTION(byte_offset_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_big_int_64);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_big_uint_64);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_float_32);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_float_64);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_int_8);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_int_16);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_int_32);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_uint_8);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_uint_16);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_uint_32);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_big_int_64);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_big_uint_64);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_float_32);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_float_64);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_int_8);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_int_16);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_int_32);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_uint_8);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_uint_16);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_uint_32);
+
+ JS_DECLARE_OLD_NATIVE_FUNCTION(buffer_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(byte_length_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(byte_offset_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/DateConstructor.cpp b/Userland/Libraries/LibJS/Runtime/DateConstructor.cpp
index 349eee7738..64078224c4 100644
--- a/Userland/Libraries/LibJS/Runtime/DateConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/DateConstructor.cpp
@@ -289,7 +289,7 @@ Value DateConstructor::construct(FunctionObject& new_target)
}
// 21.4.3.1 Date.now ( ), https://tc39.es/ecma262/#sec-date.now
-JS_DEFINE_NATIVE_FUNCTION(DateConstructor::now)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DateConstructor::now)
{
struct timeval tv;
gettimeofday(&tv, nullptr);
@@ -297,7 +297,7 @@ JS_DEFINE_NATIVE_FUNCTION(DateConstructor::now)
}
// 21.4.3.2 Date.parse ( string ), https://tc39.es/ecma262/#sec-date.parse
-JS_DEFINE_NATIVE_FUNCTION(DateConstructor::parse)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DateConstructor::parse)
{
if (!vm.argument_count())
return js_nan();
@@ -308,7 +308,7 @@ JS_DEFINE_NATIVE_FUNCTION(DateConstructor::parse)
}
// 21.4.3.4 Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] ] ), https://tc39.es/ecma262/#sec-date.utc
-JS_DEFINE_NATIVE_FUNCTION(DateConstructor::utc)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DateConstructor::utc)
{
auto arg_or = [&vm, &global_object](size_t i, i32 fallback) -> ThrowCompletionOr<i32> {
return vm.argument_count() > i ? vm.argument(i).to_i32(global_object) : fallback;
diff --git a/Userland/Libraries/LibJS/Runtime/DateConstructor.h b/Userland/Libraries/LibJS/Runtime/DateConstructor.h
index 6718aebd31..d36a9f466f 100644
--- a/Userland/Libraries/LibJS/Runtime/DateConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/DateConstructor.h
@@ -24,9 +24,9 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(now);
- JS_DECLARE_NATIVE_FUNCTION(parse);
- JS_DECLARE_NATIVE_FUNCTION(utc);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(now);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(parse);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(utc);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp
index 9ec27a3cf5..417192ed47 100644
--- a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp
@@ -93,7 +93,7 @@ DatePrototype::~DatePrototype()
}
// 21.4.4.2 Date.prototype.getDate ( ), https://tc39.es/ecma262/#sec-date.prototype.getdate
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_date)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -104,7 +104,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_date)
}
// 21.4.4.20 Date.prototype.setDate ( date ), https://tc39.es/ecma262/#sec-date.prototype.setdate
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_date)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -128,7 +128,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_date)
}
// 21.4.4.3 Date.prototype.getDay ( ), https://tc39.es/ecma262/#sec-date.prototype.getday
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_day)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_day)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -139,7 +139,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_day)
}
// 21.4.4.4 Date.prototype.getFullYear ( ), https://tc39.es/ecma262/#sec-date.prototype.getfullyear
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_full_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_full_year)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -150,7 +150,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_full_year)
}
// 21.4.4.21 Date.prototype.setFullYear ( year [ , month [ , date ] ] ), https://tc39.es/ecma262/#sec-date.prototype.setfullyear
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_full_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_full_year)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -193,7 +193,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_full_year)
}
// B.2.4.1 Date.prototype.getYear ( ), https://tc39.es/ecma262/#sec-date.prototype.getyear
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_year)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -204,7 +204,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_year)
}
// B.2.4.2 Date.prototype.setYear ( year ), https://tc39.es/ecma262/#sec-date.prototype.setyear
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_year)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -231,7 +231,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_year)
}
// 21.4.4.5 Date.prototype.getHours ( ), https://tc39.es/ecma262/#sec-date.prototype.gethours
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_hours)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_hours)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -242,7 +242,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_hours)
}
// 21.4.4.22 Date.prototype.setHours ( hour [ , min [ , sec [ , ms ] ] ] ), https://tc39.es/ecma262/#sec-date.prototype.sethours
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_hours)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_hours)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -294,7 +294,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_hours)
}
// 21.4.4.23 Date.prototype.setMilliseconds ( ms ), https://tc39.es/ecma262/#sec-date.prototype.setmilliseconds
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_milliseconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_milliseconds)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -305,7 +305,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_milliseconds)
}
// 21.4.4.23 Date.prototype.setMilliseconds ( ms ), https://tc39.es/ecma262/#sec-date.prototype.setmilliseconds
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_milliseconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_milliseconds)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -337,7 +337,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_milliseconds)
}
// 21.4.4.7 Date.prototype.getMinutes ( ), https://tc39.es/ecma262/#sec-date.prototype.getminutes
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_minutes)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_minutes)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -348,7 +348,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_minutes)
}
// 21.4.4.24 Date.prototype.setMinutes ( min [ , sec [ , ms ] ] ), https://tc39.es/ecma262/#sec-date.prototype.setminutes
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_minutes)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_minutes)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -393,7 +393,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_minutes)
}
// 21.4.4.8 Date.prototype.getMonth ( ), https://tc39.es/ecma262/#sec-date.prototype.getmonth
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_month)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_month)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -404,7 +404,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_month)
}
// 21.4.4.25 Date.prototype.setMonth ( month [ , date ] ), https://tc39.es/ecma262/#sec-date.prototype.setmonth
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_month)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_month)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -439,7 +439,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_month)
}
// 21.4.4.9 Date.prototype.getSeconds ( ), https://tc39.es/ecma262/#sec-date.prototype.getseconds
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_seconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_seconds)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -450,7 +450,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_seconds)
}
// 21.4.4.26 Date.prototype.setSeconds ( sec [ , ms ] ), https://tc39.es/ecma262/#sec-date.prototype.setseconds
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_seconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_seconds)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -488,7 +488,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_seconds)
}
// 21.4.4.10 Date.prototype.getTime ( ), https://tc39.es/ecma262/#sec-date.prototype.gettime
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_time)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -499,7 +499,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_time)
}
// 21.4.4.27 Date.prototype.setTime ( time ), https://tc39.es/ecma262/#sec-date.prototype.settime
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::set_time)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -524,7 +524,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::set_time)
}
// 21.4.4.11 Date.prototype.getTimezoneOffset ( ), https://tc39.es/ecma262/#sec-date.prototype.gettimezoneoffset
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_timezone_offset)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_timezone_offset)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -536,7 +536,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_timezone_offset)
}
// 21.4.4.12 Date.prototype.getUTCDate ( ), https://tc39.es/ecma262/#sec-date.prototype.getutcdate
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_utc_date)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -547,7 +547,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_date)
}
// 21.4.4.13 Date.prototype.getUTCDay ( ), https://tc39.es/ecma262/#sec-date.prototype.getutcday
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_day)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_utc_day)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -558,7 +558,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_day)
}
// 21.4.4.14 Date.prototype.getUTCFullYear ( ), https://tc39.es/ecma262/#sec-date.prototype.getutcfullyear
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_full_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_utc_full_year)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -569,7 +569,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_full_year)
}
// 21.4.4.15 Date.prototype.getUTCHours ( ), https://tc39.es/ecma262/#sec-date.prototype.getutchours
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_hours)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_utc_hours)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -580,7 +580,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_hours)
}
// 21.4.4.16 Date.prototype.getUTCMilliseconds ( ), https://tc39.es/ecma262/#sec-date.prototype.getutcmilliseconds
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_milliseconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_utc_milliseconds)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -591,7 +591,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_milliseconds)
}
// 21.4.4.18 Date.prototype.getUTCMonth ( ), https://tc39.es/ecma262/#sec-date.prototype.getutcmonth
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_month)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_utc_month)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -602,7 +602,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_month)
}
// 21.4.4.17 Date.prototype.getUTCMinutes ( ), https://tc39.es/ecma262/#sec-date.prototype.getutcminutes
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_minutes)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_utc_minutes)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -613,7 +613,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_minutes)
}
// 21.4.4.19 Date.prototype.getUTCSeconds ( ), https://tc39.es/ecma262/#sec-date.prototype.getutcseconds
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_seconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::get_utc_seconds)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -624,7 +624,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::get_utc_seconds)
}
// 21.4.4.35 Date.prototype.toDateString ( ), https://tc39.es/ecma262/#sec-date.prototype.todatestring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_date_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_date_string)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -636,14 +636,14 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_date_string)
}
// B.2.4.3 Date.prototype.toGMTString ( ), https://tc39.es/ecma262/#sec-date.prototype.togmtstring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_gmt_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_gmt_string)
{
// NOTE: The toUTCString method is preferred. The toGMTString method is provided principally for compatibility with old code.
return to_utc_string(vm, global_object);
}
// 21.4.4.43 Date.prototype.toUTCString ( ), https://tc39.es/ecma262/#sec-date.prototype.toutcstring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_utc_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_utc_string)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -656,7 +656,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_utc_string)
}
// 21.4.4.36 Date.prototype.toISOString ( ), https://tc39.es/ecma262/#sec-date.prototype.toisostring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_iso_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_iso_string)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -670,7 +670,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_iso_string)
}
// 21.4.4.38 Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-date.prototype.tolocaledatestring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_date_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_locale_date_string)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -683,7 +683,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_date_string)
}
// 21.4.4.39 Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-date.prototype.tolocalestring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_locale_string)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -696,7 +696,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_string)
}
// 21.4.4.40 Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-date.prototype.tolocaletimestring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_time_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_locale_time_string)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -709,7 +709,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_time_string)
}
// 21.4.4.42 Date.prototype.toTimeString ( ), https://tc39.es/ecma262/#sec-date.prototype.totimestring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_time_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_time_string)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -721,7 +721,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_time_string)
}
// 21.4.4.41 Date.prototype.toString ( ), https://tc39.es/ecma262/#sec-date.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_string)
{
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -733,7 +733,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_string)
}
// 21.4.4.37 Date.prototype.toJSON ( key ), https://tc39.es/ecma262/#sec-date.prototype.tojson
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_json)
{
auto this_value = vm.this_value(global_object);
@@ -746,7 +746,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_json)
}
// 14.1.1 Date.prototype.toTemporalInstant ( ), https://tc39.es/proposal-temporal/#sec-date.prototype.totemporalinstant
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_temporal_instant)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::to_temporal_instant)
{
// 1. Let t be ? thisTimeValue(this value).
auto* this_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -763,7 +763,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_temporal_instant)
}
// 21.4.4.45 Date.prototype [ @@toPrimitive ] ( hint ), https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
-JS_DEFINE_NATIVE_FUNCTION(DatePrototype::symbol_to_primitive)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DatePrototype::symbol_to_primitive)
{
auto this_value = vm.this_value(global_object);
if (!this_value.is_object()) {
diff --git a/Userland/Libraries/LibJS/Runtime/DatePrototype.h b/Userland/Libraries/LibJS/Runtime/DatePrototype.h
index 9c164aed40..4fee49478a 100644
--- a/Userland/Libraries/LibJS/Runtime/DatePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/DatePrototype.h
@@ -20,46 +20,46 @@ public:
virtual ~DatePrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(get_date);
- JS_DECLARE_NATIVE_FUNCTION(set_date);
- JS_DECLARE_NATIVE_FUNCTION(get_day);
- JS_DECLARE_NATIVE_FUNCTION(get_full_year);
- JS_DECLARE_NATIVE_FUNCTION(set_full_year);
- JS_DECLARE_NATIVE_FUNCTION(get_year);
- JS_DECLARE_NATIVE_FUNCTION(set_year);
- JS_DECLARE_NATIVE_FUNCTION(get_hours);
- JS_DECLARE_NATIVE_FUNCTION(set_hours);
- JS_DECLARE_NATIVE_FUNCTION(get_milliseconds);
- JS_DECLARE_NATIVE_FUNCTION(set_milliseconds);
- JS_DECLARE_NATIVE_FUNCTION(get_minutes);
- JS_DECLARE_NATIVE_FUNCTION(set_minutes);
- JS_DECLARE_NATIVE_FUNCTION(get_month);
- JS_DECLARE_NATIVE_FUNCTION(set_month);
- JS_DECLARE_NATIVE_FUNCTION(get_seconds);
- JS_DECLARE_NATIVE_FUNCTION(set_seconds);
- JS_DECLARE_NATIVE_FUNCTION(get_time);
- JS_DECLARE_NATIVE_FUNCTION(set_time);
- JS_DECLARE_NATIVE_FUNCTION(get_timezone_offset);
- JS_DECLARE_NATIVE_FUNCTION(get_utc_date);
- JS_DECLARE_NATIVE_FUNCTION(get_utc_day);
- JS_DECLARE_NATIVE_FUNCTION(get_utc_full_year);
- JS_DECLARE_NATIVE_FUNCTION(get_utc_hours);
- JS_DECLARE_NATIVE_FUNCTION(get_utc_milliseconds);
- JS_DECLARE_NATIVE_FUNCTION(get_utc_minutes);
- JS_DECLARE_NATIVE_FUNCTION(get_utc_month);
- JS_DECLARE_NATIVE_FUNCTION(get_utc_seconds);
- JS_DECLARE_NATIVE_FUNCTION(to_date_string);
- JS_DECLARE_NATIVE_FUNCTION(to_gmt_string);
- JS_DECLARE_NATIVE_FUNCTION(to_utc_string);
- JS_DECLARE_NATIVE_FUNCTION(to_iso_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_date_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_time_string);
- JS_DECLARE_NATIVE_FUNCTION(to_time_string);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_json);
- JS_DECLARE_NATIVE_FUNCTION(to_temporal_instant);
- JS_DECLARE_NATIVE_FUNCTION(symbol_to_primitive);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_day);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_full_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_full_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_hours);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_hours);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_milliseconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_milliseconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_minutes);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_minutes);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_month);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_month);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_seconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_seconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_timezone_offset);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_utc_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_utc_day);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_utc_full_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_utc_hours);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_utc_milliseconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_utc_minutes);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_utc_month);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_utc_seconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_date_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_gmt_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_utc_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_iso_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_date_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_time_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_time_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_temporal_instant);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_to_primitive);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ErrorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ErrorPrototype.cpp
index 57aa578b61..1b09560b8d 100644
--- a/Userland/Libraries/LibJS/Runtime/ErrorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ErrorPrototype.cpp
@@ -30,7 +30,7 @@ void ErrorPrototype::initialize(GlobalObject& global_object)
}
// 20.5.3.4 Error.prototype.toString ( ), https://tc39.es/ecma262/#sec-error.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(ErrorPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ErrorPrototype::to_string)
{
auto this_value = vm.this_value(global_object);
if (!this_value.is_object()) {
diff --git a/Userland/Libraries/LibJS/Runtime/ErrorPrototype.h b/Userland/Libraries/LibJS/Runtime/ErrorPrototype.h
index 081a19666c..64f9a7cee3 100644
--- a/Userland/Libraries/LibJS/Runtime/ErrorPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/ErrorPrototype.h
@@ -19,7 +19,7 @@ public:
virtual ~ErrorPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
};
#define DECLARE_NATIVE_ERROR_PROTOTYPE(ClassName, snake_name, PrototypeName, ConstructorName) \
diff --git a/Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.cpp b/Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.cpp
index b3e833c80a..9b9a7dcfec 100644
--- a/Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.cpp
@@ -33,7 +33,7 @@ FinalizationRegistryPrototype::~FinalizationRegistryPrototype()
}
// @STAGE 2@ FinalizationRegistry.prototype.cleanupSome ( [ callback ] ), https://github.com/tc39/proposal-cleanup-some/blob/master/spec/finalization-registry.html
-JS_DEFINE_NATIVE_FUNCTION(FinalizationRegistryPrototype::cleanup_some)
+JS_DEFINE_OLD_NATIVE_FUNCTION(FinalizationRegistryPrototype::cleanup_some)
{
auto* finalization_registry = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -49,7 +49,7 @@ JS_DEFINE_NATIVE_FUNCTION(FinalizationRegistryPrototype::cleanup_some)
}
// 26.2.3.2 FinalizationRegistry.prototype.register ( target, heldValue [ , unregisterToken ] ), https://tc39.es/ecma262/#sec-finalization-registry.prototype.register
-JS_DEFINE_NATIVE_FUNCTION(FinalizationRegistryPrototype::register_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(FinalizationRegistryPrototype::register_)
{
auto* finalization_registry = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -77,7 +77,7 @@ JS_DEFINE_NATIVE_FUNCTION(FinalizationRegistryPrototype::register_)
}
// 26.2.3.3 FinalizationRegistry.prototype.unregister ( unregisterToken ), https://tc39.es/ecma262/#sec-finalization-registry.prototype.unregister
-JS_DEFINE_NATIVE_FUNCTION(FinalizationRegistryPrototype::unregister)
+JS_DEFINE_OLD_NATIVE_FUNCTION(FinalizationRegistryPrototype::unregister)
{
auto* finalization_registry = TRY_OR_DISCARD(typed_this_object(global_object));
diff --git a/Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.h b/Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.h
index f78f782645..5bd31a0aed 100644
--- a/Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/FinalizationRegistryPrototype.h
@@ -20,9 +20,9 @@ public:
virtual ~FinalizationRegistryPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(cleanup_some);
- JS_DECLARE_NATIVE_FUNCTION(register_);
- JS_DECLARE_NATIVE_FUNCTION(unregister);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(cleanup_some);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(register_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(unregister);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionPrototype.cpp b/Userland/Libraries/LibJS/Runtime/FunctionPrototype.cpp
index 90a0966eae..d1a25f1b53 100644
--- a/Userland/Libraries/LibJS/Runtime/FunctionPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/FunctionPrototype.cpp
@@ -43,7 +43,7 @@ FunctionPrototype::~FunctionPrototype()
}
// 20.2.3.1 Function.prototype.apply ( thisArg, argArray ), https://tc39.es/ecma262/#sec-function.prototype.apply
-JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::apply)
+JS_DEFINE_OLD_NATIVE_FUNCTION(FunctionPrototype::apply)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
if (!this_object->is_function()) {
@@ -60,7 +60,7 @@ JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::apply)
}
// 20.2.3.2 Function.prototype.bind ( thisArg, ...args ), https://tc39.es/ecma262/#sec-function.prototype.bind
-JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::bind)
+JS_DEFINE_OLD_NATIVE_FUNCTION(FunctionPrototype::bind)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
if (!this_object->is_function()) {
@@ -80,7 +80,7 @@ JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::bind)
}
// 20.2.3.3 Function.prototype.call ( thisArg, ...args ), https://tc39.es/ecma262/#sec-function.prototype.call
-JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::call)
+JS_DEFINE_OLD_NATIVE_FUNCTION(FunctionPrototype::call)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
if (!this_object->is_function()) {
@@ -98,7 +98,7 @@ JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::call)
}
// 20.2.3.5 Function.prototype.toString ( ), https://tc39.es/ecma262/#sec-function.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(FunctionPrototype::to_string)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
if (!this_object->is_function()) {
@@ -149,7 +149,7 @@ JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::to_string)
}
// 20.2.3.6 Function.prototype [ @@hasInstance ] ( V ), https://tc39.es/ecma262/#sec-function.prototype-@@hasinstance
-JS_DEFINE_NATIVE_FUNCTION(FunctionPrototype::symbol_has_instance)
+JS_DEFINE_OLD_NATIVE_FUNCTION(FunctionPrototype::symbol_has_instance)
{
return TRY_OR_DISCARD(ordinary_has_instance(global_object, vm.argument(0), vm.this_value(global_object)));
}
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionPrototype.h b/Userland/Libraries/LibJS/Runtime/FunctionPrototype.h
index 1ff21bb3e0..a6ee601f0f 100644
--- a/Userland/Libraries/LibJS/Runtime/FunctionPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/FunctionPrototype.h
@@ -19,11 +19,11 @@ public:
virtual ~FunctionPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(apply);
- JS_DECLARE_NATIVE_FUNCTION(bind);
- JS_DECLARE_NATIVE_FUNCTION(call);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(symbol_has_instance);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(apply);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(bind);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(call);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_has_instance);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.cpp b/Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.cpp
index 70eeeeef41..717132a4da 100644
--- a/Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.cpp
@@ -33,14 +33,14 @@ GeneratorObjectPrototype::~GeneratorObjectPrototype()
}
// 27.5.1.2 Generator.prototype.next ( value ), https://tc39.es/ecma262/#sec-generator.prototype.next
-JS_DEFINE_NATIVE_FUNCTION(GeneratorObjectPrototype::next)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GeneratorObjectPrototype::next)
{
auto* generator_object = TRY_OR_DISCARD(typed_this_object(global_object));
return generator_object->next_impl(vm, global_object, {});
}
// 27.5.1.3 Generator.prototype.next ( value ), https://tc39.es/ecma262/#sec-generator.prototype.return
-JS_DEFINE_NATIVE_FUNCTION(GeneratorObjectPrototype::return_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GeneratorObjectPrototype::return_)
{
auto* generator_object = TRY_OR_DISCARD(typed_this_object(global_object));
generator_object->set_done();
@@ -48,7 +48,7 @@ JS_DEFINE_NATIVE_FUNCTION(GeneratorObjectPrototype::return_)
}
// 27.5.1.4 Generator.prototype.next ( value ), https://tc39.es/ecma262/#sec-generator.prototype.throw
-JS_DEFINE_NATIVE_FUNCTION(GeneratorObjectPrototype::throw_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GeneratorObjectPrototype::throw_)
{
auto* generator_object = TRY_OR_DISCARD(typed_this_object(global_object));
return generator_object->next_impl(vm, global_object, vm.argument(0));
diff --git a/Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.h b/Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.h
index 776c5da123..3851874763 100644
--- a/Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/GeneratorObjectPrototype.h
@@ -21,9 +21,9 @@ public:
virtual ~GeneratorObjectPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(next);
- JS_DECLARE_NATIVE_FUNCTION(return_);
- JS_DECLARE_NATIVE_FUNCTION(throw_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(next);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(return_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(throw_);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
index dad52eb6ce..8b8410495d 100644
--- a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
@@ -329,7 +329,7 @@ void GlobalObject::set_associated_realm(Badge<Realm>, Realm& realm)
m_associated_realm = &realm;
}
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::gc)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::gc)
{
#ifdef __serenity__
dbgln("Forced garbage collection requested!");
@@ -339,19 +339,19 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::gc)
}
// 19.2.3 isNaN ( number ), https://tc39.es/ecma262/#sec-isnan-number
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::is_nan)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::is_nan)
{
return Value(TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).is_nan());
}
// 19.2.2 isFinite ( number ), https://tc39.es/ecma262/#sec-isfinite-number
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::is_finite)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::is_finite)
{
return Value(TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).is_finite_number());
}
// 19.2.4 parseFloat ( string ), https://tc39.es/ecma262/#sec-parsefloat-string
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::parse_float)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::parse_float)
{
if (vm.argument(0).is_number())
return vm.argument(0);
@@ -366,7 +366,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::parse_float)
}
// 19.2.5 parseInt ( string, radix ), https://tc39.es/ecma262/#sec-parseint-string-radix
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::parse_int)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::parse_int)
{
auto input_string = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
@@ -424,7 +424,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::parse_int)
}
// 19.2.1 eval ( x ), https://tc39.es/ecma262/#sec-eval-x
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::eval)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::eval)
{
return TRY_OR_DISCARD(perform_eval(vm.argument(0), global_object, CallerMode::NonStrict, EvalMode::Indirect));
}
@@ -499,7 +499,7 @@ static String decode(JS::GlobalObject& global_object, const String& string, Stri
}
// 19.2.6.4 encodeURI ( uri ), https://tc39.es/ecma262/#sec-encodeuri-uri
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::encode_uri)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::encode_uri)
{
auto uri_string = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
auto encoded = encode(global_object, uri_string, ";/?:@&=+$,abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.!~*'()#"sv);
@@ -509,7 +509,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::encode_uri)
}
// 19.2.6.2 decodeURI ( encodedURI ), https://tc39.es/ecma262/#sec-decodeuri-encodeduri
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::decode_uri)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::decode_uri)
{
auto uri_string = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
auto decoded = decode(global_object, uri_string, ";/?:@&=+$,#"sv);
@@ -519,7 +519,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::decode_uri)
}
// 19.2.6.5 encodeURIComponent ( uriComponent ), https://tc39.es/ecma262/#sec-encodeuricomponent-uricomponent
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::encode_uri_component)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::encode_uri_component)
{
auto uri_string = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
auto encoded = encode(global_object, uri_string, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.!~*'()"sv);
@@ -529,7 +529,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::encode_uri_component)
}
// 19.2.6.3 decodeURIComponent ( encodedURIComponent ), https://tc39.es/ecma262/#sec-decodeuricomponent-encodeduricomponent
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::decode_uri_component)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::decode_uri_component)
{
auto uri_string = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
auto decoded = decode(global_object, uri_string, ""sv);
@@ -539,7 +539,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::decode_uri_component)
}
// B.2.1.1 escape ( string ), https://tc39.es/ecma262/#sec-escape-string
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::escape)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::escape)
{
auto string = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
StringBuilder escaped;
@@ -557,7 +557,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::escape)
}
// B.2.1.2 unescape ( string ), https://tc39.es/ecma262/#sec-unescape-string
-JS_DEFINE_NATIVE_FUNCTION(GlobalObject::unescape)
+JS_DEFINE_OLD_NATIVE_FUNCTION(GlobalObject::unescape)
{
auto string = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
ssize_t length = string.length();
diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.h b/Userland/Libraries/LibJS/Runtime/GlobalObject.h
index 32387a0eef..e39bbe538c 100644
--- a/Userland/Libraries/LibJS/Runtime/GlobalObject.h
+++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.h
@@ -76,18 +76,18 @@ protected:
private:
virtual bool is_global_object() const final { return true; }
- JS_DECLARE_NATIVE_FUNCTION(gc);
- JS_DECLARE_NATIVE_FUNCTION(is_nan);
- JS_DECLARE_NATIVE_FUNCTION(is_finite);
- JS_DECLARE_NATIVE_FUNCTION(parse_float);
- JS_DECLARE_NATIVE_FUNCTION(parse_int);
- JS_DECLARE_NATIVE_FUNCTION(eval);
- JS_DECLARE_NATIVE_FUNCTION(encode_uri);
- JS_DECLARE_NATIVE_FUNCTION(decode_uri);
- JS_DECLARE_NATIVE_FUNCTION(encode_uri_component);
- JS_DECLARE_NATIVE_FUNCTION(decode_uri_component);
- JS_DECLARE_NATIVE_FUNCTION(escape);
- JS_DECLARE_NATIVE_FUNCTION(unescape);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(gc);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_nan);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_finite);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(parse_float);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(parse_int);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(eval);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(encode_uri);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(decode_uri);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(encode_uri_component);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(decode_uri_component);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(escape);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(unescape);
NonnullOwnPtr<Console> m_console;
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp
index f5a65757e4..8173906c3a 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp
@@ -117,7 +117,7 @@ Value DisplayNamesConstructor::construct(FunctionObject& new_target)
}
// 12.3.2 Intl.DisplayNames.supportedLocalesOf ( locales [ , options ] ), https://tc39.es/ecma402/#sec-Intl.DisplayNames.supportedLocalesOf
-JS_DEFINE_NATIVE_FUNCTION(DisplayNamesConstructor::supported_locales_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DisplayNamesConstructor::supported_locales_of)
{
auto locales = vm.argument(0);
auto options = vm.argument(1);
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.h b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.h
index 3e7afc7143..38b4d32943 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(supported_locales_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(supported_locales_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp
index ba6a250c40..c1df84148c 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp
@@ -33,7 +33,7 @@ void DisplayNamesPrototype::initialize(GlobalObject& global_object)
}
// 12.4.3 Intl.DisplayNames.prototype.of ( code ), https://tc39.es/ecma402/#sec-Intl.DisplayNames.prototype.of
-JS_DEFINE_NATIVE_FUNCTION(DisplayNamesPrototype::of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DisplayNamesPrototype::of)
{
auto code = vm.argument(0);
@@ -81,7 +81,7 @@ JS_DEFINE_NATIVE_FUNCTION(DisplayNamesPrototype::of)
}
// 12.4.4 Intl.DisplayNames.prototype.resolvedOptions ( ), https://tc39.es/ecma402/#sec-Intl.DisplayNames.prototype.resolvedOptions
-JS_DEFINE_NATIVE_FUNCTION(DisplayNamesPrototype::resolved_options)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DisplayNamesPrototype::resolved_options)
{
// 1. Let displayNames be this value.
// 2. Perform ? RequireInternalSlot(displayNames, [[InitializedDisplayNames]]).
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.h b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.h
index 30e4d23f11..6bc6ef975e 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.h
@@ -20,8 +20,8 @@ public:
virtual ~DisplayNamesPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(of);
- JS_DECLARE_NATIVE_FUNCTION(resolved_options);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(resolved_options);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp
index 70bb64ef24..7a90ec5b67 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp
@@ -40,7 +40,7 @@ void Intl::initialize(GlobalObject& global_object)
}
// 8.3.1 Intl.getCanonicalLocales ( locales ), https://tc39.es/ecma402/#sec-intl.getcanonicallocales
-JS_DEFINE_NATIVE_FUNCTION(Intl::get_canonical_locales)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Intl::get_canonical_locales)
{
auto locales = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Intl.h b/Userland/Libraries/LibJS/Runtime/Intl/Intl.h
index fa1f69673e..731a4d84e1 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/Intl.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/Intl.h
@@ -19,7 +19,7 @@ public:
virtual ~Intl() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(get_canonical_locales);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_canonical_locales);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp
index 2dd89dcd80..0e1280f8e6 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.cpp
@@ -97,7 +97,7 @@ Value ListFormatConstructor::construct(FunctionObject& new_target)
}
// 13.3.2 Intl.ListFormat.supportedLocalesOf ( locales [ , options ] ), https://tc39.es/ecma402/#sec-Intl.ListFormat.supportedLocalesOf
-JS_DEFINE_NATIVE_FUNCTION(ListFormatConstructor::supported_locales_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ListFormatConstructor::supported_locales_of)
{
auto locales = vm.argument(0);
auto options = vm.argument(1);
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.h b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.h
index 72287dd876..c9e0752c71 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(supported_locales_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(supported_locales_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp
index 339f037af7..6d2cc4a38d 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.cpp
@@ -34,7 +34,7 @@ void ListFormatPrototype::initialize(GlobalObject& global_object)
}
// 13.4.3 Intl.ListFormat.prototype.format ( list ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.format
-JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::format)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ListFormatPrototype::format)
{
auto list = vm.argument(0);
@@ -51,7 +51,7 @@ JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::format)
}
// 13.4.4 Intl.ListFormat.prototype.formatToParts ( list ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.formatToParts
-JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::format_to_parts)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ListFormatPrototype::format_to_parts)
{
auto list = vm.argument(0);
@@ -67,7 +67,7 @@ JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::format_to_parts)
}
// 13.4.5 Intl.ListFormat.prototype.resolvedOptions ( ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.resolvedoptions
-JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::resolved_options)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ListFormatPrototype::resolved_options)
{
// 1. Let lf be the this value.
// 2. Perform ? RequireInternalSlot(lf, [[InitializedListFormat]]).
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.h b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.h
index 1761b7c129..350225e656 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormatPrototype.h
@@ -20,9 +20,9 @@ public:
virtual ~ListFormatPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(format);
- JS_DECLARE_NATIVE_FUNCTION(format_to_parts);
- JS_DECLARE_NATIVE_FUNCTION(resolved_options);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(format);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(format_to_parts);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(resolved_options);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
index e81a942578..2174270ed7 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
@@ -45,7 +45,7 @@ void LocalePrototype::initialize(GlobalObject& global_object)
}
// 14.3.3 Intl.Locale.prototype.maximize ( ), https://tc39.es/ecma402/#sec-Intl.Locale.prototype.maximize
-JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::maximize)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::maximize)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -63,7 +63,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::maximize)
}
// 14.3.4 Intl.Locale.prototype.minimize ( ), https://tc39.es/ecma402/#sec-Intl.Locale.prototype.minimize
-JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::minimize)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::minimize)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -81,7 +81,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::minimize)
}
// 14.3.5 Intl.Locale.prototype.toString ( ), https://tc39.es/ecma402/#sec-Intl.Locale.prototype.toString
-JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::to_string)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -92,7 +92,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::to_string)
}
// 14.3.6 get Intl.Locale.prototype.baseName, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.baseName
-JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::base_name)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::base_name)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::base_name)
// 14.3.10 get Intl.Locale.prototype.hourCycle, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.hourCycle
// 14.3.12 get Intl.Locale.prototype.numberingSystem, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.numberingSystem
#define __JS_ENUMERATE(keyword) \
- JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::keyword) \
+ JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::keyword) \
{ \
auto* locale_object = TRY_OR_DISCARD(typed_this_object(global_object)); \
if (!locale_object->has_##keyword()) \
@@ -130,7 +130,7 @@ JS_ENUMERATE_LOCALE_KEYWORD_PROPERTIES
#undef __JS_ENUMERATE
// 14.3.11 get Intl.Locale.prototype.numeric, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.numeric
-JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::numeric)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::numeric)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -141,7 +141,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::numeric)
}
// 14.3.13 get Intl.Locale.prototype.language, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.language
-JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::language)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::language)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -158,7 +158,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::language)
}
// 14.3.14 get Intl.Locale.prototype.script, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.script
-JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::script)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::script)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -179,7 +179,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::script)
}
// 14.3.15 get Intl.Locale.prototype.region, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.region
-JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::region)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocalePrototype::region)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h
index aa460a8a0a..d4e859c578 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h
@@ -20,20 +20,20 @@ public:
virtual ~LocalePrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(maximize);
- JS_DECLARE_NATIVE_FUNCTION(minimize);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
-
- JS_DECLARE_NATIVE_FUNCTION(base_name);
- JS_DECLARE_NATIVE_FUNCTION(calendar);
- JS_DECLARE_NATIVE_FUNCTION(case_first);
- JS_DECLARE_NATIVE_FUNCTION(collation);
- JS_DECLARE_NATIVE_FUNCTION(hour_cycle);
- JS_DECLARE_NATIVE_FUNCTION(numbering_system);
- JS_DECLARE_NATIVE_FUNCTION(numeric);
- JS_DECLARE_NATIVE_FUNCTION(language);
- JS_DECLARE_NATIVE_FUNCTION(script);
- JS_DECLARE_NATIVE_FUNCTION(region);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(maximize);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(minimize);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+
+ JS_DECLARE_OLD_NATIVE_FUNCTION(base_name);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(calendar);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(case_first);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(collation);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(hour_cycle);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(numbering_system);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(numeric);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(language);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(script);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(region);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp
index 0b282e52f1..d3377998aa 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp
@@ -65,7 +65,7 @@ Value NumberFormatConstructor::construct(FunctionObject& new_target)
}
// 15.3.2 Intl.NumberFormat.supportedLocalesOf ( locales [ , options ] ), https://tc39.es/ecma402/#sec-intl.numberformat.supportedlocalesof
-JS_DEFINE_NATIVE_FUNCTION(NumberFormatConstructor::supported_locales_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberFormatConstructor::supported_locales_of)
{
auto locales = vm.argument(0);
auto options = vm.argument(1);
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.h b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.h
index 2f140fc81b..853499a688 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(supported_locales_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(supported_locales_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp
index 53c824966b..4bb3653ebd 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.cpp
@@ -31,7 +31,7 @@ void NumberFormatPrototype::initialize(GlobalObject& global_object)
}
// 15.4.5 Intl.NumberFormat.prototype.resolvedOptions ( ), https://tc39.es/ecma402/#sec-intl.numberformat.prototype.resolvedoptions
-JS_DEFINE_NATIVE_FUNCTION(NumberFormatPrototype::resolved_options)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberFormatPrototype::resolved_options)
{
// 1. Let nf be the this value.
// 2. If the implementation supports the normative optional constructor mode of 4.3 Note 1, then
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.h b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.h
index 16a7408c58..0f79eb6557 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatPrototype.h
@@ -20,7 +20,7 @@ public:
virtual ~NumberFormatPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(resolved_options);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(resolved_options);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp
index 1ed1bafa3c..fb1f7ada9d 100644
--- a/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp
@@ -28,7 +28,7 @@ IteratorPrototype::~IteratorPrototype()
}
// 27.1.2.1 %IteratorPrototype% [ @@iterator ] ( ), https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
-JS_DEFINE_NATIVE_FUNCTION(IteratorPrototype::symbol_iterator)
+JS_DEFINE_OLD_NATIVE_FUNCTION(IteratorPrototype::symbol_iterator)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
return this_object;
diff --git a/Userland/Libraries/LibJS/Runtime/IteratorPrototype.h b/Userland/Libraries/LibJS/Runtime/IteratorPrototype.h
index 1b62f4d45b..7aee58e1db 100644
--- a/Userland/Libraries/LibJS/Runtime/IteratorPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/IteratorPrototype.h
@@ -19,7 +19,7 @@ public:
virtual ~IteratorPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(symbol_iterator);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_iterator);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/JSONObject.cpp b/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
index f008eb06a8..6f85b3b598 100644
--- a/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
@@ -112,7 +112,7 @@ String JSONObject::stringify_impl(GlobalObject& global_object, Value value, Valu
}
// 25.5.2 JSON.stringify ( value [ , replacer [ , space ] ] ), https://tc39.es/ecma262/#sec-json.stringify
-JS_DEFINE_NATIVE_FUNCTION(JSONObject::stringify)
+JS_DEFINE_OLD_NATIVE_FUNCTION(JSONObject::stringify)
{
if (!vm.argument_count())
return js_undefined();
@@ -375,7 +375,7 @@ String JSONObject::quote_json_string(String string)
}
// 25.5.1 JSON.parse ( text [ , reviver ] ), https://tc39.es/ecma262/#sec-json.parse
-JS_DEFINE_NATIVE_FUNCTION(JSONObject::parse)
+JS_DEFINE_OLD_NATIVE_FUNCTION(JSONObject::parse)
{
auto string = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
auto reviver = vm.argument(1);
diff --git a/Userland/Libraries/LibJS/Runtime/JSONObject.h b/Userland/Libraries/LibJS/Runtime/JSONObject.h
index 591d9bc801..6d717b22be 100644
--- a/Userland/Libraries/LibJS/Runtime/JSONObject.h
+++ b/Userland/Libraries/LibJS/Runtime/JSONObject.h
@@ -44,8 +44,8 @@ private:
static Array* parse_json_array(GlobalObject&, const JsonArray&);
static Value internalize_json_property(GlobalObject&, Object* holder, PropertyName const& name, FunctionObject& reviver);
- JS_DECLARE_NATIVE_FUNCTION(stringify);
- JS_DECLARE_NATIVE_FUNCTION(parse);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(stringify);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(parse);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp b/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
index fa5c52f162..0090a23476 100644
--- a/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
@@ -83,7 +83,7 @@ Value MapConstructor::construct(FunctionObject& new_target)
}
// 24.1.2.2 get Map [ @@species ], https://tc39.es/ecma262/#sec-get-map-@@species
-JS_DEFINE_NATIVE_FUNCTION(MapConstructor::symbol_species_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/MapConstructor.h b/Userland/Libraries/LibJS/Runtime/MapConstructor.h
index f507a205dc..c1eebc2f65 100644
--- a/Userland/Libraries/LibJS/Runtime/MapConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/MapConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.cpp
index 43f3e4e558..1ba42c2111 100644
--- a/Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.cpp
@@ -32,7 +32,7 @@ MapIteratorPrototype::~MapIteratorPrototype()
}
// 24.1.5.2.1 %MapIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%mapiteratorprototype%.next
-JS_DEFINE_NATIVE_FUNCTION(MapIteratorPrototype::next)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapIteratorPrototype::next)
{
auto* map_iterator = TRY_OR_DISCARD(typed_this_value(global_object));
if (map_iterator->done())
diff --git a/Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.h b/Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.h
index 730e3334aa..98f2fd3dc4 100644
--- a/Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/MapIteratorPrototype.h
@@ -20,7 +20,7 @@ public:
virtual ~MapIteratorPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(next);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(next);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/MapPrototype.cpp b/Userland/Libraries/LibJS/Runtime/MapPrototype.cpp
index e5501541d8..5d5e879f1f 100644
--- a/Userland/Libraries/LibJS/Runtime/MapPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/MapPrototype.cpp
@@ -43,7 +43,7 @@ MapPrototype::~MapPrototype()
}
// 24.1.3.1 Map.prototype.clear ( ), https://tc39.es/ecma262/#sec-map.prototype.clear
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::clear)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::clear)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
map->entries().clear();
@@ -51,14 +51,14 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::clear)
}
// 24.1.3.3 Map.prototype.delete ( key ), https://tc39.es/ecma262/#sec-map.prototype.delete
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::delete_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::delete_)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
return Value(map->entries().remove(vm.argument(0)));
}
// 24.1.3.4 Map.prototype.entries ( ), https://tc39.es/ecma262/#sec-map.prototype.entries
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::entries)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::entries)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -66,7 +66,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::entries)
}
// 24.1.3.5 Map.prototype.forEach ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-map.prototype.foreach
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::for_each)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::for_each)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
if (!vm.argument(0).is_function()) {
@@ -83,7 +83,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::for_each)
}
// 24.1.3.6 Map.prototype.get ( key ), https://tc39.es/ecma262/#sec-map.prototype.get
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::get)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::get)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
auto result = map->entries().get(vm.argument(0));
@@ -93,7 +93,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::get)
}
// 24.1.3.7 Map.prototype.has ( key ), https://tc39.es/ecma262/#sec-map.prototype.has
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::has)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::has)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
auto& entries = map->entries();
@@ -101,7 +101,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::has)
}
// 24.1.3.8 Map.prototype.keys ( ), https://tc39.es/ecma262/#sec-map.prototype.keys
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::keys)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::keys)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -109,7 +109,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::keys)
}
// 24.1.3.9 Map.prototype.set ( key, value ), https://tc39.es/ecma262/#sec-map.prototype.set
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::set)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::set)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
auto key = vm.argument(0);
@@ -120,7 +120,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::set)
}
// 24.1.3.11 Map.prototype.values ( ), https://tc39.es/ecma262/#sec-map.prototype.values
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::values)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::values)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -128,7 +128,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::values)
}
// 24.1.3.10 get Map.prototype.size, https://tc39.es/ecma262/#sec-get-map.prototype.size
-JS_DEFINE_NATIVE_FUNCTION(MapPrototype::size_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MapPrototype::size_getter)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
return Value(map->entries().size());
diff --git a/Userland/Libraries/LibJS/Runtime/MapPrototype.h b/Userland/Libraries/LibJS/Runtime/MapPrototype.h
index d7b4e74c2e..43c4a000a3 100644
--- a/Userland/Libraries/LibJS/Runtime/MapPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/MapPrototype.h
@@ -20,17 +20,17 @@ public:
virtual ~MapPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(clear);
- JS_DECLARE_NATIVE_FUNCTION(delete_);
- JS_DECLARE_NATIVE_FUNCTION(entries);
- JS_DECLARE_NATIVE_FUNCTION(for_each);
- JS_DECLARE_NATIVE_FUNCTION(get);
- JS_DECLARE_NATIVE_FUNCTION(has);
- JS_DECLARE_NATIVE_FUNCTION(keys);
- JS_DECLARE_NATIVE_FUNCTION(set);
- JS_DECLARE_NATIVE_FUNCTION(values);
-
- JS_DECLARE_NATIVE_FUNCTION(size_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(clear);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(delete_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(entries);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(for_each);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(has);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(keys);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(values);
+
+ JS_DECLARE_OLD_NATIVE_FUNCTION(size_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/MathObject.cpp b/Userland/Libraries/LibJS/Runtime/MathObject.cpp
index 5bfe6e12b5..05986f59e5 100644
--- a/Userland/Libraries/LibJS/Runtime/MathObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/MathObject.cpp
@@ -79,7 +79,7 @@ MathObject::~MathObject()
}
// 21.3.2.1 Math.abs ( x ), https://tc39.es/ecma262/#sec-math.abs
-JS_DEFINE_NATIVE_FUNCTION(MathObject::abs)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::abs)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -92,14 +92,14 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::abs)
}
// 21.3.2.27 Math.random ( ), https://tc39.es/ecma262/#sec-math.random
-JS_DEFINE_NATIVE_FUNCTION(MathObject::random)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::random)
{
double r = (double)get_random<u32>() / (double)UINT32_MAX;
return Value(r);
}
// 21.3.2.32 Math.sqrt ( x ), https://tc39.es/ecma262/#sec-math.sqrt
-JS_DEFINE_NATIVE_FUNCTION(MathObject::sqrt)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::sqrt)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -108,7 +108,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::sqrt)
}
// 21.3.2.16 Math.floor ( x ), https://tc39.es/ecma262/#sec-math.floor
-JS_DEFINE_NATIVE_FUNCTION(MathObject::floor)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::floor)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -117,7 +117,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::floor)
}
// 21.3.2.10 Math.ceil ( x ), https://tc39.es/ecma262/#sec-math.ceil
-JS_DEFINE_NATIVE_FUNCTION(MathObject::ceil)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::ceil)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -129,7 +129,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::ceil)
}
// 21.3.2.28 Math.round ( x ), https://tc39.es/ecma262/#sec-math.round
-JS_DEFINE_NATIVE_FUNCTION(MathObject::round)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::round)
{
auto value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double();
double integer = ::ceil(value);
@@ -139,7 +139,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::round)
}
// 21.3.2.24 Math.max ( ...args ), https://tc39.es/ecma262/#sec-math.max
-JS_DEFINE_NATIVE_FUNCTION(MathObject::max)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::max)
{
Vector<Value> coerced;
for (size_t i = 0; i < vm.argument_count(); ++i)
@@ -156,7 +156,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::max)
}
// 21.3.2.25 Math.min ( ...args ), https://tc39.es/ecma262/#sec-math.min
-JS_DEFINE_NATIVE_FUNCTION(MathObject::min)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::min)
{
Vector<Value> coerced;
for (size_t i = 0; i < vm.argument_count(); ++i)
@@ -173,7 +173,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::min)
}
// 21.3.2.35 Math.trunc ( x ), https://tc39.es/ecma262/#sec-math.trunc
-JS_DEFINE_NATIVE_FUNCTION(MathObject::trunc)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::trunc)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -184,7 +184,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::trunc)
}
// 21.3.2.30 Math.sin ( x ), https://tc39.es/ecma262/#sec-math.sin
-JS_DEFINE_NATIVE_FUNCTION(MathObject::sin)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::sin)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -193,7 +193,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::sin)
}
// 21.3.2.12 Math.cos ( x ), https://tc39.es/ecma262/#sec-math.cos
-JS_DEFINE_NATIVE_FUNCTION(MathObject::cos)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::cos)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -202,7 +202,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::cos)
}
// 21.3.2.33 Math.tan ( x ), https://tc39.es/ecma262/#sec-math.tan
-JS_DEFINE_NATIVE_FUNCTION(MathObject::tan)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::tan)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -211,7 +211,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::tan)
}
// 21.3.2.26 Math.pow ( base, exponent ), https://tc39.es/ecma262/#sec-math.pow
-JS_DEFINE_NATIVE_FUNCTION(MathObject::pow)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::pow)
{
auto base = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
auto exponent = TRY_OR_DISCARD(vm.argument(1).to_number(global_object));
@@ -265,7 +265,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::pow)
}
// 21.3.2.14 Math.exp ( x ), https://tc39.es/ecma262/#sec-math.exp
-JS_DEFINE_NATIVE_FUNCTION(MathObject::exp)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::exp)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -274,7 +274,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::exp)
}
// 21.3.2.15 Math.expm1 ( x ), https://tc39.es/ecma262/#sec-math.expm1
-JS_DEFINE_NATIVE_FUNCTION(MathObject::expm1)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::expm1)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -283,7 +283,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::expm1)
}
// 21.3.2.29 Math.sign ( x ), https://tc39.es/ecma262/#sec-math.sign
-JS_DEFINE_NATIVE_FUNCTION(MathObject::sign)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::sign)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_positive_zero())
@@ -298,7 +298,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::sign)
}
// 21.3.2.11 Math.clz32 ( x ), https://tc39.es/ecma262/#sec-math.clz32
-JS_DEFINE_NATIVE_FUNCTION(MathObject::clz32)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::clz32)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object));
if (number == 0)
@@ -307,7 +307,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::clz32)
}
// 21.3.2.2 Math.acos ( x ), https://tc39.es/ecma262/#sec-math.acos
-JS_DEFINE_NATIVE_FUNCTION(MathObject::acos)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::acos)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan() || number.as_double() > 1 || number.as_double() < -1)
@@ -318,7 +318,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::acos)
}
// 21.3.2.3 Math.acosh ( x ), https://tc39.es/ecma262/#sec-math.acosh
-JS_DEFINE_NATIVE_FUNCTION(MathObject::acosh)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::acosh)
{
auto value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double();
if (value < 1)
@@ -327,7 +327,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::acosh)
}
// 21.3.2.4 Math.asin ( x ), https://tc39.es/ecma262/#sec-math.asin
-JS_DEFINE_NATIVE_FUNCTION(MathObject::asin)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::asin)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan() || number.is_positive_zero() || number.is_negative_zero())
@@ -336,13 +336,13 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::asin)
}
// 21.3.2.5 Math.asinh ( x ), https://tc39.es/ecma262/#sec-math.asinh
-JS_DEFINE_NATIVE_FUNCTION(MathObject::asinh)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::asinh)
{
return Value(::asinh(TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double()));
}
// 21.3.2.6 Math.atan ( x ), https://tc39.es/ecma262/#sec-math.atan
-JS_DEFINE_NATIVE_FUNCTION(MathObject::atan)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::atan)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan() || number.is_positive_zero() || number.is_negative_zero())
@@ -355,7 +355,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::atan)
}
// 21.3.2.7 Math.atanh ( x ), https://tc39.es/ecma262/#sec-math.atanh
-JS_DEFINE_NATIVE_FUNCTION(MathObject::atanh)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::atanh)
{
auto value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double();
if (value > 1 || value < -1)
@@ -364,7 +364,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::atanh)
}
// 21.3.2.21 Math.log1p ( x ), https://tc39.es/ecma262/#sec-math.log1p
-JS_DEFINE_NATIVE_FUNCTION(MathObject::log1p)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::log1p)
{
auto value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double();
if (value < -1)
@@ -373,13 +373,13 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::log1p)
}
// 21.3.2.9 Math.cbrt ( x ), https://tc39.es/ecma262/#sec-math.cbrt
-JS_DEFINE_NATIVE_FUNCTION(MathObject::cbrt)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::cbrt)
{
return Value(::cbrt(TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double()));
}
// 21.3.2.8 Math.atan2 ( y, x ), https://tc39.es/ecma262/#sec-math.atan2
-JS_DEFINE_NATIVE_FUNCTION(MathObject::atan2)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::atan2)
{
auto constexpr three_quarters_pi = M_PI_4 + M_PI_2;
@@ -438,7 +438,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::atan2)
}
// 21.3.2.17 Math.fround ( x ), https://tc39.es/ecma262/#sec-math.fround
-JS_DEFINE_NATIVE_FUNCTION(MathObject::fround)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::fround)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -447,7 +447,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::fround)
}
// 21.3.2.18 Math.hypot ( ...args ), https://tc39.es/ecma262/#sec-math.hypot
-JS_DEFINE_NATIVE_FUNCTION(MathObject::hypot)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::hypot)
{
Vector<Value> coerced;
for (size_t i = 0; i < vm.argument_count(); ++i)
@@ -475,7 +475,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::hypot)
}
// 21.3.2.19 Math.imul ( x, y ), https://tc39.es/ecma262/#sec-math.imul
-JS_DEFINE_NATIVE_FUNCTION(MathObject::imul)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::imul)
{
auto a = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object));
auto b = TRY_OR_DISCARD(vm.argument(1).to_u32(global_object));
@@ -483,7 +483,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::imul)
}
// 21.3.2.20 Math.log ( x ), https://tc39.es/ecma262/#sec-math.log
-JS_DEFINE_NATIVE_FUNCTION(MathObject::log)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::log)
{
auto value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double();
if (value < 0)
@@ -492,7 +492,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::log)
}
// 21.3.2.23 Math.log2 ( x ), https://tc39.es/ecma262/#sec-math.log2
-JS_DEFINE_NATIVE_FUNCTION(MathObject::log2)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::log2)
{
auto value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double();
if (value < 0)
@@ -501,7 +501,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::log2)
}
// 21.3.2.22 Math.log10 ( x ), https://tc39.es/ecma262/#sec-math.log10
-JS_DEFINE_NATIVE_FUNCTION(MathObject::log10)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::log10)
{
auto value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double();
if (value < 0)
@@ -510,7 +510,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::log10)
}
// 21.3.2.31 Math.sinh ( x ), https://tc39.es/ecma262/#sec-math.sinh
-JS_DEFINE_NATIVE_FUNCTION(MathObject::sinh)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::sinh)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -519,7 +519,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::sinh)
}
// 21.3.2.13 Math.cosh ( x ), https://tc39.es/ecma262/#sec-math.cosh
-JS_DEFINE_NATIVE_FUNCTION(MathObject::cosh)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::cosh)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
@@ -528,7 +528,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::cosh)
}
// 21.3.2.34 Math.tanh ( x ), https://tc39.es/ecma262/#sec-math.tanh
-JS_DEFINE_NATIVE_FUNCTION(MathObject::tanh)
+JS_DEFINE_OLD_NATIVE_FUNCTION(MathObject::tanh)
{
auto number = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
if (number.is_nan())
diff --git a/Userland/Libraries/LibJS/Runtime/MathObject.h b/Userland/Libraries/LibJS/Runtime/MathObject.h
index 16b139f65a..a1b8961677 100644
--- a/Userland/Libraries/LibJS/Runtime/MathObject.h
+++ b/Userland/Libraries/LibJS/Runtime/MathObject.h
@@ -19,41 +19,41 @@ public:
virtual ~MathObject() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(abs);
- JS_DECLARE_NATIVE_FUNCTION(random);
- JS_DECLARE_NATIVE_FUNCTION(sqrt);
- JS_DECLARE_NATIVE_FUNCTION(floor);
- JS_DECLARE_NATIVE_FUNCTION(ceil);
- JS_DECLARE_NATIVE_FUNCTION(round);
- JS_DECLARE_NATIVE_FUNCTION(max);
- JS_DECLARE_NATIVE_FUNCTION(min);
- JS_DECLARE_NATIVE_FUNCTION(trunc);
- JS_DECLARE_NATIVE_FUNCTION(sin);
- JS_DECLARE_NATIVE_FUNCTION(cos);
- JS_DECLARE_NATIVE_FUNCTION(tan);
- JS_DECLARE_NATIVE_FUNCTION(pow);
- JS_DECLARE_NATIVE_FUNCTION(exp);
- JS_DECLARE_NATIVE_FUNCTION(expm1);
- JS_DECLARE_NATIVE_FUNCTION(sign);
- JS_DECLARE_NATIVE_FUNCTION(clz32);
- JS_DECLARE_NATIVE_FUNCTION(acos);
- JS_DECLARE_NATIVE_FUNCTION(acosh);
- JS_DECLARE_NATIVE_FUNCTION(asin);
- JS_DECLARE_NATIVE_FUNCTION(asinh);
- JS_DECLARE_NATIVE_FUNCTION(atan);
- JS_DECLARE_NATIVE_FUNCTION(atanh);
- JS_DECLARE_NATIVE_FUNCTION(log1p);
- JS_DECLARE_NATIVE_FUNCTION(cbrt);
- JS_DECLARE_NATIVE_FUNCTION(atan2);
- JS_DECLARE_NATIVE_FUNCTION(fround);
- JS_DECLARE_NATIVE_FUNCTION(hypot);
- JS_DECLARE_NATIVE_FUNCTION(imul);
- JS_DECLARE_NATIVE_FUNCTION(log);
- JS_DECLARE_NATIVE_FUNCTION(log2);
- JS_DECLARE_NATIVE_FUNCTION(log10);
- JS_DECLARE_NATIVE_FUNCTION(sinh);
- JS_DECLARE_NATIVE_FUNCTION(cosh);
- JS_DECLARE_NATIVE_FUNCTION(tanh);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(abs);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(random);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sqrt);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(floor);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(ceil);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(round);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(max);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(min);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(trunc);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sin);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(cos);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(tan);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(pow);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(exp);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(expm1);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sign);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(clz32);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(acos);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(acosh);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(asin);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(asinh);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(atan);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(atanh);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(log1p);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(cbrt);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(atan2);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(fround);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(hypot);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(imul);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(log);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(log2);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(log10);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sinh);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(cosh);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(tanh);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp b/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp
index 302f466fc5..c0bee463e0 100644
--- a/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp
@@ -105,25 +105,25 @@ Value NumberConstructor::construct(FunctionObject& new_target)
}
// 21.1.2.2 Number.isFinite ( number ), https://tc39.es/ecma262/#sec-number.isfinite
-JS_DEFINE_NATIVE_FUNCTION(NumberConstructor::is_finite)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberConstructor::is_finite)
{
return Value(vm.argument(0).is_finite_number());
}
// 21.1.2.3 Number.isInteger ( number ), https://tc39.es/ecma262/#sec-number.isinteger
-JS_DEFINE_NATIVE_FUNCTION(NumberConstructor::is_integer)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberConstructor::is_integer)
{
return Value(vm.argument(0).is_integral_number());
}
// 21.1.2.4 Number.isNaN ( number ), https://tc39.es/ecma262/#sec-number.isnan
-JS_DEFINE_NATIVE_FUNCTION(NumberConstructor::is_nan)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberConstructor::is_nan)
{
return Value(vm.argument(0).is_nan());
}
// 21.1.2.5 Number.isSafeInteger ( number ), https://tc39.es/ecma262/#sec-number.issafeinteger
-JS_DEFINE_NATIVE_FUNCTION(NumberConstructor::is_safe_integer)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberConstructor::is_safe_integer)
{
if (!vm.argument(0).is_number())
return Value(false);
diff --git a/Userland/Libraries/LibJS/Runtime/NumberConstructor.h b/Userland/Libraries/LibJS/Runtime/NumberConstructor.h
index 8ae7830050..7e898ca606 100644
--- a/Userland/Libraries/LibJS/Runtime/NumberConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/NumberConstructor.h
@@ -24,10 +24,10 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(is_finite);
- JS_DECLARE_NATIVE_FUNCTION(is_integer);
- JS_DECLARE_NATIVE_FUNCTION(is_nan);
- JS_DECLARE_NATIVE_FUNCTION(is_safe_integer);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_finite);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_integer);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_nan);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_safe_integer);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp b/Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp
index 8fc0a9f980..7aeb109d0b 100644
--- a/Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp
@@ -57,7 +57,7 @@ static ThrowCompletionOr<Value> this_number_value(GlobalObject& global_object, V
}
// 21.1.3.3 Number.prototype.toFixed ( fractionDigits ), https://tc39.es/ecma262/#sec-number.prototype.tofixed
-JS_DEFINE_NATIVE_FUNCTION(NumberPrototype::to_fixed)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberPrototype::to_fixed)
{
auto number_value = TRY_OR_DISCARD(this_number_value(global_object, vm.this_value(global_object)));
auto fraction_digits = TRY_OR_DISCARD(vm.argument(0).to_integer_or_infinity(global_object));
@@ -82,7 +82,7 @@ JS_DEFINE_NATIVE_FUNCTION(NumberPrototype::to_fixed)
}
// 21.1.3.6 Number.prototype.toString ( [ radix ] ), https://tc39.es/ecma262/#sec-number.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(NumberPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberPrototype::to_string)
{
auto number_value = TRY_OR_DISCARD(this_number_value(global_object, vm.this_value(global_object)));
double radix_argument = 10;
@@ -154,7 +154,7 @@ JS_DEFINE_NATIVE_FUNCTION(NumberPrototype::to_string)
}
// 21.1.3.7 Number.prototype.valueOf ( ), https://tc39.es/ecma262/#sec-number.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(NumberPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NumberPrototype::value_of)
{
return TRY_OR_DISCARD(this_number_value(global_object, vm.this_value(global_object)));
}
diff --git a/Userland/Libraries/LibJS/Runtime/NumberPrototype.h b/Userland/Libraries/LibJS/Runtime/NumberPrototype.h
index ed36778376..61a015acc8 100644
--- a/Userland/Libraries/LibJS/Runtime/NumberPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/NumberPrototype.h
@@ -18,9 +18,9 @@ public:
virtual void initialize(GlobalObject&) override;
virtual ~NumberPrototype() override;
- JS_DECLARE_NATIVE_FUNCTION(to_fixed);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_fixed);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
index 8a40e2b17f..9494f16623 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
@@ -114,21 +114,21 @@ static Array* get_own_property_keys(GlobalObject& global_object, Value value, Ge
}
// 20.1.2.10 Object.getOwnPropertyNames ( O ), https://tc39.es/ecma262/#sec-object.getownpropertynames
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_names)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::get_own_property_names)
{
// 1. Return ? GetOwnPropertyKeys(O, string).
return get_own_property_keys(global_object, vm.argument(0), GetOwnPropertyKeysType::String);
}
// 20.1.2.11 Object.getOwnPropertySymbols ( O ), https://tc39.es/ecma262/#sec-object.getownpropertysymbols
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_symbols)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::get_own_property_symbols)
{
// 1. Return ? GetOwnPropertyKeys(O, symbol).
return get_own_property_keys(global_object, vm.argument(0), GetOwnPropertyKeysType::Symbol);
}
// 20.1.2.12 Object.getPrototypeOf ( O ), https://tc39.es/ecma262/#sec-object.getprototypeof
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_prototype_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::get_prototype_of)
{
// 1. Let obj be ? ToObject(O).
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
@@ -138,7 +138,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_prototype_of)
}
// 20.1.2.21 Object.setPrototypeOf ( O, proto ), https://tc39.es/ecma262/#sec-object.setprototypeof
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::set_prototype_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::set_prototype_of)
{
auto proto = vm.argument(1);
@@ -170,7 +170,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::set_prototype_of)
}
// 20.1.2.14 Object.isExtensible ( O ), https://tc39.es/ecma262/#sec-object.isextensible
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_extensible)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_extensible)
{
auto argument = vm.argument(0);
if (!argument.is_object())
@@ -179,7 +179,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_extensible)
}
// 20.1.2.15 Object.isFrozen ( O ), https://tc39.es/ecma262/#sec-object.isfrozen
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_frozen)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_frozen)
{
auto argument = vm.argument(0);
if (!argument.is_object())
@@ -188,7 +188,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_frozen)
}
// 20.1.2.16 Object.isSealed ( O ), https://tc39.es/ecma262/#sec-object.issealed
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_sealed)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_sealed)
{
auto argument = vm.argument(0);
if (!argument.is_object())
@@ -197,7 +197,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is_sealed)
}
// 20.1.2.18 Object.preventExtensions ( O ), https://tc39.es/ecma262/#sec-object.preventextensions
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::prevent_extensions)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::prevent_extensions)
{
auto argument = vm.argument(0);
if (!argument.is_object())
@@ -212,7 +212,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::prevent_extensions)
}
// 20.1.2.6 Object.freeze ( O ), https://tc39.es/ecma262/#sec-object.freeze
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::freeze)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::freeze)
{
auto argument = vm.argument(0);
if (!argument.is_object())
@@ -226,7 +226,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::freeze)
}
// 20.1.2.7 Object.fromEntries ( iterable ), https://tc39.es/ecma262/#sec-object.fromentries
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::from_entries)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::from_entries)
{
auto iterable = TRY_OR_DISCARD(require_object_coercible(global_object, vm.argument(0)));
@@ -261,7 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::from_entries)
}
// 20.1.2.20 Object.seal ( O ), https://tc39.es/ecma262/#sec-object.seal
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::seal)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::seal)
{
auto argument = vm.argument(0);
if (!argument.is_object())
@@ -275,7 +275,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::seal)
}
// 20.1.2.8 Object.getOwnPropertyDescriptor ( O, P ), https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptor)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptor)
{
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
auto key = TRY_OR_DISCARD(vm.argument(1).to_property_key(global_object));
@@ -284,7 +284,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptor)
}
// 20.1.2.9 Object.getOwnPropertyDescriptors ( O ), https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptors)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptors)
{
// 1. Let obj be ? ToObject(O).
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
@@ -315,7 +315,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptors)
}
// 20.1.2.4 Object.defineProperty ( O, P, Attributes ), https://tc39.es/ecma262/#sec-object.defineproperty
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::define_property)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::define_property)
{
if (!vm.argument(0).is_object()) {
vm.throw_exception<TypeError>(global_object, ErrorType::NotAnObject, vm.argument(0).to_string_without_side_effects());
@@ -328,7 +328,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::define_property)
}
// 20.1.2.3 Object.defineProperties ( O, Properties ), https://tc39.es/ecma262/#sec-object.defineproperties
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::define_properties)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::define_properties)
{
auto object = vm.argument(0);
auto properties = vm.argument(1);
@@ -344,13 +344,13 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::define_properties)
}
// 20.1.2.13 Object.is ( value1, value2 ), https://tc39.es/ecma262/#sec-object.is
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::is)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is)
{
return Value(same_value(vm.argument(0), vm.argument(1)));
}
// 20.1.2.17 Object.keys ( O ), https://tc39.es/ecma262/#sec-object.keys
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::keys)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::keys)
{
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
auto name_list = TRY_OR_DISCARD(object->enumerable_own_property_names(PropertyKind::Key));
@@ -358,7 +358,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::keys)
}
// 20.1.2.22 Object.values ( O ), https://tc39.es/ecma262/#sec-object.values
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::values)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::values)
{
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
auto name_list = TRY_OR_DISCARD(object->enumerable_own_property_names(PropertyKind::Value));
@@ -366,7 +366,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::values)
}
// 20.1.2.5 Object.entries ( O ), https://tc39.es/ecma262/#sec-object.entries
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::entries)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::entries)
{
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
auto name_list = TRY_OR_DISCARD(object->enumerable_own_property_names(PropertyKind::KeyAndValue));
@@ -374,7 +374,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::entries)
}
// 20.1.2.2 Object.create ( O, Properties ), https://tc39.es/ecma262/#sec-object.create
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::create)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::create)
{
auto proto = vm.argument(0);
auto properties = vm.argument(1);
@@ -399,7 +399,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::create)
}
// 1 Object.hasOwn ( O, P ), https://tc39.es/proposal-accessible-object-hasownproperty/#sec-object.hasown
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::has_own)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::has_own)
{
// 1. Let obj be ? ToObject(O).
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
@@ -412,7 +412,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::has_own)
}
// 20.1.2.1 Object.assign ( target, ...sources ), https://tc39.es/ecma262/#sec-object.assign
-JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::assign)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::assign)
{
// 1. Let to be ? ToObject(target).
auto* to = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.h b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.h
index f827357dd3..24716a5d62 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.h
@@ -25,28 +25,28 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(define_property);
- JS_DECLARE_NATIVE_FUNCTION(define_properties);
- JS_DECLARE_NATIVE_FUNCTION(is);
- JS_DECLARE_NATIVE_FUNCTION(get_own_property_descriptor);
- JS_DECLARE_NATIVE_FUNCTION(get_own_property_descriptors);
- JS_DECLARE_NATIVE_FUNCTION(get_own_property_names);
- JS_DECLARE_NATIVE_FUNCTION(get_own_property_symbols);
- JS_DECLARE_NATIVE_FUNCTION(get_prototype_of);
- JS_DECLARE_NATIVE_FUNCTION(set_prototype_of);
- JS_DECLARE_NATIVE_FUNCTION(is_extensible);
- JS_DECLARE_NATIVE_FUNCTION(is_frozen);
- JS_DECLARE_NATIVE_FUNCTION(is_sealed);
- JS_DECLARE_NATIVE_FUNCTION(prevent_extensions);
- JS_DECLARE_NATIVE_FUNCTION(seal);
- JS_DECLARE_NATIVE_FUNCTION(freeze);
- JS_DECLARE_NATIVE_FUNCTION(from_entries);
- JS_DECLARE_NATIVE_FUNCTION(keys);
- JS_DECLARE_NATIVE_FUNCTION(values);
- JS_DECLARE_NATIVE_FUNCTION(entries);
- JS_DECLARE_NATIVE_FUNCTION(create);
- JS_DECLARE_NATIVE_FUNCTION(has_own);
- JS_DECLARE_NATIVE_FUNCTION(assign);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(define_property);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(define_properties);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_own_property_descriptor);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_own_property_descriptors);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_own_property_names);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_own_property_symbols);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_prototype_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_prototype_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_extensible);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_frozen);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_sealed);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(prevent_extensions);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(seal);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(freeze);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from_entries);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(keys);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(values);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(entries);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(create);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(has_own);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(assign);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
index d1afa56849..6f2b765782 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.cpp
@@ -60,7 +60,7 @@ ThrowCompletionOr<bool> ObjectPrototype::internal_set_prototype_of(Object* proto
}
// 20.1.3.2 Object.prototype.hasOwnProperty ( V ), https://tc39.es/ecma262/#sec-object.prototype.hasownproperty
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::has_own_property)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::has_own_property)
{
auto property_key = TRY_OR_DISCARD(vm.argument(0).to_property_key(global_object));
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -68,7 +68,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::has_own_property)
}
// 20.1.3.6 Object.prototype.toString ( ), https://tc39.es/ecma262/#sec-object.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::to_string)
{
auto this_value = vm.this_value(global_object);
@@ -136,20 +136,20 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::to_string)
}
// 20.1.3.5 Object.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-object.prototype.tolocalestring
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::to_locale_string)
{
auto this_value = vm.this_value(global_object);
return TRY_OR_DISCARD(this_value.invoke(global_object, vm.names.toString));
}
// 20.1.3.7 Object.prototype.valueOf ( ), https://tc39.es/ecma262/#sec-object.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::value_of)
{
return TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
}
// 20.1.3.4 Object.prototype.propertyIsEnumerable ( V ), https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::property_is_enumerable)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::property_is_enumerable)
{
// 1. Let P be ? ToPropertyKey(V).
auto property_key = TRY_OR_DISCARD(vm.argument(0).to_property_key(global_object));
@@ -165,7 +165,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::property_is_enumerable)
}
// 20.1.3.3 Object.prototype.isPrototypeOf ( V ), https://tc39.es/ecma262/#sec-object.prototype.isprototypeof
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::is_prototype_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::is_prototype_of)
{
auto object_argument = vm.argument(0);
if (!object_argument.is_object())
@@ -183,7 +183,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::is_prototype_of)
}
// B.2.2.2 Object.prototype.__defineGetter__ ( P, getter ), https://tc39.es/ecma262/#sec-object.prototype.__defineGetter__
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::define_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::define_getter)
{
auto* object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -203,7 +203,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::define_getter)
}
// B.2.2.3 Object.prototype.__defineSetter__ ( P, getter ), https://tc39.es/ecma262/#sec-object.prototype.__defineSetter__
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::define_setter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::define_setter)
{
auto* object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -223,7 +223,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::define_setter)
}
// B.2.2.4 Object.prototype.__lookupGetter__ ( P ), https://tc39.es/ecma262/#sec-object.prototype.__lookupGetter__
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::lookup_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::lookup_getter)
{
auto* object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -243,7 +243,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::lookup_getter)
}
// B.2.2.5 Object.prototype.__lookupSetter__ ( P ), https://tc39.es/ecma262/#sec-object.prototype.__lookupSetter__
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::lookup_setter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::lookup_setter)
{
auto* object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -263,14 +263,14 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::lookup_setter)
}
// B.2.2.1.1 get Object.prototype.__proto__, https://tc39.es/ecma262/#sec-get-object.prototype.__proto__
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::proto_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::proto_getter)
{
auto* object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
return TRY_OR_DISCARD(object->internal_get_prototype_of());
}
// B.2.2.1.2 set Object.prototype.__proto__, https://tc39.es/ecma262/#sec-set-object.prototype.__proto__
-JS_DEFINE_NATIVE_FUNCTION(ObjectPrototype::proto_setter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectPrototype::proto_setter)
{
auto object = TRY_OR_DISCARD(require_object_coercible(global_object, vm.this_value(global_object)));
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.h b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.h
index ef1f5ee785..5a7b7c385c 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/ObjectPrototype.h
@@ -24,20 +24,20 @@ public:
virtual ThrowCompletionOr<bool> internal_set_prototype_of(Object* prototype) override;
// public to serve as intrinsic function %Object.prototype.toString%
- JS_DECLARE_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
private:
- JS_DECLARE_NATIVE_FUNCTION(has_own_property);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
- JS_DECLARE_NATIVE_FUNCTION(property_is_enumerable);
- JS_DECLARE_NATIVE_FUNCTION(is_prototype_of);
- JS_DECLARE_NATIVE_FUNCTION(define_getter);
- JS_DECLARE_NATIVE_FUNCTION(define_setter);
- JS_DECLARE_NATIVE_FUNCTION(lookup_getter);
- JS_DECLARE_NATIVE_FUNCTION(lookup_setter);
- JS_DECLARE_NATIVE_FUNCTION(proto_getter);
- JS_DECLARE_NATIVE_FUNCTION(proto_setter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(has_own_property);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(property_is_enumerable);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_prototype_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(define_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(define_setter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(lookup_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(lookup_setter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(proto_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(proto_setter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
index 3a71cae95f..a17c4befb5 100644
--- a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
@@ -273,7 +273,7 @@ Value PromiseConstructor::construct(FunctionObject& new_target)
}
// 27.2.4.1 Promise.all ( iterable ), https://tc39.es/ecma262/#sec-promise.all
-JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::all)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromiseConstructor::all)
{
auto* constructor = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -302,7 +302,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::all)
}
// 27.2.4.2 Promise.allSettled ( iterable ), https://tc39.es/ecma262/#sec-promise.allsettled
-JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::all_settled)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromiseConstructor::all_settled)
{
auto* constructor = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -331,7 +331,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::all_settled)
}
// 27.2.4.3 Promise.any ( iterable ), https://tc39.es/ecma262/#sec-promise.any
-JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::any)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromiseConstructor::any)
{
auto* constructor = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -360,7 +360,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::any)
}
// 27.2.4.5 Promise.race ( iterable ), https://tc39.es/ecma262/#sec-promise.race
-JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::race)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromiseConstructor::race)
{
auto* constructor = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -389,7 +389,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::race)
}
// 27.2.4.6 Promise.reject ( r ), https://tc39.es/ecma262/#sec-promise.reject
-JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::reject)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromiseConstructor::reject)
{
auto* constructor = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto promise_capability = new_promise_capability(global_object, constructor);
@@ -401,7 +401,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::reject)
}
// 27.2.4.7 Promise.resolve ( x ), https://tc39.es/ecma262/#sec-promise.resolve
-JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::resolve)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromiseConstructor::resolve)
{
auto* constructor = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto value = vm.argument(0);
@@ -409,7 +409,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::resolve)
}
// 27.2.4.8 get Promise [ @@species ], https://tc39.es/ecma262/#sec-get-promise-@@species
-JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::symbol_species_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromiseConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.h b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.h
index 02230c2304..319b124cd0 100644
--- a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.h
@@ -24,14 +24,14 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(all);
- JS_DECLARE_NATIVE_FUNCTION(all_settled);
- JS_DECLARE_NATIVE_FUNCTION(any);
- JS_DECLARE_NATIVE_FUNCTION(race);
- JS_DECLARE_NATIVE_FUNCTION(reject);
- JS_DECLARE_NATIVE_FUNCTION(resolve);
-
- JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(all);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(all_settled);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(any);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(race);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(reject);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(resolve);
+
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp b/Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp
index 93fdb519c0..711add5389 100644
--- a/Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/PromisePrototype.cpp
@@ -36,7 +36,7 @@ void PromisePrototype::initialize(GlobalObject& global_object)
}
// 27.2.5.4 Promise.prototype.then ( onFulfilled, onRejected ), https://tc39.es/ecma262/#sec-promise.prototype.then
-JS_DEFINE_NATIVE_FUNCTION(PromisePrototype::then)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromisePrototype::then)
{
auto* promise = TRY_OR_DISCARD(typed_this_object(global_object));
auto on_fulfilled = vm.argument(0);
@@ -49,7 +49,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromisePrototype::then)
}
// 27.2.5.1 Promise.prototype.catch ( onRejected ), https://tc39.es/ecma262/#sec-promise.prototype.catch
-JS_DEFINE_NATIVE_FUNCTION(PromisePrototype::catch_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromisePrototype::catch_)
{
auto this_value = vm.this_value(global_object);
auto on_rejected = vm.argument(0);
@@ -57,7 +57,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromisePrototype::catch_)
}
// 27.2.5.3 Promise.prototype.finally ( onFinally ), https://tc39.es/ecma262/#sec-promise.prototype.finally
-JS_DEFINE_NATIVE_FUNCTION(PromisePrototype::finally)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PromisePrototype::finally)
{
auto* promise = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto* constructor = TRY_OR_DISCARD(species_constructor(global_object, *promise, *global_object.promise_constructor()));
diff --git a/Userland/Libraries/LibJS/Runtime/PromisePrototype.h b/Userland/Libraries/LibJS/Runtime/PromisePrototype.h
index 102c3443cd..e5a5711203 100644
--- a/Userland/Libraries/LibJS/Runtime/PromisePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/PromisePrototype.h
@@ -19,9 +19,9 @@ public:
virtual ~PromisePrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(then);
- JS_DECLARE_NATIVE_FUNCTION(catch_);
- JS_DECLARE_NATIVE_FUNCTION(finally);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(then);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(catch_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(finally);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ProxyConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ProxyConstructor.cpp
index 2193ed689c..e2a3e25aac 100644
--- a/Userland/Libraries/LibJS/Runtime/ProxyConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ProxyConstructor.cpp
@@ -63,7 +63,7 @@ Value ProxyConstructor::construct(FunctionObject&)
}
// 28.2.2.1 Proxy.revocable ( target, handler ), https://tc39.es/ecma262/#sec-proxy.revocable
-JS_DEFINE_NATIVE_FUNCTION(ProxyConstructor::revocable)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ProxyConstructor::revocable)
{
auto* proxy = proxy_create(global_object, vm.argument(0), vm.argument(1));
if (vm.exception())
diff --git a/Userland/Libraries/LibJS/Runtime/ProxyConstructor.h b/Userland/Libraries/LibJS/Runtime/ProxyConstructor.h
index f66ed96685..e2d87a7d40 100644
--- a/Userland/Libraries/LibJS/Runtime/ProxyConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/ProxyConstructor.h
@@ -25,7 +25,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(revocable);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(revocable);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
index dec045be2f..5915fcde97 100644
--- a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
@@ -48,7 +48,7 @@ ReflectObject::~ReflectObject()
}
// 28.1.1 Reflect.apply ( target, thisArgument, argumentsList ), https://tc39.es/ecma262/#sec-reflect.apply
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::apply)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::apply)
{
auto target = vm.argument(0);
auto this_argument = vm.argument(1);
@@ -69,7 +69,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::apply)
}
// 28.1.2 Reflect.construct ( target, argumentsList [ , newTarget ] ), https://tc39.es/ecma262/#sec-reflect.construct
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::construct)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::construct)
{
auto target = vm.argument(0);
auto arguments_list = vm.argument(1);
@@ -99,7 +99,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::construct)
}
// 28.1.3 Reflect.defineProperty ( target, propertyKey, attributes ), https://tc39.es/ecma262/#sec-reflect.defineproperty
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::define_property)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::define_property)
{
auto target = vm.argument(0);
auto property_key = vm.argument(1);
@@ -122,7 +122,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::define_property)
}
// 28.1.4 Reflect.deleteProperty ( target, propertyKey ), https://tc39.es/ecma262/#sec-reflect.deleteproperty
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::delete_property)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::delete_property)
{
auto target = vm.argument(0);
auto property_key = vm.argument(1);
@@ -141,7 +141,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::delete_property)
}
// 28.1.5 Reflect.get ( target, propertyKey [ , receiver ] ), https://tc39.es/ecma262/#sec-reflect.get
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::get)
{
auto target = vm.argument(0);
auto property_key = vm.argument(1);
@@ -167,7 +167,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get)
}
// 28.1.6 Reflect.getOwnPropertyDescriptor ( target, propertyKey ), https://tc39.es/ecma262/#sec-reflect.getownpropertydescriptor
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get_own_property_descriptor)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::get_own_property_descriptor)
{
auto target = vm.argument(0);
auto property_key = vm.argument(1);
@@ -189,7 +189,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get_own_property_descriptor)
}
// 28.1.7 Reflect.getPrototypeOf ( target ), https://tc39.es/ecma262/#sec-reflect.getprototypeof
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get_prototype_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::get_prototype_of)
{
auto target = vm.argument(0);
@@ -204,7 +204,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get_prototype_of)
}
// 28.1.8 Reflect.has ( target, propertyKey ), https://tc39.es/ecma262/#sec-reflect.has
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::has)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::has)
{
auto target = vm.argument(0);
auto property_key = vm.argument(1);
@@ -223,7 +223,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::has)
}
// 28.1.9 Reflect.isExtensible ( target ), https://tc39.es/ecma262/#sec-reflect.isextensible
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::is_extensible)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::is_extensible)
{
auto target = vm.argument(0);
@@ -238,7 +238,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::is_extensible)
}
// 28.1.10 Reflect.ownKeys ( target ), https://tc39.es/ecma262/#sec-reflect.ownkeys
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::own_keys)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::own_keys)
{
auto target = vm.argument(0);
@@ -256,7 +256,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::own_keys)
}
// 28.1.11 Reflect.preventExtensions ( target ), https://tc39.es/ecma262/#sec-reflect.preventextensions
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::prevent_extensions)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::prevent_extensions)
{
auto target = vm.argument(0);
@@ -271,7 +271,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::prevent_extensions)
}
// 28.1.12 Reflect.set ( target, propertyKey, V [ , receiver ] ), https://tc39.es/ecma262/#sec-reflect.set
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::set)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::set)
{
auto target = vm.argument(0);
auto property_key = vm.argument(1);
@@ -298,7 +298,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::set)
}
// 28.1.13 Reflect.setPrototypeOf ( target, proto ), https://tc39.es/ecma262/#sec-reflect.setprototypeof
-JS_DEFINE_NATIVE_FUNCTION(ReflectObject::set_prototype_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::set_prototype_of)
{
auto target = vm.argument(0);
auto proto = vm.argument(1);
diff --git a/Userland/Libraries/LibJS/Runtime/ReflectObject.h b/Userland/Libraries/LibJS/Runtime/ReflectObject.h
index 8157b8dc6c..baf7e4d93f 100644
--- a/Userland/Libraries/LibJS/Runtime/ReflectObject.h
+++ b/Userland/Libraries/LibJS/Runtime/ReflectObject.h
@@ -19,19 +19,19 @@ public:
virtual ~ReflectObject() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(apply);
- JS_DECLARE_NATIVE_FUNCTION(construct);
- JS_DECLARE_NATIVE_FUNCTION(define_property);
- JS_DECLARE_NATIVE_FUNCTION(delete_property);
- JS_DECLARE_NATIVE_FUNCTION(get);
- JS_DECLARE_NATIVE_FUNCTION(get_own_property_descriptor);
- JS_DECLARE_NATIVE_FUNCTION(get_prototype_of);
- JS_DECLARE_NATIVE_FUNCTION(has);
- JS_DECLARE_NATIVE_FUNCTION(is_extensible);
- JS_DECLARE_NATIVE_FUNCTION(own_keys);
- JS_DECLARE_NATIVE_FUNCTION(prevent_extensions);
- JS_DECLARE_NATIVE_FUNCTION(set);
- JS_DECLARE_NATIVE_FUNCTION(set_prototype_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(apply);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(construct);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(define_property);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(delete_property);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_own_property_descriptor);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_prototype_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(has);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(is_extensible);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(own_keys);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(prevent_extensions);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_prototype_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
index 02861b2017..34afe2faa1 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
@@ -92,7 +92,7 @@ Value RegExpConstructor::construct(FunctionObject&)
}
// 22.2.4.2 get RegExp [ @@species ], https://tc39.es/ecma262/#sec-get-regexp-@@species
-JS_DEFINE_NATIVE_FUNCTION(RegExpConstructor::symbol_species_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.h b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.h
index 1068c53947..b3ea4a61ff 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
index 759ddc088f..123187357f 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
@@ -280,7 +280,7 @@ Value regexp_exec(GlobalObject& global_object, Object& regexp_object, Utf16Strin
// 22.2.5.14 get RegExp.prototype.sticky, https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky
// 22.2.5.17 get RegExp.prototype.unicode, https://tc39.es/ecma262/#sec-get-regexp.prototype.unicode
#define __JS_ENUMERATE(flagName, flag_name, flag_char) \
- JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::flag_name) \
+ JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::flag_name) \
{ \
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object)); \
if (!is<RegExpObject>(regexp_object)) { \
@@ -297,7 +297,7 @@ JS_ENUMERATE_REGEXP_FLAGS
#undef __JS_ENUMERATE
// 22.2.5.4 get RegExp.prototype.flags, https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::flags)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::flags)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
StringBuilder builder(8);
@@ -313,7 +313,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::flags)
}
// 22.2.5.12 get RegExp.prototype.source, https://tc39.es/ecma262/#sec-get-regexp.prototype.source
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::source)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::source)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
if (!is<RegExpObject>(regexp_object)) {
@@ -327,7 +327,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::source)
}
// 22.2.5.2 RegExp.prototype.exec ( string ), https://tc39.es/ecma262/#sec-regexp.prototype.exec
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::exec)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::exec)
{
auto* regexp_object = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -337,7 +337,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::exec)
}
// 22.2.5.15 RegExp.prototype.test ( S ), https://tc39.es/ecma262/#sec-regexp.prototype.test
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::test)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::test)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
auto string = TRY_OR_DISCARD(vm.argument(0).to_utf16_string(global_object));
@@ -350,7 +350,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::test)
}
// 22.2.5.16 RegExp.prototype.toString ( ), https://tc39.es/ecma262/#sec-regexp.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::to_string)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
auto source_attr = TRY_OR_DISCARD(regexp_object->get(vm.names.source));
@@ -363,7 +363,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::to_string)
}
// 22.2.5.7 RegExp.prototype [ @@match ] ( string ), https://tc39.es/ecma262/#sec-regexp.prototype-@@match
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_match)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::symbol_match)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
auto string = TRY_OR_DISCARD(vm.argument(0).to_utf16_string(global_object));
@@ -412,7 +412,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_match)
}
// 22.2.5.8 RegExp.prototype [ @@matchAll ] ( string ), https://tc39.es/ecma262/#sec-regexp-prototype-matchall
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_match_all)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::symbol_match_all)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
auto string = TRY_OR_DISCARD(vm.argument(0).to_utf16_string(global_object));
@@ -441,7 +441,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_match_all)
}
// 22.2.5.10 RegExp.prototype [ @@replace ] ( string, replaceValue ), https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
{
auto string_value = vm.argument(0);
auto replace_value = vm.argument(1);
@@ -553,7 +553,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
}
// 22.2.5.11 RegExp.prototype [ @@search ] ( string ), https://tc39.es/ecma262/#sec-regexp.prototype-@@search
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_search)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::symbol_search)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
auto string = TRY_OR_DISCARD(vm.argument(0).to_utf16_string(global_object));
@@ -578,7 +578,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_search)
}
// 22.2.5.13 RegExp.prototype [ @@split ] ( string, limit ), https://tc39.es/ecma262/#sec-regexp.prototype-@@split
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_split)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::symbol_split)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
auto string = TRY_OR_DISCARD(vm.argument(0).to_utf16_string(global_object));
@@ -670,7 +670,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_split)
}
// B.2.4.1 RegExp.prototype.compile ( pattern, flags ), https://tc39.es/ecma262/#sec-regexp.prototype.compile
-JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::compile)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpPrototype::compile)
{
auto* regexp_object = TRY_OR_DISCARD(typed_this_object(global_object));
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h
index b2b861ba44..8e9101829c 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h
@@ -24,21 +24,21 @@ public:
virtual ~RegExpPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(flags);
- JS_DECLARE_NATIVE_FUNCTION(source);
-
- JS_DECLARE_NATIVE_FUNCTION(exec);
- JS_DECLARE_NATIVE_FUNCTION(test);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(symbol_match);
- JS_DECLARE_NATIVE_FUNCTION(symbol_match_all);
- JS_DECLARE_NATIVE_FUNCTION(symbol_replace);
- JS_DECLARE_NATIVE_FUNCTION(symbol_search);
- JS_DECLARE_NATIVE_FUNCTION(symbol_split);
- JS_DECLARE_NATIVE_FUNCTION(compile);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(flags);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(source);
+
+ JS_DECLARE_OLD_NATIVE_FUNCTION(exec);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(test);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_match);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_match_all);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_replace);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_search);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_split);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(compile);
#define __JS_ENUMERATE(_, flag_name, ...) \
- JS_DECLARE_NATIVE_FUNCTION(flag_name);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(flag_name);
JS_ENUMERATE_REGEXP_FLAGS
#undef __JS_ENUMERATE
};
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.cpp
index 67d006ee42..095490d52d 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.cpp
@@ -30,7 +30,7 @@ void RegExpStringIteratorPrototype::initialize(GlobalObject& global_object)
}
// 22.2.7.2.1 %RegExpStringIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%regexpstringiteratorprototype%.next
-JS_DEFINE_NATIVE_FUNCTION(RegExpStringIteratorPrototype::next)
+JS_DEFINE_OLD_NATIVE_FUNCTION(RegExpStringIteratorPrototype::next)
{
// For details, see the 'closure' of: https://tc39.es/ecma262/#sec-createregexpstringiterator
auto* iterator = TRY_OR_DISCARD(typed_this_value(global_object));
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.h b/Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.h
index 17637afb6d..e6aa8154d8 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.h
@@ -21,7 +21,7 @@ public:
virtual void initialize(GlobalObject&) override;
private:
- JS_DECLARE_NATIVE_FUNCTION(next);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(next);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp b/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
index f1d7792c5f..719af0222e 100644
--- a/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
@@ -71,7 +71,7 @@ Value SetConstructor::construct(FunctionObject& new_target)
}
// 24.2.2.2 get Set [ @@species ], https://tc39.es/ecma262/#sec-get-set-@@species
-JS_DEFINE_NATIVE_FUNCTION(SetConstructor::symbol_species_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/SetConstructor.h b/Userland/Libraries/LibJS/Runtime/SetConstructor.h
index 4d22c932c3..2221775ae3 100644
--- a/Userland/Libraries/LibJS/Runtime/SetConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/SetConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.cpp
index 7eea4224b3..c87be65029 100644
--- a/Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.cpp
@@ -34,7 +34,7 @@ SetIteratorPrototype::~SetIteratorPrototype()
}
// 24.2.5.2.1 %SetIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%setiteratorprototype%.next
-JS_DEFINE_NATIVE_FUNCTION(SetIteratorPrototype::next)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetIteratorPrototype::next)
{
auto* set_iterator = TRY_OR_DISCARD(typed_this_value(global_object));
if (set_iterator->done())
diff --git a/Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.h b/Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.h
index 43aff39f04..a0b028387f 100644
--- a/Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.h
@@ -20,7 +20,7 @@ public:
virtual ~SetIteratorPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(next);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(next);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp
index 423c91ee0c..8d701785b2 100644
--- a/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp
@@ -45,7 +45,7 @@ SetPrototype::~SetPrototype()
}
// 24.2.3.1 Set.prototype.add ( value ), https://tc39.es/ecma262/#sec-set.prototype.add
-JS_DEFINE_NATIVE_FUNCTION(SetPrototype::add)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetPrototype::add)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
auto value = vm.argument(0);
@@ -56,7 +56,7 @@ JS_DEFINE_NATIVE_FUNCTION(SetPrototype::add)
}
// 24.2.3.2 Set.prototype.clear ( ), https://tc39.es/ecma262/#sec-set.prototype.clear
-JS_DEFINE_NATIVE_FUNCTION(SetPrototype::clear)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetPrototype::clear)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
set->values().clear();
@@ -64,14 +64,14 @@ JS_DEFINE_NATIVE_FUNCTION(SetPrototype::clear)
}
// 24.2.3.4 Set.prototype.delete ( value ), https://tc39.es/ecma262/#sec-set.prototype.delete
-JS_DEFINE_NATIVE_FUNCTION(SetPrototype::delete_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetPrototype::delete_)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
return Value(set->values().remove(vm.argument(0)));
}
// 24.2.3.5 Set.prototype.entries ( ), https://tc39.es/ecma262/#sec-set.prototype.entries
-JS_DEFINE_NATIVE_FUNCTION(SetPrototype::entries)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetPrototype::entries)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -79,7 +79,7 @@ JS_DEFINE_NATIVE_FUNCTION(SetPrototype::entries)
}
// 24.2.3.6 Set.prototype.forEach ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-set.prototype.foreach
-JS_DEFINE_NATIVE_FUNCTION(SetPrototype::for_each)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetPrototype::for_each)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
if (!vm.argument(0).is_function()) {
@@ -96,7 +96,7 @@ JS_DEFINE_NATIVE_FUNCTION(SetPrototype::for_each)
}
// 24.2.3.7 Set.prototype.has ( value ), https://tc39.es/ecma262/#sec-set.prototype.has
-JS_DEFINE_NATIVE_FUNCTION(SetPrototype::has)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetPrototype::has)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
auto& values = set->values();
@@ -104,7 +104,7 @@ JS_DEFINE_NATIVE_FUNCTION(SetPrototype::has)
}
// 24.2.3.10 Set.prototype.values ( ), https://tc39.es/ecma262/#sec-set.prototype.values
-JS_DEFINE_NATIVE_FUNCTION(SetPrototype::values)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetPrototype::values)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
@@ -112,7 +112,7 @@ JS_DEFINE_NATIVE_FUNCTION(SetPrototype::values)
}
// 24.2.3.9 get Set.prototype.size, https://tc39.es/ecma262/#sec-get-set.prototype.size
-JS_DEFINE_NATIVE_FUNCTION(SetPrototype::size_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SetPrototype::size_getter)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
return Value(set->values().size());
diff --git a/Userland/Libraries/LibJS/Runtime/SetPrototype.h b/Userland/Libraries/LibJS/Runtime/SetPrototype.h
index cefa2b7767..c6c5929d51 100644
--- a/Userland/Libraries/LibJS/Runtime/SetPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/SetPrototype.h
@@ -20,15 +20,15 @@ public:
virtual ~SetPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(add);
- JS_DECLARE_NATIVE_FUNCTION(clear);
- JS_DECLARE_NATIVE_FUNCTION(delete_);
- JS_DECLARE_NATIVE_FUNCTION(entries);
- JS_DECLARE_NATIVE_FUNCTION(for_each);
- JS_DECLARE_NATIVE_FUNCTION(has);
- JS_DECLARE_NATIVE_FUNCTION(values);
-
- JS_DECLARE_NATIVE_FUNCTION(size_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(add);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(clear);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(delete_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(entries);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(for_each);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(has);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(values);
+
+ JS_DECLARE_OLD_NATIVE_FUNCTION(size_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp
index a76093b769..8d3f2d7147 100644
--- a/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.cpp
@@ -30,7 +30,7 @@ void ShadowRealmPrototype::initialize(GlobalObject& global_object)
}
// 3.4.1 ShadowRealm.prototype.evaluate ( sourceText ), https://tc39.es/proposal-shadowrealm/#sec-shadowrealm.prototype.evaluate
-JS_DEFINE_NATIVE_FUNCTION(ShadowRealmPrototype::evaluate)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ShadowRealmPrototype::evaluate)
{
auto source_text = vm.argument(0);
@@ -55,7 +55,7 @@ JS_DEFINE_NATIVE_FUNCTION(ShadowRealmPrototype::evaluate)
}
// 3.4.2 ShadowRealm.prototype.importValue ( specifier, exportName ), https://tc39.es/proposal-shadowrealm/#sec-shadowrealm.prototype.importvalue
-JS_DEFINE_NATIVE_FUNCTION(ShadowRealmPrototype::import_value)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ShadowRealmPrototype::import_value)
{
auto specifier = vm.argument(0);
auto export_name = vm.argument(1);
diff --git a/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.h b/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.h
index 74786eb20b..10d810bc9f 100644
--- a/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/ShadowRealmPrototype.h
@@ -20,8 +20,8 @@ public:
virtual ~ShadowRealmPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(evaluate);
- JS_DECLARE_NATIVE_FUNCTION(import_value);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(evaluate);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(import_value);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
index ed77b2adec..c035dab703 100644
--- a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
@@ -67,7 +67,7 @@ Value StringConstructor::construct(FunctionObject& new_target)
}
// 22.1.2.4 String.raw ( template, ...substitutions ), https://tc39.es/ecma262/#sec-string.raw
-JS_DEFINE_NATIVE_FUNCTION(StringConstructor::raw)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringConstructor::raw)
{
auto* cooked = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
auto raw_value = TRY_OR_DISCARD(cooked->get(vm.names.raw));
@@ -100,7 +100,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringConstructor::raw)
}
// 22.1.2.1 String.fromCharCode ( ...codeUnits ), https://tc39.es/ecma262/#sec-string.fromcharcode
-JS_DEFINE_NATIVE_FUNCTION(StringConstructor::from_char_code)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringConstructor::from_char_code)
{
Vector<u16, 1> string;
string.ensure_capacity(vm.argument_count());
@@ -112,7 +112,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringConstructor::from_char_code)
}
// 22.1.2.2 String.fromCodePoint ( ...codePoints ), https://tc39.es/ecma262/#sec-string.fromcodepoint
-JS_DEFINE_NATIVE_FUNCTION(StringConstructor::from_code_point)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringConstructor::from_code_point)
{
Vector<u16, 1> string;
string.ensure_capacity(vm.argument_count()); // This will be an under-estimate if any code point is > 0xffff.
diff --git a/Userland/Libraries/LibJS/Runtime/StringConstructor.h b/Userland/Libraries/LibJS/Runtime/StringConstructor.h
index 148c9615c5..47085ec340 100644
--- a/Userland/Libraries/LibJS/Runtime/StringConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/StringConstructor.h
@@ -24,9 +24,9 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(raw);
- JS_DECLARE_NATIVE_FUNCTION(from_char_code);
- JS_DECLARE_NATIVE_FUNCTION(from_code_point);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(raw);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from_char_code);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from_code_point);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp
index 54c44d93c0..f3cf26ce79 100644
--- a/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp
@@ -33,7 +33,7 @@ StringIteratorPrototype::~StringIteratorPrototype()
}
// 22.1.5.1.1 %StringIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
-JS_DEFINE_NATIVE_FUNCTION(StringIteratorPrototype::next)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringIteratorPrototype::next)
{
auto* iterator = TRY_OR_DISCARD(typed_this_value(global_object));
if (iterator->done())
diff --git a/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.h b/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.h
index 9fc892c85d..a3e8a8b6e3 100644
--- a/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.h
@@ -21,7 +21,7 @@ public:
virtual ~StringIteratorPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(next);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(next);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
index 3541f95584..e454c15de7 100644
--- a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
@@ -176,7 +176,7 @@ static ThrowCompletionOr<PrimitiveString*> this_string_value(GlobalObject& globa
}
// 22.1.3.1 String.prototype.charAt ( pos ), https://tc39.es/ecma262/#sec-string.prototype.charat
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::char_at)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::char_at)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -189,7 +189,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::char_at)
}
// 22.1.3.2 String.prototype.charCodeAt ( pos ), https://tc39.es/ecma262/#sec-string.prototype.charcodeat
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::char_code_at)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::char_code_at)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -202,7 +202,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::char_code_at)
}
// 22.1.3.3 String.prototype.codePointAt ( pos ), https://tc39.es/ecma262/#sec-string.prototype.codepointat
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::code_point_at)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::code_point_at)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -216,7 +216,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::code_point_at)
}
// 22.1.3.16 String.prototype.repeat ( count ), https://tc39.es/ecma262/#sec-string.prototype.repeat
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::repeat)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::repeat)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -248,7 +248,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::repeat)
}
// 22.1.3.22 String.prototype.startsWith ( searchString [ , position ] ), https://tc39.es/ecma262/#sec-string.prototype.startswith
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::starts_with)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::starts_with)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -284,7 +284,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::starts_with)
}
// 22.1.3.6 String.prototype.endsWith ( searchString [ , endPosition ] ), https://tc39.es/ecma262/#sec-string.prototype.endswith
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::ends_with)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::ends_with)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -320,7 +320,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::ends_with)
}
// 22.1.3.8 String.prototype.indexOf ( searchString [ , position ] ), https://tc39.es/ecma262/#sec-string.prototype.indexof
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::index_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::index_of)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -377,7 +377,7 @@ static Optional<String> resolve_best_locale(GlobalObject& global_object, Value l
}
// 18.1.2 String.prototype.toLocaleLowerCase ( [ locales ] ), https://tc39.es/ecma402/#sup-string.prototype.tolocalelowercase
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_locale_lowercase)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::to_locale_lowercase)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -392,7 +392,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_locale_lowercase)
}
// 18.1.3 String.prototype.toLocaleUpperCase ( [ locales ] ), https://tc39.es/ecma402/#sup-string.prototype.tolocaleuppercase
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_locale_uppercase)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::to_locale_uppercase)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -407,7 +407,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_locale_uppercase)
}
// 22.1.3.26 String.prototype.toLowerCase ( ), https://tc39.es/ecma262/#sec-string.prototype.tolowercase
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_lowercase)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::to_lowercase)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -418,7 +418,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_lowercase)
}
// 22.1.3.28 String.prototype.toUpperCase ( ), https://tc39.es/ecma262/#sec-string.prototype.touppercase
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_uppercase)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::to_uppercase)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -429,13 +429,13 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_uppercase)
}
// 22.1.3.27 String.prototype.toString ( ), https://tc39.es/ecma262/#sec-string.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::to_string)
{
return TRY_OR_DISCARD(this_string_value(global_object, vm.this_value(global_object)));
}
// 22.1.3.32 String.prototype.valueOf ( ), https://tc39.es/ecma262/#sec-string.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::value_of)
{
return TRY_OR_DISCARD(this_string_value(global_object, vm.this_value(global_object)));
}
@@ -479,7 +479,7 @@ static Value pad_string(GlobalObject& global_object, Utf16String string, PadPlac
}
// 22.1.3.15 String.prototype.padStart ( maxLength [ , fillString ] ), https://tc39.es/ecma262/#sec-string.prototype.padstart
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::pad_start)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::pad_start)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -488,7 +488,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::pad_start)
}
// 22.1.3.14 String.prototype.padEnd ( maxLength [ , fillString ] ), https://tc39.es/ecma262/#sec-string.prototype.padend
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::pad_end)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::pad_end)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -499,7 +499,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::pad_end)
static Utf8View const whitespace_characters = Utf8View("\x09\x0A\x0B\x0C\x0D\x20\xC2\xA0\xE1\x9A\x80\xE2\x80\x80\xE2\x80\x81\xE2\x80\x82\xE2\x80\x83\xE2\x80\x84\xE2\x80\x85\xE2\x80\x86\xE2\x80\x87\xE2\x80\x88\xE2\x80\x89\xE2\x80\x8A\xE2\x80\xAF\xE2\x81\x9F\xE3\x80\x80\xE2\x80\xA8\xE2\x80\xA9\xEF\xBB\xBF"sv);
// 22.1.3.29 String.prototype.trim ( ), https://tc39.es/ecma262/#sec-string.prototype.trim
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::trim)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::trim)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -508,7 +508,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::trim)
}
// 22.1.3.31 String.prototype.trimStart ( ), https://tc39.es/ecma262/#sec-string.prototype.trimstart
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::trim_start)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::trim_start)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -517,7 +517,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::trim_start)
}
// 22.1.3.30 String.prototype.trimEnd ( ), https://tc39.es/ecma262/#sec-string.prototype.trimend
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::trim_end)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::trim_end)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -526,7 +526,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::trim_end)
}
// 22.1.3.4 String.prototype.concat ( ...args ), https://tc39.es/ecma262/#sec-string.prototype.concat
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::concat)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::concat)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
@@ -541,7 +541,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::concat)
}
// 22.1.3.23 String.prototype.substring ( start, end ), https://tc39.es/ecma262/#sec-string.prototype.substring
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::substring)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::substring)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -563,7 +563,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::substring)
}
// B.2.3.1 String.prototype.substr ( start, length ), https://tc39.es/ecma262/#sec-string.prototype.substr
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::substr)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::substr)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -591,7 +591,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::substr)
}
// 22.1.3.7 String.prototype.includes ( searchString [ , position ] ), https://tc39.es/ecma262/#sec-string.prototype.includes
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::includes)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::includes)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -618,7 +618,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::includes)
}
// 22.1.3.20 String.prototype.slice ( start, end ), https://tc39.es/ecma262/#sec-string.prototype.slice
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::slice)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::slice)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -651,7 +651,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::slice)
}
// 22.1.3.21 String.prototype.split ( separator, limit ), https://tc39.es/ecma262/#sec-string.prototype.split
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::split)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::split)
{
auto object = TRY_OR_DISCARD(require_object_coercible(global_object, vm.this_value(global_object)));
@@ -717,7 +717,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::split)
}
// 22.1.3.9 String.prototype.lastIndexOf ( searchString [ , position ] ), https://tc39.es/ecma262/#sec-string.prototype.lastindexof
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::last_index_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::last_index_of)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -751,7 +751,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::last_index_of)
}
// 3.1 String.prototype.at ( index ), https://tc39.es/proposal-relative-indexing-method/#sec-string.prototype.at
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::at)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::at)
{
auto string = utf16_string_from(vm, global_object);
if (vm.exception())
@@ -776,7 +776,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::at)
}
// 22.1.3.33 String.prototype [ @@iterator ] ( ), https://tc39.es/ecma262/#sec-string.prototype-@@iterator
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::symbol_iterator)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::symbol_iterator)
{
auto this_object = TRY_OR_DISCARD(require_object_coercible(global_object, vm.this_value(global_object)));
auto string = TRY_OR_DISCARD(this_object.to_string(global_object));
@@ -784,7 +784,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::symbol_iterator)
}
// 22.1.3.11 String.prototype.match ( regexp ), https://tc39.es/ecma262/#sec-string.prototype.match
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::match)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::match)
{
auto this_object = TRY_OR_DISCARD(require_object_coercible(global_object, vm.this_value(global_object)));
auto regexp = vm.argument(0);
@@ -802,7 +802,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::match)
}
// 22.1.3.12 String.prototype.matchAll ( regexp ), https://tc39.es/ecma262/#sec-string.prototype.matchall
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::match_all)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::match_all)
{
auto this_object = TRY_OR_DISCARD(require_object_coercible(global_object, vm.this_value(global_object)));
auto regexp = vm.argument(0);
@@ -830,7 +830,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::match_all)
}
// 22.1.3.17 String.prototype.replace ( searchValue, replaceValue ), https://tc39.es/ecma262/#sec-string.prototype.replace
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::replace)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::replace)
{
auto this_object = TRY_OR_DISCARD(require_object_coercible(global_object, vm.this_value(global_object)));
auto search_value = vm.argument(0);
@@ -872,7 +872,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::replace)
}
// 22.1.3.18 String.prototype.replaceAll ( searchValue, replaceValue ), https://tc39.es/ecma262/#sec-string.prototype.replaceall
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::replace_all)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::replace_all)
{
auto this_object = TRY_OR_DISCARD(require_object_coercible(global_object, vm.this_value(global_object)));
auto search_value = vm.argument(0);
@@ -945,7 +945,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::replace_all)
}
// 22.1.3.19 String.prototype.search ( regexp ), https://tc39.es/ecma262/#sec-string.prototype.search
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::search)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::search)
{
auto this_object = TRY_OR_DISCARD(require_object_coercible(global_object, vm.this_value(global_object)));
auto regexp = vm.argument(0);
@@ -988,86 +988,86 @@ static Value create_html(GlobalObject& global_object, Value string, const String
}
// B.2.3.2 String.prototype.anchor ( name ), https://tc39.es/ecma262/#sec-string.prototype.anchor
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::anchor)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::anchor)
{
return create_html(global_object, vm.this_value(global_object), "a", "name", vm.argument(0));
}
// B.2.3.3 String.prototype.big ( ), https://tc39.es/ecma262/#sec-string.prototype.big
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::big)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::big)
{
return create_html(global_object, vm.this_value(global_object), "big", String::empty(), Value());
}
// B.2.3.4 String.prototype.blink ( ), https://tc39.es/ecma262/#sec-string.prototype.blink
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::blink)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::blink)
{
return create_html(global_object, vm.this_value(global_object), "blink", String::empty(), Value());
}
// B.2.3.5 String.prototype.bold ( ), https://tc39.es/ecma262/#sec-string.prototype.bold
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::bold)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::bold)
{
return create_html(global_object, vm.this_value(global_object), "b", String::empty(), Value());
}
// B.2.3.6 String.prototype.fixed ( ), https://tc39.es/ecma262/#sec-string.prototype.fixed
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::fixed)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::fixed)
{
return create_html(global_object, vm.this_value(global_object), "tt", String::empty(), Value());
}
// B.2.3.7 String.prototype.fontcolor ( color ), https://tc39.es/ecma262/#sec-string.prototype.fontcolor
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::fontcolor)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::fontcolor)
{
return create_html(global_object, vm.this_value(global_object), "font", "color", vm.argument(0));
}
// B.2.3.8 String.prototype.fontsize ( size ), https://tc39.es/ecma262/#sec-string.prototype.fontsize
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::fontsize)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::fontsize)
{
return create_html(global_object, vm.this_value(global_object), "font", "size", vm.argument(0));
}
// B.2.3.9 String.prototype.italics ( ), https://tc39.es/ecma262/#sec-string.prototype.italics
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::italics)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::italics)
{
return create_html(global_object, vm.this_value(global_object), "i", String::empty(), Value());
}
// B.2.3.10 String.prototype.link ( url ), https://tc39.es/ecma262/#sec-string.prototype.link
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::link)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::link)
{
return create_html(global_object, vm.this_value(global_object), "a", "href", vm.argument(0));
}
// B.2.3.11 String.prototype.small ( ), https://tc39.es/ecma262/#sec-string.prototype.small
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::small)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::small)
{
return create_html(global_object, vm.this_value(global_object), "small", String::empty(), Value());
}
// B.2.3.12 String.prototype.strike ( ), https://tc39.es/ecma262/#sec-string.prototype.strike
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::strike)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::strike)
{
return create_html(global_object, vm.this_value(global_object), "strike", String::empty(), Value());
}
// B.2.3.13 String.prototype.sub ( ), https://tc39.es/ecma262/#sec-string.prototype.sub
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::sub)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::sub)
{
return create_html(global_object, vm.this_value(global_object), "sub", String::empty(), Value());
}
// B.2.3.14 String.prototype.sup ( ), https://tc39.es/ecma262/#sec-string.prototype.sup
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::sup)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::sup)
{
return create_html(global_object, vm.this_value(global_object), "sup", String::empty(), Value());
}
// 22.1.3.10 String.prototype.localeCompare ( that [ , reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-string.prototype.localecompare
// NOTE: This is the minimum localeCompare implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(StringPrototype::locale_compare)
+JS_DEFINE_OLD_NATIVE_FUNCTION(StringPrototype::locale_compare)
{
auto string = ak_string_from(vm, global_object);
if (!string.has_value())
diff --git a/Userland/Libraries/LibJS/Runtime/StringPrototype.h b/Userland/Libraries/LibJS/Runtime/StringPrototype.h
index 50f17bb74a..e14e538202 100644
--- a/Userland/Libraries/LibJS/Runtime/StringPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/StringPrototype.h
@@ -27,53 +27,53 @@ public:
virtual ~StringPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(char_at);
- JS_DECLARE_NATIVE_FUNCTION(char_code_at);
- JS_DECLARE_NATIVE_FUNCTION(code_point_at);
- JS_DECLARE_NATIVE_FUNCTION(repeat);
- JS_DECLARE_NATIVE_FUNCTION(starts_with);
- JS_DECLARE_NATIVE_FUNCTION(ends_with);
- JS_DECLARE_NATIVE_FUNCTION(index_of);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_lowercase);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_uppercase);
- JS_DECLARE_NATIVE_FUNCTION(to_lowercase);
- JS_DECLARE_NATIVE_FUNCTION(to_uppercase);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
- JS_DECLARE_NATIVE_FUNCTION(pad_start);
- JS_DECLARE_NATIVE_FUNCTION(pad_end);
- JS_DECLARE_NATIVE_FUNCTION(substring);
- JS_DECLARE_NATIVE_FUNCTION(substr);
- JS_DECLARE_NATIVE_FUNCTION(trim);
- JS_DECLARE_NATIVE_FUNCTION(trim_start);
- JS_DECLARE_NATIVE_FUNCTION(trim_end);
- JS_DECLARE_NATIVE_FUNCTION(concat);
- JS_DECLARE_NATIVE_FUNCTION(includes);
- JS_DECLARE_NATIVE_FUNCTION(slice);
- JS_DECLARE_NATIVE_FUNCTION(split);
- JS_DECLARE_NATIVE_FUNCTION(last_index_of);
- JS_DECLARE_NATIVE_FUNCTION(at);
- JS_DECLARE_NATIVE_FUNCTION(match);
- JS_DECLARE_NATIVE_FUNCTION(match_all);
- JS_DECLARE_NATIVE_FUNCTION(replace);
- JS_DECLARE_NATIVE_FUNCTION(replace_all);
- JS_DECLARE_NATIVE_FUNCTION(search);
- JS_DECLARE_NATIVE_FUNCTION(anchor);
- JS_DECLARE_NATIVE_FUNCTION(big);
- JS_DECLARE_NATIVE_FUNCTION(blink);
- JS_DECLARE_NATIVE_FUNCTION(bold);
- JS_DECLARE_NATIVE_FUNCTION(fixed);
- JS_DECLARE_NATIVE_FUNCTION(fontcolor);
- JS_DECLARE_NATIVE_FUNCTION(fontsize);
- JS_DECLARE_NATIVE_FUNCTION(italics);
- JS_DECLARE_NATIVE_FUNCTION(link);
- JS_DECLARE_NATIVE_FUNCTION(small);
- JS_DECLARE_NATIVE_FUNCTION(strike);
- JS_DECLARE_NATIVE_FUNCTION(sub);
- JS_DECLARE_NATIVE_FUNCTION(sup);
- JS_DECLARE_NATIVE_FUNCTION(locale_compare);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(char_at);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(char_code_at);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(code_point_at);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(repeat);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(starts_with);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(ends_with);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(index_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_lowercase);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_uppercase);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_lowercase);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_uppercase);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(pad_start);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(pad_end);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(substring);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(substr);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(trim);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(trim_start);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(trim_end);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(concat);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(includes);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(slice);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(split);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(last_index_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(at);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(match);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(match_all);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(replace);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(replace_all);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(search);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(anchor);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(big);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(blink);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(bold);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(fixed);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(fontcolor);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(fontsize);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(italics);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(link);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(small);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(strike);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sub);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sup);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(locale_compare);
- JS_DECLARE_NATIVE_FUNCTION(symbol_iterator);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_iterator);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/SymbolConstructor.cpp b/Userland/Libraries/LibJS/Runtime/SymbolConstructor.cpp
index 97061a704a..977bf60f60 100644
--- a/Userland/Libraries/LibJS/Runtime/SymbolConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SymbolConstructor.cpp
@@ -55,14 +55,14 @@ Value SymbolConstructor::construct(FunctionObject&)
}
// 20.4.2.2 Symbol.for ( key ), https://tc39.es/ecma262/#sec-symbol.for
-JS_DEFINE_NATIVE_FUNCTION(SymbolConstructor::for_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SymbolConstructor::for_)
{
auto description = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
return global_object.vm().get_global_symbol(description);
}
// 20.4.2.6 Symbol.keyFor ( sym ), https://tc39.es/ecma262/#sec-symbol.keyfor
-JS_DEFINE_NATIVE_FUNCTION(SymbolConstructor::key_for)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SymbolConstructor::key_for)
{
auto argument = vm.argument(0);
if (!argument.is_symbol()) {
diff --git a/Userland/Libraries/LibJS/Runtime/SymbolConstructor.h b/Userland/Libraries/LibJS/Runtime/SymbolConstructor.h
index ae55b6ce78..aa06900c45 100644
--- a/Userland/Libraries/LibJS/Runtime/SymbolConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/SymbolConstructor.h
@@ -24,8 +24,8 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(for_);
- JS_DECLARE_NATIVE_FUNCTION(key_for);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(for_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(key_for);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
index 3d8b3b04d0..2f4b5b396d 100644
--- a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
@@ -53,7 +53,7 @@ static ThrowCompletionOr<Symbol*> this_symbol_value(GlobalObject& global_object,
}
// 20.4.3.2 get Symbol.prototype.description, https://tc39.es/ecma262/#sec-symbol.prototype.description
-JS_DEFINE_NATIVE_FUNCTION(SymbolPrototype::description_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SymbolPrototype::description_getter)
{
auto* symbol = TRY_OR_DISCARD(this_symbol_value(global_object, vm.this_value(global_object)));
auto& description = symbol->raw_description();
@@ -63,20 +63,20 @@ JS_DEFINE_NATIVE_FUNCTION(SymbolPrototype::description_getter)
}
// 20.4.3.3 Symbol.prototype.toString ( ), https://tc39.es/ecma262/#sec-symbol.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(SymbolPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SymbolPrototype::to_string)
{
auto* symbol = TRY_OR_DISCARD(this_symbol_value(global_object, vm.this_value(global_object)));
return js_string(vm, symbol->to_string());
}
// 20.4.3.4 Symbol.prototype.valueOf ( ), https://tc39.es/ecma262/#sec-symbol.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(SymbolPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SymbolPrototype::value_of)
{
return TRY_OR_DISCARD(this_symbol_value(global_object, vm.this_value(global_object)));
}
// 20.4.3.5 Symbol.prototype [ @@toPrimitive ] ( hint ), https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
-JS_DEFINE_NATIVE_FUNCTION(SymbolPrototype::symbol_to_primitive)
+JS_DEFINE_OLD_NATIVE_FUNCTION(SymbolPrototype::symbol_to_primitive)
{
// The hint argument is ignored.
return TRY_OR_DISCARD(this_symbol_value(global_object, vm.this_value(global_object)));
diff --git a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.h b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.h
index 67412ad73b..8b17ed0c75 100644
--- a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.h
@@ -19,11 +19,11 @@ public:
virtual ~SymbolPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(description_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(description_getter);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
- JS_DECLARE_NATIVE_FUNCTION(symbol_to_primitive);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_to_primitive);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp
index de4e7af2e5..413ae468be 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.cpp
@@ -63,7 +63,7 @@ Value CalendarConstructor::construct(FunctionObject& new_target)
}
// 12.3.2 Temporal.Calendar.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.from
-JS_DEFINE_NATIVE_FUNCTION(CalendarConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarConstructor::from)
{
auto item = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h
index 64fcbb69be..10ae604691 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
index 41796a7189..81f7588df3 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.cpp
@@ -63,7 +63,7 @@ void CalendarPrototype::initialize(GlobalObject& global_object)
}
// 12.4.3 get Temporal.Calendar.prototype.id, https://tc39.es/proposal-temporal/#sec-get-temporal.calendar.prototype.id
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::id_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::id_getter)
{
// 1. Let calendar be the this value.
auto calendar = vm.this_value(global_object);
@@ -74,7 +74,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::id_getter)
// 12.4.4 Temporal.Calendar.prototype.dateFromFields ( fields [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.datefromfields
// NOTE: This is the minimum dateFromFields implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_from_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::date_from_fields)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -102,7 +102,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_from_fields)
// 12.4.5 Temporal.Calendar.prototype.yearMonthFromFields ( fields [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.yearmonthfromfields
// NOTE: This is the minimum yearMonthFromFields implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year_month_from_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::year_month_from_fields)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -130,7 +130,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year_month_from_fields)
// 12.4.6 Temporal.Calendar.prototype.monthDayFromFields ( fields [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.monthdayfromfields
// NOTE: This is the minimum monthDayFromFields implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_day_from_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::month_day_from_fields)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -158,7 +158,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_day_from_fields)
// 12.4.7 Temporal.Calendar.prototype.dateAdd ( date, duration [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dateadd
// NOTE: This is the minimum dateAdd implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_add)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::date_add)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -194,7 +194,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_add)
// 12.4.8 Temporal.Calendar.prototype.dateUntil ( one, two [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dateuntil
// NOTE: This is the minimum dateUntil implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_until)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::date_until)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -224,7 +224,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::date_until)
// 12.4.9 Temporal.Calendar.prototype.year ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.year
// NOTE: This is the minimum year implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::year)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -246,7 +246,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::year)
// 12.4.10 Temporal.Calendar.prototype.month ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.month
// NOTE: This is the minimum month implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::month)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -276,7 +276,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month)
// 12.4.11 Temporal.Calendar.prototype.monthCode ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.monthcode
// NOTE: This is the minimum monthCode implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_code)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::month_code)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -298,7 +298,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::month_code)
// 12.4.12 Temporal.Calendar.prototype.day ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.day
// NOTE: This is the minimum day implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::day)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -320,7 +320,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day)
// 12.4.13 Temporal.Calendar.prototype.dayOfWeek ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dayofweek
// NOTE: This is the minimum dayOfWeek implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day_of_week)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::day_of_week)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -338,7 +338,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day_of_week)
// 12.4.14 Temporal.Calendar.prototype.dayOfYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dayofyear
// NOTE: This is the minimum dayOfYear implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day_of_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::day_of_year)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -356,7 +356,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::day_of_year)
// 12.4.15 Temporal.Calendar.prototype.weekOfYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.weekofyear
// NOTE: This is the minimum weekOfYear implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::week_of_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::week_of_year)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -374,7 +374,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::week_of_year)
// 12.4.16 Temporal.Calendar.prototype.daysInWeek ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinweek
// NOTE: This is the minimum daysInWeek implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_week)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::days_in_week)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -392,7 +392,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_week)
// 12.4.16 Temporal.Calendar.prototype.daysInMonth ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinweek
// NOTE: This is the minimum daysInMonth implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_month)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::days_in_month)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -414,7 +414,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_month)
// 12.4.18 Temporal.Calendar.prototype.daysInYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinyear
// NOTE: This is the minimum daysInYear implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::days_in_year)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -436,7 +436,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::days_in_year)
// 12.4.19 Temporal.Calendar.prototype.monthsInYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.monthsinyear
// NOTE: This is the minimum monthsInYear implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::months_in_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::months_in_year)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -458,7 +458,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::months_in_year)
// 12.4.20 Temporal.Calendar.prototype.inLeapYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.inleapyear
// NOTE: This is the minimum inLeapYear implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::in_leap_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::in_leap_year)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -480,7 +480,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::in_leap_year)
// 12.4.21 Temporal.Calendar.prototype.fields ( fields ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.fields
// NOTE: This is the minimum fields implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::fields)
{
auto fields = vm.argument(0);
@@ -556,7 +556,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::fields)
// 12.4.22 Temporal.Calendar.prototype.mergeFields ( fields, additionalFields ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.mergefields
// NOTE: This is the minimum mergeFields implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::merge_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::merge_fields)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -576,7 +576,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::merge_fields)
}
// 12.4.23 Temporal.Calendar.prototype.toString ( ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::to_string)
{
// 1. Let calendar be the this value.
// 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
@@ -587,7 +587,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::to_string)
}
// 12.4.24 Temporal.Calendar.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.tojson
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::to_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::to_json)
{
// 1. Let calendar be the this value.
auto calendar = vm.this_value(global_object);
@@ -597,7 +597,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::to_json)
}
// 15.6.2.6 Temporal.Calendar.prototype.era ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.era
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::era)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::era)
{
auto temporal_date_like = vm.argument(0);
@@ -625,7 +625,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::era)
}
// 15.6.2.7 Temporal.Calendar.prototype.eraYear ( temporalDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.erayear
-JS_DEFINE_NATIVE_FUNCTION(CalendarPrototype::era_year)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CalendarPrototype::era_year)
{
auto temporal_date_like = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h
index 4c32e4a7d6..123c83315e 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/CalendarPrototype.h
@@ -20,30 +20,30 @@ public:
virtual ~CalendarPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(id_getter);
- JS_DECLARE_NATIVE_FUNCTION(date_from_fields);
- JS_DECLARE_NATIVE_FUNCTION(year_month_from_fields);
- JS_DECLARE_NATIVE_FUNCTION(month_day_from_fields);
- JS_DECLARE_NATIVE_FUNCTION(date_add);
- JS_DECLARE_NATIVE_FUNCTION(date_until);
- JS_DECLARE_NATIVE_FUNCTION(year);
- JS_DECLARE_NATIVE_FUNCTION(month);
- JS_DECLARE_NATIVE_FUNCTION(month_code);
- JS_DECLARE_NATIVE_FUNCTION(day);
- JS_DECLARE_NATIVE_FUNCTION(day_of_week);
- JS_DECLARE_NATIVE_FUNCTION(day_of_year);
- JS_DECLARE_NATIVE_FUNCTION(week_of_year);
- JS_DECLARE_NATIVE_FUNCTION(days_in_week);
- JS_DECLARE_NATIVE_FUNCTION(days_in_month);
- JS_DECLARE_NATIVE_FUNCTION(days_in_year);
- JS_DECLARE_NATIVE_FUNCTION(months_in_year);
- JS_DECLARE_NATIVE_FUNCTION(in_leap_year);
- JS_DECLARE_NATIVE_FUNCTION(fields);
- JS_DECLARE_NATIVE_FUNCTION(merge_fields);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_json);
- JS_DECLARE_NATIVE_FUNCTION(era);
- JS_DECLARE_NATIVE_FUNCTION(era_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(id_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(date_from_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(year_month_from_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_day_from_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(date_add);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(date_until);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_code);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_week);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(week_of_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_week);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(merge_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_year);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp
index 2a69dada37..65327db021 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.cpp
@@ -85,7 +85,7 @@ Value DurationConstructor::construct(FunctionObject& new_target)
}
// 7.2.2 Temporal.Duration.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.duration.from
-JS_DEFINE_NATIVE_FUNCTION(DurationConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationConstructor::from)
{
auto item = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h
index 73fff2b2f8..f431f4c658 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp
index 1f80984a62..0540a2d221 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp
@@ -48,7 +48,7 @@ void DurationPrototype::initialize(GlobalObject& global_object)
}
// 7.3.3 get Temporal.Duration.prototype.years, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.years
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::years_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::years_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -59,7 +59,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::years_getter)
}
// 7.3.4 get Temporal.Duration.prototype.months, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.months
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::months_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::months_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -70,7 +70,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::months_getter)
}
// 7.3.5 get Temporal.Duration.prototype.weeks, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.weeks
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::weeks_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::weeks_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -81,7 +81,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::weeks_getter)
}
// 7.3.6 get Temporal.Duration.prototype.days, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.days
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::days_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::days_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -92,7 +92,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::days_getter)
}
// 7.3.7 get Temporal.Duration.prototype.hours, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.hours
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::hours_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::hours_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -103,7 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::hours_getter)
}
// 7.3.8 get Temporal.Duration.prototype.minutes, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.minutes
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::minutes_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::minutes_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -114,7 +114,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::minutes_getter)
}
// 7.3.9 get Temporal.Duration.prototype.seconds, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.seconds
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::seconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::seconds_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -125,7 +125,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::seconds_getter)
}
// 7.3.10 get Temporal.Duration.prototype.milliseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.milliseconds
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::milliseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::milliseconds_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -136,7 +136,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::milliseconds_getter)
}
// 7.3.11 get Temporal.Duration.prototype.microseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.microseconds
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::microseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::microseconds_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -147,7 +147,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::microseconds_getter)
}
// 7.3.12 get Temporal.Duration.prototype.nanoseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.nanoseconds
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::nanoseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::nanoseconds_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -158,7 +158,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::nanoseconds_getter)
}
// 7.3.13 get Temporal.Duration.prototype.sign, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.sign
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::sign_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::sign_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -169,7 +169,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::sign_getter)
}
// 7.3.14 get Temporal.Duration.prototype.blank, https://tc39.es/proposal-temporal/#sec-get-temporal.duration.prototype.blank
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::blank_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::blank_getter)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -187,7 +187,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::blank_getter)
}
// 7.3.15 Temporal.Duration.prototype.with ( temporalDurationLike ), https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.with
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::with)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::with)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -261,7 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::with)
}
// 7.3.16 Temporal.Duration.prototype.negated ( ), https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.negated
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::negated)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::negated)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -272,7 +272,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::negated)
}
// 7.3.17 Temporal.Duration.prototype.abs ( ), https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.abs
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::abs)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::abs)
{
// 1. Let duration be the this value.
// 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]).
@@ -283,7 +283,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::abs)
}
// 7.3.25 Temporal.Duration.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(DurationPrototype::value_of)
{
// 1. Throw a TypeError exception.
vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.Duration", "a primitive value");
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h
index 24d82649fe..ad5bb382d7 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.h
@@ -20,22 +20,22 @@ public:
virtual ~DurationPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(years_getter);
- JS_DECLARE_NATIVE_FUNCTION(months_getter);
- JS_DECLARE_NATIVE_FUNCTION(weeks_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_getter);
- JS_DECLARE_NATIVE_FUNCTION(hours_getter);
- JS_DECLARE_NATIVE_FUNCTION(minutes_getter);
- JS_DECLARE_NATIVE_FUNCTION(seconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(milliseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(microseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(nanoseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(sign_getter);
- JS_DECLARE_NATIVE_FUNCTION(blank_getter);
- JS_DECLARE_NATIVE_FUNCTION(with);
- JS_DECLARE_NATIVE_FUNCTION(negated);
- JS_DECLARE_NATIVE_FUNCTION(abs);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(years_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(months_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(weeks_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(hours_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(minutes_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(seconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(milliseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(microseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(nanoseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sign_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(blank_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(with);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(negated);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(abs);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp
index 7ba555dad3..f2b0e56cf2 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.cpp
@@ -69,7 +69,7 @@ Value InstantConstructor::construct(FunctionObject& new_target)
}
// 8.2.2 Temporal.Instant.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.instant.from
-JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from)
{
auto item = vm.argument(0);
@@ -84,7 +84,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from)
}
// 8.2.3 Temporal.Instant.fromEpochSeconds ( epochSeconds ), https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochseconds
-JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_seconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from_epoch_seconds)
{
// 1. Set epochSeconds to ? ToNumber(epochSeconds).
auto epoch_seconds_value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
@@ -108,7 +108,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_seconds)
}
// 8.2.4 Temporal.Instant.fromEpochMilliseconds ( epochMilliseconds ), https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochmilliseconds
-JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_milliseconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from_epoch_milliseconds)
{
// 1. Set epochMilliseconds to ? ToNumber(epochMilliseconds).
auto epoch_milliseconds_value = TRY_OR_DISCARD(vm.argument(0).to_number(global_object));
@@ -132,7 +132,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_milliseconds)
}
// 8.2.5 Temporal.Instant.fromEpochMicroseconds ( epochMicroseconds ), https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochmicroseconds
-JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_microseconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from_epoch_microseconds)
{
// 1. Set epochMicroseconds to ? ToBigInt(epochMicroseconds).
auto* epoch_microseconds = TRY_OR_DISCARD(vm.argument(0).to_bigint(global_object));
@@ -151,7 +151,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_microseconds)
}
// 8.2.6 Temporal.Instant.fromEpochNanoseconds ( epochNanoseconds ), https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochnanoseconds
-JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_nanoseconds)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::from_epoch_nanoseconds)
{
// 1. Set epochNanoseconds to ? ToBigInt(epochNanoseconds).
auto* epoch_nanoseconds = TRY_OR_DISCARD(vm.argument(0).to_bigint(global_object));
@@ -167,7 +167,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_nanoseconds)
}
// 8.2.7 Temporal.Instant.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.instant.compare
-JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::compare)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantConstructor::compare)
{
// 1. Set one to ? ToTemporalInstant(one).
auto* one = TRY_OR_DISCARD(to_temporal_instant(global_object, vm.argument(0)));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h
index 310e5c7c8e..cdce6d7d97 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h
@@ -24,12 +24,12 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
- JS_DECLARE_NATIVE_FUNCTION(from_epoch_seconds);
- JS_DECLARE_NATIVE_FUNCTION(from_epoch_milliseconds);
- JS_DECLARE_NATIVE_FUNCTION(from_epoch_microseconds);
- JS_DECLARE_NATIVE_FUNCTION(from_epoch_nanoseconds);
- JS_DECLARE_NATIVE_FUNCTION(compare);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from_epoch_seconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from_epoch_milliseconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from_epoch_microseconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from_epoch_nanoseconds);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(compare);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp
index dbac4e2e42..4c300266f2 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp
@@ -53,7 +53,7 @@ void InstantPrototype::initialize(GlobalObject& global_object)
}
// 8.3.3 get Temporal.Instant.prototype.epochSeconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochseconds
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_seconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::epoch_seconds_getter)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -70,7 +70,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_seconds_getter)
}
// 8.3.4 get Temporal.Instant.prototype.epochMilliseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochmilliseconds
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_milliseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::epoch_milliseconds_getter)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -87,7 +87,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_milliseconds_getter)
}
// 8.3.5 get Temporal.Instant.prototype.epochMicroseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochmicroseconds
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_microseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::epoch_microseconds_getter)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -104,7 +104,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_microseconds_getter)
}
// 8.3.6 get Temporal.Instant.prototype.epochNanoseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.instant.prototype.epochnanoseconds
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_nanoseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::epoch_nanoseconds_getter)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -118,7 +118,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::epoch_nanoseconds_getter)
}
// 8.3.7 Temporal.Instant.prototype.add ( temporalDurationLike ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.add
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::add)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::add)
{
auto temporal_duration_like = vm.argument(0);
@@ -137,7 +137,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::add)
}
// 8.3.8 Temporal.Instant.prototype.subtract ( temporalDurationLike ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.subtract
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::subtract)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::subtract)
{
auto temporal_duration_like = vm.argument(0);
@@ -156,7 +156,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::subtract)
}
// 8.3.9 Temporal.Instant.prototype.until ( other [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.until
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::until)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::until)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -200,7 +200,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::until)
}
// 8.3.10 Temporal.Instant.prototype.since ( other [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.since
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::since)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::since)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -244,7 +244,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::since)
}
// 8.3.11 Temporal.Instant.prototype.round ( options ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.round
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::round)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::round)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -321,7 +321,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::round)
}
// 8.3.12 Temporal.Instant.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.equals
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::equals)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::equals)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -339,7 +339,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::equals)
}
// 8.3.13 Temporal.Instant.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_string)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -377,7 +377,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_string)
// 8.3.14 Temporal.Instant.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tolocalestring
// NOTE: This is the minimum toLocaleString implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_locale_string)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -388,7 +388,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_locale_string)
}
// 8.3.15 Temporal.Instant.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tojson
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_json)
{
// 1. Let instant be the this value.
// 2. Perform ? RequireInternalSlot(instant, [[InitializedTemporalInstant]]).
@@ -399,7 +399,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_json)
}
// 8.3.16 Temporal.Instant.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::value_of)
{
// 1. Throw a TypeError exception.
vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.Instant", "a primitive value");
@@ -407,7 +407,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::value_of)
}
// 8.3.17 Temporal.Instant.prototype.toZonedDateTime ( item ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tozoneddatetime
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time)
{
auto item = vm.argument(0);
@@ -453,7 +453,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time)
}
// 8.3.18 Temporal.Instant.prototype.toZonedDateTimeISO ( item ), https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tozoneddatetimeiso
-JS_DEFINE_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time_iso)
+JS_DEFINE_OLD_NATIVE_FUNCTION(InstantPrototype::to_zoned_date_time_iso)
{
auto item = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h
index 04dfddf9de..970e91e431 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.h
@@ -20,22 +20,22 @@ public:
virtual ~InstantPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(epoch_seconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(epoch_milliseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(epoch_microseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(epoch_nanoseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(add);
- JS_DECLARE_NATIVE_FUNCTION(subtract);
- JS_DECLARE_NATIVE_FUNCTION(until);
- JS_DECLARE_NATIVE_FUNCTION(since);
- JS_DECLARE_NATIVE_FUNCTION(round);
- JS_DECLARE_NATIVE_FUNCTION(equals);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(to_json);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
- JS_DECLARE_NATIVE_FUNCTION(to_zoned_date_time);
- JS_DECLARE_NATIVE_FUNCTION(to_zoned_date_time_iso);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_seconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_milliseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_microseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_nanoseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(add);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(subtract);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(until);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(since);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(round);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(equals);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_zoned_date_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_zoned_date_time_iso);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp
index afc15ee0e4..72ac3fe013 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp
@@ -47,21 +47,21 @@ void Now::initialize(GlobalObject& global_object)
}
// 2.2.1 Temporal.Now.timeZone ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.timezone
-JS_DEFINE_NATIVE_FUNCTION(Now::time_zone)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::time_zone)
{
// 1. Return ! SystemTimeZone().
return system_time_zone(global_object);
}
// 2.2.2 Temporal.Now.instant ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.instant
-JS_DEFINE_NATIVE_FUNCTION(Now::instant)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::instant)
{
// 1. Return ! SystemInstant().
return system_instant(global_object);
}
// 2.2.3 Temporal.Now.plainDateTime ( calendar [ , temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaindatetime
-JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_date_time)
{
auto calendar = vm.argument(0);
auto temporal_time_zone_like = vm.argument(1);
@@ -71,7 +71,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_time)
}
// 2.2.4 Temporal.Now.plainDateTimeISO ( [ temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaindatetimeiso
-JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_time_iso)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_date_time_iso)
{
auto temporal_time_zone_like = vm.argument(0);
@@ -83,7 +83,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_time_iso)
}
// 2.2.5 Temporal.Now.zonedDateTime ( calendar [ , temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.zoneddatetime
-JS_DEFINE_NATIVE_FUNCTION(Now::zoned_date_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::zoned_date_time)
{
auto calendar = vm.argument(0);
auto temporal_time_zone_like = vm.argument(1);
@@ -93,7 +93,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::zoned_date_time)
}
// 2.2.6 Temporal.Now.zonedDateTimeISO ( [ temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.zoneddatetimeiso
-JS_DEFINE_NATIVE_FUNCTION(Now::zoned_date_time_iso)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::zoned_date_time_iso)
{
auto temporal_time_zone_like = vm.argument(0);
@@ -105,7 +105,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::zoned_date_time_iso)
}
// 2.2.7 Temporal.Now.plainDate ( calendar [ , temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaindate
-JS_DEFINE_NATIVE_FUNCTION(Now::plain_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_date)
{
auto calendar = vm.argument(0);
auto temporal_time_zone_like = vm.argument(1);
@@ -118,7 +118,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::plain_date)
}
// 2.2.8 Temporal.Now.plainDateISO ( [ temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaindateiso
-JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_iso)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_date_iso)
{
auto temporal_time_zone_like = vm.argument(0);
@@ -133,7 +133,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::plain_date_iso)
}
// 2.2.9 Temporal.Now.plainTimeISO ( [ temporalTimeZoneLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.now.plaintimeiso
-JS_DEFINE_NATIVE_FUNCTION(Now::plain_time_iso)
+JS_DEFINE_OLD_NATIVE_FUNCTION(Now::plain_time_iso)
{
auto temporal_time_zone_like = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.h b/Userland/Libraries/LibJS/Runtime/Temporal/Now.h
index c17563432e..da8152a216 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.h
@@ -20,15 +20,15 @@ public:
virtual ~Now() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(time_zone);
- JS_DECLARE_NATIVE_FUNCTION(instant);
- JS_DECLARE_NATIVE_FUNCTION(plain_date_time);
- JS_DECLARE_NATIVE_FUNCTION(plain_date_time_iso);
- JS_DECLARE_NATIVE_FUNCTION(zoned_date_time);
- JS_DECLARE_NATIVE_FUNCTION(zoned_date_time_iso);
- JS_DECLARE_NATIVE_FUNCTION(plain_date);
- JS_DECLARE_NATIVE_FUNCTION(plain_date_iso);
- JS_DECLARE_NATIVE_FUNCTION(plain_time_iso);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(time_zone);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(instant);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(plain_date_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(plain_date_time_iso);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(zoned_date_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(zoned_date_time_iso);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(plain_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(plain_date_iso);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(plain_time_iso);
};
TimeZone* system_time_zone(GlobalObject&);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp
index 6c0c9910ff..2cb9abe87f 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.cpp
@@ -77,7 +77,7 @@ Value PlainDateConstructor::construct(FunctionObject& new_target)
}
// 3.2.2 Temporal.PlainDate.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.from
-JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateConstructor::from)
{
// 1. Set options to ? GetOptionsObject(options).
auto* options = TRY_OR_DISCARD(get_options_object(global_object, vm.argument(1)));
@@ -98,7 +98,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::from)
}
// 3.2.3 Temporal.PlainDate.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-properties-of-the-temporal-plaindate-constructor
-JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::compare)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateConstructor::compare)
{
// 1. Set one to ? ToTemporalDate(one).
auto* one = TRY_OR_DISCARD(to_temporal_date(global_object, vm.argument(0)));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h
index 4a0d6ab6df..4df961ddf2 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateConstructor.h
@@ -24,8 +24,8 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
- JS_DECLARE_NATIVE_FUNCTION(compare);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(compare);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp
index d2623baf21..c3792c5236 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp
@@ -63,7 +63,7 @@ void PlainDatePrototype::initialize(GlobalObject& global_object)
}
// 3.3.3 get Temporal.PlainDate.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.calendar
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::calendar_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::calendar_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -74,7 +74,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::calendar_getter)
}
// 3.3.4 get Temporal.PlainDate.prototype.year, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.year
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::year_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -88,7 +88,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::year_getter)
}
// 3.3.5 get Temporal.PlainDate.prototype.month, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.month
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::month_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::month_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -102,7 +102,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::month_getter)
}
// 3.3.6 get Temporal.PlainDate.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.monthCode
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::month_code_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::month_code_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -116,7 +116,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::month_code_getter)
}
// 3.3.7 get Temporal.PlainDate.prototype.day, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.day
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::day_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -130,7 +130,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_getter)
}
// 3.3.8 get Temporal.PlainDate.prototype.dayOfWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.dayofweek
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_of_week_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::day_of_week_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -144,7 +144,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_of_week_getter)
}
// 3.3.9 get Temporal.PlainDate.prototype.dayOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.dayofyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_of_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::day_of_year_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -158,7 +158,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::day_of_year_getter)
}
// 3.3.10 get Temporal.PlainDate.prototype.weekOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.weekofyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::week_of_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::week_of_year_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -172,7 +172,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::week_of_year_getter)
}
// 3.3.11 get Temporal.PlainDate.prototype.daysInWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.daysinweek
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_week_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::days_in_week_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -186,7 +186,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_week_getter)
}
// 3.3.12 get Temporal.PlainDate.prototype.daysInMonth, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.daysinmonth
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_month_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::days_in_month_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -200,7 +200,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_month_getter)
}
// 3.3.13 get Temporal.PlainDate.prototype.daysInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.daysinyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::days_in_year_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -214,7 +214,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::days_in_year_getter)
}
// 3.3.14 get Temporal.PlainDate.prototype.monthsInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.monthsinyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::months_in_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::months_in_year_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -228,7 +228,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::months_in_year_getter)
}
// 3.3.15 get Temporal.PlainDate.prototype.inLeapYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.inleapyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::in_leap_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::in_leap_year_getter)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -242,7 +242,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::in_leap_year_getter)
}
// 15.6.5.2 get Temporal.PlainDate.prototype.era, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.era
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::era_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::era_getter)
{
// 1. Let plainDate be the this value.
// 2. Perform ? RequireInternalSlot(plainDate, [[InitializedTemporalDate]]).
@@ -256,7 +256,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::era_getter)
}
// 15.6.5.3 get Temporal.PlainDate.prototype.eraYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.erayear
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::era_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::era_year_getter)
{
// 1. Let plainDate be the this value.
// 2. Perform ? RequireInternalSlot(plainDate, [[InitializedTemporalDate]]).
@@ -270,7 +270,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::era_year_getter)
}
// 3.3.16 Temporal.PlainDate.prototype.toPlainYearMonth ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplainyearmonth
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_year_month)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_plain_year_month)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -290,7 +290,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_year_month)
}
// 3.3.17 Temporal.PlainDate.prototype.toPlainMonthDay ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplainmonthday
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_month_day)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_plain_month_day)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -310,7 +310,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_month_day)
}
// 3.3.18 Temporal.PlainDate.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.getisofields
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::get_iso_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::get_iso_fields)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -336,7 +336,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::get_iso_fields)
}
// 3.3.22 Temporal.PlainDate.prototype.withCalendar ( calendar ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.withcalendar
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::with_calendar)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::with_calendar)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -350,7 +350,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::with_calendar)
}
// 3.3.25 Temporal.PlainDate.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.equals
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::equals)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::equals)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -373,7 +373,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::equals)
}
// 3.3.26 Temporal.PlainDate.prototype.toPlainDateTime ( [ temporalTime ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplaindatetime
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_date_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_plain_date_time)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -393,7 +393,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_plain_date_time)
}
// 3.3.28 Temporal.PlainDate.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_string)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -411,7 +411,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_string)
// 3.3.29 Temporal.PlainDate.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.tolocalestring
// NOTE: This is the minimum toLocaleString implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_locale_string)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -422,7 +422,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_locale_string)
}
// 3.3.30 Temporal.PlainDate.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.tojson
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::to_json)
{
// 1. Let temporalDate be the this value.
// 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
@@ -433,7 +433,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::to_json)
}
// 3.3.31 Temporal.PlainDate.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDatePrototype::value_of)
{
// 1. Throw a TypeError exception.
vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainDate", "a primitive value");
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h
index 692cc36586..bc0d695d7b 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.h
@@ -20,31 +20,31 @@ public:
virtual ~PlainDatePrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(calendar_getter);
- JS_DECLARE_NATIVE_FUNCTION(year_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_code_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_of_week_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_of_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(week_of_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_week_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_month_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(months_in_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(in_leap_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(era_getter);
- JS_DECLARE_NATIVE_FUNCTION(era_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_year_month);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_month_day);
- JS_DECLARE_NATIVE_FUNCTION(get_iso_fields);
- JS_DECLARE_NATIVE_FUNCTION(with_calendar);
- JS_DECLARE_NATIVE_FUNCTION(equals);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_date_time);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(to_json);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_week_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(week_of_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_week_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_year_month);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_month_day);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(with_calendar);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(equals);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp
index 5015061eff..7f2e588201 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.cpp
@@ -96,7 +96,7 @@ Value PlainDateTimeConstructor::construct(FunctionObject& new_target)
}
// 5.2.2 Temporal.PlainDateTime.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.from
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimeConstructor::from)
{
auto item = vm.argument(0);
@@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::from)
}
// 5.2.3 Temporal.PlainDateTime.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.compare
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::compare)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimeConstructor::compare)
{
// 1. Set one to ? ToTemporalDateTime(one).
auto* one = TRY_OR_DISCARD(to_temporal_date_time(global_object, vm.argument(0)));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h
index 90577a8da6..0d9941a842 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimeConstructor.h
@@ -24,8 +24,8 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
- JS_DECLARE_NATIVE_FUNCTION(compare);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(compare);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp
index ad13b848b4..89d691d304 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp
@@ -66,7 +66,7 @@ void PlainDateTimePrototype::initialize(GlobalObject& global_object)
}
// 5.3.3 get Temporal.PlainDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.calendar
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::calendar_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::calendar_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -77,7 +77,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::calendar_getter)
}
// 5.3.4 get Temporal.PlainDateTime.prototype.year, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.year
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::year_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -91,7 +91,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::year_getter)
}
// 5.3.5 get Temporal.PlainDateTime.prototype.month, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.month
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::month_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -105,7 +105,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_getter)
}
// 5.3.6 get Temporal.PlainDateTime.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.monthcode
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_code_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::month_code_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_code_getter)
}
// 5.3.7 get Temporal.PlainDateTime.prototype.day, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.day
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::day_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -133,7 +133,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_getter)
}
// 5.3.8 get Temporal.PlainDateTime.prototype.hour, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.hour
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::hour_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::hour_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -144,7 +144,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::hour_getter)
}
// 5.3.9 get Temporal.PlainDateTime.prototype.minute, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.minute
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::minute_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::minute_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -155,7 +155,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::minute_getter)
}
// 5.3.10 get Temporal.PlainDateTime.prototype.second, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.second
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::second_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::second_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -166,7 +166,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::second_getter)
}
// 5.3.11 get Temporal.PlainDateTime.prototype.millisecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.millisecond
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::millisecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::millisecond_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -177,7 +177,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::millisecond_getter)
}
// 5.3.12 get Temporal.PlainDateTime.prototype.microsecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.microsecond
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::microsecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::microsecond_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -188,7 +188,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::microsecond_getter)
}
// 5.3.13 get Temporal.PlainDateTime.prototype.nanosecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.nanosecond
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::nanosecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::nanosecond_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -199,7 +199,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::nanosecond_getter)
}
// 5.3.14 get Temporal.PlainDateTime.prototype.dayOfWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.dayofweek
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_week_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_week_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -213,7 +213,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_week_getter)
}
// 5.3.15 get Temporal.PlainDateTime.prototype.dayOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.dayofyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_year_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -227,7 +227,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::day_of_year_getter)
}
// 5.3.16 get Temporal.PlainDateTime.prototype.weekOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.weekofyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::week_of_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::week_of_year_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -241,7 +241,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::week_of_year_getter)
}
// 5.3.17 get Temporal.PlainDateTime.prototype.daysInWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.daysinweek
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_week_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_week_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -255,7 +255,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_week_getter)
}
// 5.3.18 get Temporal.PlainDateTime.prototype.daysInMonth, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.daysinmonth
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_month_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_month_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -269,7 +269,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_month_getter)
}
// 5.3.19 get Temporal.PlainDateTime.prototype.daysInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.daysinyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_year_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -283,7 +283,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::days_in_year_getter)
}
// 5.3.20 get Temporal.PlainDateTime.prototype.monthsInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.monthsinyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::months_in_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::months_in_year_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -297,7 +297,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::months_in_year_getter)
}
// 5.3.21 get Temporal.PlainDateTime.prototype.inLeapYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.inleapyear
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::in_leap_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::in_leap_year_getter)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -311,7 +311,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::in_leap_year_getter)
}
// 15.6.6.2 get Temporal.PlainDateTime.prototype.era, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.era
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::era_getter)
{
// 1. Let plainDateTime be the this value.
// 2. Perform ? RequireInternalSlot(plainDateTime, [[InitializedTemporalDateTime]]).
@@ -325,7 +325,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_getter)
}
// 15.6.6.3 get Temporal.PlainDateTime.prototype.eraYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.erayear
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::era_year_getter)
{
// 1. Let plainDateTime be the this value.
// 2. Perform ? RequireInternalSlot(plainDateTime, [[InitializedTemporalDateTime]]).
@@ -339,7 +339,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_year_getter)
}
// 5.3.23 Temporal.PlainDateTime.prototype.withPlainTime ( [ plainTimeLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.withplaintime
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_time)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -359,7 +359,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_time)
}
// 5.3.24 Temporal.PlainDateTime.prototype.withPlainDate ( plainDateLike ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.withplaindate
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_date)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -376,7 +376,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_plain_date)
}
// 5.3.25 Temporal.PlainDateTime.prototype.withCalendar ( calendar ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.withcalendar
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_calendar)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::with_calendar)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -390,7 +390,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::with_calendar)
}
// 5.3.31 Temporal.PlainDateTime.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.equals
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::equals)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::equals)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -411,7 +411,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::equals)
}
// 5.3.35 Temporal.PlainDateTime.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::value_of)
{
// 1. Throw a TypeError exception.
vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainDateTime", "a primitive value");
@@ -419,7 +419,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::value_of)
}
// 5.3.37 Temporal.PlainDateTime.prototype.toPlainDate ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplaindate
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_date)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -430,7 +430,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_date)
}
// 5.3.38 Temporal.PlainDateTime.prototype.toPlainYearMonth ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplainyearmonth
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_year_month)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_year_month)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -450,7 +450,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_year_month)
}
// 5.3.39 Temporal.PlainDateTime.prototype.toPlainMonthDay ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplainmonthday
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_month_day)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_month_day)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -470,7 +470,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_month_day)
}
// 5.3.40 Temporal.PlainDateTime.prototype.toPlainTime ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplaintime
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_time)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
@@ -481,7 +481,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::to_plain_time)
}
// 5.3.41 Temporal.PlainDateTime.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.getisofields
-JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::get_iso_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainDateTimePrototype::get_iso_fields)
{
// 1. Let dateTime be the this value.
// 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h
index 5470d1c72e..5a10b778aa 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.h
@@ -20,37 +20,37 @@ public:
virtual ~PlainDateTimePrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(calendar_getter);
- JS_DECLARE_NATIVE_FUNCTION(year_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_code_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_getter);
- JS_DECLARE_NATIVE_FUNCTION(hour_getter);
- JS_DECLARE_NATIVE_FUNCTION(minute_getter);
- JS_DECLARE_NATIVE_FUNCTION(second_getter);
- JS_DECLARE_NATIVE_FUNCTION(millisecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(microsecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(nanosecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_of_week_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_of_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(week_of_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_week_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_month_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(months_in_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(in_leap_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(era_getter);
- JS_DECLARE_NATIVE_FUNCTION(era_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(with_plain_time);
- JS_DECLARE_NATIVE_FUNCTION(with_plain_date);
- JS_DECLARE_NATIVE_FUNCTION(with_calendar);
- JS_DECLARE_NATIVE_FUNCTION(equals);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_date);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_year_month);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_month_day);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_time);
- JS_DECLARE_NATIVE_FUNCTION(get_iso_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(hour_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(minute_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(second_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(millisecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(microsecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(nanosecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_week_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(week_of_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_week_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(with_plain_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(with_plain_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(with_calendar);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(equals);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_year_month);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_month_day);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp
index 373eac7ee6..349ea2fd12 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp
@@ -86,7 +86,7 @@ Value PlainMonthDayConstructor::construct(FunctionObject& new_target)
}
// 10.2.2 Temporal.PlainMonthDay.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.from
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayConstructor::from)
{
auto item = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h
index 01ab59c0e7..e1b9690eb9 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp
index 35a2b26d17..867917d336 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp
@@ -43,7 +43,7 @@ void PlainMonthDayPrototype::initialize(GlobalObject& global_object)
}
// 10.3.3 get Temporal.PlainMonthDay.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plainmonthday.prototype.calendar
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::calendar_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::calendar_getter)
{
// 1. Let monthDay be the this value.
// 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
@@ -54,7 +54,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::calendar_getter)
}
// 10.3.4 get Temporal.PlainMonthDay.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.plainmonthday.prototype.monthcode
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::month_code_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::month_code_getter)
{
// 1. Let monthDay be the this value.
// 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
@@ -68,7 +68,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::month_code_getter)
}
// 10.3.5 get Temporal.PlainMonthDay.prototype.day, https://tc39.es/proposal-temporal/#sec-get-temporal.plainmonthday.prototype.day
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::day_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::day_getter)
{
// 1. Let monthDay be the this value.
// 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
@@ -82,7 +82,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::day_getter)
}
// 10.3.7 Temporal.PlainMonthDay.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.equals
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::equals)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::equals)
{
// 1. Let monthDay be the this value.
// 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
@@ -108,7 +108,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::equals)
}
// 10.3.8 Temporal.PlainMonthDay.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::to_string)
{
// 1. Let monthDay be the this value.
// 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
@@ -126,7 +126,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_string)
// 10.3.9 Temporal.PlainMonthDay.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.tolocalestring
// NOTE: This is the minimum toLocaleString implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::to_locale_string)
{
// 1. Let monthDay be the this value.
// 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
@@ -137,7 +137,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_locale_string)
}
// 10.3.10 Temporal.PlainMonthDay.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.tojson
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::to_json)
{
// 1. Let monthDay be the this value.
// 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
@@ -148,7 +148,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_json)
}
// 10.3.11 Temporal.PlainMonthDay.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::value_of)
{
// 1. Throw a TypeError exception.
vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainMonthDay", "a primitive value");
@@ -156,7 +156,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::value_of)
}
// 10.3.12 Temporal.PlainMonthDay.prototype.toPlainDate ( item ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.toplaindate
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_plain_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::to_plain_date)
{
auto item = vm.argument(0);
@@ -214,7 +214,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::to_plain_date)
}
// 10.3.13 Temporal.PlainMonthDay.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.getisofields
-JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::get_iso_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainMonthDayPrototype::get_iso_fields)
{
// 1. Let monthDay be the this value.
// 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h
index 4750c77f8c..40879338a9 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.h
@@ -20,16 +20,16 @@ public:
virtual ~PlainMonthDayPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(calendar_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_code_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_getter);
- JS_DECLARE_NATIVE_FUNCTION(equals);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(to_json);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_date);
- JS_DECLARE_NATIVE_FUNCTION(get_iso_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(equals);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp
index 7a7f0006ba..203fae1a21 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.cpp
@@ -82,7 +82,7 @@ Value PlainTimeConstructor::construct(FunctionObject& new_target)
}
// 4.2.2 Temporal.PlainTime.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.from
-JS_DEFINE_NATIVE_FUNCTION(PlainTimeConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimeConstructor::from)
{
// 1. Set options to ? GetOptionsObject(options).
auto* options = TRY_OR_DISCARD(get_options_object(global_object, vm.argument(1)));
@@ -104,7 +104,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimeConstructor::from)
}
// 4.2.3 Temporal.PlainTime.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.compare
-JS_DEFINE_NATIVE_FUNCTION(PlainTimeConstructor::compare)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimeConstructor::compare)
{
// 1. Set one to ? ToTemporalTime(one).
auto* one = TRY_OR_DISCARD(to_temporal_time(global_object, vm.argument(0)));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h
index 9e6b69a57e..31f6465d9d 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h
@@ -24,8 +24,8 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
- JS_DECLARE_NATIVE_FUNCTION(compare);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(compare);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp
index 6f35442513..e9596e41fd 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp
@@ -49,7 +49,7 @@ void PlainTimePrototype::initialize(GlobalObject& global_object)
}
// 4.3.3 get Temporal.PlainTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.calendar
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::calendar_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::calendar_getter)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -60,7 +60,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::calendar_getter)
}
// 4.3.4 get Temporal.PlainTime.prototype.hour, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.hour
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::hour_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::hour_getter)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -71,7 +71,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::hour_getter)
}
// 4.3.5 get Temporal.PlainTime.prototype.minute, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.minute
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::minute_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::minute_getter)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -82,7 +82,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::minute_getter)
}
// 4.3.6 get Temporal.PlainTime.prototype.second, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.second
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::second_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::second_getter)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -93,7 +93,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::second_getter)
}
// 4.3.7 get Temporal.PlainTime.prototype.millisecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.millisecond
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::millisecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::millisecond_getter)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -104,7 +104,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::millisecond_getter)
}
// 4.3.8 get Temporal.PlainTime.prototype.microsecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.microsecond
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::microsecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::microsecond_getter)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -115,7 +115,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::microsecond_getter)
}
// 4.3.9 get Temporal.PlainTime.prototype.nanosecond, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.nanosecond
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::nanosecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::nanosecond_getter)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -126,7 +126,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::nanosecond_getter)
}
// 4.3.12 Temporal.PlainTime.prototype.with ( temporalTimeLike [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.with
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::with)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::with)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -219,7 +219,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::with)
}
// 4.3.16 Temporal.PlainTime.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.equals
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::equals)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::equals)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -257,7 +257,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::equals)
}
// 4.3.17 Temporal.PlainTime.prototype.toPlainDateTime ( temporalDate ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.toplaindatetime
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_plain_date_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::to_plain_date_time)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -271,7 +271,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_plain_date_time)
}
// 4.3.19 Temporal.PlainTime.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.getisofields
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::get_iso_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::get_iso_fields)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -306,7 +306,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::get_iso_fields)
}
// 4.3.20 Temporal.PlainTime.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::to_string)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -330,7 +330,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_string)
}
// 4.3.21 Temporal.PlainTime.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tolocalestring
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::to_locale_string)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -342,7 +342,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_locale_string)
}
// 4.3.22 Temporal.PlainTime.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tojson
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::to_json)
{
// 1. Let temporalTime be the this value.
// 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
@@ -354,7 +354,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::to_json)
}
// 4.3.23 Temporal.PlainTime.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainTimePrototype::value_of)
{
// 1. Throw a TypeError exception.
vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainTime", "a primitive value");
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h
index b732aff2e0..60a5e7e377 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.h
@@ -20,21 +20,21 @@ public:
virtual ~PlainTimePrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(calendar_getter);
- JS_DECLARE_NATIVE_FUNCTION(hour_getter);
- JS_DECLARE_NATIVE_FUNCTION(minute_getter);
- JS_DECLARE_NATIVE_FUNCTION(second_getter);
- JS_DECLARE_NATIVE_FUNCTION(millisecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(microsecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(nanosecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(with);
- JS_DECLARE_NATIVE_FUNCTION(equals);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_date_time);
- JS_DECLARE_NATIVE_FUNCTION(get_iso_fields);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(to_json);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(hour_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(minute_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(second_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(millisecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(microsecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(nanosecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(with);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(equals);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
index 75a343c5b1..3f2548c308 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
@@ -88,7 +88,7 @@ Value PlainYearMonthConstructor::construct(FunctionObject& new_target)
}
// 9.2.2 Temporal.PlainYearMonth.from ( item [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.from
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthConstructor::from)
{
// 1. Set options to ? GetOptionsObject(options).
auto* options = TRY_OR_DISCARD(get_options_object(global_object, vm.argument(1)));
@@ -111,7 +111,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthConstructor::from)
}
// 9.2.3 Temporal.PlainYearMonth.compare ( one, two ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.compare
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthConstructor::compare)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthConstructor::compare)
{
// 1. Set one to ? ToTemporalYearMonth(one).
auto* one = TRY_OR_DISCARD(to_temporal_year_month(global_object, vm.argument(0)));
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h
index 145484b904..58b64e807d 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h
@@ -24,8 +24,8 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
- JS_DECLARE_NATIVE_FUNCTION(compare);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(compare);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp
index 0290aca1b1..5755bd0132 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp
@@ -50,7 +50,7 @@ void PlainYearMonthPrototype::initialize(GlobalObject& global_object)
}
// 9.3.3 get Temporal.PlainYearMonth.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.calendar
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::calendar_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::calendar_getter)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -61,7 +61,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::calendar_getter)
}
// 9.3.4 get Temporal.PlainYearMonth.prototype.year, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.year
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::year_getter)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -75,7 +75,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::year_getter)
}
// 9.3.5 get Temporal.PlainYearMonth.prototype.month, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.month
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::month_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::month_getter)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -89,7 +89,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::month_getter)
}
// 9.3.6 get Temporal.PlainYearMonth.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.monthCode
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::month_code_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::month_code_getter)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -103,7 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::month_code_getter)
}
// 9.3.7 get Temporal.PlainYearMonth.prototype.daysInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.daysinyear
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_year_getter)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -117,7 +117,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_year_getter)
}
// 9.3.8 get Temporal.PlainYearMonth.prototype.daysInMonth, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.daysinmonth
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_month_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_month_getter)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -131,7 +131,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::days_in_month_getter)
}
// 9.3.9 get Temporal.PlainYearMonth.prototype.monthsInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.monthsinyear
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::months_in_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::months_in_year_getter)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -145,7 +145,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::months_in_year_getter)
}
// 9.3.10 get Temporal.PlainYearMonth.prototype.inLeapYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.inleapyear
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::in_leap_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::in_leap_year_getter)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -159,7 +159,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::in_leap_year_getter)
}
// 15.6.9.2 get Temporal.PlainYearMonth.prototype.era, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.era
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::era_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::era_getter)
{
// 1. Let plainYearMonth be the this value.
// 2. Perform ? RequireInternalSlot(plainYearMonth, [[InitializedTemporalYearMonth]]).
@@ -173,7 +173,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::era_getter)
}
// 15.6.9.3 get Temporal.PlainYearMonth.prototype.eraYear, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.erayear
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::era_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::era_year_getter)
{
// 1. Let plainYearMonth be the this value.
// 2. Perform ? RequireInternalSlot(plainYearMonth, [[InitializedTemporalYearMonth]]).
@@ -187,7 +187,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::era_year_getter)
}
// 9.3.16 Temporal.PlainYearMonth.prototype.equals ( other ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.equals
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::equals)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::equals)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -213,7 +213,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::equals)
}
// 9.3.17 Temporal.PlainYearMonth.prototype.toString ( [ options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::to_string)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -231,7 +231,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_string)
// 9.3.18 Temporal.PlainYearMonth.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.tolocalestring
// NOTE: This is the minimum toLocaleString implementation for engines without ECMA-402.
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::to_locale_string)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -242,7 +242,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_locale_string)
}
// 9.3.19 Temporal.PlainYearMonth.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.tojson
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::to_json)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
@@ -253,7 +253,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_json)
}
// 9.3.20 Temporal.PlainYearMonth.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::value_of)
{
// 1. Throw a TypeError exception.
vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.PlainYearMonth", "a primitive value");
@@ -261,7 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::value_of)
}
// 9.3.21 Temporal.PlainYearMonth.prototype.toPlainDate ( item ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.toplaindate
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_plain_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::to_plain_date)
{
auto item = vm.argument(0);
@@ -319,7 +319,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::to_plain_date)
}
// 9.3.22 Temporal.PlainYearMonth.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.getisofields
-JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::get_iso_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(PlainYearMonthPrototype::get_iso_fields)
{
// 1. Let yearMonth be the this value.
// 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h
index 4dc0ed0135..a4a48945a0 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.h
@@ -20,23 +20,23 @@ public:
virtual ~PlainYearMonthPrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(calendar_getter);
- JS_DECLARE_NATIVE_FUNCTION(year_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_code_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_month_getter);
- JS_DECLARE_NATIVE_FUNCTION(months_in_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(in_leap_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(era_getter);
- JS_DECLARE_NATIVE_FUNCTION(era_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(equals);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
- JS_DECLARE_NATIVE_FUNCTION(to_json);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_date);
- JS_DECLARE_NATIVE_FUNCTION(get_iso_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(equals);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp
index 219397925d..09c04527d0 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp
@@ -79,7 +79,7 @@ Value TimeZoneConstructor::construct(FunctionObject& new_target)
}
// 11.3.2 Temporal.TimeZone.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.from
-JS_DEFINE_NATIVE_FUNCTION(TimeZoneConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZoneConstructor::from)
{
auto item = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h
index 385a9b0438..fb655b515b 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp
index c3742afb81..cc1d425285 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp
@@ -39,7 +39,7 @@ void TimeZonePrototype::initialize(GlobalObject& global_object)
}
// 11.4.3 get Temporal.TimeZone.prototype.id, https://tc39.es/proposal-temporal/#sec-get-temporal.timezone.prototype.id
-JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::id_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::id_getter)
{
// 1. Let timeZone be the this value.
auto time_zone = vm.this_value(global_object);
@@ -49,7 +49,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::id_getter)
}
// 11.4.4 Temporal.TimeZone.prototype.getOffsetNanosecondsFor ( instant ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getoffsetnanosecondsfor
-JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_offset_nanoseconds_for)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::get_offset_nanoseconds_for)
{
// 1. Let timeZone be the this value.
// 2. Perform ? RequireInternalSlot(timeZone, [[InitializedTemporalTimeZone]]).
@@ -67,7 +67,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_offset_nanoseconds_for)
}
// 11.4.5 Temporal.TimeZone.prototype.getOffsetStringFor ( instant ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getoffsetstringfor
-JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_offset_string_for)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::get_offset_string_for)
{
// 1. Let timeZone be the this value.
// 2. Perform ? RequireInternalSlot(timeZone, [[InitializedTemporalTimeZone]]).
@@ -82,7 +82,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_offset_string_for)
}
// 11.4.6 Temporal.TimeZone.prototype.getPlainDateTimeFor ( instant [ , calendarLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getplaindatetimefor
-JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_plain_date_time_for)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::get_plain_date_time_for)
{
// 1. Let timeZone be the this value.
auto time_zone = vm.this_value(global_object);
@@ -98,7 +98,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::get_plain_date_time_for)
}
// 11.4.11 Temporal.TimeZone.prototype.toString ( ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.tostring
-JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::to_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::to_string)
{
// 1. Let timeZone be the this value.
// 2. Perform ? RequireInternalSlot(timeZone, [[InitializedTemporalTimeZone]]).
@@ -109,7 +109,7 @@ JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::to_string)
}
// 11.4.12 Temporal.TimeZone.prototype.toJSON ( ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.tojson
-JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::to_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TimeZonePrototype::to_json)
{
// 1. Let timeZone be the this value.
auto time_zone = vm.this_value(global_object);
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h
index 3137cb5ee3..62f30c4a2c 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.h
@@ -20,12 +20,12 @@ public:
virtual ~TimeZonePrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(id_getter);
- JS_DECLARE_NATIVE_FUNCTION(get_offset_nanoseconds_for);
- JS_DECLARE_NATIVE_FUNCTION(get_offset_string_for);
- JS_DECLARE_NATIVE_FUNCTION(get_plain_date_time_for);
- JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_FUNCTION(to_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(id_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_offset_nanoseconds_for);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_offset_string_for);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_plain_date_time_for);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_json);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp
index ca3cd23818..9ff27cd88b 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp
@@ -74,7 +74,7 @@ void ZonedDateTimePrototype::initialize(GlobalObject& global_object)
}
// 6.3.3 get Temporal.ZonedDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.calendar
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::calendar_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::calendar_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -85,7 +85,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::calendar_getter)
}
// 6.3.4 get Temporal.ZonedDateTime.prototype.timeZone, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.timezone
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::time_zone_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::time_zone_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -96,7 +96,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::time_zone_getter)
}
// 6.3.5 get Temporal.ZonedDateTime.prototype.year, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.year
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::year_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::year_getter)
}
// 6.3.6 get Temporal.ZonedDateTime.prototype.month, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.month
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::month_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -142,7 +142,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_getter)
}
// 6.3.7 get Temporal.ZonedDateTime.prototype.monthCode, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.monthcode
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_code_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::month_code_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -165,7 +165,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_code_getter)
}
// 6.3.8 get Temporal.ZonedDateTime.prototype.day, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.day
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::day_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -188,7 +188,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_getter)
}
// 6.3.9 get Temporal.ZonedDateTime.prototype.hour, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.hour
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::hour_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::hour_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -211,7 +211,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::hour_getter)
}
// 6.3.10 get Temporal.ZonedDateTime.prototype.minute, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.minute
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::minute_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::minute_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -234,7 +234,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::minute_getter)
}
// 6.3.11 get Temporal.ZonedDateTime.prototype.second, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.second
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::second_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::second_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -257,7 +257,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::second_getter)
}
// 6.3.12 get Temporal.ZonedDateTime.prototype.millisecond, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.millisecond
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::millisecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::millisecond_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -280,7 +280,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::millisecond_getter)
}
// 6.3.13 get Temporal.ZonedDateTime.prototype.microsecond, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.microsecond
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::microsecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::microsecond_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -303,7 +303,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::microsecond_getter)
}
// 6.3.14 get Temporal.ZonedDateTime.prototype.nanosecond, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.nanosecond
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::nanosecond_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::nanosecond_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -326,7 +326,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::nanosecond_getter)
}
// 6.3.15 get Temporal.ZonedDateTime.prototype.epochSeconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochseconds
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_seconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_seconds_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -343,7 +343,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_seconds_getter)
}
// 6.3.16 get Temporal.ZonedDateTime.prototype.epochMilliseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochmilliseconds
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_milliseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_milliseconds_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -360,7 +360,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_milliseconds_getter)
}
// 6.3.17 get Temporal.ZonedDateTime.prototype.epochMicroseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochmicroseconds
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_microseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_microseconds_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -377,7 +377,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_microseconds_getter)
}
// 6.3.18 get Temporal.ZonedDateTime.prototype.epochNanoseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochnanoseconds
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_nanoseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_nanoseconds_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -388,7 +388,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::epoch_nanoseconds_getter)
}
// 6.3.19 get Temporal.ZonedDateTime.prototype.dayOfWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.dayofweek
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_week_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_week_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -411,7 +411,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_week_getter)
}
// 6.3.20 get Temporal.ZonedDateTime.prototype.dayOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.dayofyear
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_year_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -434,7 +434,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::day_of_year_getter)
}
// 6.3.21 get Temporal.ZonedDateTime.prototype.weekOfYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.weekofyear
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::week_of_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::week_of_year_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -457,7 +457,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::week_of_year_getter)
}
// 6.3.23 get Temporal.ZonedDateTime.prototype.daysInWeek, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinweek
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_week_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_week_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -480,7 +480,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_week_getter)
}
// 6.3.24 get Temporal.ZonedDateTime.prototype.daysInMonth, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinmonth
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_month_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_month_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -503,7 +503,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_month_getter)
}
// 6.3.25 get Temporal.ZonedDateTime.prototype.daysInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinyear
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_year_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -526,7 +526,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::days_in_year_getter)
}
// 6.3.26 get Temporal.ZonedDateTime.prototype.monthsInYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.monthsinyear
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::months_in_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::months_in_year_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -549,7 +549,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::months_in_year_getter)
}
// 6.3.27 get Temporal.ZonedDateTime.prototype.inLeapYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.inleapyear
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::in_leap_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::in_leap_year_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -572,7 +572,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::in_leap_year_getter)
}
// 6.3.28 get Temporal.ZonedDateTime.prototype.offsetNanoseconds, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.offsetnanoseconds
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_nanoseconds_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_nanoseconds_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -589,7 +589,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_nanoseconds_getter)
}
// 6.3.29 get Temporal.ZonedDateTime.prototype.offset, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.offset
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -604,7 +604,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::offset_getter)
}
// 15.6.10.2 get Temporal.ZonedDateTime.prototype.era, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.era
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::era_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -627,7 +627,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_getter)
}
// 15.6.10.3 get Temporal.ZonedDateTime.prototype.eraYear, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.erayear
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_year_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::era_year_getter)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -650,7 +650,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_year_getter)
}
// 6.3.44 Temporal.ZonedDateTime.prototype.valueOf ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.valueof
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::value_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::value_of)
{
// 1. Throw a TypeError exception.
vm.throw_exception<TypeError>(global_object, ErrorType::Convert, "Temporal.ZonedDateTime", "a primitive value");
@@ -658,7 +658,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::value_of)
}
// 6.3.46 Temporal.ZonedDateTime.prototype.toInstant ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toinstant
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_instant)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_instant)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -669,7 +669,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_instant)
}
// 6.3.47 Temporal.ZonedDateTime.prototype.toPlainDate ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaindate
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -692,7 +692,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date)
}
// 6.3.48 Temporal.ZonedDateTime.prototype.toPlainTime ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaintime
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_time)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -715,7 +715,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_time)
}
// 6.3.49 Temporal.ZonedDateTime.prototype.toPlainDateTime ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaindatetime
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date_time)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date_time)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -732,7 +732,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_date_time)
}
// 6.3.50 Temporal.ZonedDateTime.prototype.toPlainYearMonth ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplainyearmonth
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_year_month)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_year_month)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -761,7 +761,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_year_month)
}
// 6.3.51 Temporal.ZonedDateTime.prototype.toPlainMonthDay ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplainmonthday
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_month_day)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_month_day)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
@@ -790,7 +790,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_plain_month_day)
}
// 6.3.52 Temporal.ZonedDateTime.prototype.getISOFields ( ), https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.getisofields
-JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::get_iso_fields)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ZonedDateTimePrototype::get_iso_fields)
{
// 1. Let zonedDateTime be the this value.
// 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h
index 5a24098148..2a66360fa3 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.h
@@ -20,42 +20,42 @@ public:
virtual ~ZonedDateTimePrototype() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(calendar_getter);
- JS_DECLARE_NATIVE_FUNCTION(time_zone_getter);
- JS_DECLARE_NATIVE_FUNCTION(year_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_getter);
- JS_DECLARE_NATIVE_FUNCTION(month_code_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_getter);
- JS_DECLARE_NATIVE_FUNCTION(hour_getter);
- JS_DECLARE_NATIVE_FUNCTION(minute_getter);
- JS_DECLARE_NATIVE_FUNCTION(second_getter);
- JS_DECLARE_NATIVE_FUNCTION(millisecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(microsecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(nanosecond_getter);
- JS_DECLARE_NATIVE_FUNCTION(epoch_seconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(epoch_milliseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(epoch_microseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(epoch_nanoseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_of_week_getter);
- JS_DECLARE_NATIVE_FUNCTION(day_of_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(week_of_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_week_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_month_getter);
- JS_DECLARE_NATIVE_FUNCTION(days_in_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(months_in_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(in_leap_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(offset_nanoseconds_getter);
- JS_DECLARE_NATIVE_FUNCTION(offset_getter);
- JS_DECLARE_NATIVE_FUNCTION(era_getter);
- JS_DECLARE_NATIVE_FUNCTION(era_year_getter);
- JS_DECLARE_NATIVE_FUNCTION(value_of);
- JS_DECLARE_NATIVE_FUNCTION(to_instant);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_date);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_time);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_date_time);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_year_month);
- JS_DECLARE_NATIVE_FUNCTION(to_plain_month_day);
- JS_DECLARE_NATIVE_FUNCTION(get_iso_fields);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(calendar_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(time_zone_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(month_code_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(hour_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(minute_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(second_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(millisecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(microsecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(nanosecond_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_seconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_milliseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_microseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(epoch_nanoseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_week_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(day_of_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(week_of_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_week_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_month_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(days_in_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(months_in_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(in_leap_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(offset_nanoseconds_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(offset_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(era_year_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(value_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_instant);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_date_time);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_year_month);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_plain_month_day);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_iso_fields);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
index 7f4cdfc4e7..c088ebf51d 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
@@ -56,7 +56,7 @@ Value TypedArrayConstructor::construct(FunctionObject&)
}
// 23.2.2.1 %TypedArray%.from ( source [ , mapfn [ , thisArg ] ] ), https://tc39.es/ecma262/#sec-%typedarray%.from
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::from)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayConstructor::from)
{
auto constructor = vm.this_value(global_object);
if (!constructor.is_constructor()) {
@@ -121,7 +121,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::from)
}
// 23.2.2.2 %TypedArray%.of ( ...items ), https://tc39.es/ecma262/#sec-%typedarray%.of
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayConstructor::of)
{
auto length = vm.argument_count();
auto constructor = vm.this_value(global_object);
@@ -143,7 +143,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::of)
}
// 23.2.2.4 get %TypedArray% [ @@species ], https://tc39.es/ecma262/#sec-get-%typedarray%-@@species
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::symbol_species_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h
index 40455fbbdc..16e838011c 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h
@@ -25,9 +25,9 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_FUNCTION(from);
- JS_DECLARE_NATIVE_FUNCTION(of);
- JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(from);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
index c052c0fb1f..428976af23 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
@@ -188,7 +188,7 @@ static TypedArrayBase* typed_array_species_create(GlobalObject& global_object, T
}
// 23.2.3.18 get %TypedArray%.prototype.length, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.length
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::length_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::length_getter)
{
auto typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -201,7 +201,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::length_getter)
}
// 4.1 %TypedArray%.prototype.at ( index ), https://tc39.es/proposal-relative-indexing-method/#sec-%typedarray%.prototype.at
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::at)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::at)
{
auto* typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -223,7 +223,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::at)
}
// 23.2.3.7 %TypedArray%.prototype.every ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::every)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::every)
{
auto result = true;
for_each_item(vm, global_object, "every", [&](auto, auto, auto callback_result) {
@@ -237,7 +237,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::every)
}
// 23.2.3.8 %TypedArray%.prototype.fill ( value [ , start [ , end ] ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::fill)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::fill)
{
auto typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -287,7 +287,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::fill)
}
// 23.2.3.10 %TypedArray%.prototype.find ( predicate [ , thisArg ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::find)
{
auto result = js_undefined();
for_each_item(vm, global_object, "find", [&](auto, auto value, auto callback_result) {
@@ -301,7 +301,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find)
}
// 23.2.3.11 %TypedArray%.prototype.findIndex ( predicate [ , thisArg ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_index)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::find_index)
{
auto result_index = -1;
for_each_item(vm, global_object, "findIndex", [&](auto index, auto, auto callback_result) {
@@ -315,7 +315,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_index)
}
// 4 %TypedArray%.prototype.findLast ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlast
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_last)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::find_last)
{
auto result = js_undefined();
for_each_item_from_last(vm, global_object, "findLast", [&](auto, auto value, auto callback_result) {
@@ -329,7 +329,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_last)
}
// 5 %TypedArray%.prototype.findLastIndex ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlastindex
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_last_index)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::find_last_index)
{
auto result_index = -1;
for_each_item_from_last(vm, global_object, "findLastIndex", [&](auto index, auto, auto callback_result) {
@@ -343,7 +343,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_last_index)
}
// 23.2.3.12 %TypedArray%.prototype.forEach ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::for_each)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::for_each)
{
for_each_item(vm, global_object, "forEach", [](auto, auto, auto) {
return IterationDecision::Continue;
@@ -352,7 +352,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::for_each)
}
// 23.2.3.13 %TypedArray%.prototype.includes ( searchElement [ , fromIndex ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::includes)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::includes)
{
auto typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -393,7 +393,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::includes)
}
// 23.2.3.14 %TypedArray%.prototype.indexOf ( searchElement [ , fromIndex ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::index_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::index_of)
{
auto typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -437,7 +437,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::index_of)
}
// 23.2.3.17 %TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::last_index_of)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::last_index_of)
{
auto typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -482,7 +482,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::last_index_of)
}
// 23.2.3.20 %TypedArray%.prototype.reduce ( callbackfn [ , initialValue ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::reduce)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::reduce)
{
auto* typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -518,7 +518,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::reduce)
}
// 23.2.3.21 %TypedArray%.prototype.reduceRight ( callbackfn [ , initialValue ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::reduce_right)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::reduce_right)
{
auto* typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -554,7 +554,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::reduce_right)
}
// 23.2.3.25 %TypedArray%.prototype.some ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::some)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::some)
{
auto result = false;
for_each_item(vm, global_object, "some", [&](auto, auto, auto callback_result) {
@@ -568,7 +568,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::some)
}
// 23.2.3.15 %TypedArray%.prototype.join ( separator ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::join)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::join)
{
auto* typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -593,7 +593,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::join)
}
// 23.2.3.16 %TypedArray%.prototype.keys ( ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::keys)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::keys)
{
auto* typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -602,7 +602,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::keys)
}
// 23.2.3.30 %TypedArray%.prototype.values ( ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::values)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::values)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -611,7 +611,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::values)
}
// 23.2.3.6 %TypedArray%.prototype.entries ( ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::entries)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::entries)
{
auto* typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -620,7 +620,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::entries)
}
// 23.2.3.1 get %TypedArray%.prototype.buffer, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.buffer
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::buffer_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::buffer_getter)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -631,7 +631,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::buffer_getter)
}
// 23.2.3.2 get %TypedArray%.prototype.byteLength, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.bytelength
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::byte_length_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::byte_length_getter)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -644,7 +644,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::byte_length_getter)
}
// 23.2.3.3 get %TypedArray%.prototype.byteOffset, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.byteoffset
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::byte_offset_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::byte_offset_getter)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -657,7 +657,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::byte_offset_getter)
}
// 23.2.3.32 get %TypedArray%.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::to_string_tag_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::to_string_tag_getter)
{
auto this_value = vm.this_value(global_object);
if (!this_value.is_object())
@@ -669,7 +669,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::to_string_tag_getter)
}
// 23.2.3.23 %TypedArray%.prototype.set ( source [ , offset ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::set)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::set)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -823,7 +823,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::set)
}
// 23.2.3.24 %TypedArray%.prototype.slice ( start, end ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::slice)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::slice)
{
auto* typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
@@ -1004,7 +1004,7 @@ static void typed_array_merge_sort(GlobalObject& global_object, FunctionObject*
}
// 23.2.3.26 %TypedArray%.prototype.sort ( comparefn ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::sort)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::sort)
{
auto compare_fn = vm.argument(0);
if (!compare_fn.is_undefined() && !compare_fn.is_function()) {
@@ -1043,7 +1043,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::sort)
}
// 23.2.3.27 %TypedArray%.prototype.subarray ( begin, end ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::subarray)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::subarray)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -1093,7 +1093,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::subarray)
}
// 23.2.3.22 %TypedArray%.prototype.reverse ( ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::reverse)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::reverse)
{
// 1. Let O be the this value.
// 2. Perform ? ValidateTypedArray(O).
@@ -1135,7 +1135,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::reverse)
}
// 23.2.3.5 %TypedArray%.prototype.copyWithin ( target, start [ , end ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::copy_within)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::copy_within)
{
// 1. Let O be the this value.
// 2. Perform ? ValidateTypedArray(O).
@@ -1307,7 +1307,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::copy_within)
}
// 23.2.3.9 %TypedArray%.prototype.filter ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::filter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::filter)
{
// 1. Let O be the this value.
// 2. Perform ? ValidateTypedArray(O).
@@ -1377,7 +1377,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::filter)
}
// 23.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::map)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::map)
{
// 1. Let O be the this value.
// 2. Perform ? ValidateTypedArray(O).
@@ -1423,7 +1423,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::map)
}
// 23.2.3.28 %TypedArray%.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
-JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::to_locale_string)
+JS_DEFINE_OLD_NATIVE_FUNCTION(TypedArrayPrototype::to_locale_string)
{
auto* typed_array = validate_typed_array_from_this(global_object);
if (!typed_array)
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h
index 245d146878..78de8bdac2 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h
@@ -20,38 +20,38 @@ public:
virtual ~TypedArrayPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(length_getter);
- JS_DECLARE_NATIVE_FUNCTION(buffer_getter);
- JS_DECLARE_NATIVE_FUNCTION(byte_length_getter);
- JS_DECLARE_NATIVE_FUNCTION(byte_offset_getter);
- JS_DECLARE_NATIVE_FUNCTION(to_string_tag_getter);
- JS_DECLARE_NATIVE_FUNCTION(at);
- JS_DECLARE_NATIVE_FUNCTION(every);
- JS_DECLARE_NATIVE_FUNCTION(fill);
- JS_DECLARE_NATIVE_FUNCTION(find);
- JS_DECLARE_NATIVE_FUNCTION(find_index);
- JS_DECLARE_NATIVE_FUNCTION(find_last);
- JS_DECLARE_NATIVE_FUNCTION(find_last_index);
- JS_DECLARE_NATIVE_FUNCTION(for_each);
- JS_DECLARE_NATIVE_FUNCTION(includes);
- JS_DECLARE_NATIVE_FUNCTION(index_of);
- JS_DECLARE_NATIVE_FUNCTION(last_index_of);
- JS_DECLARE_NATIVE_FUNCTION(reduce);
- JS_DECLARE_NATIVE_FUNCTION(reduce_right);
- JS_DECLARE_NATIVE_FUNCTION(some);
- JS_DECLARE_NATIVE_FUNCTION(join);
- JS_DECLARE_NATIVE_FUNCTION(keys);
- JS_DECLARE_NATIVE_FUNCTION(values);
- JS_DECLARE_NATIVE_FUNCTION(entries);
- JS_DECLARE_NATIVE_FUNCTION(set);
- JS_DECLARE_NATIVE_FUNCTION(slice);
- JS_DECLARE_NATIVE_FUNCTION(sort);
- JS_DECLARE_NATIVE_FUNCTION(subarray);
- JS_DECLARE_NATIVE_FUNCTION(reverse);
- JS_DECLARE_NATIVE_FUNCTION(copy_within);
- JS_DECLARE_NATIVE_FUNCTION(filter);
- JS_DECLARE_NATIVE_FUNCTION(map);
- JS_DECLARE_NATIVE_FUNCTION(to_locale_string);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(length_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(buffer_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(byte_length_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(byte_offset_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_string_tag_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(at);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(every);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(fill);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(find);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(find_index);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(find_last);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(find_last_index);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(for_each);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(includes);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(index_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(last_index_of);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(reduce);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(reduce_right);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(some);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(join);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(keys);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(values);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(entries);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(slice);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(sort);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(subarray);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(reverse);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(copy_within);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(filter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(map);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(to_locale_string);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp b/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp
index 66e2143207..4c1b06b8e6 100644
--- a/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.cpp
@@ -35,7 +35,7 @@ WeakMapPrototype::~WeakMapPrototype()
}
// 24.3.3.2 WeakMap.prototype.delete ( key ), https://tc39.es/ecma262/#sec-weakmap.prototype.delete
-JS_DEFINE_NATIVE_FUNCTION(WeakMapPrototype::delete_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WeakMapPrototype::delete_)
{
auto* weak_map = TRY_OR_DISCARD(typed_this_object(global_object));
auto value = vm.argument(0);
@@ -45,7 +45,7 @@ JS_DEFINE_NATIVE_FUNCTION(WeakMapPrototype::delete_)
}
// 24.3.3.3 WeakMap.prototype.get ( key ), https://tc39.es/ecma262/#sec-weakmap.prototype.get
-JS_DEFINE_NATIVE_FUNCTION(WeakMapPrototype::get)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WeakMapPrototype::get)
{
auto* weak_map = TRY_OR_DISCARD(typed_this_object(global_object));
auto value = vm.argument(0);
@@ -59,7 +59,7 @@ JS_DEFINE_NATIVE_FUNCTION(WeakMapPrototype::get)
}
// 24.3.3.4 WeakMap.prototype.has ( key ), https://tc39.es/ecma262/#sec-weakmap.prototype.has
-JS_DEFINE_NATIVE_FUNCTION(WeakMapPrototype::has)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WeakMapPrototype::has)
{
auto* weak_map = TRY_OR_DISCARD(typed_this_object(global_object));
auto value = vm.argument(0);
@@ -70,7 +70,7 @@ JS_DEFINE_NATIVE_FUNCTION(WeakMapPrototype::has)
}
// 24.3.3.5 WeakMap.prototype.set ( key, value ), https://tc39.es/ecma262/#sec-weakmap.prototype.set
-JS_DEFINE_NATIVE_FUNCTION(WeakMapPrototype::set)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WeakMapPrototype::set)
{
auto* weak_map = TRY_OR_DISCARD(typed_this_object(global_object));
auto value = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.h b/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.h
index 5adcc838bd..0e2afbafa7 100644
--- a/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/WeakMapPrototype.h
@@ -20,10 +20,10 @@ public:
virtual ~WeakMapPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(delete_);
- JS_DECLARE_NATIVE_FUNCTION(get);
- JS_DECLARE_NATIVE_FUNCTION(has);
- JS_DECLARE_NATIVE_FUNCTION(set);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(delete_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(has);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp b/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp
index b0e4029ef9..8d392bd169 100644
--- a/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.cpp
@@ -29,7 +29,7 @@ WeakRefPrototype::~WeakRefPrototype()
}
// 26.1.3.2 WeakRef.prototype.deref ( ), https://tc39.es/ecma262/#sec-weak-ref.prototype.deref
-JS_DEFINE_NATIVE_FUNCTION(WeakRefPrototype::deref)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WeakRefPrototype::deref)
{
auto* weak_ref = TRY_OR_DISCARD(typed_this_object(global_object));
diff --git a/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.h b/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.h
index 15254e946c..11abd18ab7 100644
--- a/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/WeakRefPrototype.h
@@ -20,7 +20,7 @@ public:
virtual ~WeakRefPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(deref);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(deref);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/WeakSetPrototype.cpp b/Userland/Libraries/LibJS/Runtime/WeakSetPrototype.cpp
index ee826990c5..566d71c29d 100644
--- a/Userland/Libraries/LibJS/Runtime/WeakSetPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/WeakSetPrototype.cpp
@@ -34,7 +34,7 @@ WeakSetPrototype::~WeakSetPrototype()
}
// 24.4.3.1 WeakSet.prototype.add ( value ), https://tc39.es/ecma262/#sec-weakset.prototype.add
-JS_DEFINE_NATIVE_FUNCTION(WeakSetPrototype::add)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WeakSetPrototype::add)
{
auto* weak_set = TRY_OR_DISCARD(typed_this_object(global_object));
auto value = vm.argument(0);
@@ -47,7 +47,7 @@ JS_DEFINE_NATIVE_FUNCTION(WeakSetPrototype::add)
}
// 24.4.3.3 WeakSet.prototype.delete ( value ), https://tc39.es/ecma262/#sec-weakset.prototype.delete
-JS_DEFINE_NATIVE_FUNCTION(WeakSetPrototype::delete_)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WeakSetPrototype::delete_)
{
auto* weak_set = TRY_OR_DISCARD(typed_this_object(global_object));
auto value = vm.argument(0);
@@ -57,7 +57,7 @@ JS_DEFINE_NATIVE_FUNCTION(WeakSetPrototype::delete_)
}
// 24.4.3.4 WeakSet.prototype.has ( value ), https://tc39.es/ecma262/#sec-weakset.prototype.has
-JS_DEFINE_NATIVE_FUNCTION(WeakSetPrototype::has)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WeakSetPrototype::has)
{
auto* weak_set = TRY_OR_DISCARD(typed_this_object(global_object));
auto value = vm.argument(0);
diff --git a/Userland/Libraries/LibJS/Runtime/WeakSetPrototype.h b/Userland/Libraries/LibJS/Runtime/WeakSetPrototype.h
index 50351c2684..9dbb6e9de1 100644
--- a/Userland/Libraries/LibJS/Runtime/WeakSetPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/WeakSetPrototype.h
@@ -20,9 +20,9 @@ public:
virtual ~WeakSetPrototype() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(add);
- JS_DECLARE_NATIVE_FUNCTION(delete_);
- JS_DECLARE_NATIVE_FUNCTION(has);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(add);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(delete_);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(has);
};
}
diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunner.h b/Userland/Libraries/LibTest/JavaScriptTestRunner.h
index d7cb06a558..aa70f1f67e 100644
--- a/Userland/Libraries/LibTest/JavaScriptTestRunner.h
+++ b/Userland/Libraries/LibTest/JavaScriptTestRunner.h
@@ -64,9 +64,9 @@
} __testjs_register_##fn {};
#define TESTJS_GLOBAL_FUNCTION(function, exposed_name, ...) \
- JS_DECLARE_NATIVE_FUNCTION(function); \
+ JS_DECLARE_OLD_NATIVE_FUNCTION(function); \
__TESTJS_REGISTER_GLOBAL_FUNCTION(#exposed_name, function, ##__VA_ARGS__); \
- JS_DEFINE_NATIVE_FUNCTION(function)
+ JS_DEFINE_OLD_NATIVE_FUNCTION(function)
#define TESTJS_MAIN_HOOK() \
struct __TestJS_main_hook { \
diff --git a/Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp b/Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp
index ec1e3cd395..0cc5e3a063 100644
--- a/Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/CSSNamespace.cpp
@@ -31,7 +31,7 @@ void CSSNamespace::initialize(JS::GlobalObject& global_object)
}
// https://www.w3.org/TR/cssom-1/#dom-css-escape
-JS_DEFINE_NATIVE_FUNCTION(CSSNamespace::escape)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CSSNamespace::escape)
{
if (!vm.argument_count()) {
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::BadArgCountAtLeastOne, "CSS.escape");
@@ -44,7 +44,7 @@ JS_DEFINE_NATIVE_FUNCTION(CSSNamespace::escape)
}
// https://www.w3.org/TR/css-conditional-3/#dom-css-supports
-JS_DEFINE_NATIVE_FUNCTION(CSSNamespace::supports)
+JS_DEFINE_OLD_NATIVE_FUNCTION(CSSNamespace::supports)
{
if (!vm.argument_count()) {
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::BadArgCountAtLeastOne, "CSS.supports");
diff --git a/Userland/Libraries/LibWeb/Bindings/CSSNamespace.h b/Userland/Libraries/LibWeb/Bindings/CSSNamespace.h
index 2791c54580..2a0942448a 100644
--- a/Userland/Libraries/LibWeb/Bindings/CSSNamespace.h
+++ b/Userland/Libraries/LibWeb/Bindings/CSSNamespace.h
@@ -21,8 +21,8 @@ public:
virtual ~CSSNamespace() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(escape);
- JS_DECLARE_NATIVE_FUNCTION(supports);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(escape);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(supports);
};
}
diff --git a/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp b/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
index f44f7f5bfd..ef7b41ad63 100644
--- a/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/LocationObject.cpp
@@ -44,13 +44,13 @@ LocationObject::~LocationObject()
{
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::href_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::href_getter)
{
auto& window = static_cast<WindowObject&>(global_object);
return JS::js_string(vm, window.impl().associated_document().url().to_string());
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::href_setter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::href_setter)
{
auto& window = static_cast<WindowObject&>(global_object);
auto new_href = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
@@ -63,26 +63,26 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::href_setter)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::pathname_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::pathname_getter)
{
auto& window = static_cast<WindowObject&>(global_object);
return JS::js_string(vm, window.impl().associated_document().url().path());
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::hostname_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::hostname_getter)
{
auto& window = static_cast<WindowObject&>(global_object);
return JS::js_string(vm, window.impl().associated_document().url().host());
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::host_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::host_getter)
{
auto& window = static_cast<WindowObject&>(global_object);
auto url = window.impl().associated_document().url();
return JS::js_string(vm, String::formatted("{}:{}", url.host(), url.port_or_default()));
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::hash_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::hash_getter)
{
auto& window = static_cast<WindowObject&>(global_object);
auto fragment = window.impl().associated_document().url().fragment();
@@ -94,7 +94,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::hash_getter)
return JS::js_string(vm, builder.to_string());
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::search_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::search_getter)
{
auto& window = static_cast<WindowObject&>(global_object);
auto query = window.impl().associated_document().url().query();
@@ -106,7 +106,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::search_getter)
return JS::js_string(vm, builder.to_string());
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::protocol_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::protocol_getter)
{
auto& window = static_cast<WindowObject&>(global_object);
StringBuilder builder;
@@ -115,20 +115,20 @@ JS_DEFINE_NATIVE_FUNCTION(LocationObject::protocol_getter)
return JS::js_string(vm, builder.to_string());
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::port_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::port_getter)
{
auto& window = static_cast<WindowObject&>(global_object);
return JS::Value(window.impl().associated_document().url().port_or_default());
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::reload)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::reload)
{
auto& window = static_cast<WindowObject&>(global_object);
window.impl().did_call_location_reload({});
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(LocationObject::replace)
+JS_DEFINE_OLD_NATIVE_FUNCTION(LocationObject::replace)
{
auto& window = static_cast<WindowObject&>(global_object);
auto url = TRY_OR_DISCARD(vm.argument(0).to_string(global_object));
diff --git a/Userland/Libraries/LibWeb/Bindings/LocationObject.h b/Userland/Libraries/LibWeb/Bindings/LocationObject.h
index e89d82b22e..980f65cd47 100644
--- a/Userland/Libraries/LibWeb/Bindings/LocationObject.h
+++ b/Userland/Libraries/LibWeb/Bindings/LocationObject.h
@@ -29,19 +29,19 @@ public:
// but we don't have the infrastructure in place to implement them yet.
private:
- JS_DECLARE_NATIVE_FUNCTION(reload);
- JS_DECLARE_NATIVE_FUNCTION(replace);
-
- JS_DECLARE_NATIVE_FUNCTION(href_getter);
- JS_DECLARE_NATIVE_FUNCTION(href_setter);
-
- JS_DECLARE_NATIVE_FUNCTION(host_getter);
- JS_DECLARE_NATIVE_FUNCTION(hostname_getter);
- JS_DECLARE_NATIVE_FUNCTION(pathname_getter);
- JS_DECLARE_NATIVE_FUNCTION(hash_getter);
- JS_DECLARE_NATIVE_FUNCTION(search_getter);
- JS_DECLARE_NATIVE_FUNCTION(protocol_getter);
- JS_DECLARE_NATIVE_FUNCTION(port_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(reload);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(replace);
+
+ JS_DECLARE_OLD_NATIVE_FUNCTION(href_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(href_setter);
+
+ JS_DECLARE_OLD_NATIVE_FUNCTION(host_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(hostname_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(pathname_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(hash_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(search_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(protocol_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(port_getter);
};
}
diff --git a/Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp b/Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp
index 057dd0000c..bc494d07a0 100644
--- a/Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/NavigatorObject.cpp
@@ -44,12 +44,12 @@ NavigatorObject::~NavigatorObject()
{
}
-JS_DEFINE_NATIVE_FUNCTION(NavigatorObject::user_agent_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NavigatorObject::user_agent_getter)
{
return JS::js_string(vm, ResourceLoader::the().user_agent());
}
-JS_DEFINE_NATIVE_FUNCTION(NavigatorObject::cookie_enabled_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(NavigatorObject::cookie_enabled_getter)
{
// No way of disabling cookies right now :^)
return JS::Value(true);
diff --git a/Userland/Libraries/LibWeb/Bindings/NavigatorObject.h b/Userland/Libraries/LibWeb/Bindings/NavigatorObject.h
index 3125d35a40..807483b2d3 100644
--- a/Userland/Libraries/LibWeb/Bindings/NavigatorObject.h
+++ b/Userland/Libraries/LibWeb/Bindings/NavigatorObject.h
@@ -21,8 +21,8 @@ public:
virtual ~NavigatorObject() override;
private:
- JS_DECLARE_NATIVE_FUNCTION(user_agent_getter);
- JS_DECLARE_NATIVE_FUNCTION(cookie_enabled_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(user_agent_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(cookie_enabled_getter);
};
}
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp
index 24b670ea1d..a7dff7685a 100644
--- a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp
@@ -179,7 +179,7 @@ static DOM::Window* impl_from(JS::VM& vm, JS::GlobalObject& global_object)
return &static_cast<WindowObject*>(this_object)->impl();
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::alert)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::alert)
{
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#simple-dialogs
// Note: This method is defined using two overloads, instead of using an optional argument,
@@ -195,7 +195,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::alert)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::confirm)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::confirm)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -206,7 +206,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::confirm)
return JS::Value(impl->confirm(message));
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::prompt)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::prompt)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -224,7 +224,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::prompt)
}
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_interval)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::set_interval)
{
// FIXME: Ideally this would share more code with setTimeout() using the "timer initialization steps"
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timer-initialisation-steps
@@ -261,7 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_interval)
}
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_timeout)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::set_timeout)
{
// FIXME: Ideally this would share more code with setInterval() using the "timer initialization steps"
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timer-initialisation-steps
@@ -297,7 +297,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_timeout)
return JS::Value(timer_id);
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::clear_timeout)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::clear_timeout)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -311,7 +311,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::clear_timeout)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::clear_interval)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::clear_interval)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -325,7 +325,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::clear_interval)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::request_animation_frame)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::request_animation_frame)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -342,7 +342,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::request_animation_frame)
return JS::Value(impl->request_animation_frame(*static_cast<JS::FunctionObject*>(callback_object)));
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::cancel_animation_frame)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::cancel_animation_frame)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -356,7 +356,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::cancel_animation_frame)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::queue_microtask)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::queue_microtask)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -375,7 +375,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::queue_microtask)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::atob)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::atob)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -393,7 +393,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::atob)
return JS::js_string(vm, decoder->to_utf8(decoded));
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::btoa)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::btoa)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -419,7 +419,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::btoa)
}
// https://html.spec.whatwg.org/multipage/browsers.html#dom-top
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::top_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::top_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -435,7 +435,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::top_getter)
}
// https://html.spec.whatwg.org/multipage/browsers.html#dom-parent
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::parent_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::parent_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -454,7 +454,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::parent_getter)
return impl->wrapper();
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::document_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::document_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -462,7 +462,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::document_getter)
return wrap(global_object, impl->associated_document());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::performance_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::performance_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -470,7 +470,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::performance_getter)
return wrap(global_object, impl->performance());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -478,7 +478,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_getter)
return wrap(global_object, impl->screen());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::event_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::event_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -488,12 +488,12 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::event_getter)
return wrap(global_object, const_cast<DOM::Event&>(*impl->current_event()));
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::event_setter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::event_setter)
{
REPLACEABLE_PROPERTY_SETTER(WindowObject, event);
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::crypto_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::crypto_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -501,7 +501,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::crypto_getter)
return wrap(global_object, impl->crypto());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::inner_width_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::inner_width_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -509,7 +509,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::inner_width_getter)
return JS::Value(impl->inner_width());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::inner_height_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::inner_height_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -517,7 +517,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::inner_height_getter)
return JS::Value(impl->inner_height());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::device_pixel_ratio_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::device_pixel_ratio_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -525,7 +525,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::device_pixel_ratio_getter)
return JS::Value(impl->device_pixel_ratio());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::get_computed_style)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::get_computed_style)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -539,7 +539,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::get_computed_style)
return wrap(global_object, impl->get_computed_style(static_cast<ElementWrapper*>(object)->impl()));
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::get_selection)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::get_selection)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -550,7 +550,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::get_selection)
return wrap(global_object, *selection);
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::match_media)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::match_media)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -560,7 +560,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::match_media)
}
// https://www.w3.org/TR/cssom-view/#dom-window-scrollx
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_x_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::scroll_x_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -569,7 +569,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_x_getter)
}
// https://www.w3.org/TR/cssom-view/#dom-window-scrolly
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_y_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::scroll_y_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -591,7 +591,7 @@ static void perform_a_scroll(Page& page, double x, double y, ScrollBehavior)
}
// https://www.w3.org/TR/cssom-view/#dom-window-scroll
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::scroll)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -645,7 +645,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll)
}
// https://www.w3.org/TR/cssom-view/#dom-window-scrollby
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_by)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::scroll_by)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -696,7 +696,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_by)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::history_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::history_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -704,7 +704,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::history_getter)
return wrap(global_object, impl->associated_document().history());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_left_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_left_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -712,7 +712,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_left_getter)
return JS::Value(impl->screen_x());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_top_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_top_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -720,7 +720,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_top_getter)
return JS::Value(impl->screen_y());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_x_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_x_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -728,7 +728,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_x_getter)
return JS::Value(impl->screen_x());
}
-JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_y_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::screen_y_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -737,7 +737,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_y_getter)
}
#define __ENUMERATE(attribute, event_name) \
- JS_DEFINE_NATIVE_FUNCTION(WindowObject::attribute##_getter) \
+ JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::attribute##_getter) \
{ \
auto* impl = impl_from(vm, global_object); \
if (!impl) \
@@ -747,7 +747,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_y_getter)
return JS::js_null(); \
return retval.callback.cell(); \
} \
- JS_DEFINE_NATIVE_FUNCTION(WindowObject::attribute##_setter) \
+ JS_DEFINE_OLD_NATIVE_FUNCTION(WindowObject::attribute##_setter) \
{ \
auto* impl = impl_from(vm, global_object); \
if (!impl) \
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.h b/Userland/Libraries/LibWeb/Bindings/WindowObject.h
index c86a89de5e..89fddf8bd4 100644
--- a/Userland/Libraries/LibWeb/Bindings/WindowObject.h
+++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.h
@@ -66,57 +66,57 @@ public:
private:
virtual void visit_edges(Visitor&) override;
- JS_DECLARE_NATIVE_FUNCTION(top_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(top_getter);
- JS_DECLARE_NATIVE_FUNCTION(document_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(document_getter);
- JS_DECLARE_NATIVE_FUNCTION(performance_getter);
- JS_DECLARE_NATIVE_FUNCTION(history_getter);
- JS_DECLARE_NATIVE_FUNCTION(screen_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(performance_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(history_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(screen_getter);
- JS_DECLARE_NATIVE_FUNCTION(event_getter);
- JS_DECLARE_NATIVE_FUNCTION(event_setter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(event_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(event_setter);
- JS_DECLARE_NATIVE_FUNCTION(inner_width_getter);
- JS_DECLARE_NATIVE_FUNCTION(inner_height_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(inner_width_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(inner_height_getter);
- JS_DECLARE_NATIVE_FUNCTION(parent_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(parent_getter);
- JS_DECLARE_NATIVE_FUNCTION(device_pixel_ratio_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(device_pixel_ratio_getter);
- JS_DECLARE_NATIVE_FUNCTION(scroll_x_getter);
- JS_DECLARE_NATIVE_FUNCTION(scroll_y_getter);
- JS_DECLARE_NATIVE_FUNCTION(scroll);
- JS_DECLARE_NATIVE_FUNCTION(scroll_by);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(scroll_x_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(scroll_y_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(scroll);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(scroll_by);
- JS_DECLARE_NATIVE_FUNCTION(screen_x_getter);
- JS_DECLARE_NATIVE_FUNCTION(screen_y_getter);
- JS_DECLARE_NATIVE_FUNCTION(screen_left_getter);
- JS_DECLARE_NATIVE_FUNCTION(screen_top_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(screen_x_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(screen_y_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(screen_left_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(screen_top_getter);
- JS_DECLARE_NATIVE_FUNCTION(alert);
- JS_DECLARE_NATIVE_FUNCTION(confirm);
- JS_DECLARE_NATIVE_FUNCTION(prompt);
- JS_DECLARE_NATIVE_FUNCTION(set_interval);
- JS_DECLARE_NATIVE_FUNCTION(set_timeout);
- JS_DECLARE_NATIVE_FUNCTION(clear_interval);
- JS_DECLARE_NATIVE_FUNCTION(clear_timeout);
- JS_DECLARE_NATIVE_FUNCTION(request_animation_frame);
- JS_DECLARE_NATIVE_FUNCTION(cancel_animation_frame);
- JS_DECLARE_NATIVE_FUNCTION(atob);
- JS_DECLARE_NATIVE_FUNCTION(btoa);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(alert);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(confirm);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(prompt);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_interval);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set_timeout);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(clear_interval);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(clear_timeout);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(request_animation_frame);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(cancel_animation_frame);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(atob);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(btoa);
- JS_DECLARE_NATIVE_FUNCTION(get_computed_style);
- JS_DECLARE_NATIVE_FUNCTION(match_media);
- JS_DECLARE_NATIVE_FUNCTION(get_selection);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_computed_style);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(match_media);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get_selection);
- JS_DECLARE_NATIVE_FUNCTION(queue_microtask);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(queue_microtask);
- JS_DECLARE_NATIVE_FUNCTION(crypto_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(crypto_getter);
-#define __ENUMERATE(attribute, event_name) \
- JS_DECLARE_NATIVE_FUNCTION(attribute##_getter); \
- JS_DECLARE_NATIVE_FUNCTION(attribute##_setter);
+#define __ENUMERATE(attribute, event_name) \
+ JS_DECLARE_OLD_NATIVE_FUNCTION(attribute##_getter); \
+ JS_DECLARE_OLD_NATIVE_FUNCTION(attribute##_setter);
ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE);
#undef __ENUMERATE
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp
index 1db0997d0f..0d2f71f6af 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp
@@ -16,7 +16,7 @@ void WebAssemblyInstancePrototype::initialize(JS::GlobalObject& global_object)
define_native_accessor("exports", exports_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable);
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyInstancePrototype::exports_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyInstancePrototype::exports_getter)
{
auto this_value = vm.this_value(global_object);
auto* this_object = TRY_OR_DISCARD(this_value.to_object(global_object));
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h
index fff25310e1..4417787135 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h
@@ -25,7 +25,7 @@ public:
virtual void initialize(JS::GlobalObject&) override;
private:
- JS_DECLARE_NATIVE_FUNCTION(exports_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(exports_getter);
static JS::Handle<WebAssemblyInstancePrototype> s_instance;
};
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp
index bc4020ce7a..ec85d245bd 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp
@@ -17,7 +17,7 @@ void WebAssemblyMemoryPrototype::initialize(JS::GlobalObject& global_object)
define_native_function("grow", grow, 1, JS::Attribute::Writable | JS::Attribute::Enumerable | JS::Attribute::Configurable);
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow)
{
auto page_count = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object));
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
@@ -40,7 +40,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow)
return JS::Value(static_cast<u32>(previous_size));
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::buffer_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::buffer_getter)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
if (!is<WebAssemblyMemoryObject>(this_object)) {
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h
index 74fd7b0322..00f54c8692 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h
@@ -27,8 +27,8 @@ public:
virtual void initialize(JS::GlobalObject&) override;
private:
- JS_DECLARE_NATIVE_FUNCTION(grow);
- JS_DECLARE_NATIVE_FUNCTION(buffer_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(grow);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(buffer_getter);
};
}
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
index 51e21fbdde..1c4b72c4c2 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
@@ -87,7 +87,7 @@ void WebAssemblyObject::visit_edges(Visitor& visitor)
}
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::validate)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::validate)
{
// FIXME: Implement this once module validation is implemented in LibWasm.
dbgln("Hit WebAssemblyObject::validate() stub!");
@@ -127,7 +127,7 @@ Result<size_t, JS::Value> parse_module(JS::GlobalObject& global_object, JS::Obje
return WebAssemblyObject::s_compiled_modules.size() - 1;
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::compile)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::compile)
{
// FIXME: This shouldn't block!
auto buffer_or_error = vm.argument(0).to_object(global_object);
@@ -308,7 +308,7 @@ Result<size_t, JS::Value> WebAssemblyObject::instantiate_module(Wasm::Module con
return s_instantiated_modules.size() - 1;
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::instantiate)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyObject::instantiate)
{
// FIXME: This shouldn't block!
auto buffer_or_error = vm.argument(0).to_object(global_object);
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h
index 2c0eae4349..4bc959472f 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.h
@@ -60,9 +60,9 @@ public:
static Wasm::AbstractMachine s_abstract_machine;
private:
- JS_DECLARE_NATIVE_FUNCTION(validate);
- JS_DECLARE_NATIVE_FUNCTION(compile);
- JS_DECLARE_NATIVE_FUNCTION(instantiate);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(validate);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(compile);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(instantiate);
};
class WebAssemblyMemoryObject final : public JS::Object {
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp
index 7493579e2e..ffc0d8b3d8 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.cpp
@@ -19,7 +19,7 @@ void WebAssemblyTablePrototype::initialize(JS::GlobalObject& global_object)
define_native_function("set", set, 1, JS::Attribute::Writable | JS::Attribute::Enumerable | JS::Attribute::Configurable);
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::grow)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyTablePrototype::grow)
{
auto delta = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object));
@@ -56,7 +56,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::grow)
return JS::Value(static_cast<u32>(initial_size));
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::get)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyTablePrototype::get)
{
auto index = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object));
@@ -84,7 +84,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::get)
return to_js_value(wasm_value, global_object);
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::set)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyTablePrototype::set)
{
auto index = TRY_OR_DISCARD(vm.argument(0).to_u32(global_object));
@@ -121,7 +121,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::set)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(WebAssemblyTablePrototype::length_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(WebAssemblyTablePrototype::length_getter)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
if (!is<WebAssemblyTableObject>(this_object)) {
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h
index e3075c63ae..9e034e70c0 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h
@@ -27,10 +27,10 @@ public:
virtual void initialize(JS::GlobalObject& global_object) override;
private:
- JS_DECLARE_NATIVE_FUNCTION(grow);
- JS_DECLARE_NATIVE_FUNCTION(get);
- JS_DECLARE_NATIVE_FUNCTION(set);
- JS_DECLARE_NATIVE_FUNCTION(length_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(grow);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(get);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(set);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(length_getter);
};
}
diff --git a/Userland/Services/WebContent/ConsoleGlobalObject.cpp b/Userland/Services/WebContent/ConsoleGlobalObject.cpp
index 69dede6e7c..a1f1e15ba2 100644
--- a/Userland/Services/WebContent/ConsoleGlobalObject.cpp
+++ b/Userland/Services/WebContent/ConsoleGlobalObject.cpp
@@ -98,7 +98,7 @@ JS::ThrowCompletionOr<JS::MarkedValueList> ConsoleGlobalObject::internal_own_pro
return m_window_object->internal_own_property_keys();
}
-JS_DEFINE_NATIVE_FUNCTION(ConsoleGlobalObject::inspected_node_getter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ConsoleGlobalObject::inspected_node_getter)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
diff --git a/Userland/Services/WebContent/ConsoleGlobalObject.h b/Userland/Services/WebContent/ConsoleGlobalObject.h
index d3d5fa652f..c25708d1e9 100644
--- a/Userland/Services/WebContent/ConsoleGlobalObject.h
+++ b/Userland/Services/WebContent/ConsoleGlobalObject.h
@@ -41,7 +41,7 @@ private:
virtual void visit_edges(Visitor&) override;
// Because $0 is not a nice C++ function name
- JS_DECLARE_NATIVE_FUNCTION(inspected_node_getter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(inspected_node_getter);
Web::Bindings::WindowObject* m_window_object;
};
diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp
index 9bafd2ccaa..68184ea9d4 100644
--- a/Userland/Utilities/js.cpp
+++ b/Userland/Utilities/js.cpp
@@ -77,11 +77,11 @@ public:
virtual ~ReplObject() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(exit_interpreter);
- JS_DECLARE_NATIVE_FUNCTION(repl_help);
- JS_DECLARE_NATIVE_FUNCTION(load_file);
- JS_DECLARE_NATIVE_FUNCTION(save_to_file);
- JS_DECLARE_NATIVE_FUNCTION(load_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(exit_interpreter);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(repl_help);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(load_file);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(save_to_file);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(load_json);
};
class ScriptObject final : public JS::GlobalObject {
@@ -93,8 +93,8 @@ public:
virtual ~ScriptObject() override = default;
private:
- JS_DECLARE_NATIVE_FUNCTION(load_file);
- JS_DECLARE_NATIVE_FUNCTION(load_json);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(load_file);
+ JS_DECLARE_OLD_NATIVE_FUNCTION(load_json);
};
static bool s_dump_ast = false;
@@ -948,7 +948,7 @@ void ReplObject::initialize_global_object()
define_native_function("loadJSON", load_json, 1, attr);
}
-JS_DEFINE_NATIVE_FUNCTION(ReplObject::save_to_file)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReplObject::save_to_file)
{
if (!vm.argument_count())
return JS::Value(false);
@@ -960,14 +960,14 @@ JS_DEFINE_NATIVE_FUNCTION(ReplObject::save_to_file)
return JS::Value(false);
}
-JS_DEFINE_NATIVE_FUNCTION(ReplObject::exit_interpreter)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReplObject::exit_interpreter)
{
if (!vm.argument_count())
exit(0);
exit(TRY_OR_DISCARD(vm.argument(0).to_number(global_object)).as_double());
}
-JS_DEFINE_NATIVE_FUNCTION(ReplObject::repl_help)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReplObject::repl_help)
{
outln("REPL commands:");
outln(" exit(code): exit the REPL with specified code. Defaults to 0.");
@@ -977,12 +977,12 @@ JS_DEFINE_NATIVE_FUNCTION(ReplObject::repl_help)
return JS::js_undefined();
}
-JS_DEFINE_NATIVE_FUNCTION(ReplObject::load_file)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReplObject::load_file)
{
return load_file_impl(vm, global_object);
}
-JS_DEFINE_NATIVE_FUNCTION(ReplObject::load_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ReplObject::load_json)
{
return load_json_impl(vm, global_object);
}
@@ -996,12 +996,12 @@ void ScriptObject::initialize_global_object()
define_native_function("loadJSON", load_json, 1, attr);
}
-JS_DEFINE_NATIVE_FUNCTION(ScriptObject::load_file)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ScriptObject::load_file)
{
return load_file_impl(vm, global_object);
}
-JS_DEFINE_NATIVE_FUNCTION(ScriptObject::load_json)
+JS_DEFINE_OLD_NATIVE_FUNCTION(ScriptObject::load_json)
{
return load_json_impl(vm, global_object);
}