Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: src/bootstrapper.cc

Issue 1136553006: Implement SharedArrayBuffer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arraybuffer.js ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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++) {
« no previous file with comments | « src/arraybuffer.js ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698