@@ -22,6 +22,8 @@ use crate::ecmascript::builtins::numbers_and_dates::date_objects::{
2222} ;
2323#[ cfg( feature = "math" ) ]
2424use crate :: ecmascript:: builtins:: numbers_and_dates:: math_object:: MathObject ;
25+ #[ cfg( feature = "atomics" ) ]
26+ use crate :: ecmascript:: builtins:: structured_data:: atomics_object:: AtomicsObject ;
2527#[ cfg( feature = "json" ) ]
2628use crate :: ecmascript:: builtins:: structured_data:: json_object:: JSONObject ;
2729#[ cfg( feature = "shared-array-buffer" ) ]
@@ -96,7 +98,6 @@ use crate::{
9698 } ,
9799 primitive_objects:: PrimitiveObject ,
98100 reflection:: { proxy_constructor:: ProxyConstructor , reflect_object:: ReflectObject } ,
99- structured_data:: atomics_object:: AtomicsObject ,
100101 text_processing:: {
101102 regexp_objects:: {
102103 regexp_constructor:: RegExpConstructor , regexp_prototype:: RegExpPrototype ,
@@ -149,7 +150,6 @@ use crate::{
149150 IntrinsicObjectIndexes , IntrinsicPrimitiveObjectIndexes , WorkQueues ,
150151 } ,
151152} ;
152-
153153#[ derive( Debug , Clone ) ]
154154pub ( crate ) struct Intrinsics {
155155 pub ( crate ) object_index_base : ObjectIndex ,
@@ -329,6 +329,7 @@ impl Intrinsics {
329329 DataViewPrototype :: create_intrinsic ( agent, realm) ;
330330 #[ cfg( feature = "array-buffer" ) ]
331331 DataViewConstructor :: create_intrinsic ( agent, realm) ;
332+ #[ cfg( feature = "atomics" ) ]
332333 AtomicsObject :: create_intrinsic ( agent, realm) ;
333334 #[ cfg( feature = "json" ) ]
334335 JSONObject :: create_intrinsic ( agent, realm) ;
@@ -612,6 +613,7 @@ impl Intrinsics {
612613 }
613614
614615 /// %Atomics%
616+ #[ cfg( feature = "atomics" ) ]
615617 pub ( crate ) fn atomics ( & self ) -> OrdinaryObject {
616618 IntrinsicObjectIndexes :: AtomicsObject
617619 . get_object_index ( self . object_index_base )
@@ -1618,6 +1620,7 @@ impl HeapMarkAndSweep for Intrinsics {
16181620 self . async_generator_function ( ) . mark_values ( queues) ;
16191621 self . async_generator_prototype ( ) . mark_values ( queues) ;
16201622 self . async_iterator_prototype ( ) . mark_values ( queues) ;
1623+ #[ cfg( feature = "atomics" ) ]
16211624 self . atomics ( ) . mark_values ( queues) ;
16221625 self . big_int_prototype ( ) . mark_values ( queues) ;
16231626 self . big_int ( ) . mark_values ( queues) ;
0 commit comments