| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index 04eb009c71b79e53c678f60ce714ba574ef855d3..7ddc9a64dee4efcd21aba5de25484a3b7712f160 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -1227,7 +1227,19 @@ void Genesis::InitializeExperimentalGlobal() {
|
| Handle<JSObject> global = Handle<JSObject>(global_context()->global());
|
|
|
| // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no
|
| - // longer need to live behind a flag, so WeakMap gets added to the snapshot.
|
| + // longer need to live behind a flag, so functions get added to the snapshot.
|
| + 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);
|
| + }
|
| + if (FLAG_harmony_collections) { // -- M a p
|
| + Handle<JSObject> prototype =
|
| + factory()->NewJSObject(isolate()->object_function(), TENURED);
|
| + InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize,
|
| + prototype, Builtins::kIllegal, true);
|
| + }
|
| if (FLAG_harmony_weakmaps) { // -- W e a k M a p
|
| Handle<JSObject> prototype =
|
| factory()->NewJSObject(isolate()->object_function(), TENURED);
|
| @@ -1740,6 +1752,11 @@ bool Genesis::InstallExperimentalNatives() {
|
| "native proxy.js") == 0) {
|
| if (!CompileExperimentalBuiltin(isolate(), i)) return false;
|
| }
|
| + if (FLAG_harmony_collections &&
|
| + strcmp(ExperimentalNatives::GetScriptName(i).start(),
|
| + "native collection.js") == 0) {
|
| + if (!CompileExperimentalBuiltin(isolate(), i)) return false;
|
| + }
|
| if (FLAG_harmony_weakmaps &&
|
| strcmp(ExperimentalNatives::GetScriptName(i).start(),
|
| "native weakmap.js") == 0) {
|
|
|