| Index: src/crankshaft/mips/lithium-codegen-mips.cc
|
| diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc
|
| index 414061d8e3682a843b07ec96f3e8dd0eb2714ea2..1073f86af0a28d9f7602cd1352962cbfee3d917e 100644
|
| --- a/src/crankshaft/mips/lithium-codegen-mips.cc
|
| +++ b/src/crankshaft/mips/lithium-codegen-mips.cc
|
| @@ -1966,29 +1966,30 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
| __ lw(at, FieldMemOperand(reg, String::kLengthOffset));
|
| EmitBranch(instr, ne, at, Operand(zero_reg));
|
| } else {
|
| - ToBooleanStub::Types expected = instr->hydrogen()->expected_input_types();
|
| + ToBooleanICStub::Types expected =
|
| + instr->hydrogen()->expected_input_types();
|
| // Avoid deopts in the case where we've never executed this path before.
|
| - if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic();
|
| + if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic();
|
|
|
| - if (expected.Contains(ToBooleanStub::UNDEFINED)) {
|
| + if (expected.Contains(ToBooleanICStub::UNDEFINED)) {
|
| // undefined -> false.
|
| __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
|
| __ Branch(instr->FalseLabel(chunk_), eq, reg, Operand(at));
|
| }
|
| - if (expected.Contains(ToBooleanStub::BOOLEAN)) {
|
| + if (expected.Contains(ToBooleanICStub::BOOLEAN)) {
|
| // Boolean -> its value.
|
| __ LoadRoot(at, Heap::kTrueValueRootIndex);
|
| __ Branch(instr->TrueLabel(chunk_), eq, reg, Operand(at));
|
| __ LoadRoot(at, Heap::kFalseValueRootIndex);
|
| __ Branch(instr->FalseLabel(chunk_), eq, reg, Operand(at));
|
| }
|
| - if (expected.Contains(ToBooleanStub::NULL_TYPE)) {
|
| + if (expected.Contains(ToBooleanICStub::NULL_TYPE)) {
|
| // 'null' -> false.
|
| __ LoadRoot(at, Heap::kNullValueRootIndex);
|
| __ Branch(instr->FalseLabel(chunk_), eq, reg, Operand(at));
|
| }
|
|
|
| - if (expected.Contains(ToBooleanStub::SMI)) {
|
| + if (expected.Contains(ToBooleanICStub::SMI)) {
|
| // Smis: 0 -> false, all other -> true.
|
| __ Branch(instr->FalseLabel(chunk_), eq, reg, Operand(zero_reg));
|
| __ JumpIfSmi(reg, instr->TrueLabel(chunk_));
|
| @@ -2009,14 +2010,14 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
| }
|
| }
|
|
|
| - if (expected.Contains(ToBooleanStub::SPEC_OBJECT)) {
|
| + if (expected.Contains(ToBooleanICStub::SPEC_OBJECT)) {
|
| // spec object -> true.
|
| __ lbu(at, FieldMemOperand(map, Map::kInstanceTypeOffset));
|
| __ Branch(instr->TrueLabel(chunk_),
|
| ge, at, Operand(FIRST_JS_RECEIVER_TYPE));
|
| }
|
|
|
| - if (expected.Contains(ToBooleanStub::STRING)) {
|
| + if (expected.Contains(ToBooleanICStub::STRING)) {
|
| // String value -> false iff empty.
|
| Label not_string;
|
| __ lbu(at, FieldMemOperand(map, Map::kInstanceTypeOffset));
|
| @@ -2027,14 +2028,14 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
| __ bind(¬_string);
|
| }
|
|
|
| - if (expected.Contains(ToBooleanStub::SYMBOL)) {
|
| + if (expected.Contains(ToBooleanICStub::SYMBOL)) {
|
| // Symbol value -> true.
|
| const Register scratch = scratch1();
|
| __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
|
| __ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE));
|
| }
|
|
|
| - if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
|
| + if (expected.Contains(ToBooleanICStub::SIMD_VALUE)) {
|
| // SIMD value -> true.
|
| const Register scratch = scratch1();
|
| __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
|
| @@ -2042,7 +2043,7 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
| Operand(SIMD128_VALUE_TYPE));
|
| }
|
|
|
| - if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
|
| + if (expected.Contains(ToBooleanICStub::HEAP_NUMBER)) {
|
| // heap number -> false iff +0, -0, or NaN.
|
| DoubleRegister dbl_scratch = double_scratch0();
|
| Label not_heap_number;
|
|
|