| Index: src/ppc/lithium-codegen-ppc.cc
|
| diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc
|
| index 2ddb658c35c6c765b35fe31c4afccf2d88f7ed74..2977da5ebc79a8d9fd04b5e1f55363ff8faeda6d 100644
|
| --- a/src/ppc/lithium-codegen-ppc.cc
|
| +++ b/src/ppc/lithium-codegen-ppc.cc
|
| @@ -5823,9 +5823,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(r6));
|
| + DCHECK(ToRegister(instr->result()).is(r3));
|
| + Label end, do_call;
|
| + Register value_register = ToRegister(instr->value());
|
| + __ JumpIfNotSmi(value_register, &do_call);
|
| + __ mov(r3, Operand(isolate()->factory()->number_string()));
|
| + __ b(&end);
|
| + __ bind(&do_call);
|
| + TypeofStub stub(isolate());
|
| + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
| + __ bind(&end);
|
| }
|
|
|
|
|
|
|