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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 2149993006: DBC: Make unoptimized static calls call through ICData (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments 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 | « runtime/vm/instructions_dbc.cc ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | 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 a2a9d2768a3eeca3dde6f90e183d07cca37b1d3b..e181c16355ef8bd9730715c8f78d2a06a1004c09 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -3280,7 +3280,6 @@ LocationSummary* StaticCallInstr::MakeLocationSummary(Zone* zone,
void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-#if !defined(TARGET_ARCH_DBC)
const ICData* call_ic_data = NULL;
if (!FLAG_propagate_ic_data || !compiler->is_optimizing() ||
(ic_data() == NULL)) {
@@ -3306,6 +3305,8 @@ void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
} else {
call_ic_data = &ICData::ZoneHandle(ic_data()->raw());
}
+
+#if !defined(TARGET_ARCH_DBC)
compiler->GenerateStaticCall(deopt_id(),
token_pos(),
function(),
@@ -3321,17 +3322,20 @@ void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Array::Handle(ic_data()->arguments_descriptor());
const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor);
- __ PushConstant(function());
- __ StaticCall(ArgumentCount(), argdesc_kidx);
- RawPcDescriptors::Kind kind = (compiler->is_optimizing())
- ? RawPcDescriptors::kOther
- : RawPcDescriptors::kUnoptStaticCall;
- compiler->AddCurrentDescriptor(kind, deopt_id(), token_pos());
-
- compiler->RecordAfterCall(this);
-
if (compiler->is_optimizing()) {
+ __ PushConstant(function());
+ __ StaticCall(ArgumentCount(), argdesc_kidx);
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther,
+ deopt_id(), token_pos());
+ compiler->RecordAfterCall(this);
__ PopLocal(locs()->out(0).reg());
+ } else {
+ const intptr_t ic_data_kidx = __ AddConstant(*call_ic_data);
+ __ PushConstant(ic_data_kidx);
+ __ IndirectStaticCall(ArgumentCount(), argdesc_kidx);
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kUnoptStaticCall,
+ deopt_id(), token_pos());
+ compiler->RecordAfterCall(this);
}
#endif // !defined(TARGET_ARCH_DBC)
}
« no previous file with comments | « runtime/vm/instructions_dbc.cc ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698