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

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

Issue 2625933006: MIPS[64]: Fix `Internalize strings in-place (reland)` (Closed)
Patch Set: Fix typo in a comment Created 3 years, 11 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/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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 __ JumpIfNotSmi(a1, &runtime); 1469 __ JumpIfNotSmi(a1, &runtime);
1470 __ lw(a3, FieldMemOperand(a3, String::kLengthOffset)); 1470 __ lw(a3, FieldMemOperand(a3, String::kLengthOffset));
1471 __ Branch(&runtime, ls, a3, Operand(a1)); 1471 __ Branch(&runtime, ls, a3, Operand(a1));
1472 __ sra(a1, a1, kSmiTagSize); // Untag the Smi. 1472 __ sra(a1, a1, kSmiTagSize); // Untag the Smi.
1473 1473
1474 STATIC_ASSERT(kStringEncodingMask == 8); 1474 STATIC_ASSERT(kStringEncodingMask == 8);
1475 STATIC_ASSERT(kOneByteStringTag == 8); 1475 STATIC_ASSERT(kOneByteStringTag == 8);
1476 STATIC_ASSERT(kTwoByteStringTag == 0); 1476 STATIC_ASSERT(kTwoByteStringTag == 0);
1477 __ And(a0, a0, Operand(kStringEncodingMask)); // Non-zero for one-byte. 1477 __ And(a0, a0, Operand(kStringEncodingMask)); // Non-zero for one-byte.
1478 __ lw(t9, FieldMemOperand(regexp_data, JSRegExp::kDataOneByteCodeOffset)); 1478 __ lw(t9, FieldMemOperand(regexp_data, JSRegExp::kDataOneByteCodeOffset));
1479 __ sra(a3, a0, 2); // a3 is 1 for ASCII, 0 for UC16 (used below). 1479 __ sra(a3, a0, 3); // a3 is 1 for ASCII, 0 for UC16 (used below).
1480 __ lw(t1, FieldMemOperand(regexp_data, JSRegExp::kDataUC16CodeOffset)); 1480 __ lw(t1, FieldMemOperand(regexp_data, JSRegExp::kDataUC16CodeOffset));
1481 __ Movz(t9, t1, a0); // If UC16 (a0 is 0), replace t9 w/kDataUC16CodeOffset. 1481 __ Movz(t9, t1, a0); // If UC16 (a0 is 0), replace t9 w/kDataUC16CodeOffset.
1482 1482
1483 // (E) Carry on. String handling is done. 1483 // (E) Carry on. String handling is done.
1484 // t9: irregexp code 1484 // t9: irregexp code
1485 // Check that the irregexp code has been generated for the actual string 1485 // Check that the irregexp code has been generated for the actual string
1486 // encoding. If it has, the field contains a code object otherwise it contains 1486 // encoding. If it has, the field contains a code object otherwise it contains
1487 // a smi (code flushing support). 1487 // a smi (code flushing support).
1488 __ JumpIfSmi(t9, &runtime); 1488 __ JumpIfSmi(t9, &runtime);
1489 1489
(...skipping 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after
4293 kStackUnwindSpace, kInvalidStackOffset, 4293 kStackUnwindSpace, kInvalidStackOffset,
4294 return_value_operand, NULL); 4294 return_value_operand, NULL);
4295 } 4295 }
4296 4296
4297 #undef __ 4297 #undef __
4298 4298
4299 } // namespace internal 4299 } // namespace internal
4300 } // namespace v8 4300 } // namespace v8
4301 4301
4302 #endif // V8_TARGET_ARCH_MIPS 4302 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698