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

Unified Diff: src/bootstrapper.cc

Issue 1432453005: Revert of Use in-object fields instead of private symbols for regexp slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 e24d89d002d6e556ba55e2fcc390a7d123b4d8cd..9b1399e1cbdfdf8c26364eb91d9e3bc3f520033d 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1223,15 +1223,32 @@
DCHECK_EQ(0, initial_map->GetInObjectProperties());
- Map::EnsureDescriptorSlack(initial_map, 1);
-
- // 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);
+ PropertyAttributes final =
+ static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
+ Map::EnsureDescriptorSlack(initial_map, 5);
+
+ {
+ // 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);
+ }
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