Chromium Code Reviews| Index: src/mips/lithium-codegen-mips.cc |
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
| index 4e1cd8140b859d40bd92f7981de5b9d0d05a04b3..5901d1e0bf2de9fb1d8889c3985229a3f5cbe10d 100644 |
| --- a/src/mips/lithium-codegen-mips.cc |
| +++ b/src/mips/lithium-codegen-mips.cc |
| @@ -5553,10 +5553,17 @@ void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| void LCodeGen::DoTypeof(LTypeof* instr) { |
| + DCHECK(ToRegister(instr->value()).is(a3)); |
| DCHECK(ToRegister(instr->result()).is(v0)); |
| - Register input = ToRegister(instr->value()); |
| - __ push(input); |
| - CallRuntime(Runtime::kTypeof, 1, instr); |
| + Label end, do_call; |
| + Register value_register = ToRegister(instr->value()); |
| + __ JumpIfNotSmi(value_register, &do_call); |
| + __ mov(v0, Immediate(isolate()->factory()->number_string())); |
|
paul.l...
2015/04/28 17:03:36
s/b: __ li(v0, Operand(isolate()->factory()->numbe
mvstanton
2015/04/29 06:37:24
Done.
|
| + __ jmp(&end); |
| + __ bind(&do_call); |
| + TypeofStub stub(isolate()); |
| + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| + __ bind(&end); |
| } |