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

Unified Diff: tests/compiler/dart2js/semantic_visitor_test.dart

Issue 1238783003: Handle deferred access as pre-step in SemanticSendVisitor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/proxy_test.dart ('k') | tests/compiler/dart2js/semantic_visitor_test_send_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/semantic_visitor_test.dart
diff --git a/tests/compiler/dart2js/semantic_visitor_test.dart b/tests/compiler/dart2js/semantic_visitor_test.dart
index 19c16947c7585c53cc26016e3113db9e1f4ac143..40b36ea31dd34bc7547b380506d314788d0a6030 100644
--- a/tests/compiler/dart2js/semantic_visitor_test.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test.dart
@@ -142,17 +142,19 @@ class Visit {
class Test {
final String codeByPrefix;
+ final bool isDeferred;
final String code;
final /*Visit | List<Visit>*/ expectedVisits;
final String cls;
final String method;
const Test(this.code, this.expectedVisits)
- : cls = null, method = 'm', codeByPrefix = null;
+ : cls = null, method = 'm', codeByPrefix = null, isDeferred = false;
const Test.clazz(this.code, this.expectedVisits,
{this.cls: 'C', this.method: 'm'})
- : codeByPrefix = null;
- const Test.prefix(this.codeByPrefix, this.code, this.expectedVisits)
+ : codeByPrefix = null, isDeferred = false;
+ const Test.prefix(this.codeByPrefix, this.code, this.expectedVisits,
+ {this.isDeferred: false})
: cls = null, method = 'm';
String toString() {
@@ -276,7 +278,11 @@ Future test(Set<VisitKind> unvisitedKinds,
if (test.codeByPrefix != null) {
String prefixFilename = 'pre$index.dart';
sourceFiles[prefixFilename] = test.codeByPrefix;
- testSource.writeln("import '$prefixFilename' as p;");
+ if (test.isDeferred) {
+ testSource.writeln("import '$prefixFilename' deferred as p;");
+ } else {
+ testSource.writeln("import '$prefixFilename' as p;");
+ }
}
String filename = 'lib$index.dart';
@@ -703,4 +709,6 @@ enum VisitKind {
VISIT_CONSTANT_GET,
VISIT_CONSTANT_INVOKE,
+
+ PREVISIT_DEFERRED_ACCESS,
}
« no previous file with comments | « tests/compiler/dart2js/proxy_test.dart ('k') | tests/compiler/dart2js/semantic_visitor_test_send_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698