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

Unified Diff: pkg/compiler/lib/src/ssa/optimize.dart

Issue 2609063002: Further reduce use of Element in codegen. (Closed)
Patch Set: Created 3 years, 12 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: pkg/compiler/lib/src/ssa/optimize.dart
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index 2c6cdb82e8bd4d90801d3a7cb707629166d96462..8ee546c951a59044e84e36783da0ab2f391b24ef 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -748,7 +748,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
if (expression.isInteger(closedWorld)) {
if (element == commonElements.intClass ||
element == commonElements.numClass ||
- Elements.isNumberOrStringSupertype(element, commonElements)) {
+ commonElements.isNumberOrStringSupertype(element)) {
return graph.addConstantBool(true, closedWorld);
} else if (element == commonElements.doubleClass) {
// We let the JS semantics decide for that check. Currently
@@ -760,7 +760,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
} else if (expression.isDouble(closedWorld)) {
if (element == commonElements.doubleClass ||
element == commonElements.numClass ||
- Elements.isNumberOrStringSupertype(element, commonElements)) {
+ commonElements.isNumberOrStringSupertype(element)) {
return graph.addConstantBool(true, closedWorld);
} else if (element == commonElements.intClass) {
// We let the JS semantics decide for that check. Currently
@@ -2306,11 +2306,12 @@ class SsaLoadElimination extends HBaseVisitor implements OptimizationPhase {
memorySet.registerAllocation(instruction);
if (shouldTrackInitialValues(instruction)) {
int argumentIndex = 0;
- instruction.element.forEachInstanceField((_, FieldElement member) {
+ compiler.codegenWorld.forEachInstanceField(instruction.element,
+ (_, FieldElement member) {
if (compiler.elementHasCompileTimeError(member)) return;
memorySet.registerFieldValue(
member, instruction, instruction.inputs[argumentIndex++]);
- }, includeSuperAndInjectedMembers: true);
+ });
}
// In case this instruction has as input non-escaping objects, we
// need to mark these objects as escaping.

Powered by Google App Engine
This is Rietveld 408576698