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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 2173213002: DBC: Only try Smi fastpath in unoptimized code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index e181c16355ef8bd9730715c8f78d2a06a1004c09..d1f8f924082c0e8a7554a53457e9ebfe22f19cac 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -3186,14 +3186,17 @@ void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
}
#else
- ICData* ic_data = &ICData::ZoneHandle(call_ic_data->Original());
+ ICData* original_ic_data = &ICData::ZoneHandle(call_ic_data->Original());
// Emit smi fast path instruction. If fast-path succeeds it skips the next
- // instruction otherwise it falls through.
- TryFastPathSmiOp(compiler, ic_data, function_name());
+ // instruction otherwise it falls through. Only attempt in unoptimized code
+ // because TryFastPathSmiOp will update original_ic_data.
+ if (!compiler->is_optimizing()) {
+ TryFastPathSmiOp(compiler, original_ic_data, function_name());
+ }
- const intptr_t call_ic_data_kidx = __ AddConstant(*call_ic_data);
- switch (ic_data->NumArgsTested()) {
+ const intptr_t call_ic_data_kidx = __ AddConstant(*original_ic_data);
+ switch (original_ic_data->NumArgsTested()) {
case 1:
if (compiler->is_optimizing()) {
__ InstanceCall1Opt(ArgumentCount(), call_ic_data_kidx);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698