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

Side by Side Diff: src/ppc/code-stubs-ppc.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/mips64/code-stubs-mips64.cc ('k') | src/regexp/jsregexp.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 __ LoadP(r4, 1571 __ LoadP(r4,
1572 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); 1572 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset));
1573 // Calculate number of capture registers (number_of_captures + 1) * 2. 1573 // Calculate number of capture registers (number_of_captures + 1) * 2.
1574 // SmiToShortArrayOffset accomplishes the multiplication by 2 and 1574 // SmiToShortArrayOffset accomplishes the multiplication by 2 and
1575 // SmiUntag (which is a nop for 32-bit). 1575 // SmiUntag (which is a nop for 32-bit).
1576 __ SmiToShortArrayOffset(r4, r4); 1576 __ SmiToShortArrayOffset(r4, r4);
1577 __ addi(r4, r4, Operand(2)); 1577 __ addi(r4, r4, Operand(2));
1578 1578
1579 __ LoadP(r3, MemOperand(sp, kLastMatchInfoOffset)); 1579 __ LoadP(r3, MemOperand(sp, kLastMatchInfoOffset));
1580 __ JumpIfSmi(r3, &runtime); 1580 __ JumpIfSmi(r3, &runtime);
1581 __ CompareObjectType(r3, r5, r5, JS_ARRAY_TYPE); 1581 __ CompareObjectType(r3, r5, r5, JS_OBJECT_TYPE);
1582 __ bne(&runtime); 1582 __ bne(&runtime);
1583 // Check that the JSArray is in fast case. 1583 // Check that the object has fast elements.
1584 __ LoadP(last_match_info_elements, 1584 __ LoadP(last_match_info_elements,
1585 FieldMemOperand(r3, JSArray::kElementsOffset)); 1585 FieldMemOperand(r3, JSArray::kElementsOffset));
1586 __ LoadP(r3, 1586 __ LoadP(r3,
1587 FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); 1587 FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset));
1588 __ CompareRoot(r3, Heap::kFixedArrayMapRootIndex); 1588 __ CompareRoot(r3, Heap::kFixedArrayMapRootIndex);
1589 __ bne(&runtime); 1589 __ bne(&runtime);
1590 // Check that the last match info has space for the capture registers and the 1590 // Check that the last match info has space for the capture registers and the
1591 // additional information. 1591 // additional information.
1592 __ LoadP( 1592 __ LoadP(
1593 r3, FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); 1593 r3, FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset));
(...skipping 3878 matching lines...) Expand 10 before | Expand all | Expand 10 after
5472 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); 5472 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize);
5473 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5473 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5474 kStackUnwindSpace, NULL, return_value_operand, NULL); 5474 kStackUnwindSpace, NULL, return_value_operand, NULL);
5475 } 5475 }
5476 5476
5477 #undef __ 5477 #undef __
5478 } // namespace internal 5478 } // namespace internal
5479 } // namespace v8 5479 } // namespace v8
5480 5480
5481 #endif // V8_TARGET_ARCH_PPC 5481 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/regexp/jsregexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698