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

Side by Side Diff: src/bootstrapper.cc

Issue 288233002: Ensure that collection iterators' maps have constructors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bootstrapper.h" 5 #include "bootstrapper.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "isolate-inl.h" 8 #include "isolate-inl.h"
9 #include "natives.h" 9 #include "natives.h"
10 #include "snapshot.h" 10 #include "snapshot.h"
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 if (FLAG_harmony_collections) { 1307 if (FLAG_harmony_collections) {
1308 // -- M a p 1308 // -- M a p
1309 InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize, 1309 InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize,
1310 isolate()->initial_object_prototype(), Builtins::kIllegal); 1310 isolate()->initial_object_prototype(), Builtins::kIllegal);
1311 // -- S e t 1311 // -- S e t
1312 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize, 1312 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize,
1313 isolate()->initial_object_prototype(), Builtins::kIllegal); 1313 isolate()->initial_object_prototype(), Builtins::kIllegal);
1314 { // -- S e t I t e r a t o r 1314 { // -- S e t I t e r a t o r
1315 Handle<Map> map = isolate()->factory()->NewMap( 1315 Handle<Map> map = isolate()->factory()->NewMap(
1316 JS_SET_ITERATOR_TYPE, JSSetIterator::kSize); 1316 JS_SET_ITERATOR_TYPE, JSSetIterator::kSize);
1317 map->set_constructor(native_context()->closure());
1317 native_context()->set_set_iterator_map(*map); 1318 native_context()->set_set_iterator_map(*map);
1318 } 1319 }
1319 { // -- M a p I t e r a t o r 1320 { // -- M a p I t e r a t o r
1320 Handle<Map> map = isolate()->factory()->NewMap( 1321 Handle<Map> map = isolate()->factory()->NewMap(
1321 JS_MAP_ITERATOR_TYPE, JSMapIterator::kSize); 1322 JS_MAP_ITERATOR_TYPE, JSMapIterator::kSize);
1323 map->set_constructor(native_context()->closure());
1322 native_context()->set_map_iterator_map(*map); 1324 native_context()->set_map_iterator_map(*map);
1323 } 1325 }
1324 } 1326 }
1325 1327
1326 if (FLAG_harmony_generators) { 1328 if (FLAG_harmony_generators) {
1327 // Create generator meta-objects and install them on the builtins object. 1329 // Create generator meta-objects and install them on the builtins object.
1328 Handle<JSObject> builtins(native_context()->builtins()); 1330 Handle<JSObject> builtins(native_context()->builtins());
1329 Handle<JSObject> generator_object_prototype = 1331 Handle<JSObject> generator_object_prototype =
1330 factory()->NewJSObject(isolate()->object_function(), TENURED); 1332 factory()->NewJSObject(isolate()->object_function(), TENURED);
1331 Handle<JSFunction> generator_function_prototype = InstallFunction( 1333 Handle<JSFunction> generator_function_prototype = InstallFunction(
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 return from + sizeof(NestingCounterType); 2655 return from + sizeof(NestingCounterType);
2654 } 2656 }
2655 2657
2656 2658
2657 // Called when the top-level V8 mutex is destroyed. 2659 // Called when the top-level V8 mutex is destroyed.
2658 void Bootstrapper::FreeThreadResources() { 2660 void Bootstrapper::FreeThreadResources() {
2659 ASSERT(!IsActive()); 2661 ASSERT(!IsActive());
2660 } 2662 }
2661 2663
2662 } } // namespace v8::internal 2664 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698