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

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

Issue 1385183002: Revert "Avoid eager enqueueing from resolution" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « tests/compiler/dart2js/related_types.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 7
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import 'package:compiler/src/constants/expressions.dart'; 10 import 'package:compiler/src/constants/expressions.dart';
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 return compiler.runCompiler(uri).then((_) { 1076 return compiler.runCompiler(uri).then((_) {
1077 return compiler; 1077 return compiler;
1078 }); 1078 });
1079 } 1079 }
1080 1080
1081 checkMemberResolved(compiler, className, memberName) { 1081 checkMemberResolved(compiler, className, memberName) {
1082 ClassElement cls = findElement(compiler, className); 1082 ClassElement cls = findElement(compiler, className);
1083 Element memberElement = cls.lookupLocalMember(memberName); 1083 Element memberElement = cls.lookupLocalMember(memberName);
1084 Expect.isNotNull(memberElement); 1084 Expect.isNotNull(memberElement);
1085 Expect.isTrue( 1085 Expect.isTrue(
1086 compiler.enqueuer.resolution.hasBeenProcessed(memberElement)); 1086 compiler.enqueuer.resolution.hasBeenResolved(memberElement));
1087 } 1087 }
1088 1088
1089 testToString() { 1089 testToString() {
1090 final script = r"class C { toString() => 'C'; } main() { '${new C()}'; }"; 1090 final script = r"class C { toString() => 'C'; } main() { '${new C()}'; }";
1091 asyncTest(() => compileScript(script).then((compiler) { 1091 asyncTest(() => compileScript(script).then((compiler) {
1092 checkMemberResolved(compiler, 'C', 'toString'); 1092 checkMemberResolved(compiler, 'C', 'toString');
1093 })); 1093 }));
1094 } 1094 }
1095 1095
1096 operatorName(op, isUnary) { 1096 operatorName(op, isUnary) {
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 } 1410 }
1411 main() => A.m(); 1411 main() => A.m();
1412 ''', functionName: 'm'); 1412 ''', functionName: 'm');
1413 check(''' 1413 check('''
1414 class A { 1414 class A {
1415 m() => () => await - 3; 1415 m() => () => await - 3;
1416 } 1416 }
1417 main() => new A().m(); 1417 main() => new A().m();
1418 ''', className: 'A'); 1418 ''', className: 'A');
1419 } 1419 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/related_types.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698