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

Side by Side Diff: tests/compiler/dart2js/inference/inference_test_helper.dart

Issue 2935063002: Add ClosedWorld.elementEnvironment and remove Compiler.elementEnvironment (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:compiler/src/common.dart'; 5 import 'package:compiler/src/common.dart';
6 import 'package:compiler/src/common_elements.dart'; 6 import 'package:compiler/src/common_elements.dart';
7 import 'package:compiler/src/compiler.dart'; 7 import 'package:compiler/src/compiler.dart';
8 import 'package:compiler/src/elements/elements.dart'; 8 import 'package:compiler/src/elements/elements.dart';
9 import 'package:compiler/src/elements/entities.dart'; 9 import 'package:compiler/src/elements/entities.dart';
10 import 'package:compiler/src/resolution/tree_elements.dart'; 10 import 'package:compiler/src/resolution/tree_elements.dart';
(...skipping 28 matching lines...) Expand all
39 }); 39 });
40 } else if (member.isTypedef) { 40 } else if (member.isTypedef) {
41 // Skip. 41 // Skip.
42 } else { 42 } else {
43 checkMember(compiler, expectedMap, member); 43 checkMember(compiler, expectedMap, member);
44 } 44 }
45 }); 45 });
46 expectedMap.forEach((Id id, String expected) { 46 expectedMap.forEach((Id id, String expected) {
47 reportHere( 47 reportHere(
48 compiler.reporter, 48 compiler.reporter,
49 computeSpannable(compiler.elementEnvironment, mainUri, id), 49 computeSpannable(compiler.resolution.elementEnvironment, mainUri, id),
50 'expected:${expected},actual:null'); 50 'expected:${expected},actual:null');
51 }); 51 });
52 Expect.isTrue(expectedMap.isEmpty, "Ids not found: $expectedMap."); 52 Expect.isTrue(expectedMap.isEmpty, "Ids not found: $expectedMap.");
53 } 53 }
54 54
55 void checkMemberAstTypeMasks( 55 void checkMemberAstTypeMasks(
56 Compiler compiler, Map<Id, String> expectedMap, MemberElement member) { 56 Compiler compiler, Map<Id, String> expectedMap, MemberElement member) {
57 ResolvedAst resolvedAst = member.resolvedAst; 57 ResolvedAst resolvedAst = member.resolvedAst;
58 if (resolvedAst.kind != ResolvedAstKind.PARSED) return; 58 if (resolvedAst.kind != ResolvedAstKind.PARSED) return;
59 compiler.reporter.withCurrentElement(member.implementation, () { 59 compiler.reporter.withCurrentElement(member.implementation, () {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 visitSend(Send node) { 173 visitSend(Send node) {
174 checkSend(node); 174 checkSend(node);
175 visitNode(node); 175 visitNode(node);
176 } 176 }
177 177
178 visitSendSet(SendSet node) { 178 visitSendSet(SendSet node) {
179 checkSend(node); 179 checkSend(node);
180 visitNode(node); 180 visitNode(node);
181 } 181 }
182 } 182 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/dill_loader_test.dart ('k') | tests/compiler/dart2js/kernel/closed_world2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698