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

Side by Side Diff: src/mips/code-stubs-mips.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/js/regexp.js ('k') | src/mips64/code-stubs-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); 1621 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset));
1622 // Calculate number of capture registers (number_of_captures + 1) * 2. 1622 // Calculate number of capture registers (number_of_captures + 1) * 2.
1623 // Multiplying by 2 comes for free since r1 is smi-tagged. 1623 // Multiplying by 2 comes for free since r1 is smi-tagged.
1624 STATIC_ASSERT(kSmiTag == 0); 1624 STATIC_ASSERT(kSmiTag == 0);
1625 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); 1625 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1);
1626 __ Addu(a1, a1, Operand(2)); // a1 was a smi. 1626 __ Addu(a1, a1, Operand(2)); // a1 was a smi.
1627 1627
1628 __ lw(a0, MemOperand(sp, kLastMatchInfoOffset)); 1628 __ lw(a0, MemOperand(sp, kLastMatchInfoOffset));
1629 __ JumpIfSmi(a0, &runtime); 1629 __ JumpIfSmi(a0, &runtime);
1630 __ GetObjectType(a0, a2, a2); 1630 __ GetObjectType(a0, a2, a2);
1631 __ Branch(&runtime, ne, a2, Operand(JS_ARRAY_TYPE)); 1631 __ Branch(&runtime, ne, a2, Operand(JS_OBJECT_TYPE));
1632 // Check that the JSArray is in fast case. 1632 // Check that the object has fast elements.
1633 __ lw(last_match_info_elements, 1633 __ lw(last_match_info_elements,
1634 FieldMemOperand(a0, JSArray::kElementsOffset)); 1634 FieldMemOperand(a0, JSArray::kElementsOffset));
1635 __ lw(a0, FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); 1635 __ lw(a0, FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset));
1636 __ LoadRoot(at, Heap::kFixedArrayMapRootIndex); 1636 __ LoadRoot(at, Heap::kFixedArrayMapRootIndex);
1637 __ Branch(&runtime, ne, a0, Operand(at)); 1637 __ Branch(&runtime, ne, a0, Operand(at));
1638 // Check that the last match info has space for the capture registers and the 1638 // Check that the last match info has space for the capture registers and the
1639 // additional information. 1639 // additional information.
1640 __ lw(a0, 1640 __ lw(a0,
1641 FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); 1641 FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset));
1642 __ Addu(a2, a1, Operand(RegExpImpl::kLastMatchOverhead)); 1642 __ Addu(a2, a1, Operand(RegExpImpl::kLastMatchOverhead));
(...skipping 3761 matching lines...) Expand 10 before | Expand all | Expand 10 after
5404 kStackUnwindSpace, kInvalidStackOffset, 5404 kStackUnwindSpace, kInvalidStackOffset,
5405 return_value_operand, NULL); 5405 return_value_operand, NULL);
5406 } 5406 }
5407 5407
5408 #undef __ 5408 #undef __
5409 5409
5410 } // namespace internal 5410 } // namespace internal
5411 } // namespace v8 5411 } // namespace v8
5412 5412
5413 #endif // V8_TARGET_ARCH_MIPS 5413 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/js/regexp.js ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698