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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 1149713002: With --noopt run unoptimized code through optimizer, more optimizations can be done later. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 years, 7 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
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 47e7dab5dd17252dab67b347c45110feb3f8fa34..c2d5002adee7d4bc803e31d733eb57bece8553c7 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -2938,17 +2938,18 @@ static uword TwoArgsSmiOpInlineCacheEntry(Token::Kind kind) {
void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Zone* zone = compiler->zone();
const ICData* call_ic_data = NULL;
- if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) {
+ if (!FLAG_propagate_ic_data || !compiler->is_optimizing() ||
+ (ic_data() == NULL)) {
const Array& arguments_descriptor =
Array::Handle(zone, ArgumentsDescriptor::New(ArgumentCount(),
- argument_names()));
+ argument_names()));
call_ic_data = compiler->GetOrAddInstanceCallICData(
deopt_id(), function_name(), arguments_descriptor,
checked_argument_count());
} else {
call_ic_data = &ICData::ZoneHandle(zone, ic_data()->raw());
}
- if (compiler->is_optimizing()) {
+ if (compiler->is_optimizing() && HasICData()) {
ASSERT(HasICData());
if (ic_data()->NumberOfUsedChecks() > 0) {
const ICData& unary_ic_data =
@@ -3054,7 +3055,8 @@ LocationSummary* StaticCallInstr::MakeLocationSummary(Zone* zone,
void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
const ICData* call_ic_data = NULL;
- if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) {
+ if (!FLAG_propagate_ic_data || !compiler->is_optimizing() ||
+ (ic_data() == NULL)) {
const Array& arguments_descriptor =
Array::Handle(ArgumentsDescriptor::New(ArgumentCount(),
argument_names()));

Powered by Google App Engine
This is Rietveld 408576698