OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |