| 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 28693010d888670760939971cecce1f51d4bec2b..7a41583029fa382f8aed202446162e1da390dbf4 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
|
| @@ -598,21 +598,22 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
|
| if (field == null) return node;
|
|
|
| Modifiers modifiers = field.modifiers;
|
| - bool isAssignable = !(modifiers.isFinal() || modifiers.isConst());
|
| + bool isFinalOrConst = 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.
|
| - isAssignable = false;
|
| + isFinalOrConst = true;
|
| }
|
| + 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()) {
|
| - // 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;
|
| + result.setDependsOnSomething();
|
| }
|
| - HFieldGet result = new HFieldGet(
|
| - field, node.inputs[0], isAssignable: isAssignable);
|
|
|
| if (field.getEnclosingClass().isNative()) {
|
| result.instructionType =
|
|
|