Commit aa0cb2ea authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: Internalize strings in-place (reland)

Port 4c699e34

Original Commit Message:

    using newly introduced ThinStrings, which store a pointer to the actual,
    internalized string they represent.

    (Previously landed as #42168 / af51befe.

R=jkummerow@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4520
LOG=N

Review-Url: https://codereview.chromium.org/2628643002
Cr-Commit-Position: refs/heads/master@{#42202}
parent 904bee3b
......@@ -1386,7 +1386,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// (1) Sequential string? If yes, go to (4).
STATIC_ASSERT((kIsNotStringMask | kStringRepresentationMask |
kShortExternalStringMask) == 0x93);
kShortExternalStringMask) == 0xa7);
__ andi(r4, r3, Operand(kIsNotStringMask | kStringRepresentationMask |
kShortExternalStringMask));
STATIC_ASSERT((kStringTag | kSeqStringTag) == 0);
......@@ -1424,9 +1424,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ ble(&runtime);
__ SmiUntag(r4);
STATIC_ASSERT(4 == kOneByteStringTag);
STATIC_ASSERT(8 == kOneByteStringTag);
STATIC_ASSERT(kTwoByteStringTag == 0);
STATIC_ASSERT(kStringEncodingMask == 4);
STATIC_ASSERT(kStringEncodingMask == 8);
__ ExtractBitMask(r6, r3, kStringEncodingMask, SetRC);
__ beq(&encoding_type_UC16, cr0);
__ LoadP(code,
......
......@@ -1383,7 +1383,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// (1) Sequential string? If yes, go to (4).
STATIC_ASSERT((kIsNotStringMask | kStringRepresentationMask |
kShortExternalStringMask) == 0x93);
kShortExternalStringMask) == 0xa7);
__ mov(r3, Operand(kIsNotStringMask | kStringRepresentationMask |
kShortExternalStringMask));
__ AndP(r3, r2);
......@@ -1422,9 +1422,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ ble(&runtime);
__ SmiUntag(r3);
STATIC_ASSERT(4 == kOneByteStringTag);
STATIC_ASSERT(8 == kOneByteStringTag);
STATIC_ASSERT(kTwoByteStringTag == 0);
STATIC_ASSERT(kStringEncodingMask == 4);
STATIC_ASSERT(kStringEncodingMask == 8);
__ ExtractBitMask(r5, r2, kStringEncodingMask, SetRC);
__ beq(&encoding_type_UC16, Label::kNear);
__ LoadP(code,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment