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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart

Issue 12381080: Address code review comments on r19350 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index 7a41583029fa382f8aed202446162e1da390dbf4..28693010d888670760939971cecce1f51d4bec2b 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -598,22 +598,21 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
if (field == null) return node;
Modifiers modifiers = field.modifiers;
- bool isFinalOrConst = modifiers.isFinal() || modifiers.isConst();
+ bool isAssignable = !(modifiers.isFinal() || modifiers.isConst());
if (!compiler.resolverWorld.hasInvokedSetter(field, compiler)) {
// If no setter is ever used for this field it is only initialized in the
// initializer list.
- isFinalOrConst = true;
+ isAssignable = false;
}
- HFieldGet result = new HFieldGet(
- field, node.inputs[0], isAssignable: !isFinalOrConst);
-
- // Some native fields are views of data that may be changed by operations.
- // E.g. node.firstChild depends on parentNode.removeBefore(n1, n2).
- // TODO(sra): Refine the effect classification so that native effects are
- // distinct from ordinary Dart effects.
if (field.isNative()) {
- result.setDependsOnSomething();
+ // Some native fields are views of data that may be changed by operations.
+ // E.g. node.firstChild depends on parentNode.removeBefore(n1, n2).
+ // TODO(sra): Refine the effect classification so that native effects are
+ // distinct from ordinary Dart effects.
+ isAssignable = true;
}
+ HFieldGet result = new HFieldGet(
+ field, node.inputs[0], isAssignable: isAssignable);
if (field.getEnclosingClass().isNative()) {
result.instructionType =
« 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