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

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

Issue 2549773002: Internalize strings in-place (Closed)
Patch Set: forgot one Created 4 years 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
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_S390 5 #if V8_TARGET_ARCH_S390
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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 // and go to (1). Otherwise bail out to runtime. 1361 // and go to (1). Otherwise bail out to runtime.
1362 // (4) Sequential string. Load regexp code according to encoding. 1362 // (4) Sequential string. Load regexp code according to encoding.
1363 // (E) Carry on. 1363 // (E) Carry on.
1364 /// [...] 1364 /// [...]
1365 1365
1366 // Deferred code at the end of the stub: 1366 // Deferred code at the end of the stub:
1367 // (5) Long external string? If not, go to (7). 1367 // (5) Long external string? If not, go to (7).
1368 // (6) External string. Make it, offset-wise, look like a sequential string. 1368 // (6) External string. Make it, offset-wise, look like a sequential string.
1369 // Go to (4). 1369 // Go to (4).
1370 // (7) Short external string or not a string? If yes, bail out to runtime. 1370 // (7) Short external string or not a string? If yes, bail out to runtime.
1371 // (8) Sliced string. Replace subject with parent. Go to (1). 1371 // (8) Sliced or thin string. Replace subject with parent. Go to (1).
1372 1372
1373 Label seq_string /* 4 */, external_string /* 6 */, check_underlying /* 1 */, 1373 Label seq_string /* 4 */, external_string /* 6 */, check_underlying /* 1 */,
1374 not_seq_nor_cons /* 5 */, not_long_external /* 7 */; 1374 not_seq_nor_cons /* 5 */, not_long_external /* 7 */;
1375 1375
1376 __ bind(&check_underlying); 1376 __ bind(&check_underlying);
1377 __ LoadP(r2, FieldMemOperand(subject, HeapObject::kMapOffset)); 1377 __ LoadP(r2, FieldMemOperand(subject, HeapObject::kMapOffset));
1378 __ LoadlB(r2, FieldMemOperand(r2, Map::kInstanceTypeOffset)); 1378 __ LoadlB(r2, FieldMemOperand(r2, Map::kInstanceTypeOffset));
1379 1379
1380 // (1) Sequential string? If yes, go to (4). 1380 // (1) Sequential string? If yes, go to (4).
1381 1381
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); 1670 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag));
1671 __ b(&seq_string); // Go to (4). 1671 __ b(&seq_string); // Go to (4).
1672 1672
1673 // (7) Short external string or not a string? If yes, bail out to runtime. 1673 // (7) Short external string or not a string? If yes, bail out to runtime.
1674 __ bind(&not_long_external); 1674 __ bind(&not_long_external);
1675 STATIC_ASSERT(kNotStringTag != 0 && kShortExternalStringTag != 0); 1675 STATIC_ASSERT(kNotStringTag != 0 && kShortExternalStringTag != 0);
1676 __ mov(r0, Operand(kIsNotStringMask | kShortExternalStringMask)); 1676 __ mov(r0, Operand(kIsNotStringMask | kShortExternalStringMask));
1677 __ AndP(r0, r3); 1677 __ AndP(r0, r3);
1678 __ bne(&runtime); 1678 __ bne(&runtime);
1679 1679
1680 // (8) Sliced string. Replace subject with parent. Go to (4). 1680 // (8) Sliced or thin string. Replace subject with parent. Go to (4).
1681 Label thin_string;
1682 __ CmpP(r3, Operand(kThinStringTag));
1683 __ beq(&thin_string);
1681 // Load offset into ip and replace subject string with parent. 1684 // Load offset into ip and replace subject string with parent.
1682 __ LoadP(ip, FieldMemOperand(subject, SlicedString::kOffsetOffset)); 1685 __ LoadP(ip, FieldMemOperand(subject, SlicedString::kOffsetOffset));
1683 __ SmiUntag(ip); 1686 __ SmiUntag(ip);
1684 __ LoadP(subject, FieldMemOperand(subject, SlicedString::kParentOffset)); 1687 __ LoadP(subject, FieldMemOperand(subject, SlicedString::kParentOffset));
1685 __ b(&check_underlying); // Go to (4). 1688 __ b(&check_underlying); // Go to (4).
1689
1690 __ bind(&thin_string);
1691 __ LoadP(subject, FieldMemOperand(subject, ThinString::kActualOffset));
1692 __ b(&check_underlying); // Go to (4).
1686 #endif // V8_INTERPRETED_REGEXP 1693 #endif // V8_INTERPRETED_REGEXP
1687 } 1694 }
1688 1695
1689 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { 1696 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) {
1690 // r2 : number of arguments to the construct function 1697 // r2 : number of arguments to the construct function
1691 // r3 : the function to call 1698 // r3 : the function to call
1692 // r4 : feedback vector 1699 // r4 : feedback vector
1693 // r5 : slot in feedback vector (Smi) 1700 // r5 : slot in feedback vector (Smi)
1694 FrameScope scope(masm, StackFrame::INTERNAL); 1701 FrameScope scope(masm, StackFrame::INTERNAL);
1695 1702
(...skipping 2807 matching lines...) Expand 10 before | Expand all | Expand 10 after
4503 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 4510 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
4504 kStackUnwindSpace, NULL, return_value_operand, NULL); 4511 kStackUnwindSpace, NULL, return_value_operand, NULL);
4505 } 4512 }
4506 4513
4507 #undef __ 4514 #undef __
4508 4515
4509 } // namespace internal 4516 } // namespace internal
4510 } // namespace v8 4517 } // namespace v8
4511 4518
4512 #endif // V8_TARGET_ARCH_S390 4519 #endif // V8_TARGET_ARCH_S390
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698