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

Side by Side Diff: src/builtins/builtins-regexp-gen.cc

Issue 2792963002: [regexp] Fix check for FLAG_harmony_regexp_dotall (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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/builtins/builtins-regexp-gen.h" 5 #include "src/builtins/builtins-regexp-gen.h"
6 6
7 #include "src/builtins/builtins-constructor-gen.h" 7 #include "src/builtins/builtins-constructor-gen.h"
8 #include "src/builtins/builtins-utils-gen.h" 8 #include "src/builtins/builtins-utils-gen.h"
9 #include "src/builtins/builtins.h" 9 #include "src/builtins/builtins.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 Node* context = Parameter(Descriptor::kContext); 1361 Node* context = Parameter(Descriptor::kContext);
1362 Node* receiver = Parameter(Descriptor::kReceiver); 1362 Node* receiver = Parameter(Descriptor::kReceiver);
1363 FlagGetter(context, receiver, JSRegExp::kMultiline, 1363 FlagGetter(context, receiver, JSRegExp::kMultiline,
1364 v8::Isolate::kRegExpPrototypeOldFlagGetter, 1364 v8::Isolate::kRegExpPrototypeOldFlagGetter,
1365 "RegExp.prototype.multiline"); 1365 "RegExp.prototype.multiline");
1366 } 1366 }
1367 1367
1368 Node* RegExpBuiltinsAssembler::IsDotAllEnabled(Isolate* isolate) { 1368 Node* RegExpBuiltinsAssembler::IsDotAllEnabled(Isolate* isolate) {
1369 Node* flag_ptr = ExternalConstant( 1369 Node* flag_ptr = ExternalConstant(
1370 ExternalReference::address_of_regexp_dotall_flag(isolate)); 1370 ExternalReference::address_of_regexp_dotall_flag(isolate));
1371 Node* flag_value = Load(MachineType::IntPtr(), flag_ptr); 1371 Node* const flag_value = Load(MachineType::Int8(), flag_ptr);
1372 return WordNotEqual(flag_value, IntPtrConstant(0)); 1372 return Word32NotEqual(flag_value, Int32Constant(0));
1373 } 1373 }
1374 1374
1375 // ES #sec-get-regexp.prototype.dotAll 1375 // ES #sec-get-regexp.prototype.dotAll
1376 TF_BUILTIN(RegExpPrototypeDotAllGetter, RegExpBuiltinsAssembler) { 1376 TF_BUILTIN(RegExpPrototypeDotAllGetter, RegExpBuiltinsAssembler) {
1377 Node* context = Parameter(Descriptor::kContext); 1377 Node* context = Parameter(Descriptor::kContext);
1378 Node* receiver = Parameter(Descriptor::kReceiver); 1378 Node* receiver = Parameter(Descriptor::kReceiver);
1379 static const int kNoCounter = -1; 1379 static const int kNoCounter = -1;
1380 CSA_ASSERT(this, IsDotAllEnabled(isolate())); 1380 CSA_ASSERT(this, IsDotAllEnabled(isolate()));
1381 FlagGetter(context, receiver, JSRegExp::kDotAll, kNoCounter, 1381 FlagGetter(context, receiver, JSRegExp::kDotAll, kNoCounter,
1382 "RegExp.prototype.dotAll"); 1382 "RegExp.prototype.dotAll");
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 Bind(&if_matched); 2725 Bind(&if_matched);
2726 { 2726 {
2727 Node* result = 2727 Node* result =
2728 ConstructNewResultFromMatchInfo(context, regexp, match_indices, string); 2728 ConstructNewResultFromMatchInfo(context, regexp, match_indices, string);
2729 Return(result); 2729 Return(result);
2730 } 2730 }
2731 } 2731 }
2732 2732
2733 } // namespace internal 2733 } // namespace internal
2734 } // namespace v8 2734 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698