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

Unified Diff: src/bootstrapper.cc

Issue 14165004: Move creation of collection prototypes into JavaScript. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « no previous file | src/collection.js » ('j') | test/mjsunit/harmony/collections.js » ('J')
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 a7c2bac25d61bd0987c33b08d9e8ea26fba4d6aa..d071f45da96dbd10df3cf8107c124f8df9877315 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1275,31 +1275,27 @@ void Genesis::InitializeExperimentalGlobal() {
if (FLAG_harmony_collections) {
{ // -- S e t
- Handle<JSObject> prototype =
- factory()->NewJSObject(isolate()->object_function(), TENURED);
InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize,
- prototype, Builtins::kIllegal, true);
+ isolate()->initial_object_prototype(),
+ Builtins::kIllegal, true);
}
{ // -- M a p
- Handle<JSObject> prototype =
- factory()->NewJSObject(isolate()->object_function(), TENURED);
InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize,
- prototype, Builtins::kIllegal, true);
+ isolate()->initial_object_prototype(),
+ Builtins::kIllegal, true);
}
{ // -- W e a k M a p
- Handle<JSObject> prototype =
- factory()->NewJSObject(isolate()->object_function(), TENURED);
InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize,
- prototype, Builtins::kIllegal, true);
+ isolate()->initial_object_prototype(),
+ Builtins::kIllegal, true);
}
}
if (FLAG_harmony_typed_arrays) {
- { // -- A r r a y B u f f e r
- Handle<JSObject> prototype =
- factory()->NewJSObject(isolate()->object_function(), TENURED);
+ { // -- A r r a y B u f f e r
InstallFunction(global, "__ArrayBuffer", JS_ARRAY_BUFFER_TYPE,
- JSArrayBuffer::kSize, prototype,
+ JSArrayBuffer::kSize,
+ isolate()->initial_object_prototype(),
Builtins::kIllegal, true);
}
}
« no previous file with comments | « no previous file | src/collection.js » ('j') | test/mjsunit/harmony/collections.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698