Chromium Code Reviews| Index: runtime/vm/intermediate_language_ia32.cc |
| =================================================================== |
| --- runtime/vm/intermediate_language_ia32.cc (revision 38158) |
| +++ runtime/vm/intermediate_language_ia32.cc (working copy) |
| @@ -945,17 +945,15 @@ |
| void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| const Register object = locs()->in(0).reg(); |
| const Register result = locs()->out(0).reg(); |
| - Label not_smi, done; |
| + Label done; |
| // We don't use Assembler::LoadTaggedClassIdMayBeSmi() here---which uses |
| // a conditional move instead, and requires an additional register---because |
| // it is slower, probably due to branch prediction usually working just fine |
| // in this case. |
| + __ movl(result, Immediate(kSmiCid << 1)); |
|
srdjan
2014/07/11 18:23:30
ASSERT result != object
zra
2014/07/11 18:28:41
Done.
|
| __ testl(object, Immediate(kSmiTagMask)); |
| - __ j(NOT_ZERO, ¬_smi, Assembler::kNearJump); |
| - __ movl(result, Immediate(Smi::RawValue(kSmiCid))); |
| - __ jmp(&done, Assembler::kNearJump); |
| - __ Bind(¬_smi); |
| + __ j(EQUAL, &done, Assembler::kNearJump); |
| __ LoadClassId(result, object); |
| __ SmiTag(result); |
| __ Bind(&done); |