mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:37:12 +00:00
Don't register code for CHA or field guard deopt when precompiling.
dart2js ARM -0.5% size R=srdjan@google.com Review URL: https://codereview.chromium.org/1430973005 .
This commit is contained in:
parent
720e67ea1a
commit
ab77310444
|
@ -795,20 +795,23 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline,
|
||||||
function.InstallOptimizedCode(code, is_osr);
|
function.InstallOptimizedCode(code, is_osr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(srdjan): In background compilation, verify that CHA has not
|
// TODO(srdjan): In background compilation, verify that CHA and field
|
||||||
// been invalidated in the meantime.
|
// guards have not been invalidated in the meantime.
|
||||||
// Register code with the classes it depends on because of CHA.
|
// Register code with the classes it depends on because of CHA and
|
||||||
for (intptr_t i = 0;
|
// fields it depends on because of store guards, unless we cannot
|
||||||
i < thread->cha()->leaf_classes().length();
|
// deopt.
|
||||||
++i) {
|
if (Compiler::allow_recompilation()) {
|
||||||
thread->cha()->leaf_classes()[i]->RegisterCHACode(code);
|
for (intptr_t i = 0;
|
||||||
}
|
i < thread->cha()->leaf_classes().length();
|
||||||
|
++i) {
|
||||||
for (intptr_t i = 0;
|
thread->cha()->leaf_classes()[i]->RegisterCHACode(code);
|
||||||
i < flow_graph->guarded_fields()->length();
|
}
|
||||||
i++) {
|
for (intptr_t i = 0;
|
||||||
const Field* field = (*flow_graph->guarded_fields())[i];
|
i < flow_graph->guarded_fields()->length();
|
||||||
field->RegisterDependentCode(code);
|
i++) {
|
||||||
|
const Field* field = (*flow_graph->guarded_fields())[i];
|
||||||
|
field->RegisterDependentCode(code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else { // not optimized.
|
} else { // not optimized.
|
||||||
if (!Compiler::always_optimize() &&
|
if (!Compiler::always_optimize() &&
|
||||||
|
|
Loading…
Reference in a new issue