diff --git a/nova_vm/src/builtin_strings b/nova_vm/src/builtin_strings index 694d430f1..14fbf413c 100644 --- a/nova_vm/src/builtin_strings +++ b/nova_vm/src/builtin_strings @@ -329,6 +329,7 @@ parseFloat parseInt #[cfg(feature = "proposal-atomics-microwait")]pause #[cfg(feature = "math")]PI +#[cfg(feature = "temporal")]PlainTime pop POSITIVE_INFINITY #[cfg(feature = "math")]pow @@ -454,6 +455,7 @@ SyntaxError #[cfg(feature = "temporal")]Temporal #[cfg(feature = "temporal")]Temporal.Duration #[cfg(feature = "temporal")]Temporal.Instant +#[cfg(feature = "temporal")]Temporal.PlainTime #[cfg(feature = "math")]tan #[cfg(feature = "math")]tanh #[cfg(feature = "regexp")]test diff --git a/nova_vm/src/ecmascript/builtins/ordinary.rs b/nova_vm/src/ecmascript/builtins/ordinary.rs index 3f53f7c69..d521acf17 100644 --- a/nova_vm/src/ecmascript/builtins/ordinary.rs +++ b/nova_vm/src/ecmascript/builtins/ordinary.rs @@ -19,7 +19,7 @@ use crate::ecmascript::SharedDataViewRecord; #[cfg(feature = "array-buffer")] use crate::ecmascript::try_get_result_into_value; #[cfg(feature = "temporal")] -use crate::ecmascript::{DurationRecord, InstantRecord}; +use crate::ecmascript::{DurationRecord, InstantRecord, PlainTimeRecord}; use crate::{ ecmascript::{ Agent, ArgumentsList, BUILTIN_STRING_MEMORY, ExceptionType, Function, InternalMethods, @@ -1657,6 +1657,8 @@ pub(crate) fn ordinary_object_create_with_intrinsics<'a>( ProtoIntrinsics::TemporalInstant => agent.heap.create(InstantRecord::default()).into(), #[cfg(feature = "temporal")] ProtoIntrinsics::TemporalDuration => agent.heap.create(DurationRecord::default()).into(), + #[cfg(feature = "temporal")] + ProtoIntrinsics::TemporalPlainTime => agent.heap.create(PlainTimeRecord::default()).into(), ProtoIntrinsics::TypeError => agent .heap .create(ErrorHeapData::new(ExceptionType::TypeError, None, None)) @@ -2094,6 +2096,8 @@ fn get_intrinsic_constructor<'a>( ProtoIntrinsics::TemporalInstant => Some(intrinsics.temporal_instant().into()), #[cfg(feature = "temporal")] ProtoIntrinsics::TemporalDuration => Some(intrinsics.temporal_duration().into()), + #[cfg(feature = "temporal")] + ProtoIntrinsics::TemporalPlainTime => Some(intrinsics.temporal_plain_time().into()), } } diff --git a/nova_vm/src/ecmascript/builtins/temporal.rs b/nova_vm/src/ecmascript/builtins/temporal.rs index 27d2bb8d6..4b088e3de 100644 --- a/nova_vm/src/ecmascript/builtins/temporal.rs +++ b/nova_vm/src/ecmascript/builtins/temporal.rs @@ -6,11 +6,13 @@ mod duration; mod error; mod instant; mod options; +mod plain_time; pub use duration::*; pub(crate) use error::*; pub use instant::*; pub(crate) use options::*; +pub use plain_time::*; use temporal_rs::{ options::{DifferenceSettings, RoundingIncrement, RoundingMode, Unit, UnitGroup}, @@ -36,9 +38,10 @@ impl TemporalObject { let instant_constructor = intrinsics.temporal_instant(); let duration_constructor = intrinsics.temporal_duration(); + let plain_time_constructor = intrinsics.temporal_plain_time(); OrdinaryObjectBuilder::new_intrinsic_object(agent, realm, this) - .with_property_capacity(3) + .with_property_capacity(4) .with_prototype(object_prototype) // 1.2.1 Temporal.Instant ( . . . ) .with_property(|builder| { @@ -52,6 +55,14 @@ impl TemporalObject { // 1.2.2 Temporal.PlainDateTime ( . . . ) // 1.2.3 Temporal.PlainDate ( . . . ) // 1.2.4 Temporal.PlainTime ( . . . ) + .with_property(|builder| { + builder + .with_key(BUILTIN_STRING_MEMORY.PlainTime.into()) + .with_value(plain_time_constructor.into()) + .with_enumerable(false) + .with_configurable(true) + .build() + }) // 1.2.5 Temporal.PlainYearMonth ( . . . ) // 1.2.6 Temporal.PlainMonthDay ( . . . ) // 1.2.7 Temporal.Duration ( . . . ) diff --git a/nova_vm/src/ecmascript/builtins/temporal/plain_time.rs b/nova_vm/src/ecmascript/builtins/temporal/plain_time.rs new file mode 100644 index 000000000..be1ce4ae3 --- /dev/null +++ b/nova_vm/src/ecmascript/builtins/temporal/plain_time.rs @@ -0,0 +1,79 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +mod data; +mod plain_time_constructor; +mod plain_time_prototype; + +pub(crate) use data::*; +pub(crate) use plain_time_constructor::*; +pub(crate) use plain_time_prototype::*; + +use crate::{ + ecmascript::{ + Agent, InternalMethods, InternalSlots, OrdinaryObject, ProtoIntrinsics, object_handle, + }, + engine::Bindable, + heap::{ + ArenaAccess, ArenaAccessMut, BaseIndex, CompactionLists, CreateHeapData, Heap, + HeapMarkAndSweep, HeapSweepWeakReference, WorkQueues, arena_vec_access, + }, +}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[repr(transparent)] +pub struct TemporalPlainTime<'a>(BaseIndex<'a, PlainTimeRecord<'static>>); +object_handle!(TemporalPlainTime, PlainTime); +arena_vec_access!( + TemporalPlainTime, + 'a, + PlainTimeRecord, + plain_times +); + +impl TemporalPlainTime<'_> { + pub(crate) fn _inner_plain_time(self, agent: &Agent) -> &temporal_rs::PlainTime { + &self.unbind().get(agent)._plain_time + } +} + +impl<'a> InternalSlots<'a> for TemporalPlainTime<'a> { + const DEFAULT_PROTOTYPE: ProtoIntrinsics = ProtoIntrinsics::TemporalPlainTime; + fn get_backing_object(self, agent: &Agent) -> Option> { + self.get(agent).object_index.unbind() + } + fn set_backing_object(self, agent: &mut Agent, backing_object: OrdinaryObject<'static>) { + assert!( + self.get_mut(agent) + .object_index + .replace(backing_object) + .is_none() + ); + } +} + +impl<'a> InternalMethods<'a> for TemporalPlainTime<'a> {} + +impl HeapMarkAndSweep for TemporalPlainTime<'static> { + fn mark_values(&self, queues: &mut WorkQueues) { + queues.plain_times.push(*self); + } + fn sweep_values(&mut self, compactions: &CompactionLists) { + compactions.plain_times.shift_index(&mut self.0); + } +} + +impl HeapSweepWeakReference for TemporalPlainTime<'static> { + fn sweep_weak_reference(self, compactions: &CompactionLists) -> Option { + compactions.plain_times.shift_weak_index(self.0).map(Self) + } +} + +impl<'a> CreateHeapData, TemporalPlainTime<'a>> for Heap { + fn create(&mut self, data: PlainTimeRecord<'a>) -> TemporalPlainTime<'a> { + self.plain_times.push(data.unbind()); + self.alloc_counter += core::mem::size_of::>(); + TemporalPlainTime(BaseIndex::last(&self.plain_times)) + } +} diff --git a/nova_vm/src/ecmascript/builtins/temporal/plain_time/data.rs b/nova_vm/src/ecmascript/builtins/temporal/plain_time/data.rs new file mode 100644 index 000000000..396fb9d0c --- /dev/null +++ b/nova_vm/src/ecmascript/builtins/temporal/plain_time/data.rs @@ -0,0 +1,46 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +use crate::{ + ecmascript::OrdinaryObject, + engine::{NoGcScope, bindable_handle, trivially_bindable}, + heap::{CompactionLists, HeapMarkAndSweep, WorkQueues}, +}; + +#[derive(Debug, Clone, Copy)] +pub struct PlainTimeRecord<'a> { + pub(crate) object_index: Option>, + pub(crate) _plain_time: temporal_rs::PlainTime, +} + +impl PlainTimeRecord<'_> { + pub fn default() -> Self { + Self { + object_index: None, + _plain_time: temporal_rs::PlainTime::try_new(0, 0, 0, 0, 0, 0).unwrap(), + } + } +} + +trivially_bindable!(temporal_rs::PlainTime); +bindable_handle!(PlainTimeRecord); + +impl HeapMarkAndSweep for PlainTimeRecord<'static> { + fn mark_values(&self, queues: &mut WorkQueues) { + let Self { + object_index, + _plain_time: _, + } = self; + + object_index.mark_values(queues); + } + fn sweep_values(&mut self, compactions: &CompactionLists) { + let Self { + object_index, + _plain_time: _, + } = self; + + object_index.sweep_values(compactions); + } +} diff --git a/nova_vm/src/ecmascript/builtins/temporal/plain_time/plain_time_constructor.rs b/nova_vm/src/ecmascript/builtins/temporal/plain_time/plain_time_constructor.rs new file mode 100644 index 000000000..dfdaa712f --- /dev/null +++ b/nova_vm/src/ecmascript/builtins/temporal/plain_time/plain_time_constructor.rs @@ -0,0 +1,49 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +use crate::{ + ecmascript::{ + Agent, ArgumentsList, BUILTIN_STRING_MEMORY, Behaviour, Builtin, + BuiltinIntrinsicConstructor, JsResult, Object, Realm, String, Value, + builders::BuiltinFunctionBuilder, + }, + engine::{GcScope, NoGcScope}, + heap::IntrinsicConstructorIndexes, +}; + +/// Constructor function object for %Temporal.PlainTime%. +pub(crate) struct TemporalPlainTimeConstructor; + +impl Builtin for TemporalPlainTimeConstructor { + const NAME: String<'static> = BUILTIN_STRING_MEMORY.PlainTime; + const LENGTH: u8 = 0; + const BEHAVIOUR: Behaviour = Behaviour::Constructor(TemporalPlainTimeConstructor::constructor); +} +impl BuiltinIntrinsicConstructor for TemporalPlainTimeConstructor { + const INDEX: IntrinsicConstructorIndexes = IntrinsicConstructorIndexes::TemporalPlainTime; +} + +impl TemporalPlainTimeConstructor { + fn constructor<'gc>( + agent: &mut Agent, + _: Value, + _args: ArgumentsList, + _new_target: Option, + gc: GcScope<'gc, '_>, + ) -> JsResult<'gc, Value<'gc>> { + Err(agent.todo("Temporal.PlainTime", gc.into_nogc())) + } + + pub(crate) fn create_intrinsic(agent: &mut Agent, realm: Realm<'static>, _gc: NoGcScope) { + let intrinsics = agent.get_realm_record_by_id(realm).intrinsics(); + let plain_time_prototype = intrinsics.temporal_plain_time_prototype(); + + BuiltinFunctionBuilder::new_intrinsic_constructor::( + agent, realm, + ) + .with_property_capacity(1) + .with_prototype_property(plain_time_prototype.into()) + .build(); + } +} diff --git a/nova_vm/src/ecmascript/builtins/temporal/plain_time/plain_time_prototype.rs b/nova_vm/src/ecmascript/builtins/temporal/plain_time/plain_time_prototype.rs new file mode 100644 index 000000000..a8ef313cb --- /dev/null +++ b/nova_vm/src/ecmascript/builtins/temporal/plain_time/plain_time_prototype.rs @@ -0,0 +1,33 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +use crate::{ + ecmascript::{Agent, BUILTIN_STRING_MEMORY, Realm, builders::OrdinaryObjectBuilder}, + engine::NoGcScope, + heap::WellKnownSymbols, +}; + +pub(crate) struct TemporalPlainTimePrototype; +impl TemporalPlainTimePrototype { + pub fn create_intrinsic(agent: &mut Agent, realm: Realm<'static>, _: NoGcScope) { + let intrinsics = agent.get_realm_record_by_id(realm).intrinsics(); + let this = intrinsics.temporal_plain_time_prototype(); + let object_prototype = intrinsics.object_prototype(); + let plain_time_constructor = intrinsics.temporal_plain_time(); + + OrdinaryObjectBuilder::new_intrinsic_object(agent, realm, this) + .with_property_capacity(2) + .with_prototype(object_prototype) + .with_constructor_property(plain_time_constructor) + .with_property(|builder| { + builder + .with_key(WellKnownSymbols::ToStringTag.into()) + .with_value_readonly(BUILTIN_STRING_MEMORY.Temporal_PlainTime.into()) + .with_enumerable(false) + .with_configurable(true) + .build() + }) + .build(); + } +} diff --git a/nova_vm/src/ecmascript/execution/realm/intrinsics.rs b/nova_vm/src/ecmascript/execution/realm/intrinsics.rs index 0ae0e6f9c..42a4410f3 100644 --- a/nova_vm/src/ecmascript/execution/realm/intrinsics.rs +++ b/nova_vm/src/ecmascript/execution/realm/intrinsics.rs @@ -27,7 +27,8 @@ use crate::ecmascript::{SharedArrayBufferConstructor, SharedArrayBufferPrototype #[cfg(feature = "temporal")] use crate::ecmascript::{ TemporalDurationConstructor, TemporalDurationPrototype, TemporalInstantConstructor, - TemporalInstantPrototype, TemporalObject, + TemporalInstantPrototype, TemporalObject, TemporalPlainTimeConstructor, + TemporalPlainTimePrototype, }; #[cfg(feature = "weak-refs")] use crate::ecmascript::{ @@ -140,6 +141,8 @@ pub enum ProtoIntrinsics { TemporalInstant, #[cfg(feature = "temporal")] TemporalDuration, + #[cfg(feature = "temporal")] + TemporalPlainTime, TypeError, #[cfg(feature = "array-buffer")] Uint16Array, @@ -220,17 +223,16 @@ impl Intrinsics { BigIntConstructor::create_intrinsic(agent, realm); #[cfg(feature = "math")] MathObject::create_intrinsic(agent, realm, gc); - - #[cfg(feature = "temporal")] - TemporalObject::create_intrinsic(agent, realm, gc); - #[cfg(feature = "temporal")] - TemporalInstantPrototype::create_intrinsic(agent, realm, gc); #[cfg(feature = "temporal")] - TemporalInstantConstructor::create_intrinsic(agent, realm, gc); - #[cfg(feature = "temporal")] - TemporalDurationPrototype::create_intrinsic(agent, realm, gc); - #[cfg(feature = "temporal")] - TemporalDurationConstructor::create_intrinsic(agent, realm, gc); + { + TemporalObject::create_intrinsic(agent, realm, gc); + TemporalInstantPrototype::create_intrinsic(agent, realm, gc); + TemporalInstantConstructor::create_intrinsic(agent, realm, gc); + TemporalDurationPrototype::create_intrinsic(agent, realm, gc); + TemporalDurationConstructor::create_intrinsic(agent, realm, gc); + TemporalPlainTimePrototype::create_intrinsic(agent, realm, gc); + TemporalPlainTimeConstructor::create_intrinsic(agent, realm, gc); + } #[cfg(feature = "date")] DatePrototype::create_intrinsic(agent, realm); #[cfg(feature = "date")] @@ -344,6 +346,8 @@ impl Intrinsics { ProtoIntrinsics::TemporalInstant => self.temporal_instant().into(), #[cfg(feature = "temporal")] ProtoIntrinsics::TemporalDuration => self.temporal_duration().into(), + #[cfg(feature = "temporal")] + ProtoIntrinsics::TemporalPlainTime => self.temporal_plain_time().into(), ProtoIntrinsics::TypeError => self.type_error().into(), ProtoIntrinsics::URIError => self.uri_error().into(), ProtoIntrinsics::AggregateError => self.aggregate_error().into(), @@ -437,6 +441,8 @@ impl Intrinsics { ProtoIntrinsics::TemporalInstant => self.temporal_instant_prototype().into(), #[cfg(feature = "temporal")] ProtoIntrinsics::TemporalDuration => self.temporal_duration_prototype().into(), + #[cfg(feature = "temporal")] + ProtoIntrinsics::TemporalPlainTime => self.temporal_plain_time_prototype().into(), ProtoIntrinsics::TypeError => self.type_error_prototype().into(), ProtoIntrinsics::URIError => self.uri_error_prototype().into(), ProtoIntrinsics::AggregateError => self.aggregate_error_prototype().into(), @@ -970,6 +976,17 @@ impl Intrinsics { .get_builtin_function(self.builtin_function_index_base) } + /// %Temporal.PlainTime% + pub(crate) const fn temporal_plain_time(&self) -> BuiltinFunction<'static> { + IntrinsicConstructorIndexes::TemporalPlainTime + .get_builtin_function(self.builtin_function_index_base) + } + + /// %Temporal.PlainTime.Prototype% + pub(crate) const fn temporal_plain_time_prototype(&self) -> OrdinaryObject<'static> { + IntrinsicObjectIndexes::TemporalPlainTimePrototype + .get_backing_object(self.object_index_base) + } /// %Number.prototype% pub(crate) fn number_prototype(&self) -> PrimitiveObject<'static> { IntrinsicPrimitiveObjectIndexes::NumberPrototype diff --git a/nova_vm/src/ecmascript/execution/weak_key.rs b/nova_vm/src/ecmascript/execution/weak_key.rs index 80f8139d7..7ba997f2d 100644 --- a/nova_vm/src/ecmascript/execution/weak_key.rs +++ b/nova_vm/src/ecmascript/execution/weak_key.rs @@ -8,6 +8,10 @@ use crate::ecmascript::DATE_DISCRIMINANT; #[cfg(feature = "date")] use crate::ecmascript::Date; +#[cfg(feature = "temporal")] +use crate::ecmascript::PLAIN_TIME_DISCRIMINANT; +#[cfg(feature = "temporal")] +use crate::ecmascript::TemporalPlainTime; use crate::ecmascript::UnmappedArguments; #[cfg(feature = "array-buffer")] use crate::ecmascript::{ @@ -105,6 +109,8 @@ pub(crate) enum WeakKey<'a> { Instant(TemporalInstant<'a>) = INSTANT_DISCRIMINANT, #[cfg(feature = "temporal")] Duration(TemporalDuration<'a>) = DURATION_DISCRIMINANT, + #[cfg(feature = "temporal")] + PlainTime(TemporalPlainTime<'a>) = PLAIN_TIME_DISCRIMINANT, Error(Error<'a>) = ERROR_DISCRIMINANT, FinalizationRegistry(FinalizationRegistry<'a>) = FINALIZATION_REGISTRY_DISCRIMINANT, Map(Map<'a>) = MAP_DISCRIMINANT, @@ -223,6 +229,8 @@ impl<'a> From> for Value<'a> { WeakKey::Instant(d) => Self::Instant(d), #[cfg(feature = "temporal")] WeakKey::Duration(d) => Self::Duration(d), + #[cfg(feature = "temporal")] + WeakKey::PlainTime(d) => Self::PlainTime(d), WeakKey::Error(d) => Self::Error(d), WeakKey::FinalizationRegistry(d) => Self::FinalizationRegistry(d), WeakKey::Map(d) => Self::Map(d), @@ -334,6 +342,8 @@ impl<'a> From> for WeakKey<'a> { Object::Instant(d) => Self::Instant(d), #[cfg(feature = "temporal")] Object::Duration(d) => Self::Duration(d), + #[cfg(feature = "temporal")] + Object::PlainTime(d) => Self::PlainTime(d), Object::Error(d) => Self::Error(d), Object::FinalizationRegistry(d) => Self::FinalizationRegistry(d), Object::Map(d) => Self::Map(d), @@ -449,6 +459,8 @@ impl<'a> TryFrom> for Object<'a> { WeakKey::Instant(d) => Ok(Self::Instant(d)), #[cfg(feature = "temporal")] WeakKey::Duration(d) => Ok(Self::Duration(d)), + #[cfg(feature = "temporal")] + WeakKey::PlainTime(d) => Ok(Self::PlainTime(d)), WeakKey::Error(d) => Ok(Self::Error(d)), WeakKey::FinalizationRegistry(d) => Ok(Self::FinalizationRegistry(d)), WeakKey::Map(d) => Ok(Self::Map(d)), @@ -611,6 +623,8 @@ impl HeapMarkAndSweep for WeakKey<'static> { Self::Instant(d) => d.mark_values(queues), #[cfg(feature = "temporal")] Self::Duration(d) => d.mark_values(queues), + #[cfg(feature = "temporal")] + Self::PlainTime(d) => d.mark_values(queues), Self::Error(d) => d.mark_values(queues), Self::FinalizationRegistry(d) => d.mark_values(queues), Self::Map(d) => d.mark_values(queues), @@ -720,6 +734,8 @@ impl HeapMarkAndSweep for WeakKey<'static> { Self::Instant(d) => d.sweep_values(compactions), #[cfg(feature = "temporal")] Self::Duration(d) => d.sweep_values(compactions), + #[cfg(feature = "temporal")] + Self::PlainTime(d) => d.sweep_values(compactions), Self::Error(d) => d.sweep_values(compactions), Self::FinalizationRegistry(d) => d.sweep_values(compactions), Self::Map(d) => d.sweep_values(compactions), @@ -845,6 +861,8 @@ impl HeapSweepWeakReference for WeakKey<'static> { Self::Instant(data) => data.sweep_weak_reference(compactions).map(Self::Instant), #[cfg(feature = "temporal")] Self::Duration(data) => data.sweep_weak_reference(compactions).map(Self::Duration), + #[cfg(feature = "temporal")] + Self::PlainTime(data) => data.sweep_weak_reference(compactions).map(Self::PlainTime), Self::Error(data) => data.sweep_weak_reference(compactions).map(Self::Error), Self::FinalizationRegistry(data) => data .sweep_weak_reference(compactions) diff --git a/nova_vm/src/ecmascript/types/language/object.rs b/nova_vm/src/ecmascript/types/language/object.rs index ff8d33acf..9bd0b2c82 100644 --- a/nova_vm/src/ecmascript/types/language/object.rs +++ b/nova_vm/src/ecmascript/types/language/object.rs @@ -44,7 +44,8 @@ use crate::ecmascript::{ use crate::ecmascript::{DATE_DISCRIMINANT, Date}; #[cfg(feature = "temporal")] use crate::ecmascript::{ - DURATION_DISCRIMINANT, INSTANT_DISCRIMINANT, TemporalDuration, TemporalInstant, + DURATION_DISCRIMINANT, INSTANT_DISCRIMINANT, PLAIN_TIME_DISCRIMINANT, TemporalDuration, + TemporalInstant, TemporalPlainTime, }; #[cfg(feature = "proposal-float16array")] use crate::ecmascript::{FLOAT_16_ARRAY_DISCRIMINANT, Float16Array}; @@ -127,6 +128,8 @@ pub enum Object<'a> { Instant(TemporalInstant<'a>) = INSTANT_DISCRIMINANT, #[cfg(feature = "temporal")] Duration(TemporalDuration<'a>) = DURATION_DISCRIMINANT, + #[cfg(feature = "temporal")] + PlainTime(TemporalPlainTime<'a>) = PLAIN_TIME_DISCRIMINANT, Error(Error<'a>) = ERROR_DISCRIMINANT, FinalizationRegistry(FinalizationRegistry<'a>) = FINALIZATION_REGISTRY_DISCRIMINANT, Map(Map<'a>) = MAP_DISCRIMINANT, @@ -658,6 +661,8 @@ impl<'a> From> for Value<'a> { Object::Instant(data) => Value::Instant(data), #[cfg(feature = "temporal")] Object::Duration(data) => Value::Duration(data), + #[cfg(feature = "temporal")] + Object::PlainTime(data) => Value::PlainTime(data), Object::Error(data) => Self::Error(data), Object::FinalizationRegistry(data) => Self::FinalizationRegistry(data), Object::Map(data) => Self::Map(data), @@ -786,6 +791,8 @@ macro_rules! object_delegate { Object::Instant(data) => data.$method($($arg),+), #[cfg(feature = "temporal")] Object::Duration(data) => data.$method($($arg),+), + #[cfg(feature = "temporal")] + Object::PlainTime(data) => data.$method($($arg),+), Self::Error(data) => data.$method($($arg),+), Self::BoundFunction(data) => data.$method($($arg),+), Self::BuiltinFunction(data) => data.$method($($arg),+), @@ -1220,6 +1227,8 @@ impl HeapSweepWeakReference for Object<'static> { Self::Instant(data) => data.sweep_weak_reference(compactions).map(Self::Instant), #[cfg(feature = "temporal")] Self::Duration(data) => data.sweep_weak_reference(compactions).map(Self::Duration), + #[cfg(feature = "temporal")] + Self::PlainTime(data) => data.sweep_weak_reference(compactions).map(Self::PlainTime), Self::Error(data) => data.sweep_weak_reference(compactions).map(Self::Error), Self::BoundFunction(data) => data .sweep_weak_reference(compactions) @@ -1426,6 +1435,8 @@ impl From> for HeapRootData { Object::Duration(d) => Self::from(d), #[cfg(feature = "temporal")] Object::Instant(d) => Self::from(d), + #[cfg(feature = "temporal")] + Object::PlainTime(d) => Self::from(d), Object::Error(d) => Self::from(d), Object::FinalizationRegistry(d) => Self::from(d), Object::Map(d) => Self::from(d), @@ -1545,6 +1556,8 @@ impl TryFrom for Object<'_> { HeapRootData::Instant(o) => Ok(Self::from(o)), #[cfg(feature = "temporal")] HeapRootData::Duration(o) => Ok(Self::from(o)), + #[cfg(feature = "temporal")] + HeapRootData::PlainTime(o) => Ok(Self::from(o)), HeapRootData::Error(o) => Ok(Self::from(o)), HeapRootData::FinalizationRegistry(o) => Ok(Self::from(o)), HeapRootData::Map(o) => Ok(Self::from(o)), diff --git a/nova_vm/src/ecmascript/types/language/value.rs b/nova_vm/src/ecmascript/types/language/value.rs index 2dbe4038f..65170a262 100644 --- a/nova_vm/src/ecmascript/types/language/value.rs +++ b/nova_vm/src/ecmascript/types/language/value.rs @@ -24,7 +24,7 @@ use crate::ecmascript::{ SharedUint8Array, SharedUint8ClampedArray, SharedUint16Array, SharedUint32Array, }; #[cfg(feature = "temporal")] -use crate::ecmascript::{TemporalDuration, TemporalInstant}; +use crate::ecmascript::{TemporalDuration, TemporalInstant, TemporalPlainTime}; #[cfg(feature = "weak-refs")] use crate::ecmascript::{WeakMap, WeakRef, WeakSet}; use crate::{ @@ -143,6 +143,8 @@ pub enum Value<'a> { Instant(TemporalInstant<'a>), #[cfg(feature = "temporal")] Duration(TemporalDuration<'a>), + #[cfg(feature = "temporal")] + PlainTime(TemporalPlainTime<'a>), Error(Error<'a>), FinalizationRegistry(FinalizationRegistry<'a>), Map(Map<'a>), @@ -284,6 +286,9 @@ pub(crate) const INSTANT_DISCRIMINANT: u8 = #[cfg(feature = "temporal")] pub(crate) const DURATION_DISCRIMINANT: u8 = value_discriminant(Value::Duration(TemporalDuration::_DEF)); +#[cfg(feature = "temporal")] +pub(crate) const PLAIN_TIME_DISCRIMINANT: u8 = + value_discriminant(Value::PlainTime(TemporalPlainTime::_DEF)); pub(crate) const ERROR_DISCRIMINANT: u8 = value_discriminant(Value::Error(Error::_DEF)); pub(crate) const BUILTIN_FUNCTION_DISCRIMINANT: u8 = value_discriminant(Value::BuiltinFunction(BuiltinFunction::_DEF)); @@ -926,6 +931,8 @@ impl Rootable for Value<'_> { Self::Instant(instant) => Err(HeapRootData::from(instant)), #[cfg(feature = "temporal")] Self::Duration(duration) => Err(HeapRootData::from(duration)), + #[cfg(feature = "temporal")] + Self::PlainTime(plain_time) => Err(HeapRootData::from(plain_time)), Self::Error(error) => Err(HeapRootData::from(error)), Self::FinalizationRegistry(finalization_registry) => { Err(HeapRootData::from(finalization_registry)) @@ -1060,6 +1067,8 @@ impl Rootable for Value<'_> { HeapRootData::Instant(o) => Some(Self::from(o)), #[cfg(feature = "temporal")] HeapRootData::Duration(o) => Some(Self::from(o)), + #[cfg(feature = "temporal")] + HeapRootData::PlainTime(o) => Some(Self::from(o)), HeapRootData::Error(o) => Some(Self::from(o)), HeapRootData::FinalizationRegistry(o) => Some(Self::from(o)), HeapRootData::Map(o) => Some(Self::from(o)), @@ -1205,6 +1214,8 @@ impl HeapMarkAndSweep for Value<'static> { Self::Instant(data) => data.mark_values(queues), #[cfg(feature = "temporal")] Self::Duration(data) => data.mark_values(queues), + #[cfg(feature = "temporal")] + Self::PlainTime(data) => data.mark_values(queues), Self::Error(data) => data.mark_values(queues), Self::BoundFunction(data) => data.mark_values(queues), Self::BuiltinFunction(data) => data.mark_values(queues), @@ -1323,6 +1334,8 @@ impl HeapMarkAndSweep for Value<'static> { Self::Instant(data) => data.sweep_values(compactions), #[cfg(feature = "temporal")] Self::Duration(data) => data.sweep_values(compactions), + #[cfg(feature = "temporal")] + Self::PlainTime(data) => data.sweep_values(compactions), Self::Error(data) => data.sweep_values(compactions), Self::BoundFunction(data) => data.sweep_values(compactions), Self::BuiltinFunction(data) => data.sweep_values(compactions), @@ -1478,6 +1491,8 @@ fn map_object_to_static_string_repr(value: Value) -> String<'static> { Object::Instant(_) => BUILTIN_STRING_MEMORY._object_Object_, #[cfg(feature = "temporal")] Object::Duration(_) => BUILTIN_STRING_MEMORY._object_Object_, + #[cfg(feature = "temporal")] + Object::PlainTime(_) => BUILTIN_STRING_MEMORY._object_Object_, #[cfg(feature = "set")] Object::Set(_) | Object::SetIterator(_) => BUILTIN_STRING_MEMORY._object_Object_, #[cfg(feature = "weak-refs")] diff --git a/nova_vm/src/engine/bytecode/vm.rs b/nova_vm/src/engine/bytecode/vm.rs index aa45fde34..51fd5f0d3 100644 --- a/nova_vm/src/engine/bytecode/vm.rs +++ b/nova_vm/src/engine/bytecode/vm.rs @@ -1302,6 +1302,8 @@ pub(crate) fn typeof_operator(agent: &Agent, val: Value, gc: NoGcScope) -> Strin Value::Instant(_) => BUILTIN_STRING_MEMORY.object, #[cfg(feature = "temporal")] Value::Duration(_) => BUILTIN_STRING_MEMORY.object, + #[cfg(feature = "temporal")] + Value::PlainTime(_) => BUILTIN_STRING_MEMORY.object, // 13. If val has a [[Call]] internal slot, return "function". Value::BoundFunction(_) | Value::BuiltinFunction(_) | Value::ECMAScriptFunction(_) | Value::BuiltinConstructorFunction(_) | diff --git a/nova_vm/src/engine/rootable.rs b/nova_vm/src/engine/rootable.rs index b17b5221f..9c4874479 100644 --- a/nova_vm/src/engine/rootable.rs +++ b/nova_vm/src/engine/rootable.rs @@ -14,6 +14,10 @@ pub(crate) use private::{HeapRootCollection, Rootable, RootableCollection}; use crate::ecmascript::DATE_DISCRIMINANT; #[cfg(feature = "date")] use crate::ecmascript::Date; +#[cfg(feature = "temporal")] +use crate::ecmascript::PLAIN_TIME_DISCRIMINANT; +#[cfg(feature = "temporal")] +use crate::ecmascript::TemporalPlainTime; use crate::ecmascript::UnmappedArguments; #[cfg(feature = "array-buffer")] use crate::ecmascript::{ @@ -322,6 +326,7 @@ pub(crate) enum HeapRootData { #[cfg(feature = "temporal")] Duration(TemporalDuration<'static>) = DURATION_DISCRIMINANT, #[cfg(feature = "temporal")] + PlainTime(TemporalPlainTime<'static>) = PLAIN_TIME_DISCRIMINANT, Error(Error<'static>) = ERROR_DISCRIMINANT, FinalizationRegistry(FinalizationRegistry<'static>) = FINALIZATION_REGISTRY_DISCRIMINANT, Map(Map<'static>) = MAP_DISCRIMINANT, @@ -501,6 +506,8 @@ impl HeapMarkAndSweep for HeapRootData { Self::Instant(instant) => instant.mark_values(queues), #[cfg(feature = "temporal")] Self::Duration(duration) => duration.mark_values(queues), + #[cfg(feature = "temporal")] + Self::PlainTime(plaintime) => plaintime.mark_values(queues), Self::Error(error) => error.mark_values(queues), Self::FinalizationRegistry(finalization_registry) => { finalization_registry.mark_values(queues) @@ -654,6 +661,8 @@ impl HeapMarkAndSweep for HeapRootData { Self::Instant(instant) => instant.sweep_values(compactions), #[cfg(feature = "temporal")] Self::Duration(duration) => duration.sweep_values(compactions), + #[cfg(feature = "temporal")] + Self::PlainTime(o) => o.sweep_values(compactions), Self::Error(error) => error.sweep_values(compactions), Self::FinalizationRegistry(finalization_registry) => { finalization_registry.sweep_values(compactions) diff --git a/nova_vm/src/heap.rs b/nova_vm/src/heap.rs index 8413be662..a451335fe 100644 --- a/nova_vm/src/heap.rs +++ b/nova_vm/src/heap.rs @@ -27,7 +27,7 @@ use crate::ecmascript::{ VoidArray, }; #[cfg(feature = "temporal")] -use crate::ecmascript::{DurationRecord, InstantRecord}; +use crate::ecmascript::{DurationRecord, InstantRecord, PlainTimeRecord}; #[cfg(feature = "regexp")] use crate::ecmascript::{RegExpHeapData, RegExpStringIteratorRecord}; #[cfg(feature = "set")] @@ -81,6 +81,8 @@ pub(crate) struct Heap { pub(crate) instants: Vec>, #[cfg(feature = "temporal")] pub(crate) durations: Vec>, + #[cfg(feature = "temporal")] + pub(crate) plain_times: Vec>, pub(crate) ecmascript_functions: Vec>, /// ElementsArrays is where all keys and values arrays live; /// Element arrays are static arrays of Values plus @@ -232,6 +234,8 @@ impl Heap { instants: Vec::with_capacity(0), #[cfg(feature = "temporal")] durations: Vec::with_capacity(0), + #[cfg(feature = "temporal")] + plain_times: Vec::with_capacity(0), ecmascript_functions: Vec::with_capacity(1024), elements: ElementArrays { e2pow1: ElementArray2Pow1::with_capacity(1024), diff --git a/nova_vm/src/heap/heap_bits.rs b/nova_vm/src/heap/heap_bits.rs index 950bb2c14..901c9dcbd 100644 --- a/nova_vm/src/heap/heap_bits.rs +++ b/nova_vm/src/heap/heap_bits.rs @@ -30,7 +30,7 @@ use crate::ecmascript::{Set, SetIterator}; #[cfg(feature = "shared-array-buffer")] use crate::ecmascript::{SharedArrayBuffer, SharedDataView, SharedVoidArray}; #[cfg(feature = "temporal")] -use crate::ecmascript::{TemporalDuration, TemporalInstant}; +use crate::ecmascript::{TemporalDuration, TemporalInstant, TemporalPlainTime}; #[cfg(feature = "weak-refs")] use crate::ecmascript::{WeakMap, WeakRef, WeakSet}; use crate::{ @@ -421,6 +421,8 @@ pub(crate) struct HeapBits { pub(super) instants: BitRange, #[cfg(feature = "temporal")] pub(super) durations: BitRange, + #[cfg(feature = "temporal")] + pub(super) plain_times: BitRange, pub(super) declarative_environments: BitRange, pub(super) ecmascript_functions: BitRange, pub(super) embedder_objects: BitRange, @@ -501,6 +503,8 @@ pub(crate) struct WorkQueues<'a> { pub(crate) instants: Vec>, #[cfg(feature = "temporal")] pub(crate) durations: Vec>, + #[cfg(feature = "temporal")] + pub(crate) plain_times: Vec>, pub(crate) declarative_environments: Vec>, pub(crate) e_2_1: Vec>, pub(crate) e_2_2: Vec>, @@ -654,6 +658,8 @@ impl HeapBits { let instants = BitRange::from_bit_count_and_len(&mut bit_count, heap.instants.len()); #[cfg(feature = "temporal")] let durations = BitRange::from_bit_count_and_len(&mut bit_count, heap.durations.len()); + #[cfg(feature = "temporal")] + let plain_times = BitRange::from_bit_count_and_len(&mut bit_count, heap.plain_times.len()); let declarative_environments = BitRange::from_bit_count_and_len(&mut bit_count, heap.environments.declarative.len()); let ecmascript_functions = @@ -765,6 +771,8 @@ impl HeapBits { instants, #[cfg(feature = "temporal")] durations, + #[cfg(feature = "temporal")] + plain_times, declarative_environments, e_2_1, e_2_2, @@ -879,6 +887,8 @@ impl HeapBits { WeakKey::Instant(d) => self.instants.get_bit(d.get_index(), &self.bits), #[cfg(feature = "temporal")] WeakKey::Duration(d) => self.durations.get_bit(d.get_index(), &self.bits), + #[cfg(feature = "temporal")] + WeakKey::PlainTime(d) => self.plain_times.get_bit(d.get_index(), &self.bits), WeakKey::Error(d) => self.errors.get_bit(d.get_index(), &self.bits), WeakKey::FinalizationRegistry(d) => self .finalization_registrys @@ -1020,6 +1030,8 @@ impl<'a> WorkQueues<'a> { instants: Vec::with_capacity(heap.instants.len() / 4), #[cfg(feature = "temporal")] durations: Vec::with_capacity(heap.durations.len() / 4), + #[cfg(feature = "temporal")] + plain_times: Vec::with_capacity(heap.plain_times.len() / 4), declarative_environments: Vec::with_capacity(heap.environments.declarative.len() / 4), e_2_1: Vec::with_capacity(heap.elements.e2pow1.values.len() / 4), e_2_2: Vec::with_capacity(heap.elements.e2pow2.values.len() / 4), @@ -1130,6 +1142,8 @@ impl<'a> WorkQueues<'a> { instants, #[cfg(feature = "temporal")] durations, + #[cfg(feature = "temporal")] + plain_times, declarative_environments, e_2_1, e_2_2, @@ -1210,6 +1224,11 @@ impl<'a> WorkQueues<'a> { } = self; #[cfg(not(feature = "temporal"))] + let instants: &[bool; 0] = &[]; + #[cfg(not(feature = "temporal"))] + let durations: &[bool; 0] = &[]; + #[cfg(not(feature = "temporal"))] + let plain_times: &[bool; 0] = &[]; #[cfg(not(feature = "date"))] let dates: &[bool; 0] = &[]; #[cfg(not(feature = "array-buffer"))] @@ -1252,6 +1271,7 @@ impl<'a> WorkQueues<'a> { && dates.is_empty() && instants.is_empty() && durations.is_empty() + && plain_times.is_empty() && declarative_environments.is_empty() && e_2_1.is_empty() && e_2_2.is_empty() @@ -1615,6 +1635,8 @@ pub(crate) struct CompactionLists { pub(crate) instants: CompactionList, #[cfg(feature = "temporal")] pub(crate) durations: CompactionList, + #[cfg(feature = "temporal")] + pub(crate) plain_times: CompactionList, pub(crate) declarative_environments: CompactionList, pub(crate) e_2_1: CompactionList, pub(crate) e_2_2: CompactionList, @@ -1774,6 +1796,8 @@ impl CompactionLists { instants: CompactionList::from_mark_bits(&bits.instants, &bits.bits), #[cfg(feature = "temporal")] durations: CompactionList::from_mark_bits(&bits.durations, &bits.bits), + #[cfg(feature = "temporal")] + plain_times: CompactionList::from_mark_bits(&bits.plain_times, &bits.bits), errors: CompactionList::from_mark_bits(&bits.errors, &bits.bits), executables: CompactionList::from_mark_bits(&bits.executables, &bits.bits), maps: CompactionList::from_mark_bits(&bits.maps, &bits.bits), diff --git a/nova_vm/src/heap/heap_constants.rs b/nova_vm/src/heap/heap_constants.rs index 05df9d61a..fa5143ddc 100644 --- a/nova_vm/src/heap/heap_constants.rs +++ b/nova_vm/src/heap/heap_constants.rs @@ -39,6 +39,8 @@ pub(crate) enum IntrinsicObjectIndexes { TemporalInstantPrototype, #[cfg(feature = "temporal")] TemporalDurationPrototype, + #[cfg(feature = "temporal")] + TemporalPlainTimePrototype, // Text processing #[cfg(feature = "regexp")] @@ -180,6 +182,8 @@ pub(crate) enum IntrinsicConstructorIndexes { TemporalInstant, #[cfg(feature = "temporal")] TemporalDuration, + #[cfg(feature = "temporal")] + TemporalPlainTime, // Text processing String, diff --git a/nova_vm/src/heap/heap_gc.rs b/nova_vm/src/heap/heap_gc.rs index 313f56a0e..6f5fefd0e 100644 --- a/nova_vm/src/heap/heap_gc.rs +++ b/nova_vm/src/heap/heap_gc.rs @@ -86,6 +86,8 @@ pub(crate) fn heap_gc(agent: &mut Agent, root_realms: &mut [Option = queues.instants.drain(..).collect(); instant_marks.sort(); instant_marks.iter().for_each(|&idx| { @@ -539,6 +543,16 @@ pub(crate) fn heap_gc(agent: &mut Agent, root_realms: &mut [Option = + queues.plain_times.drain(..).collect(); + plain_time_marks.sort(); + plain_time_marks.iter().for_each(|&idx| { + let index = idx.get_index(); + if bits.plain_times.set_bit(index, &bits.bits) { + // Did mark. + plain_times.get(index).mark_values(&mut queues); + } + }); } if !queues.embedder_objects.is_empty() { @@ -1250,6 +1264,8 @@ fn sweep( instants, #[cfg(feature = "temporal")] durations, + #[cfg(feature = "temporal")] + plain_times, ecmascript_functions, elements, embedder_objects, @@ -1715,6 +1731,12 @@ fn sweep( sweep_heap_vector_values(durations, &compactions, &bits.durations, &bits.bits); }); } + #[cfg(feature = "temporal")] + if !plain_times.is_empty() { + s.spawn(|| { + sweep_heap_vector_values(plain_times, &compactions, &bits.plain_times, &bits.bits); + }); + } if !declarative.is_empty() { s.spawn(|| { sweep_heap_vector_values( diff --git a/tests/expectations.json b/tests/expectations.json index 5e8551312..c518a7e76 100644 --- a/tests/expectations.json +++ b/tests/expectations.json @@ -3831,8 +3831,8 @@ "built-ins/Temporal/PlainMonthDay/refisoyear-undefined.js": "FAIL", "built-ins/Temporal/PlainMonthDay/subclass.js": "FAIL", "built-ins/Temporal/PlainTime/basic.js": "FAIL", - "built-ins/Temporal/PlainTime/builtin.js": "FAIL", "built-ins/Temporal/PlainTime/compare/argument-cast.js": "FAIL", + "built-ins/Temporal/PlainTime/compare/argument-number.js": "FAIL", "built-ins/Temporal/PlainTime/compare/argument-string-calendar-annotation-invalid-key.js": "FAIL", "built-ins/Temporal/PlainTime/compare/argument-string-calendar-annotation.js": "FAIL", "built-ins/Temporal/PlainTime/compare/argument-string-critical-unknown-annotation.js": "FAIL", @@ -3860,6 +3860,7 @@ "built-ins/Temporal/PlainTime/compare/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/compare/use-internal-slots.js": "FAIL", "built-ins/Temporal/PlainTime/compare/year-zero.js": "FAIL", + "built-ins/Temporal/PlainTime/constructor.js": "FAIL", "built-ins/Temporal/PlainTime/from/argument-object-leap-second.js": "FAIL", "built-ins/Temporal/PlainTime/from/argument-object.js": "FAIL", "built-ins/Temporal/PlainTime/from/argument-plaindatetime.js": "FAIL", @@ -3908,15 +3909,12 @@ "built-ins/Temporal/PlainTime/get-prototype-from-constructor-throws.js": "FAIL", "built-ins/Temporal/PlainTime/hour-undefined.js": "FAIL", "built-ins/Temporal/PlainTime/infinity-throws-rangeerror.js": "FAIL", - "built-ins/Temporal/PlainTime/length.js": "FAIL", "built-ins/Temporal/PlainTime/microsecond-undefined.js": "FAIL", "built-ins/Temporal/PlainTime/millisecond-undefined.js": "FAIL", "built-ins/Temporal/PlainTime/minute-undefined.js": "FAIL", - "built-ins/Temporal/PlainTime/name.js": "FAIL", "built-ins/Temporal/PlainTime/nanosecond-undefined.js": "FAIL", "built-ins/Temporal/PlainTime/negative-infinity-throws-rangeerror.js": "FAIL", "built-ins/Temporal/PlainTime/negative-zero.js": "FAIL", - "built-ins/Temporal/PlainTime/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/add/argument-duration-max.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/add/argument-duration-out-of-range.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/add/argument-duration-precision-exact-numerical-values.js": "FAIL", @@ -3947,7 +3945,6 @@ "built-ins/Temporal/PlainTime/prototype/add/precision-exact-mathematical-values-2.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/add/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/add/subclassing-ignored.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/constructor.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/equals/argument-cast.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/equals/argument-number.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/equals/argument-string-calendar-annotation-invalid-key.js": "FAIL", @@ -3987,7 +3984,6 @@ "built-ins/Temporal/PlainTime/prototype/minute/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/nanosecond/branding.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/nanosecond/prop-desc.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/round/branding.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/round/builtin.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/round/length.js": "FAIL", @@ -4141,15 +4137,10 @@ "built-ins/Temporal/PlainTime/prototype/toJSON/not-a-constructor.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toJSON/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toLocaleString/branding.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toLocaleString/builtin.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toLocaleString/length.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toLocaleString/name.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toLocaleString/not-a-constructor.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toLocaleString/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toLocaleString/return-string.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/basic.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/branding.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toString/builtin.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/fractionalseconddigits-auto.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/fractionalseconddigits-invalid-string.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/fractionalseconddigits-nan.js": "FAIL", @@ -4158,9 +4149,6 @@ "built-ins/Temporal/PlainTime/prototype/toString/fractionalseconddigits-out-of-range.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/fractionalseconddigits-undefined.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/fractionalseconddigits-wrong-type.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toString/length.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toString/name.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toString/not-a-constructor.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/options-invalid.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/options-object.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/options-read-before-algorithmic-validation.js": "FAIL", @@ -4187,7 +4175,6 @@ "built-ins/Temporal/PlainTime/prototype/toString/smallestunit-undefined.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/smallestunit-valid-units.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/toString/smallestunit-wrong-type.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/toStringTag/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/until/argument-cast.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/until/argument-number.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/until/argument-string-calendar-annotation-invalid-key.js": "FAIL", @@ -4263,10 +4250,6 @@ "built-ins/Temporal/PlainTime/prototype/until/year-zero.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/valueOf/basic.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/valueOf/branding.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/valueOf/builtin.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/valueOf/length.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/valueOf/name.js": "FAIL", - "built-ins/Temporal/PlainTime/prototype/valueOf/not-a-constructor.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/valueOf/prop-desc.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/with/argument-not-object.js": "FAIL", "built-ins/Temporal/PlainTime/prototype/with/basic.js": "FAIL", diff --git a/tests/metrics.json b/tests/metrics.json index 2339134d9..e52e0bc4f 100644 --- a/tests/metrics.json +++ b/tests/metrics.json @@ -1,8 +1,8 @@ { "results": { "crash": 52, - "fail": 6988, - "pass": 40312, + "fail": 6971, + "pass": 40329, "skip": 3326, "timeout": 18, "unresolved": 37