Skip to main content

RareData

Struct RareData 

Source
pub struct RareData {
    pub accessors: PropMap<Accessor>,
    pub attrs: PropMap<PropertyAttributes>,
    pub holes: Option<Box<Vec<bool>>>,
    pub primitive: Option<Value>,
    pub private_brands: Vec<u64>,
    pub private_fields: Vec<(u64, Rc<str>, Value)>,
    pub intl_locale: Option<Rc<str>>,
    pub error_stack: Option<String>,
}
Expand description

オブジェクトの稀な拡張データ(アクセサ記述子、属性フラグ表、配列の穴)。 通常の素のオブジェクト・関数・配列の大多数(98%以上)はこれらを持たないため、 Option<Box<RareData>>(8バイト)として分離し、Obj 本体のサイズを 96B → 72B(25%縮小)に抑える。

Fields§

§accessors: PropMap<Accessor>§attrs: PropMap<PropertyAttributes>§holes: Option<Box<Vec<bool>>>§primitive: Option<Value>

値の包みオブジェクト(new Number(5)・new String("a")・new Boolean(false)・Object(1))の中身(仕様の [[NumberData]] 等)。 【2026-11-18】以前は包みが空のオブジェクトで、new Number(5)+1 が NaN・new String("ab").length が undefined だった。

§private_brands: Vec<u64>

クラスプライベートメソッド/アクセサ用のブランド一覧(クラス評価ごとの一意 ID)。

§private_fields: Vec<(u64, Rc<str>, Value)>

クラスプライベートフィールドの実値((brand_id, 名前, 値))。props には入れないため列挙・hasOwnProperty・in に露出しない。

§intl_locale: Option<Rc<str>>

Intl.Locale の内部スロット [[Locale]](hasOwnProperty / ownKeys に露出しない)。

§error_stack: Option<String>

Error インスタンスの [[ErrorData]] 内部スロット兼スタック文字列(hasOwnProperty に露出しない)。

Trait Implementations§

Source§

impl Clone for RareData

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for RareData

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.