Skip to content

Commit

Permalink
Update to use const generics over runtime param
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwilliams committed Aug 20, 2024
1 parent ef0dbdd commit 4880a89
Show file tree
Hide file tree
Showing 51 changed files with 69 additions and 58 deletions.
2 changes: 1 addition & 1 deletion core/engine/src/builtins/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl IntrinsicObject for Array {

let unscopables_object = Self::unscopables_object();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 41, 5)
BuiltInBuilder::from_standard_constructor::<Self, 41, 5>(realm)
// Static Methods
.static_method(Self::from, js_string!("from"), 1)
.static_method(Self::is_array, js_string!("isArray"), 1)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/array_buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl IntrinsicObject for ArrayBuffer {
.name(js_string!("get detached"))
.build();

let builder = BuiltInBuilder::from_standard_constructor::<Self>(realm, 9, 2)
let builder = BuiltInBuilder::from_standard_constructor::<Self, 9, 2>(realm)
.static_accessor(
JsSymbol::species(),
Some(get_species),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/array_buffer/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl IntrinsicObject for SharedArrayBuffer {
.name(js_string!("get maxByteLength"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 6, 1)
BuiltInBuilder::from_standard_constructor::<Self, 6, 1>(realm)
.static_accessor(
JsSymbol::species(),
Some(get_species),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/async_function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl IntrinsicObject for AsyncFunction {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 1, 0)
BuiltInBuilder::from_standard_constructor::<Self, 1, 0>(realm)
.prototype(realm.intrinsics().constructors().function().constructor())
.inherits(Some(
realm.intrinsics().constructors().function().prototype(),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/async_generator_function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl IntrinsicObject for AsyncGeneratorFunction {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.inherits(Some(
realm.intrinsics().constructors().function().prototype(),
))
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/bigint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl IntrinsicObject for BigInt {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 3, 2)
BuiltInBuilder::from_standard_constructor::<Self, 3, 2>(realm)
.method(Self::to_string, js_string!("toString"), 0)
.method(Self::value_of, js_string!("valueOf"), 0)
.static_method(Self::as_int_n, js_string!("asIntN"), 2)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/boolean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl IntrinsicObject for Boolean {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.method(Self::to_string, js_string!("toString"), 0)
.method(Self::value_of, js_string!("valueOf"), 0)
.build();
Expand Down
22 changes: 13 additions & 9 deletions core/engine/src/builtins/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,24 +525,28 @@ impl<'ctx> BuiltInBuilder<'ctx, OrdinaryObject> {

impl<'ctx> BuiltInBuilder<'ctx, Callable<Constructor>> {
/// Create a new builder for a constructor function setting the properties ahead of time for optimizations (less reallocations)
pub(crate) fn from_standard_constructor<SC: BuiltInConstructor>(
/// Const Generic `P` is the minimum storage capacity for the prototype's Property table.
/// Const Generic `SP` is the minimum storage capacity for the object's Static Property table.
pub(crate) fn from_standard_constructor<
SC: BuiltInConstructor,
const P: usize,
const SP: usize,
>(
realm: &'ctx Realm,
// Sets the minimum storage capacity for the prototype's property table.
num_prototype_properties: usize,
// Sets the minimum storage capacity for the object's property table.
num_own_properties: usize,
) -> BuiltInConstructorWithPrototype<'ctx> {
// The number of properties that are always present in a standard constructor. See build method
const OWN_PROPS: usize = 3;
let constructor = SC::STANDARD_CONSTRUCTOR(realm.intrinsics().constructors());
BuiltInConstructorWithPrototype {
realm,
function: SC::constructor,
name: js_string!(SC::NAME),
length: SC::LENGTH,
object_property_table: PropertyTableInner::with_capacity(num_own_properties),
object_storage: Vec::with_capacity(num_own_properties),
object_property_table: PropertyTableInner::with_capacity(SP + OWN_PROPS),
object_storage: Vec::with_capacity(SP + OWN_PROPS),
object: constructor.constructor(),
prototype_property_table: PropertyTableInner::with_capacity(num_prototype_properties),
prototype_storage: Vec::with_capacity(num_prototype_properties),
prototype_property_table: PropertyTableInner::with_capacity(P),
prototype_storage: Vec::with_capacity(P),
prototype: constructor.prototype(),
__proto__: Some(realm.intrinsics().constructors().function().prototype()),
inherits: Some(realm.intrinsics().constructors().object().prototype()),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/dataview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl IntrinsicObject for DataView {
.name(js_string!("get byteOffset"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 24, 0)
BuiltInBuilder::from_standard_constructor::<Self, 24, 0>(realm)
.accessor(
js_string!("buffer"),
Some(get_buffer),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/date/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl IntrinsicObject for Date {
.length(1)
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 47, 3)
BuiltInBuilder::from_standard_constructor::<Self, 47, 3>(realm)
.static_method(Self::now, js_string!("now"), 0)
.static_method(Self::parse, js_string!("parse"), 1)
.static_method(Self::utc, js_string!("UTC"), 7)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl IntrinsicObject for AggregateError {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

let attribute = Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;
BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.prototype(realm.intrinsics().constructors().error().constructor())
.inherits(Some(realm.intrinsics().constructors().error().prototype()))
.property(js_str!("name"), Self::NAME, attribute)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl IntrinsicObject for EvalError {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

let attribute = Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;
BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.prototype(realm.intrinsics().constructors().error().constructor())
.inherits(Some(realm.intrinsics().constructors().error().prototype()))
.property(js_str!("name"), Self::NAME, attribute)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl IntrinsicObject for Error {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

let attribute = Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;
BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.property(js_string!("name"), Self::NAME, attribute)
.property(js_string!("message"), js_string!(), attribute)
.method(Self::to_string, js_string!("toString"), 0)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl IntrinsicObject for RangeError {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

let attribute = Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;
BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.prototype(realm.intrinsics().constructors().error().constructor())
.inherits(Some(realm.intrinsics().constructors().error().prototype()))
.property(js_str!("name"), Self::NAME, attribute)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl IntrinsicObject for ReferenceError {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

let attribute = Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;
BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.prototype(realm.intrinsics().constructors().error().constructor())
.inherits(Some(realm.intrinsics().constructors().error().prototype()))
.property(js_str!("name"), Self::NAME, attribute)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl IntrinsicObject for SyntaxError {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

let attribute = Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;
BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.prototype(realm.intrinsics().constructors().error().constructor())
.inherits(Some(realm.intrinsics().constructors().error().prototype()))
.property(js_str!("name"), Self::NAME, attribute)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl IntrinsicObject for TypeError {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

let attribute = Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;
BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.prototype(realm.intrinsics().constructors().error().constructor())
.inherits(Some(realm.intrinsics().constructors().error().prototype()))
.property(js_str!("name"), Self::NAME, attribute)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/uri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl IntrinsicObject for UriError {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

let attribute = Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;
BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.prototype(realm.intrinsics().constructors().error().constructor())
.inherits(Some(realm.intrinsics().constructors().error().prototype()))
.property(js_str!("name"), Self::NAME, attribute)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ impl IntrinsicObject for BuiltInFunctionObject {

let throw_type_error = realm.intrinsics().objects().throw_type_error();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 7, 0)
BuiltInBuilder::from_standard_constructor::<Self, 7, 0>(realm)
.method(Self::apply, js_string!("apply"), 2)
.method(Self::bind, js_string!("bind"), 1)
.method(Self::call, js_string!("call"), 1)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/generator_function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl IntrinsicObject for GeneratorFunction {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 2, 0)
BuiltInBuilder::from_standard_constructor::<Self, 2, 0>(realm)
.inherits(Some(
realm.intrinsics().constructors().function().prototype(),
))
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/collator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl IntrinsicObject for Collator {
.name(js_string!("get compare"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 3, 1)
BuiltInBuilder::from_standard_constructor::<Self, 3, 1>(realm)
.static_method(
Self::supported_locales_of,
js_string!("supportedLocalesOf"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/date_time_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl IntrinsicObject for DateTimeFormat {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 0, 0).build();
BuiltInBuilder::from_standard_constructor::<Self, 0, 0>(realm).build();
}

fn get(intrinsics: &Intrinsics) -> JsObject {
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/list_format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl IntrinsicObject for ListFormat {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 4, 1)
BuiltInBuilder::from_standard_constructor::<Self, 4, 1>(realm)
.static_method(
Self::supported_locales_of,
js_string!("supportedLocalesOf"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/locale/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl IntrinsicObject for Locale {
.name(js_string!("get region"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 14, 0)
BuiltInBuilder::from_standard_constructor::<Self, 14, 0>(realm)
.property(
JsSymbol::to_string_tag(),
js_string!("Intl.Locale"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/number_format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl IntrinsicObject for NumberFormat {
.name(js_string!("get format"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 3, 1)
BuiltInBuilder::from_standard_constructor::<Self, 3, 1>(realm)
.static_method(
Self::supported_locales_of,
js_string!("supportedLocalesOf"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/plural_rules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl IntrinsicObject for PluralRules {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 4, 1)
BuiltInBuilder::from_standard_constructor::<Self, 4, 1>(realm)
.static_method(
Self::supported_locales_of,
js_string!("supportedLocalesOf"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/segmenter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl IntrinsicObject for Segmenter {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 3, 1)
BuiltInBuilder::from_standard_constructor::<Self, 3, 1>(realm)
.static_method(
Self::supported_locales_of,
js_string!("supportedLocalesOf"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl IntrinsicObject for Map {
.name(js_string!("entries"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 11, 2)
BuiltInBuilder::from_standard_constructor::<Self, 11, 2>(realm)
.static_method(Self::group_by, js_string!("groupBy"), 2)
.static_accessor(
JsSymbol::species(),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/number/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl IntrinsicObject for Number {

let attribute = Attribute::READONLY | Attribute::NON_ENUMERABLE | Attribute::PERMANENT;

BuiltInBuilder::from_standard_constructor::<Self>(realm, 6, 14)
BuiltInBuilder::from_standard_constructor::<Self, 6, 14>(realm)
.static_property(js_string!("EPSILON"), f64::EPSILON, attribute)
.static_property(
js_string!("MAX_SAFE_INTEGER"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl IntrinsicObject for OrdinaryObject {
.name(js_string!("set __proto__"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 11, 23)
BuiltInBuilder::from_standard_constructor::<Self, 11, 23>(realm)
.inherits(None)
.accessor(
js_string!("__proto__"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/promise/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl IntrinsicObject for Promise {
.name(js_string!("get [Symbol.species]"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 4, 9)
BuiltInBuilder::from_standard_constructor::<Self, 4, 9>(realm)
.static_method(Self::all, js_string!("all"), 1)
.static_method(Self::all_settled, js_string!("allSettled"), 1)
.static_method(Self::any, js_string!("any"), 1)
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl IntrinsicObject for Proxy {
fn init(realm: &Realm) {
let _timer = Profiler::global().start_event(std::any::type_name::<Self>(), "init");

BuiltInBuilder::from_standard_constructor::<Self>(realm, 0, 1)
BuiltInBuilder::from_standard_constructor::<Self, 0, 1>(realm)
.static_method(Self::revocable, js_string!("revocable"), 2)
.build_without_prototype();
}
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/regexp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl IntrinsicObject for RegExp {
let get_source = BuiltInBuilder::callable(realm, Self::get_source)
.name(js_string!("get source"))
.build();
let regexp = BuiltInBuilder::from_standard_constructor::<Self>(realm, 19, 1)
let regexp = BuiltInBuilder::from_standard_constructor::<Self, 19, 1>(realm)
.static_accessor(
JsSymbol::species(),
Some(get_species),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/set/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl IntrinsicObject for Set {
.name(js_string!("values"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 11, 1)
BuiltInBuilder::from_standard_constructor::<Self, 11, 1>(realm)
.static_accessor(
JsSymbol::species(),
Some(get_species),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/string/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl IntrinsicObject for String {
let trim_right = trim_end.clone();

let attribute = Attribute::READONLY | Attribute::NON_ENUMERABLE | Attribute::PERMANENT;
let builder = BuiltInBuilder::from_standard_constructor::<Self>(realm, 36, 3)
let builder = BuiltInBuilder::from_standard_constructor::<Self, 36, 3>(realm)
.property(js_string!("length"), 0, attribute)
.property(
js_string!("trimStart"),
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/symbol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl IntrinsicObject for Symbol {
.name(js_string!("get description"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 5, 15)
BuiltInBuilder::from_standard_constructor::<Self, 5, 15>(realm)
.static_method(Self::for_, js_string!("for"), 1)
.static_method(Self::key_for, js_string!("keyFor"), 1)
.static_property(
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/duration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl IntrinsicObject for Duration {
.name(js_string!("get blank"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 22, 1)
BuiltInBuilder::from_standard_constructor::<Self, 22, 1>(realm)
.property(
JsSymbol::to_string_tag(),
StaticJsStrings::DURATION_TAG,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/instant/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl IntrinsicObject for Instant {
.name(js_string!("get epochNanoseconds"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 13, 4)
BuiltInBuilder::from_standard_constructor::<Self, 13, 4>(realm)
.property(
JsSymbol::to_string_tag(),
StaticJsStrings::INSTANT_TAG,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/plain_date/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl IntrinsicObject for PlainDate {
.name(js_string!("get inLeapYear"))
.build();

BuiltInBuilder::from_standard_constructor::<Self>(realm, 26, 2)
BuiltInBuilder::from_standard_constructor::<Self, 26, 2>(realm)
.property(
JsSymbol::to_string_tag(),
StaticJsStrings::PLAIN_DATE_TAG,
Expand Down
Loading

0 comments on commit 4880a89

Please sign in to comment.