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

Unified Diff: tests/compiler/dart2js/semantic_visitor_test_send_data.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
Index: tests/compiler/dart2js/semantic_visitor_test_send_data.dart
diff --git a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
index 7ffca2385885ace20dc79a29d0e806e0651d6a63..9a420d67850b0a98780468ecb09ffbb37f175785 100644
--- a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
@@ -107,6 +107,20 @@ const Map<String, List<Test>> SEND_TESTS = const {
'm() => p.C.o;',
const Visit(VisitKind.VISIT_STATIC_FIELD_GET,
element: 'field(C#o)')),
+ const Test.prefix(
+ '''
+ class C {
+ static var o;
+ }
+ ''',
+ 'm() => p.C.o;',
+ const [
+ const Visit(VisitKind.PREVISIT_DEFERRED_ACCESS,
+ element: 'prefix(p)'),
+ const Visit(VisitKind.VISIT_STATIC_FIELD_GET,
+ element: 'field(C#o)'),
+ ],
+ isDeferred: true),
const Test(
'''
class C {
@@ -125,6 +139,48 @@ const Map<String, List<Test>> SEND_TESTS = const {
''',
const Visit(VisitKind.VISIT_UNRESOLVED_GET,
name: 'o')),
+ const Test.prefix(
+ '''
+ ''',
+ 'm() => p.C.o;',
+ const [
+ const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_GET,
+ receiver: 'p.C', name: 'o'),
+ const Visit(VisitKind.VISIT_UNRESOLVED_GET, name: 'C'),
+ ]),
+ const Test.prefix(
+ '''
+ class C {
+ }
+ ''',
+ 'm() => p.C.o;',
+ const Visit(VisitKind.VISIT_UNRESOLVED_GET, name: 'o')),
+ const Test.prefix(
+ '''
+ ''',
+ 'm() => p.C.o;',
+ const [
+ const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_GET,
+ receiver: 'p.C', name: 'o'),
+ const Visit(VisitKind.PREVISIT_DEFERRED_ACCESS,
+ element: 'prefix(p)'),
+ const Visit(VisitKind.VISIT_UNRESOLVED_GET,
+ name: 'C'),
+ ],
+ isDeferred: true),
+ const Test.prefix(
+ '''
+ class C {
+ }
+ ''',
+ 'm() => p.C.o;',
+ const [
+ const Visit(VisitKind.PREVISIT_DEFERRED_ACCESS,
+ element: 'prefix(p)'),
+ const Visit(VisitKind.VISIT_UNRESOLVED_GET,
+ name: 'o'),
+ ],
+ isDeferred: true),
const Test(
'''
class C {}
@@ -659,6 +715,35 @@ const Map<String, List<Test>> SEND_TESTS = const {
'm() => p.o;',
const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_GET,
element: 'field(o)')),
+ const Test.prefix(
+ '''
+ var o;
+ ''',
+ 'm() => p.o;',
+ const [
+ const Visit(VisitKind.PREVISIT_DEFERRED_ACCESS,
+ element: 'prefix(p)'),
+ const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_GET,
+ element: 'field(o)'),
+ ],
+ isDeferred: true),
+ const Test.prefix(
+ '''
+ ''',
+ 'm() => p.o;',
+ const Visit(VisitKind.VISIT_UNRESOLVED_GET,
+ name: 'o')),
+ const Test.prefix(
+ '''
+ ''',
+ 'm() => p.o;',
+ const [
+ const Visit(VisitKind.PREVISIT_DEFERRED_ACCESS,
+ element: 'prefix(p)'),
+ const Visit(VisitKind.VISIT_UNRESOLVED_GET,
+ name: 'o'),
+ ],
+ isDeferred: true),
const Test(
'''
var o;
« no previous file with comments | « tests/compiler/dart2js/semantic_visitor_test.dart ('k') | tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698