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

Side by Side Diff: tests/compiler/dart2js/analyze_dart2js_helpers_test.dart

Issue 1881013002: Expand ResolvedAst to handle synthetic constructors. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments + fix test, cps and compilation units for injected members. Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/related_types.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.analyze_helpers.test; 5 library dart2js.analyze_helpers.test;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:compiler/compiler_new.dart' show 10 import 'package:compiler/compiler_new.dart' show
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 AnalyzableElement get analyzedElement => resolvedAst.element; 87 AnalyzableElement get analyzedElement => resolvedAst.element;
88 88
89 HelperAnalyzer(this.diagnostics) : super(null); 89 HelperAnalyzer(this.diagnostics) : super(null);
90 90
91 @override 91 @override
92 void apply(Node node, [_]) { 92 void apply(Node node, [_]) {
93 node.accept(this); 93 node.accept(this);
94 } 94 }
95 95
96 void analyze(ResolvedAst resolvedAst) { 96 void analyze(ResolvedAst resolvedAst) {
97 if (resolvedAst.node == null) { 97 if (resolvedAst.kind != ResolvedAstKind.PARSED) {
98 // Skip synthesized members. 98 // Skip synthesized members.
99 return; 99 return;
100 } 100 }
101 this.resolvedAst = resolvedAst; 101 this.resolvedAst = resolvedAst;
102 apply(resolvedAst.node); 102 apply(resolvedAst.node);
103 this.resolvedAst = null; 103 this.resolvedAst = null;
104 } 104 }
105 105
106 bool isHelper(Element element) { 106 bool isHelper(Element element) {
107 Uri uri = element.library.canonicalUri; 107 Uri uri = element.library.canonicalUri;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 228
229 @override 229 @override
230 void visitConstConstructorInvoke( 230 void visitConstConstructorInvoke(
231 NewExpression node, 231 NewExpression node,
232 ConstructedConstantExpression constant, 232 ConstructedConstantExpression constant,
233 _) { 233 _) {
234 checkAccess(node, constant.target); 234 checkAccess(node, constant.target);
235 } 235 }
236 } 236 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/related_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698