Skip to content

Commit

Permalink
fix: Bad merge stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
eliassjogreen committed Oct 19, 2024
1 parent 8e060e6 commit 15de646
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
14 changes: 12 additions & 2 deletions nova_vm/src/ecmascript/builtins/data_view/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,25 @@ impl Default for DataViewHeapData {

impl HeapMarkAndSweep for DataViewHeapData {
fn mark_values(&self, queues: &mut WorkQueues) {
let Self { object_index, viewed_array_buffer, byte_length, byte_offset } = self;
let Self {
object_index,
viewed_array_buffer,
byte_length,
byte_offset,
} = self;
object_index.mark_values(queues);
viewed_array_buffer.mark_values(queues);
byte_length.mark_values(queues);
byte_offset.mark_values(queues);
}

fn sweep_values(&mut self, compactions: &CompactionLists) {
let Self { object_index, viewed_array_buffer, byte_length, byte_offset } = self;
let Self {
object_index,
viewed_array_buffer,
byte_length,
byte_offset,
} = self;
object_index.sweep_values(compactions);
viewed_array_buffer.sweep_values(compactions);
byte_length.sweep_values(compactions);
Expand Down
42 changes: 13 additions & 29 deletions nova_vm/src/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,7 @@ use crate::{
promise_resolving_functions::PromiseResolvingFunctionHeapData,
},
},
map::data::MapHeapData,
module::data::ModuleHeapData,
primitive_objects::PrimitiveObjectHeapData,
promise::data::PromiseHeapData,
proxy::data::ProxyHeapData,
regexp::RegExpHeapData,
set::data::SetHeapData,
},
builtins::{
data_view::DataView,
embedder_object::data::EmbedderObjectHeapData,
error::ErrorHeapData,
finalization_registry::data::FinalizationRegistryHeapData,
Expand All @@ -70,38 +62,30 @@ use crate::{
map_objects::map_iterator_objects::map_iterator::MapIteratorHeapData,
set_objects::set_iterator_objects::set_iterator::SetIteratorHeapData,
},
map::data::MapHeapData,
module::data::ModuleHeapData,
primitive_objects::PrimitiveObjectHeapData,
promise::data::PromiseHeapData,
proxy::data::ProxyHeapData,
regexp::RegExpHeapData,
set::data::SetHeapData,
ArrayHeapData,
},
execution::{Environments, Realm, RealmIdentifier},
scripts_and_modules::source_code::SourceCodeHeapData,
scripts_and_modules::{
module::ModuleIdentifier,
script::{Script, ScriptIdentifier},
source_code::SourceCodeHeapData,
},
types::{
bigint::HeapBigInt, BuiltinConstructorHeapData, HeapNumber, HeapString, OrdinaryObject,
BUILTIN_STRINGS_LIST,
},
types::{
BigIntHeapData, BoundFunctionHeapData, BuiltinFunctionHeapData,
ECMAScriptFunctionHeapData, NumberHeapData, Object, ObjectHeapData, String,
StringHeapData, SymbolHeapData, Value,
bigint::HeapBigInt, BigIntHeapData, BoundFunctionHeapData, BuiltinConstructorHeapData,
BuiltinFunctionHeapData, ECMAScriptFunctionHeapData, HeapNumber, HeapString,
NumberHeapData, Object, ObjectHeapData, OrdinaryObject, String, StringHeapData,
SymbolHeapData, Value, BUILTIN_STRINGS_LIST,
},
},
engine::ExecutableHeapData,
};
use crate::ecmascript::{
builtins::{data_view::DataView, ArrayHeapData},
execution::{Environments, Realm, RealmIdentifier},
scripts_and_modules::{
module::ModuleIdentifier,
script::{Script, ScriptIdentifier},
},
types::{
BigIntHeapData, BoundFunctionHeapData, BuiltinFunctionHeapData, ECMAScriptFunctionHeapData,
NumberHeapData, Object, ObjectHeapData, String, StringHeapData, SymbolHeapData, Value,
},
};
use ahash::AHashMap;
pub(crate) use heap_bits::{CompactionLists, HeapMarkAndSweep, WorkQueues};

Expand Down
8 changes: 4 additions & 4 deletions nova_vm/src/heap/heap_gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ pub fn heap_gc(agent: &mut Agent, root_realms: &mut [Option<RealmIdentifier>]) {
#[cfg(feature = "array-buffer")]
data_views,
#[cfg(feature = "array-buffer")]
data_view_byte_lengths: _,
data_view_byte_lengths: _,
#[cfg(feature = "array-buffer")]
data_view_byte_offsets: _,
data_view_byte_offsets: _,
#[cfg(feature = "date")]
dates,
ecmascript_functions,
Expand Down Expand Up @@ -1007,9 +1007,9 @@ fn sweep(agent: &mut Agent, bits: &HeapBits, root_realms: &mut [Option<RealmIden
#[cfg(feature = "array-buffer")]
data_views,
#[cfg(feature = "array-buffer")]
data_view_byte_lengths: _,
data_view_byte_lengths: _,
#[cfg(feature = "array-buffer")]
data_view_byte_offsets: _,
data_view_byte_offsets: _,
#[cfg(feature = "date")]
dates,
ecmascript_functions,
Expand Down

0 comments on commit 15de646

Please sign in to comment.