| 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 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 ParameterMode mode) { | 1458 ParameterMode mode) { |
| 1459 DCHECK(mode == CodeStubAssembler::INTPTR_PARAMETERS); | 1459 DCHECK(mode == CodeStubAssembler::INTPTR_PARAMETERS); |
| 1460 | 1460 |
| 1461 CodeStubAssembler* a = assembler_; | 1461 CodeStubAssembler* a = assembler_; |
| 1462 | 1462 |
| 1463 CSA_ASSERT(a, a->IntPtrGreaterThan(current_capacity, a->IntPtrConstant(0))); | 1463 CSA_ASSERT(a, a->IntPtrGreaterThan(current_capacity, a->IntPtrConstant(0))); |
| 1464 CSA_ASSERT(a, a->IntPtrGreaterThan(new_capacity, current_capacity)); | 1464 CSA_ASSERT(a, a->IntPtrGreaterThan(new_capacity, current_capacity)); |
| 1465 | 1465 |
| 1466 const ElementsKind kind = FAST_ELEMENTS; | 1466 const ElementsKind kind = FAST_ELEMENTS; |
| 1467 const WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER; | 1467 const WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER; |
| 1468 const CodeStubAssembler::AllocationFlags flags = |
| 1469 CodeStubAssembler::kAllowLargeObjectAllocation; |
| 1468 | 1470 |
| 1469 Node* const from_array = var_array_.value(); | 1471 Node* const from_array = var_array_.value(); |
| 1470 Node* const to_array = a->AllocateFixedArray(kind, new_capacity, mode); | 1472 Node* const to_array = |
| 1473 a->AllocateFixedArray(kind, new_capacity, mode, flags); |
| 1471 a->CopyFixedArrayElements(kind, from_array, kind, to_array, | 1474 a->CopyFixedArrayElements(kind, from_array, kind, to_array, |
| 1472 current_capacity, new_capacity, barrier_mode, | 1475 current_capacity, new_capacity, barrier_mode, |
| 1473 mode); | 1476 mode); |
| 1474 | 1477 |
| 1475 return to_array; | 1478 return to_array; |
| 1476 } | 1479 } |
| 1477 | 1480 |
| 1478 private: | 1481 private: |
| 1479 CodeStubAssembler* const assembler_; | 1482 CodeStubAssembler* const assembler_; |
| 1480 Variable var_array_; | 1483 Variable var_array_; |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2521 Bind(&if_matched); | 2524 Bind(&if_matched); |
| 2522 { | 2525 { |
| 2523 Node* result = | 2526 Node* result = |
| 2524 ConstructNewResultFromMatchInfo(context, match_indices, string); | 2527 ConstructNewResultFromMatchInfo(context, match_indices, string); |
| 2525 Return(result); | 2528 Return(result); |
| 2526 } | 2529 } |
| 2527 } | 2530 } |
| 2528 | 2531 |
| 2529 } // namespace internal | 2532 } // namespace internal |
| 2530 } // namespace v8 | 2533 } // namespace v8 |
| OLD | NEW |