@@ -4144,6 +4144,25 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
41444144 " arrayBufferConstructor_DoNotInitialize" ),
41454145 Builtin::kArrayBufferConstructor_DoNotInitialize , 1 , false );
41464146 native_context ()->set_array_buffer_noinit_fun (*array_buffer_noinit_fun);
4147+
4148+ Handle<JSObject> array_buffer_prototype (
4149+ JSObject::cast (array_buffer_fun->instance_prototype ()), isolate_);
4150+ SimpleInstallGetter (isolate_, array_buffer_prototype,
4151+ factory->max_byte_length_string (),
4152+ Builtin::kArrayBufferPrototypeGetMaxByteLength , false );
4153+ SimpleInstallGetter (isolate_, array_buffer_prototype,
4154+ factory->resizable_string (),
4155+ Builtin::kArrayBufferPrototypeGetResizable , false );
4156+ SimpleInstallFunction (isolate_, array_buffer_prototype, " resize" ,
4157+ Builtin::kArrayBufferPrototypeResize , 1 , true );
4158+ SimpleInstallFunction (isolate_, array_buffer_prototype, " transfer" ,
4159+ Builtin::kArrayBufferPrototypeTransfer , 0 , false );
4160+ SimpleInstallFunction (
4161+ isolate_, array_buffer_prototype, " transferToFixedLength" ,
4162+ Builtin::kArrayBufferPrototypeTransferToFixedLength , 0 , false );
4163+ SimpleInstallGetter (isolate_, array_buffer_prototype,
4164+ factory->detached_string (),
4165+ Builtin::kArrayBufferPrototypeGetDetached , false );
41474166 }
41484167
41494168 { // -- S h a r e d A r r a y B u f f e r
@@ -4153,6 +4172,19 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
41534172 InstallWithIntrinsicDefaultProto (isolate_, shared_array_buffer_fun,
41544173 Context::SHARED_ARRAY_BUFFER_FUN_INDEX);
41554174 InstallSpeciesGetter (isolate_, shared_array_buffer_fun);
4175+
4176+ Handle<JSObject> shared_array_buffer_prototype (
4177+ JSObject::cast (shared_array_buffer_fun->instance_prototype ()),
4178+ isolate_);
4179+ SimpleInstallGetter (isolate_, shared_array_buffer_prototype,
4180+ factory->max_byte_length_string (),
4181+ Builtin::kSharedArrayBufferPrototypeGetMaxByteLength ,
4182+ false );
4183+ SimpleInstallGetter (isolate_, shared_array_buffer_prototype,
4184+ factory->growable_string (),
4185+ Builtin::kSharedArrayBufferPrototypeGetGrowable , false );
4186+ SimpleInstallFunction (isolate_, shared_array_buffer_prototype, " grow" ,
4187+ Builtin::kSharedArrayBufferPrototypeGrow , 1 , true );
41564188 }
41574189
41584190 { // -- A t o m i c s
@@ -5393,7 +5425,6 @@ void Genesis::InitializeConsole(Handle<JSObject> extras_binding) {
53935425
53945426EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE (harmony_import_assertions)
53955427EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE (harmony_import_attributes)
5396- EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE (harmony_rab_gsab_transfer)
53975428EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE (js_regexp_modifiers)
53985429EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE (js_regexp_duplicate_named_groups)
53995430
@@ -5851,46 +5882,6 @@ void Genesis::InitializeGlobal_regexp_linear_flag() {
58515882 native_context ()->set_regexp_prototype_map (regexp_prototype->map ());
58525883}
58535884
5854- void Genesis::InitializeGlobal_harmony_rab_gsab () {
5855- if (!v8_flags.harmony_rab_gsab ) return ;
5856- Handle<JSObject> array_buffer_prototype (
5857- JSObject::cast (
5858- native_context ()->array_buffer_fun ()->instance_prototype ()),
5859- isolate ());
5860- SimpleInstallGetter (isolate (), array_buffer_prototype,
5861- factory ()->max_byte_length_string (),
5862- Builtin::kArrayBufferPrototypeGetMaxByteLength , false );
5863- SimpleInstallGetter (isolate (), array_buffer_prototype,
5864- factory ()->resizable_string (),
5865- Builtin::kArrayBufferPrototypeGetResizable , false );
5866- SimpleInstallFunction (isolate (), array_buffer_prototype, " resize" ,
5867- Builtin::kArrayBufferPrototypeResize , 1 , true );
5868- if (v8_flags.harmony_rab_gsab_transfer ) {
5869- SimpleInstallFunction (isolate (), array_buffer_prototype, " transfer" ,
5870- Builtin::kArrayBufferPrototypeTransfer , 0 , false );
5871- SimpleInstallFunction (
5872- isolate (), array_buffer_prototype, " transferToFixedLength" ,
5873- Builtin::kArrayBufferPrototypeTransferToFixedLength , 0 , false );
5874- SimpleInstallGetter (isolate (), array_buffer_prototype,
5875- factory ()->detached_string (),
5876- Builtin::kArrayBufferPrototypeGetDetached , false );
5877- }
5878-
5879- Handle<JSObject> shared_array_buffer_prototype (
5880- JSObject::cast (
5881- native_context ()->shared_array_buffer_fun ()->instance_prototype ()),
5882- isolate ());
5883- SimpleInstallGetter (isolate (), shared_array_buffer_prototype,
5884- factory ()->max_byte_length_string (),
5885- Builtin::kSharedArrayBufferPrototypeGetMaxByteLength ,
5886- false );
5887- SimpleInstallGetter (isolate (), shared_array_buffer_prototype,
5888- factory ()->growable_string (),
5889- Builtin::kSharedArrayBufferPrototypeGetGrowable , false );
5890- SimpleInstallFunction (isolate (), shared_array_buffer_prototype, " grow" ,
5891- Builtin::kSharedArrayBufferPrototypeGrow , 1 , true );
5892- }
5893-
58945885void Genesis::InitializeGlobal_harmony_temporal () {
58955886 if (!v8_flags.harmony_temporal ) return ;
58965887
0 commit comments