@@ -4054,6 +4054,25 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
40544054 "arrayBufferConstructor_DoNotInitialize"),
40554055 Builtin::kArrayBufferConstructor_DoNotInitialize, 1, false);
40564056 native_context()->set_array_buffer_noinit_fun(*array_buffer_noinit_fun);
4057+
4058+ Handle<JSObject> array_buffer_prototype(
4059+ JSObject::cast(array_buffer_fun->instance_prototype()), isolate_);
4060+ SimpleInstallGetter(isolate_, array_buffer_prototype,
4061+ factory->max_byte_length_string(),
4062+ Builtin::kArrayBufferPrototypeGetMaxByteLength, false);
4063+ SimpleInstallGetter(isolate_, array_buffer_prototype,
4064+ factory->resizable_string(),
4065+ Builtin::kArrayBufferPrototypeGetResizable, false);
4066+ SimpleInstallFunction(isolate_, array_buffer_prototype, "resize",
4067+ Builtin::kArrayBufferPrototypeResize, 1, true);
4068+ SimpleInstallFunction(isolate_, array_buffer_prototype, "transfer",
4069+ Builtin::kArrayBufferPrototypeTransfer, 0, false);
4070+ SimpleInstallFunction(
4071+ isolate_, array_buffer_prototype, "transferToFixedLength",
4072+ Builtin::kArrayBufferPrototypeTransferToFixedLength, 0, false);
4073+ SimpleInstallGetter(isolate_, array_buffer_prototype,
4074+ factory->detached_string(),
4075+ Builtin::kArrayBufferPrototypeGetDetached, false);
40574076 }
40584077
40594078 { // -- S h a r e d A r r a y B u f f e r
@@ -4063,6 +4082,19 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
40634082 InstallWithIntrinsicDefaultProto(isolate_, shared_array_buffer_fun,
40644083 Context::SHARED_ARRAY_BUFFER_FUN_INDEX);
40654084 InstallSpeciesGetter(isolate_, shared_array_buffer_fun);
4085+
4086+ Handle<JSObject> shared_array_buffer_prototype(
4087+ JSObject::cast(shared_array_buffer_fun->instance_prototype()),
4088+ isolate_);
4089+ SimpleInstallGetter(isolate_, shared_array_buffer_prototype,
4090+ factory->max_byte_length_string(),
4091+ Builtin::kSharedArrayBufferPrototypeGetMaxByteLength,
4092+ false);
4093+ SimpleInstallGetter(isolate_, shared_array_buffer_prototype,
4094+ factory->growable_string(),
4095+ Builtin::kSharedArrayBufferPrototypeGetGrowable, false);
4096+ SimpleInstallFunction(isolate_, shared_array_buffer_prototype, "grow",
4097+ Builtin::kSharedArrayBufferPrototypeGrow, 1, true);
40664098 }
40674099
40684100 { // -- A t o m i c s
@@ -5300,7 +5332,6 @@ void Genesis::InitializeConsole(Handle<JSObject> extras_binding) {
53005332
53015333EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_import_assertions)
53025334EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_import_attributes)
5303- EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rab_gsab_transfer)
53045335EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(js_regexp_modifiers)
53055336EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(js_regexp_duplicate_named_groups)
53065337
@@ -5768,46 +5799,6 @@ void Genesis::InitializeGlobal_regexp_linear_flag() {
57685799 native_context()->set_regexp_prototype_map(regexp_prototype->map());
57695800}
57705801
5771- void Genesis::InitializeGlobal_harmony_rab_gsab() {
5772- if (!v8_flags.harmony_rab_gsab) return;
5773- Handle<JSObject> array_buffer_prototype(
5774- JSObject::cast(
5775- native_context()->array_buffer_fun()->instance_prototype()),
5776- isolate());
5777- SimpleInstallGetter(isolate(), array_buffer_prototype,
5778- factory()->max_byte_length_string(),
5779- Builtin::kArrayBufferPrototypeGetMaxByteLength, false);
5780- SimpleInstallGetter(isolate(), array_buffer_prototype,
5781- factory()->resizable_string(),
5782- Builtin::kArrayBufferPrototypeGetResizable, false);
5783- SimpleInstallFunction(isolate(), array_buffer_prototype, "resize",
5784- Builtin::kArrayBufferPrototypeResize, 1, true);
5785- if (v8_flags.harmony_rab_gsab_transfer) {
5786- SimpleInstallFunction(isolate(), array_buffer_prototype, "transfer",
5787- Builtin::kArrayBufferPrototypeTransfer, 0, false);
5788- SimpleInstallFunction(
5789- isolate(), array_buffer_prototype, "transferToFixedLength",
5790- Builtin::kArrayBufferPrototypeTransferToFixedLength, 0, false);
5791- SimpleInstallGetter(isolate(), array_buffer_prototype,
5792- factory()->detached_string(),
5793- Builtin::kArrayBufferPrototypeGetDetached, false);
5794- }
5795-
5796- Handle<JSObject> shared_array_buffer_prototype(
5797- JSObject::cast(
5798- native_context()->shared_array_buffer_fun()->instance_prototype()),
5799- isolate());
5800- SimpleInstallGetter(isolate(), shared_array_buffer_prototype,
5801- factory()->max_byte_length_string(),
5802- Builtin::kSharedArrayBufferPrototypeGetMaxByteLength,
5803- false);
5804- SimpleInstallGetter(isolate(), shared_array_buffer_prototype,
5805- factory()->growable_string(),
5806- Builtin::kSharedArrayBufferPrototypeGetGrowable, false);
5807- SimpleInstallFunction(isolate(), shared_array_buffer_prototype, "grow",
5808- Builtin::kSharedArrayBufferPrototypeGrow, 1, true);
5809- }
5810-
58115802void Genesis::InitializeGlobal_harmony_temporal() {
58125803 if (!v8_flags.harmony_temporal) return;
58135804
0 commit comments