OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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-utils.h" | 5 #include "src/builtins/builtins-utils.h" |
6 #include "src/builtins/builtins.h" | 6 #include "src/builtins/builtins.h" |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stub-assembler.h" | 8 #include "src/code-stub-assembler.h" |
9 #include "src/regexp/jsregexp.h" | 9 #include "src/regexp/jsregexp.h" |
10 #include "src/regexp/regexp-utils.h" | 10 #include "src/regexp/regexp-utils.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 Bind(&if_doupdate); | 252 Bind(&if_doupdate); |
253 { | 253 { |
254 Node* const regexp_lastindex = | 254 Node* const regexp_lastindex = |
255 LoadLastIndex(context, regexp, is_fastpath); | 255 LoadLastIndex(context, regexp, is_fastpath); |
256 var_lastindex.Bind(regexp_lastindex); | 256 var_lastindex.Bind(regexp_lastindex); |
257 | 257 |
258 // Omit ToLength if lastindex is a non-negative smi. | 258 // Omit ToLength if lastindex is a non-negative smi. |
259 { | 259 { |
260 Label call_tolength(this, Label::kDeferred), next(this); | 260 Label call_tolength(this, Label::kDeferred), next(this); |
261 Branch(WordIsPositiveSmi(regexp_lastindex), &next, &call_tolength); | 261 Branch(TaggedIsPositiveSmi(regexp_lastindex), &next, &call_tolength); |
262 | 262 |
263 Bind(&call_tolength); | 263 Bind(&call_tolength); |
264 { | 264 { |
265 Callable tolength_callable = CodeFactory::ToLength(isolate); | 265 Callable tolength_callable = CodeFactory::ToLength(isolate); |
266 var_lastindex.Bind( | 266 var_lastindex.Bind( |
267 CallStub(tolength_callable, context, regexp_lastindex)); | 267 CallStub(tolength_callable, context, regexp_lastindex)); |
268 Goto(&next); | 268 Goto(&next); |
269 } | 269 } |
270 | 270 |
271 Bind(&next); | 271 Bind(&next); |
(...skipping 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2544 Bind(&if_matched); | 2544 Bind(&if_matched); |
2545 { | 2545 { |
2546 Node* result = | 2546 Node* result = |
2547 ConstructNewResultFromMatchInfo(context, match_indices, string); | 2547 ConstructNewResultFromMatchInfo(context, match_indices, string); |
2548 Return(result); | 2548 Return(result); |
2549 } | 2549 } |
2550 } | 2550 } |
2551 | 2551 |
2552 } // namespace internal | 2552 } // namespace internal |
2553 } // namespace v8 | 2553 } // namespace v8 |
OLD | NEW |