| Index: src/mips64/lithium-codegen-mips64.cc
|
| diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc
|
| index fa75afd89d5150ac1824b0407c1df52c0c6bb222..223370f7113b74c49e89e64573456c6ad3bbd239 100644
|
| --- a/src/mips64/lithium-codegen-mips64.cc
|
| +++ b/src/mips64/lithium-codegen-mips64.cc
|
| @@ -5627,10 +5627,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);
|
| + __ li(v0, Operand(isolate()->factory()->number_string()));
|
| + __ jmp(&end);
|
| + __ bind(&do_call);
|
| + TypeofStub stub(isolate());
|
| + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
| + __ bind(&end);
|
| }
|
|
|
|
|
|
|