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

Side by Side Diff: tests/try/poi/forget_element_test.dart

Issue 1413613010: Normalize type masks to use the least upper instantiated subclass/type. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix try/poi Created 5 years, 1 month 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 | « tests/compiler/dart2js/union_type_test.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // Test of Compiler.forgetElement. 5 // Test of Compiler.forgetElement.
6 library trydart.forget_element_test; 6 library trydart.forget_element_test;
7 7
8 import 'package:compiler/src/elements/elements.dart' show 8 import 'package:compiler/src/elements/elements.dart' show
9 AstElement, 9 AstElement,
10 ClassElement, 10 ClassElement,
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 Iterable resolutionMembersIn(LibraryElement library) { 254 Iterable resolutionMembersIn(LibraryElement library) {
255 sameLibrary(e) => e.library == library; 255 sameLibrary(e) => e.library == library;
256 return new Set() 256 return new Set()
257 ..addAll(resolutionUniverse.closurizedMembers.where(sameLibrary)) 257 ..addAll(resolutionUniverse.closurizedMembers.where(sameLibrary))
258 ..addAll(resolutionUniverse.fieldSetters.where(sameLibrary)) 258 ..addAll(resolutionUniverse.fieldSetters.where(sameLibrary))
259 ..addAll(resolutionUniverse.fieldGetters.where(sameLibrary)); 259 ..addAll(resolutionUniverse.fieldGetters.where(sameLibrary));
260 } 260 }
261 261
262 Iterable codegenSeenClassesIn(LibraryElement library) { 262 Iterable codegenSeenClassesIn(LibraryElement library) {
263 return compiler.codegenWorld.allInstantiatedClasses.where( 263 return compiler.enqueuer.codegen.processedClasses.where(
264 (e) => e.library == library); 264 (e) => e.library == library);
265 } 265 }
266 266
267 Iterable resolutionSeenClassesIn(LibraryElement library) { 267 Iterable resolutionSeenClassesIn(LibraryElement library) {
268 return compiler.resolverWorld.allInstantiatedClasses.where( 268 return compiler.enqueuer.resolution.processedClasses.where(
269 (e) => e.library == library); 269 (e) => e.library == library);
270 } 270 }
271 } 271 }
272 272
273 class NodeCollector extends tree.Visitor { 273 class NodeCollector extends tree.Visitor {
274 final List<tree.Node> nodes = <tree.Node>[]; 274 final List<tree.Node> nodes = <tree.Node>[];
275 275
276 void visitNode(tree.Node node) { 276 void visitNode(tree.Node node) {
277 nodes.add(node); 277 nodes.add(node);
278 node.visitChildren(this); 278 node.visitChildren(this);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 // correctly (deeply nested function). 395 // correctly (deeply nested function).
396 new ForgetElementTestCase( 396 new ForgetElementTestCase(
397 'main() => (() => (([x = const Constant()]) => x)())();' 397 'main() => (() => (([x = const Constant()]) => x)())();'
398 ' $CONSTANT_CLASS', 398 ' $CONSTANT_CLASS',
399 closureCount: 2, 399 closureCount: 2,
400 constantCount: 1, 400 constantCount: 1,
401 initialValueCount: 1), 401 initialValueCount: 1),
402 402
403 // TODO(ahe): Add test for super sends [backend.aliasedSuperMembers]. 403 // TODO(ahe): Add test for super sends [backend.aliasedSuperMembers].
404 ]..addAll(assertUnimplementedLocalMetadata()); 404 ]..addAll(assertUnimplementedLocalMetadata());
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/union_type_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698