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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm64/code-stubs-arm64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ARM 5 #if V8_TARGET_ARCH_ARM
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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 __ ldr(r1, 1492 __ ldr(r1,
1493 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); 1493 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset));
1494 // Calculate number of capture registers (number_of_captures + 1) * 2. 1494 // Calculate number of capture registers (number_of_captures + 1) * 2.
1495 // Multiplying by 2 comes for free since r1 is smi-tagged. 1495 // Multiplying by 2 comes for free since r1 is smi-tagged.
1496 STATIC_ASSERT(kSmiTag == 0); 1496 STATIC_ASSERT(kSmiTag == 0);
1497 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); 1497 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1);
1498 __ add(r1, r1, Operand(2)); // r1 was a smi. 1498 __ add(r1, r1, Operand(2)); // r1 was a smi.
1499 1499
1500 __ ldr(r0, MemOperand(sp, kLastMatchInfoOffset)); 1500 __ ldr(r0, MemOperand(sp, kLastMatchInfoOffset));
1501 __ JumpIfSmi(r0, &runtime); 1501 __ JumpIfSmi(r0, &runtime);
1502 __ CompareObjectType(r0, r2, r2, JS_ARRAY_TYPE); 1502 __ CompareObjectType(r0, r2, r2, JS_OBJECT_TYPE);
1503 __ b(ne, &runtime); 1503 __ b(ne, &runtime);
1504 // Check that the JSArray is in fast case. 1504 // Check that the object has fast elements.
1505 __ ldr(last_match_info_elements, 1505 __ ldr(last_match_info_elements,
1506 FieldMemOperand(r0, JSArray::kElementsOffset)); 1506 FieldMemOperand(r0, JSArray::kElementsOffset));
1507 __ ldr(r0, FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); 1507 __ ldr(r0, FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset));
1508 __ CompareRoot(r0, Heap::kFixedArrayMapRootIndex); 1508 __ CompareRoot(r0, Heap::kFixedArrayMapRootIndex);
1509 __ b(ne, &runtime); 1509 __ b(ne, &runtime);
1510 // Check that the last match info has space for the capture registers and the 1510 // Check that the last match info has space for the capture registers and the
1511 // additional information. 1511 // additional information.
1512 __ ldr(r0, 1512 __ ldr(r0,
1513 FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); 1513 FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset));
1514 __ add(r2, r1, Operand(RegExpImpl::kLastMatchOverhead)); 1514 __ add(r2, r1, Operand(RegExpImpl::kLastMatchOverhead));
(...skipping 3699 matching lines...) Expand 10 before | Expand all | Expand 10 after
5214 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5214 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5215 kStackUnwindSpace, NULL, return_value_operand, NULL); 5215 kStackUnwindSpace, NULL, return_value_operand, NULL);
5216 } 5216 }
5217 5217
5218 #undef __ 5218 #undef __
5219 5219
5220 } // namespace internal 5220 } // namespace internal
5221 } // namespace v8 5221 } // namespace v8
5222 5222
5223 #endif // V8_TARGET_ARCH_ARM 5223 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698