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

Unified Diff: src/bootstrapper.cc

Issue 1157453002: Add basic API support for Map & Set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/api.cc ('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 d93c465b47dd20b7e290bf8865b747d4dcb88469..597c1d1a53565f2c4316fb26dc0142d15c3bebdf 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1214,13 +1214,19 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
native_context()->set_data_view_fun(*data_view_fun);
}
- // -- M a p
- InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize,
- isolate->initial_object_prototype(), Builtins::kIllegal);
+ { // -- M a p
+ Handle<JSFunction> js_map_fun = InstallFunction(
+ global, "Map", JS_MAP_TYPE, JSMap::kSize,
+ isolate->initial_object_prototype(), Builtins::kIllegal);
+ native_context()->set_js_map_map(js_map_fun->initial_map());
jochen (gone - plz use gerrit) 2015/06/01 13:32:27 this doesn't work :-/ the prototype of the Map()
adamk 2015/06/01 21:30:02 Good eye, fix up for review at https://codereview.
+ }
- // -- S e t
- InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize,
- isolate->initial_object_prototype(), Builtins::kIllegal);
+ { // -- S e t
+ Handle<JSFunction> js_set_fun = InstallFunction(
+ global, "Set", JS_SET_TYPE, JSSet::kSize,
+ isolate->initial_object_prototype(), Builtins::kIllegal);
+ native_context()->set_js_set_map(js_set_fun->initial_map());
+ }
{ // Set up the iterator result object
STATIC_ASSERT(JSGeneratorObject::kResultPropertyCount == 2);
« no previous file with comments | « src/api.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698