Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler_mips.cc |
| diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc |
| index 9fa5d9f31afd4d1d932ee5ba1c059f930732ef44..266c5660409db7e1247b0741a67364221d911187 100644 |
| --- a/runtime/vm/flow_graph_compiler_mips.cc |
| +++ b/runtime/vm/flow_graph_compiler_mips.cc |
| @@ -1330,15 +1330,13 @@ void FlowGraphCompiler::EmitMegamorphicInstanceCall( |
| // Load receiver into T0, |
| __ lw(T0, Address(SP, (argument_count - 1) * kWordSize)); |
| Label done; |
| - if (name.raw() == Symbols::hashCode().raw()) { |
| - Label try_onebytestring, megamorphic_call; |
| + if (ShouldInlineSmiStringHashCode(ic_data)) { |
| + Label megamorphic_call; |
| __ Comment("Inlined get:hashCode for Smi and OneByteString"); |
| + __ mov(V0, T0); // Move Smi hashcode to V0. |
| __ andi(CMPRES1, T0, Immediate(kSmiTagMask)); |
| - __ bne(CMPRES1, ZR, &try_onebytestring); // Not Smi. |
| - __ mov(V0, T0); |
| - __ b(&done); |
| + __ beq(CMPRES1, ZR, &done); // Is Smi. |
|
zra
2016/04/27 16:28:17
The mov can go in the branch delay slot:
__ beq(C
srdjan
2016/04/27 18:10:22
Done.
|
| - __ Bind(&try_onebytestring); |
| __ LoadClassId(CMPRES1, T0); // Class ID check. |
| __ BranchNotEqual( |
| CMPRES1, Immediate(kOneByteStringCid), &megamorphic_call); |