Chromium Code Reviews| Index: src/arm/lithium-arm.cc |
| =================================================================== |
| --- src/arm/lithium-arm.cc (revision 5982) |
| +++ src/arm/lithium-arm.cc (working copy) |
| @@ -206,6 +206,13 @@ |
| } |
| +void LIsObjectAndBranch::PrintDataTo(StringStream* stream) const { |
| + stream->Add("if is_object("); |
| + input()->PrintTo(stream); |
| + stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| +} |
| + |
| + |
| void LIsSmiAndBranch::PrintDataTo(StringStream* stream) const { |
| stream->Add("if is_smi("); |
| input()->PrintTo(stream); |
| @@ -1238,6 +1245,15 @@ |
| temp, |
| first_id, |
| second_id); |
| + } else if (v->IsIsObject()) { |
| + HIsObject* compare = HIsObject::cast(v); |
| + ASSERT(compare->value()->representation().IsTagged()); |
| + |
| + return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), |
|
Kevin Millikin (Chromium)
2010/12/15 11:45:38
Since evaluation order is unspecified and we want
|
| + TempRegister(), |
| + TempRegister(), |
| + first_id, |
| + second_id); |
| } else if (v->IsCompareJSObjectEq()) { |
| HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); |
| return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), |
| @@ -1597,6 +1613,14 @@ |
| } |
| +LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { |
| + ASSERT(instr->value()->representation().IsTagged()); |
| + LOperand* value = UseRegisterAtStart(instr->value()); |
| + |
| + return DefineAsRegister(new LIsObject(value, TempRegister())); |
| +} |
| + |
| + |
| LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { |
| ASSERT(instr->value()->representation().IsTagged()); |
| LOperand* value = UseAtStart(instr->value()); |