Commit 750b7f7a authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: [compiler] Remove broken support for undetectable strings.

Port b62dbf1e

Original commit message:
    Support for undetectable strings was officially dropped in
    https://codereview.chromium.org/916753002, but the compilers
    weren't fixed properly.

R=bmeurer@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1312473012

Cr-Commit-Position: refs/heads/master@{#30390}
parent 7f9685c3
......@@ -4992,13 +4992,8 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
Split(eq, if_true, if_false, fall_through);
} else if (String::Equals(check, factory->string_string())) {
__ JumpIfSmi(r3, if_false);
// Check for undetectable objects => false.
__ CompareObjectType(r3, r3, r4, FIRST_NONSTRING_TYPE);
__ bge(if_false);
__ lbz(r4, FieldMemOperand(r3, Map::kBitFieldOffset));
STATIC_ASSERT((1 << Map::kIsUndetectable) < 0x8000);
__ andi(r0, r4, Operand(1 << Map::kIsUndetectable));
Split(eq, if_true, if_false, fall_through, cr0);
Split(lt, if_true, if_false, fall_through);
} else if (String::Equals(check, factory->symbol_string())) {
__ JumpIfSmi(r3, if_false);
__ CompareObjectType(r3, r3, r4, SYMBOL_TYPE);
......
......@@ -5903,11 +5903,7 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, Label* false_label,
} else if (String::Equals(type_name, factory->string_string())) {
__ JumpIfSmi(input, false_label);
__ CompareObjectType(input, scratch, no_reg, FIRST_NONSTRING_TYPE);
__ bge(false_label);
__ lbz(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset));
__ ExtractBit(r0, scratch, Map::kIsUndetectable);
__ cmpi(r0, Operand::Zero());
final_branch_condition = eq;
final_branch_condition = lt;
} else if (String::Equals(type_name, factory->symbol_string())) {
__ JumpIfSmi(input, false_label);
......
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