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

Unified Diff: src/bootstrapper.cc

Issue 15943002: v8 typed arrays: add DataView type (Closed)
Patch Set: v8 typed arrays: add DataView type, v2 Created 7 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
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 9277719b0fcbfab23de70e27aff41c957372b3de..29548e63354debc3d775018f015224a6ebfa9963 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1329,6 +1329,16 @@ void Genesis::InitializeExperimentalGlobal() {
native_context()->set_array_buffer_fun(*array_buffer_fun);
}
+ if (FLAG_harmony_data_view) {
+ // -- D a t a V i e w
+ Handle<JSFunction> data_view_fun =
+ InstallFunction(global, "DataView", JS_DATA_VIEW_TYPE,
+ JSDataView::kSize,
+ isolate()->initial_object_prototype(),
+ Builtins::kIllegal, true, true);
+ native_context()->set_data_view_fun(*data_view_fun);
+ }
+
if (FLAG_harmony_typed_arrays) {
// -- T y p e d A r r a y s
Handle<JSFunction> int8_fun = InstallTypedArray("Int8Array",
@@ -2037,6 +2047,11 @@ bool Genesis::InstallExperimentalNatives() {
"native arraybuffer.js") == 0) {
if (!CompileExperimentalBuiltin(isolate(), i)) return false;
}
+ if (FLAG_harmony_data_view &&
+ strcmp(ExperimentalNatives::GetScriptName(i).start(),
+ "native dataview.js") == 0) {
+ if (!CompileExperimentalBuiltin(isolate(), i)) return false;
+ }
if (FLAG_harmony_typed_arrays &&
strcmp(ExperimentalNatives::GetScriptName(i).start(),
"native typedarray.js") == 0) {

Powered by Google App Engine
This is Rietveld 408576698