| Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| index a61c7e85a864347de4ce36d1b7388961e747cf7a..1ab19ec36e4760693a82839af6baf454e44bf46e 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| @@ -116,7 +116,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| JavaScriptBackend get backend => compiler.backend;
|
|
|
| @override
|
| - TreeElements get elements => resolvedAst.elements;
|
| + TreeElements get elements => astAdapter.elements;
|
|
|
| SourceInformationBuilder sourceInformationBuilder;
|
| KernelAstAdapter astAdapter;
|
| @@ -298,8 +298,12 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| if (field.initializer == null) {
|
| fieldValues[field] = graph.addConstantNull(closedWorld);
|
| } else {
|
| + // Gotta update the resolvedAst when we're looking at field values
|
| + // outside the constructor.
|
| + astAdapter.pushResolvedAst(field);
|
| field.initializer.accept(this);
|
| fieldValues[field] = pop();
|
| + astAdapter.popResolvedAstStack();
|
| }
|
| }
|
|
|
| @@ -386,7 +390,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| return builtArguments;
|
| }
|
|
|
| - /// Inlines the given super [constructor]'s initializers by collecting it's
|
| + /// Inlines the given super [constructor]'s initializers by collecting its
|
| /// field values and building its constructor initializers. We visit super
|
| /// constructors all the way up to the [Object] constructor.
|
| void _buildInlinedInitializers(ir.Constructor constructor,
|
| @@ -793,8 +797,8 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| HLoopInformation loopInfo = current.loopInformation;
|
| HBasicBlock loopEntryBlock = current;
|
| HBasicBlock bodyEntryBlock = current;
|
| - JumpTarget target =
|
| - elements.getTargetDefinition(astAdapter.getNode(doStatement));
|
| + JumpTarget target = astAdapter.elements
|
| + .getTargetDefinition(astAdapter.getNode(doStatement));
|
| bool hasContinues = target != null && target.isContinueTarget;
|
| if (hasContinues) {
|
| // Add extra block to hang labels on.
|
| @@ -906,8 +910,8 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| // Since the body of the loop has a break, we attach a synthesized label
|
| // to the body.
|
| SubGraph bodyGraph = new SubGraph(bodyEntryBlock, bodyExitBlock);
|
| - JumpTarget target =
|
| - elements.getTargetDefinition(astAdapter.getNode(doStatement));
|
| + JumpTarget target = astAdapter.elements
|
| + .getTargetDefinition(astAdapter.getNode(doStatement));
|
| LabelDefinition label = target.addLabel(null, 'loop');
|
| label.setBreakTarget();
|
| HLabeledBlockInformation info = new HLabeledBlockInformation(
|
|
|