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

Unified Diff: src/bootstrapper.cc

Issue 1515005: Revert svn r4269 and r4298. (Closed)
Patch Set: Created 10 years, 9 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/heap.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 82a63f0ae60e1474d5c2a66ecc2c018cea6ea8ff..8a9fa4bf69741185e0af36912d653822555ee6a3 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -723,68 +723,8 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
InstallFunction(global, "RegExp", JS_REGEXP_TYPE, JSRegExp::kSize,
Top::initial_object_prototype(), Builtins::Illegal,
true);
- global_context()->set_regexp_function(*regexp_fun);
-
- ASSERT(regexp_fun->has_initial_map());
- Handle<Map> initial_map(regexp_fun->initial_map());
-
- ASSERT_EQ(0, initial_map->inobject_properties());
- Handle<DescriptorArray> descriptors = Factory::NewDescriptorArray(5);
- PropertyAttributes final =
- static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
- int enum_index = 0;
- {
- // ECMA-262, section 15.10.7.1.
- FieldDescriptor field(Heap::source_symbol(),
- JSRegExp::kSourceFieldIndex,
- final,
- enum_index++);
- descriptors->Set(0, &field);
- }
- {
- // ECMA-262, section 15.10.7.2.
- FieldDescriptor field(Heap::global_symbol(),
- JSRegExp::kGlobalFieldIndex,
- final,
- enum_index++);
- descriptors->Set(1, &field);
- }
- {
- // ECMA-262, section 15.10.7.3.
- FieldDescriptor field(Heap::ignore_case_symbol(),
- JSRegExp::kIgnoreCaseFieldIndex,
- final,
- enum_index++);
- descriptors->Set(2, &field);
- }
- {
- // ECMA-262, section 15.10.7.4.
- FieldDescriptor field(Heap::multiline_symbol(),
- JSRegExp::kMultilineFieldIndex,
- final,
- enum_index++);
- descriptors->Set(3, &field);
- }
- {
- // ECMA-262, section 15.10.7.5.
- PropertyAttributes writable =
- static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
- FieldDescriptor field(Heap::last_index_symbol(),
- JSRegExp::kLastIndexFieldIndex,
- writable,
- enum_index++);
- descriptors->Set(4, &field);
- }
- descriptors->SetNextEnumerationIndex(enum_index);
- descriptors->Sort();
-
- initial_map->set_inobject_properties(5);
- initial_map->set_pre_allocated_property_fields(5);
- initial_map->set_unused_property_fields(0);
- initial_map->set_instance_size(
- initial_map->instance_size() + 5 * kPointerSize);
- initial_map->set_instance_descriptors(*descriptors);
+ global_context()->set_regexp_function(*regexp_fun);
}
{ // -- J S O N
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698