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

Side by Side Diff: src/bootstrapper.cc

Issue 1409013006: Revert of Implement flag and source getters on RegExp.prototype. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rproto
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 unified diff | Download patch
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.h » ('j') | 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 "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 DCHECK(regexp_fun->has_initial_map()); 1237 DCHECK(regexp_fun->has_initial_map());
1238 Handle<Map> initial_map(regexp_fun->initial_map()); 1238 Handle<Map> initial_map(regexp_fun->initial_map());
1239 1239
1240 DCHECK_EQ(0, initial_map->GetInObjectProperties()); 1240 DCHECK_EQ(0, initial_map->GetInObjectProperties());
1241 1241
1242 PropertyAttributes final = 1242 PropertyAttributes final =
1243 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); 1243 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
1244 Map::EnsureDescriptorSlack(initial_map, 5); 1244 Map::EnsureDescriptorSlack(initial_map, 5);
1245 1245
1246 { 1246 {
1247 // ES6 21.2.3.2.1 1247 // ECMA-262, section 15.10.7.1.
1248 DataDescriptor field(factory->regexp_source_symbol(), 1248 DataDescriptor field(factory->source_string(),
1249 JSRegExp::kSourceFieldIndex, final, 1249 JSRegExp::kSourceFieldIndex, final,
1250 Representation::Tagged()); 1250 Representation::Tagged());
1251 initial_map->AppendDescriptor(&field); 1251 initial_map->AppendDescriptor(&field);
1252 } 1252 }
1253 { 1253 {
1254 DataDescriptor field(factory->regexp_flags_symbol(), 1254 // ECMA-262, section 15.10.7.2.
1255 JSRegExp::kFlagsFieldIndex, final, 1255 DataDescriptor field(factory->global_string(),
1256 Representation::Smi()); 1256 JSRegExp::kGlobalFieldIndex, final,
1257 Representation::Tagged());
1257 initial_map->AppendDescriptor(&field); 1258 initial_map->AppendDescriptor(&field);
1258 } 1259 }
1259 { 1260 {
1261 // ECMA-262, section 15.10.7.3.
1262 DataDescriptor field(factory->ignore_case_string(),
1263 JSRegExp::kIgnoreCaseFieldIndex, final,
1264 Representation::Tagged());
1265 initial_map->AppendDescriptor(&field);
1266 }
1267 {
1268 // ECMA-262, section 15.10.7.4.
1269 DataDescriptor field(factory->multiline_string(),
1270 JSRegExp::kMultilineFieldIndex, final,
1271 Representation::Tagged());
1272 initial_map->AppendDescriptor(&field);
1273 }
1274 {
1260 // ECMA-262, section 15.10.7.5. 1275 // ECMA-262, section 15.10.7.5.
1261 PropertyAttributes writable = 1276 PropertyAttributes writable =
1262 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE); 1277 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
1263 DataDescriptor field(factory->last_index_string(), 1278 DataDescriptor field(factory->last_index_string(),
1264 JSRegExp::kLastIndexFieldIndex, writable, 1279 JSRegExp::kLastIndexFieldIndex, writable,
1265 Representation::Tagged()); 1280 Representation::Tagged());
1266 initial_map->AppendDescriptor(&field); 1281 initial_map->AppendDescriptor(&field);
1267 } 1282 }
1268 1283
1269 static const int num_fields = JSRegExp::kInObjectFieldCount; 1284 static const int num_fields = JSRegExp::kInObjectFieldCount;
(...skipping 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after
3289 } 3304 }
3290 3305
3291 3306
3292 // Called when the top-level V8 mutex is destroyed. 3307 // Called when the top-level V8 mutex is destroyed.
3293 void Bootstrapper::FreeThreadResources() { 3308 void Bootstrapper::FreeThreadResources() {
3294 DCHECK(!IsActive()); 3309 DCHECK(!IsActive());
3295 } 3310 }
3296 3311
3297 } // namespace internal 3312 } // namespace internal
3298 } // namespace v8 3313 } // namespace v8
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698