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

Unified Diff: src/arm64/code-stubs-arm64.cc

Issue 2621913002: Revert of Internalize strings in-place (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm64/codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index f61df949b0d79de032ab5409d03d8cacdd8b375e..c9718cab732a148d7efbf8db85e9b7fdec100bb0 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -1445,7 +1445,7 @@
// (6) External string. Make it, offset-wise, look like a sequential string.
// Go to (4).
// (7) Short external string or not a string? If yes, bail out to runtime.
- // (8) Sliced or thin string. Replace subject with parent. Go to (1).
+ // (8) Sliced string. Replace subject with parent. Go to (1).
Label check_underlying; // (1)
Label seq_string; // (4)
@@ -1479,7 +1479,6 @@
// (2) Sequential or cons? If not, go to (5).
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
- STATIC_ASSERT(kThinStringTag > kExternalStringTag);
STATIC_ASSERT(kIsNotStringMask > kExternalStringTag);
STATIC_ASSERT(kShortExternalStringTag > kExternalStringTag);
__ Cmp(string_representation, kExternalStringTag);
@@ -1507,10 +1506,10 @@
// before entering the exit frame.
__ SmiUntag(x1, x10);
- // The fourth bit determines the string encoding in string_type.
- STATIC_ASSERT(kOneByteStringTag == 0x08);
+ // The third bit determines the string encoding in string_type.
+ STATIC_ASSERT(kOneByteStringTag == 0x04);
STATIC_ASSERT(kTwoByteStringTag == 0x00);
- STATIC_ASSERT(kStringEncodingMask == 0x08);
+ STATIC_ASSERT(kStringEncodingMask == 0x04);
// Find the code object based on the assumptions above.
// kDataOneByteCodeOffset and kDataUC16CodeOffset are adjacent, adds an offset
@@ -1518,7 +1517,7 @@
STATIC_ASSERT(JSRegExp::kDataOneByteCodeOffset + kPointerSize ==
JSRegExp::kDataUC16CodeOffset);
__ Mov(x10, kPointerSize);
- // We will need the encoding later: Latin1 = 0x08
+ // We will need the encoding later: Latin1 = 0x04
// UC16 = 0x00
__ Ands(string_encoding, string_type, kStringEncodingMask);
__ CzeroX(x10, ne);
@@ -1566,10 +1565,10 @@
__ Ldr(length, UntagSmiFieldMemOperand(subject, String::kLengthOffset));
// Handle UC16 encoding, two bytes make one character.
- // string_encoding: if Latin1: 0x08
+ // string_encoding: if Latin1: 0x04
// if UC16: 0x00
- STATIC_ASSERT(kStringEncodingMask == 0x08);
- __ Ubfx(string_encoding, string_encoding, 3, 1);
+ STATIC_ASSERT(kStringEncodingMask == 0x04);
+ __ Ubfx(string_encoding, string_encoding, 2, 1);
__ Eor(string_encoding, string_encoding, 1);
// string_encoding: if Latin1: 0
// if UC16: 1
@@ -1782,17 +1781,10 @@
kShortExternalStringMask | kIsNotStringMask,
&runtime);
- // (8) Sliced or thin string. Replace subject with parent.
- Label thin_string;
- __ Cmp(string_representation, kThinStringTag);
- __ B(eq, &thin_string);
+ // (8) Sliced string. Replace subject with parent.
__ Ldr(sliced_string_offset,
UntagSmiFieldMemOperand(subject, SlicedString::kOffsetOffset));
__ Ldr(subject, FieldMemOperand(subject, SlicedString::kParentOffset));
- __ B(&check_underlying); // Go to (1).
-
- __ bind(&thin_string);
- __ Ldr(subject, FieldMemOperand(subject, ThinString::kActualOffset));
__ B(&check_underlying); // Go to (1).
#endif
}
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm64/codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698