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

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 2244673002: [regexp][liveedit] Fix inconsistent JSArrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « src/arm/code-stubs-arm.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 Register number_of_capture_registers = x12; 1641 Register number_of_capture_registers = x12;
1642 1642
1643 // Calculate number of capture registers (number_of_captures + 1) * 2 1643 // Calculate number of capture registers (number_of_captures + 1) * 2
1644 // and store it in the last match info. 1644 // and store it in the last match info.
1645 __ Ldrsw(x10, 1645 __ Ldrsw(x10,
1646 UntagSmiFieldMemOperand(regexp_data, 1646 UntagSmiFieldMemOperand(regexp_data,
1647 JSRegExp::kIrregexpCaptureCountOffset)); 1647 JSRegExp::kIrregexpCaptureCountOffset));
1648 __ Add(x10, x10, x10); 1648 __ Add(x10, x10, x10);
1649 __ Add(number_of_capture_registers, x10, 2); 1649 __ Add(number_of_capture_registers, x10, 2);
1650 1650
1651 // Check that the fourth object is a JSArray object. 1651 // Check that the fourth object is a JSObject.
1652 DCHECK(jssp.Is(__ StackPointer())); 1652 DCHECK(jssp.Is(__ StackPointer()));
1653 __ Peek(x10, kLastMatchInfoOffset); 1653 __ Peek(x10, kLastMatchInfoOffset);
1654 __ JumpIfSmi(x10, &runtime); 1654 __ JumpIfSmi(x10, &runtime);
1655 __ JumpIfNotObjectType(x10, x11, x11, JS_ARRAY_TYPE, &runtime); 1655 __ JumpIfNotObjectType(x10, x11, x11, JS_OBJECT_TYPE, &runtime);
1656 1656
1657 // Check that the JSArray is the fast case. 1657 // Check that the object has fast elements.
1658 __ Ldr(last_match_info_elements, 1658 __ Ldr(last_match_info_elements,
1659 FieldMemOperand(x10, JSArray::kElementsOffset)); 1659 FieldMemOperand(x10, JSObject::kElementsOffset));
1660 __ Ldr(x10, 1660 __ Ldr(x10,
1661 FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); 1661 FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset));
1662 __ JumpIfNotRoot(x10, Heap::kFixedArrayMapRootIndex, &runtime); 1662 __ JumpIfNotRoot(x10, Heap::kFixedArrayMapRootIndex, &runtime);
1663 1663
1664 // Check that the last match info has space for the capture registers and the 1664 // Check that the last match info has space for the capture registers and the
1665 // additional information (overhead). 1665 // additional information (overhead).
1666 // (number_of_captures + 1) * 2 + overhead <= last match info size 1666 // (number_of_captures + 1) * 2 + overhead <= last match info size
1667 // (number_of_captures * 2) + 2 + overhead <= last match info size 1667 // (number_of_captures * 2) + 2 + overhead <= last match info size
1668 // number_of_capture_registers + overhead <= last match info size 1668 // number_of_capture_registers + overhead <= last match info size
1669 __ Ldrsw(x10, 1669 __ Ldrsw(x10,
(...skipping 3905 matching lines...) Expand 10 before | Expand all | Expand 10 after
5575 kStackUnwindSpace, NULL, spill_offset, 5575 kStackUnwindSpace, NULL, spill_offset,
5576 return_value_operand, NULL); 5576 return_value_operand, NULL);
5577 } 5577 }
5578 5578
5579 #undef __ 5579 #undef __
5580 5580
5581 } // namespace internal 5581 } // namespace internal
5582 } // namespace v8 5582 } // namespace v8
5583 5583
5584 #endif // V8_TARGET_ARCH_ARM64 5584 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698