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 | 7 |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.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 1659 matching lines...) Loading... |
1670 a->LoadFixedArrayElement(res_elems, next_i, 0, mode); | 1670 a->LoadFixedArrayElement(res_elems, next_i, 0, mode); |
1671 | 1671 |
1672 Node* const new_match_start = a->SmiSub(next_elem, elem); | 1672 Node* const new_match_start = a->SmiSub(next_elem, elem); |
1673 var_match_start.Bind(new_match_start); | 1673 var_match_start.Bind(new_match_start); |
1674 a->Goto(&loop_epilogue); | 1674 a->Goto(&loop_epilogue); |
1675 } | 1675 } |
1676 } | 1676 } |
1677 | 1677 |
1678 a->Bind(&if_isstring); | 1678 a->Bind(&if_isstring); |
1679 { | 1679 { |
1680 a->Assert(a->IsStringInstanceType(a->LoadInstanceType(elem))); | 1680 a->CSA_ASSERT(a->IsStringInstanceType(a->LoadInstanceType(elem))); |
1681 | 1681 |
1682 Callable call_callable = CodeFactory::Call(isolate); | 1682 Callable call_callable = CodeFactory::Call(isolate); |
1683 Node* const replacement_obj = | 1683 Node* const replacement_obj = |
1684 a->CallJS(call_callable, context, replace_callable, undefined, elem, | 1684 a->CallJS(call_callable, context, replace_callable, undefined, elem, |
1685 var_match_start.value(), subject_string); | 1685 var_match_start.value(), subject_string); |
1686 | 1686 |
1687 Node* const replacement_str = a->ToString(context, replacement_obj); | 1687 Node* const replacement_str = a->ToString(context, replacement_obj); |
1688 a->StoreFixedArrayElement(res_elems, i, replacement_str); | 1688 a->StoreFixedArrayElement(res_elems, i, replacement_str); |
1689 | 1689 |
1690 Node* const elem_length = a->LoadStringLength(elem); | 1690 Node* const elem_length = a->LoadStringLength(elem); |
(...skipping 317 matching lines...) Loading... |
2008 a->Bind(&if_matched); | 2008 a->Bind(&if_matched); |
2009 { | 2009 { |
2010 Node* result = ConstructNewResultFromMatchInfo(isolate, a, context, | 2010 Node* result = ConstructNewResultFromMatchInfo(isolate, a, context, |
2011 match_indices, string); | 2011 match_indices, string); |
2012 a->Return(result); | 2012 a->Return(result); |
2013 } | 2013 } |
2014 } | 2014 } |
2015 | 2015 |
2016 } // namespace internal | 2016 } // namespace internal |
2017 } // namespace v8 | 2017 } // namespace v8 |
OLD | NEW |