| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 394c6bd7253fd4f50b0d33f00effddecb5fef8eb..e91fddfdd318cee3307b53338cbe218c40575144 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -5550,9 +5550,17 @@ void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
|
|
|
|
|
| void LCodeGen::DoTypeof(LTypeof* instr) {
|
| - Register input = ToRegister(instr->value());
|
| - __ push(input);
|
| - CallRuntime(Runtime::kTypeof, 1, instr);
|
| + DCHECK(ToRegister(instr->value()).is(r3));
|
| + DCHECK(ToRegister(instr->result()).is(r0));
|
| + Label end, do_call;
|
| + Register value_register = ToRegister(instr->value());
|
| + __ JumpIfNotSmi(value_register, &do_call);
|
| + __ mov(r0, Operand(isolate()->factory()->number_string()));
|
| + __ jmp(&end);
|
| + __ bind(&do_call);
|
| + TypeofStub stub(isolate());
|
| + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
| + __ bind(&end);
|
| }
|
|
|
|
|
|
|