Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Unified Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 1920103004: Added flag --inline_smi_string_hashcode and --inline_smi_string_hashcode_ratio to decide when/if sh… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Review addressed Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c63f850a1157b47a663d18da5ad6054a9bfdee39 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");
__ andi(CMPRES1, T0, Immediate(kSmiTagMask));
- __ bne(CMPRES1, ZR, &try_onebytestring); // Not Smi.
- __ mov(V0, T0);
- __ b(&done);
+ __ beq(CMPRES1, ZR, &done); // Is Smi.
+ __ delay_slot()->mov(V0, T0); // Move Smi hashcode to V0.
- __ Bind(&try_onebytestring);
__ LoadClassId(CMPRES1, T0); // Class ID check.
__ BranchNotEqual(
CMPRES1, Immediate(kOneByteStringCid), &megamorphic_call);
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698