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

Unified Diff: src/bootstrapper.cc

Issue 584943002: Make Map::Create always use the Object function, and remove the unused inobject properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/factory.cc » ('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 65b21e09bc5fbe43a5029c05894238ee20aaf97d..250562a2aa17a0a8c47dfc8567b449b5ccade0f0 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1156,7 +1156,11 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
STATIC_ASSERT(JSGeneratorObject::kResultPropertyCount == 2);
Handle<JSFunction> object_function(native_context()->object_function());
Handle<Map> iterator_result_map =
- Map::Create(object_function, JSGeneratorObject::kResultPropertyCount);
+ Map::Create(isolate, JSGeneratorObject::kResultPropertyCount);
+ DCHECK_EQ(JSGeneratorObject::kResultSize,
+ iterator_result_map->instance_size());
+ DCHECK_EQ(JSGeneratorObject::kResultPropertyCount,
+ iterator_result_map->inobject_properties());
Map::EnsureDescriptorSlack(iterator_result_map,
JSGeneratorObject::kResultPropertyCount);
@@ -1170,14 +1174,9 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
NONE, Representation::Tagged());
iterator_result_map->AppendDescriptor(&done_descr);
- iterator_result_map->set_instance_size(JSGeneratorObject::kResultSize);
iterator_result_map->set_unused_property_fields(0);
- iterator_result_map->set_inobject_properties(
- JSGeneratorObject::kResultPropertyCount);
iterator_result_map->set_pre_allocated_property_fields(
JSGeneratorObject::kResultPropertyCount);
- iterator_result_map->set_visitor_id(
- StaticVisitorBase::GetVisitorId(*iterator_result_map));
DCHECK_EQ(JSGeneratorObject::kResultSize,
iterator_result_map->instance_size());
native_context()->set_iterator_result_map(*iterator_result_map);
@@ -1929,8 +1928,7 @@ bool Genesis::InstallNatives() {
*strict_generator_function_map);
Handle<JSFunction> object_function(native_context()->object_function());
- Handle<Map> generator_object_prototype_map =
- Map::Create(object_function, 0);
+ Handle<Map> generator_object_prototype_map = Map::Create(isolate(), 0);
generator_object_prototype_map->set_prototype(*generator_object_prototype);
native_context()->set_generator_object_prototype_map(
*generator_object_prototype_map);
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698