Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 786e42be47805d1cc77ae8b16c0e23f2f50ee845..143802a49d477cc5cb4ef4b7433ef1807e3046bb 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -1753,6 +1753,7 @@ EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) |
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) |
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) |
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spread_arrays) |
+EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sharedarraybuffer) |
void Genesis::InstallNativeFunctions_harmony_proxies() { |
@@ -1846,6 +1847,20 @@ void Genesis::InitializeGlobal_harmony_tostring() { |
} |
+void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { |
+ if (!FLAG_harmony_sharedarraybuffer) return; |
+ |
+ Handle<JSGlobalObject> global( |
+ JSGlobalObject::cast(native_context()->global_object())); |
+ |
+ Handle<JSFunction> shared_array_buffer_fun = InstallFunction( |
+ global, "SharedArrayBuffer", JS_ARRAY_BUFFER_TYPE, |
+ JSArrayBuffer::kSizeWithInternalFields, |
+ isolate()->initial_object_prototype(), Builtins::kIllegal); |
+ native_context()->set_shared_array_buffer_fun(*shared_array_buffer_fun); |
+} |
+ |
+ |
Handle<JSFunction> Genesis::InstallInternalArray(Handle<JSObject> target, |
const char* name, |
ElementsKind elements_kind) { |
@@ -2410,6 +2425,8 @@ bool Genesis::InstallExperimentalNatives() { |
static const char* harmony_object_natives[] = {"native harmony-object.js", |
NULL}; |
static const char* harmony_spread_arrays_natives[] = {nullptr}; |
+ static const char* harmony_sharedarraybuffer_natives[] = { |
+ "native harmony-sharedarraybuffer.js", NULL}; |
for (int i = ExperimentalNatives::GetDebuggerCount(); |
i < ExperimentalNatives::GetBuiltinsCount(); i++) { |