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

Unified Diff: src/d8.cc

Issue 14402026: Remove __ prefix from Harmony typed arrays implementation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed flag implication Created 7 years, 8 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/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 22ace174d206988a69bf15ceab7ad59e27844965..958f4760e72bb0bf905552c559409fa98b934679 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1459,28 +1459,30 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
global_template->Set(String::New("Realm"), realm_template);
// Bind the handlers for external arrays.
- PropertyAttribute attr =
- static_cast<PropertyAttribute>(ReadOnly | DontDelete);
- global_template->Set(PerIsolateData::ArrayBuffer_string(isolate),
- CreateArrayBufferTemplate(ArrayBuffer), attr);
- global_template->Set(String::New("Int8Array"),
- CreateArrayTemplate(Int8Array), attr);
- global_template->Set(String::New("Uint8Array"),
- CreateArrayTemplate(Uint8Array), attr);
- global_template->Set(String::New("Int16Array"),
- CreateArrayTemplate(Int16Array), attr);
- global_template->Set(String::New("Uint16Array"),
- CreateArrayTemplate(Uint16Array), attr);
- global_template->Set(String::New("Int32Array"),
- CreateArrayTemplate(Int32Array), attr);
- global_template->Set(String::New("Uint32Array"),
- CreateArrayTemplate(Uint32Array), attr);
- global_template->Set(String::New("Float32Array"),
- CreateArrayTemplate(Float32Array), attr);
- global_template->Set(String::New("Float64Array"),
- CreateArrayTemplate(Float64Array), attr);
- global_template->Set(String::New("Uint8ClampedArray"),
- CreateArrayTemplate(Uint8ClampedArray), attr);
+ if (!i::FLAG_harmony_typed_arrays) {
+ PropertyAttribute attr =
+ static_cast<PropertyAttribute>(ReadOnly | DontDelete);
+ global_template->Set(PerIsolateData::ArrayBuffer_string(isolate),
+ CreateArrayBufferTemplate(ArrayBuffer), attr);
+ global_template->Set(String::New("Int8Array"),
+ CreateArrayTemplate(Int8Array), attr);
+ global_template->Set(String::New("Uint8Array"),
+ CreateArrayTemplate(Uint8Array), attr);
+ global_template->Set(String::New("Int16Array"),
+ CreateArrayTemplate(Int16Array), attr);
+ global_template->Set(String::New("Uint16Array"),
+ CreateArrayTemplate(Uint16Array), attr);
+ global_template->Set(String::New("Int32Array"),
+ CreateArrayTemplate(Int32Array), attr);
+ global_template->Set(String::New("Uint32Array"),
+ CreateArrayTemplate(Uint32Array), attr);
+ global_template->Set(String::New("Float32Array"),
+ CreateArrayTemplate(Float32Array), attr);
+ global_template->Set(String::New("Float64Array"),
+ CreateArrayTemplate(Float64Array), attr);
+ global_template->Set(String::New("Uint8ClampedArray"),
+ CreateArrayTemplate(Uint8ClampedArray), attr);
+ }
#if !defined(V8_SHARED) && !defined(_WIN32) && !defined(_WIN64)
Handle<ObjectTemplate> os_templ = ObjectTemplate::New();
« no previous file with comments | « src/bootstrapper.cc ('k') | src/flag-definitions.h » ('j') | src/flag-definitions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698