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

Unified Diff: src/bootstrapper.cc

Issue 1428203003: Use in-object fields instead of private symbols for regexp slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 1 month 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/crankshaft/hydrogen.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 0e0cd78b1891f9af197d37c385f3247be377eac1..d69ab5b1c9657a9aa744ca74fab8c8d4c2250eff 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1223,32 +1223,15 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
DCHECK_EQ(0, initial_map->GetInObjectProperties());
- PropertyAttributes final =
- static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
- Map::EnsureDescriptorSlack(initial_map, 5);
+ Map::EnsureDescriptorSlack(initial_map, 1);
- {
- // ES6 21.2.3.2.1
- DataDescriptor field(factory->regexp_source_symbol(),
- JSRegExp::kSourceFieldIndex, final,
- Representation::Tagged());
- initial_map->AppendDescriptor(&field);
- }
- {
- DataDescriptor field(factory->regexp_flags_symbol(),
- JSRegExp::kFlagsFieldIndex, final,
- Representation::Smi());
- initial_map->AppendDescriptor(&field);
- }
- {
- // ECMA-262, section 15.10.7.5.
- PropertyAttributes writable =
- static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
- DataDescriptor field(factory->last_index_string(),
- JSRegExp::kLastIndexFieldIndex, writable,
- Representation::Tagged());
- initial_map->AppendDescriptor(&field);
- }
+ // ECMA-262, section 15.10.7.5.
+ PropertyAttributes writable =
+ static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
+ DataDescriptor field(factory->last_index_string(),
+ JSRegExp::kLastIndexFieldIndex, writable,
+ Representation::Tagged());
+ initial_map->AppendDescriptor(&field);
static const int num_fields = JSRegExp::kInObjectFieldCount;
initial_map->SetInObjectProperties(num_fields);
« no previous file with comments | « no previous file | src/crankshaft/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698