-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(heap): Move ArrayHeapData to builtins
- Loading branch information
Showing
6 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use crate::heap::{element_array::ElementsVector, indexes::ObjectIndex}; | ||
|
||
/// An Array is an exotic object that gives special treatment to array index property keys (see 6.1.7). | ||
/// A property whose property name is an array index is also called an element. Every Array has a | ||
/// non-configurable "**length**" property whose value is always a non-negative integral Number whose | ||
/// mathematical value is strictly less than 2**32. | ||
#[derive(Debug, Clone, Copy)] | ||
pub struct ArrayHeapData { | ||
pub object_index: Option<ObjectIndex>, | ||
// TODO: Use enum { ElementsVector, SmallVec<[Value; 3]> } | ||
// to get some inline benefit together with a 32 byte size | ||
// for ArrayHeapData to fit two in one cache line. | ||
pub elements: ElementsVector, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters