Skip to main content

populate_builtin_protos

Function populate_builtin_protos 

Source
pub fn populate_builtin_protos(global: &Rc<RefCell<Scope>>)
Expand description

実体の種類から動的に引いている組み込みのメソッドを、X.prototype にも並べる(2026-11-16)。 以前は Number.prototype.toFixed・Promise.prototype.then・Map.prototype.set・Date.prototype.getTime が undefined だった(実体の (1).toFixed・p.then などは動いていた)。同じ関数を指すので二重実装にならない。 JsRuntime::new_ecma / JsRuntime::new_with_host が install の直後に一度だけ呼ぶ。