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

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

Issue 1154743004: Test (and fix some) invalid assignments. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart2js.semantics_visitor_test; 5 library dart2js.semantics_visitor_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:mirrors'; 8 import 'dart:mirrors';
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 element: 'parameter(m#o)')), 170 element: 'parameter(m#o)')),
171 const Test('m(o) { o = 42; }', 171 const Test('m(o) { o = 42; }',
172 const Visit(VisitKind.VISIT_PARAMETER_SET, 172 const Visit(VisitKind.VISIT_PARAMETER_SET,
173 element: 'parameter(m#o)', 173 element: 'parameter(m#o)',
174 rhs:'42')), 174 rhs:'42')),
175 const Test('m(o) { o(null, 42); }', 175 const Test('m(o) { o(null, 42); }',
176 const Visit(VisitKind.VISIT_PARAMETER_INVOKE, 176 const Visit(VisitKind.VISIT_PARAMETER_INVOKE,
177 element: 'parameter(m#o)', 177 element: 'parameter(m#o)',
178 arguments: '(null,42)', 178 arguments: '(null,42)',
179 selector: 'CallStructure(arity=2)')), 179 selector: 'CallStructure(arity=2)')),
180 // TODO(johnniwinther): Expect [VISIT_FINAL_PARAMETER_SET] instead.
181 const Test('m(final o) { o = 42; }',
182 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
183 name: 'o',
184 rhs:'42')),
180 ], 185 ],
181 'Local variables': const [ 186 'Local variables': const [
182 // Local variables 187 // Local variables
183 const Test('m() { var o; return o; }', 188 const Test('m() { var o; return o; }',
184 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_GET, 189 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_GET,
185 element: 'variable(m#o)')), 190 element: 'variable(m#o)')),
186 const Test('m() { var o; o = 42; }', 191 const Test('m() { var o; o = 42; }',
187 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_SET, 192 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_SET,
188 element: 'variable(m#o)', 193 element: 'variable(m#o)',
189 rhs:'42')), 194 rhs:'42')),
190 const Test('m() { var o; o(null, 42); }', 195 const Test('m() { var o; o(null, 42); }',
191 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_INVOKE, 196 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_INVOKE,
192 element: 'variable(m#o)', 197 element: 'variable(m#o)',
193 arguments: '(null,42)', 198 arguments: '(null,42)',
194 selector: 'CallStructure(arity=2)')), 199 selector: 'CallStructure(arity=2)')),
200 // TODO(johnniwinther): Expect [VISIT_FINAL_LOCAL_VARIABLE_SET] instead.
201 const Test('m() { final o = 0; o = 42; }',
202 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
203 name: 'o',
204 rhs:'42')),
205 // TODO(johnniwinther): Expect [VISIT_FINAL_LOCAL_VARIABLE_SET] instead.
206 const Test('m() { const o = 0; o = 42; }',
207 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
208 name: 'o',
209 rhs:'42')),
195 ], 210 ],
196 'Local functions': const [ 211 'Local functions': const [
197 // Local functions 212 // Local functions
198 const Test('m() { o(a, b) {}; return o; }', 213 const Test('m() { o(a, b) {}; return o; }',
199 const Visit(VisitKind.VISIT_LOCAL_FUNCTION_GET, 214 const Visit(VisitKind.VISIT_LOCAL_FUNCTION_GET,
200 element: 'function(m#o)')), 215 element: 'function(m#o)')),
201 const Test('m() { o(a, b) {}; o(null, 42); }', 216 const Test('m() { o(a, b) {}; o(null, 42); }',
202 const Visit(VisitKind.VISIT_LOCAL_FUNCTION_INVOKE, 217 const Visit(VisitKind.VISIT_LOCAL_FUNCTION_INVOKE,
203 element: 'function(m#o)', 218 element: 'function(m#o)',
204 arguments: '(null,42)', 219 arguments: '(null,42)',
205 selector: 'CallStructure(arity=2)')), 220 selector: 'CallStructure(arity=2)')),
221 // TODO(johnniwinther): Expect [VISIT_LOCAL_FUNCTION_SET] instead.
222 const Test('m() { o(a, b) {}; o = 42; }',
223 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
224 name: 'o',
225 rhs: '42')),
206 ], 226 ],
207 'Static fields': const [ 227 'Static fields': const [
208 // Static fields 228 // Static fields
209 const Test( 229 const Test(
210 ''' 230 '''
211 class C { static var o; } 231 class C { static var o; }
212 m() => C.o; 232 m() => C.o;
213 ''', 233 ''',
214 const Visit(VisitKind.VISIT_STATIC_FIELD_GET, 234 const Visit(VisitKind.VISIT_STATIC_FIELD_GET,
215 element: 'field(C#o)')), 235 element: 'field(C#o)')),
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 const Test.prefix( 329 const Test.prefix(
310 ''' 330 '''
311 class C { 331 class C {
312 static var o; 332 static var o;
313 } 333 }
314 ''', 334 ''',
315 'm() { p.C.o(null, 42); }', 335 'm() { p.C.o(null, 42); }',
316 const Visit(VisitKind.VISIT_STATIC_FIELD_INVOKE, 336 const Visit(VisitKind.VISIT_STATIC_FIELD_INVOKE,
317 element: 'field(C#o)', 337 element: 'field(C#o)',
318 arguments: '(null,42)')), 338 arguments: '(null,42)')),
339 // TODO(johnniwinther): Expect [VISIT_FINAL_STATIC_FIELD_SET] instead.
340 const Test(
341 '''
342 class C { static final o = 0; }
343 m() { C.o = 42; }
344 ''',
345 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
346 name: 'o',
347 rhs: '42')),
348 const Test.clazz(
349 '''
350 class C {
351 static final o = 0;
352 m() { o = 42; }
353 }
354 ''',
355 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
356 name: 'o',
357 rhs: '42')),
358 const Test.clazz(
359 '''
360 class C {
361 static final o = 0;
362 m() { C.o = 42; }
363 }
364 ''',
365 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
366 name: 'o',
367 rhs: '42')),
368 const Test.prefix(
369 '''
370 class C {
371 static final o = 0;
372 }
373 ''',
374 'm() { p.C.o = 42; }',
375 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
376 name: 'o',
377 rhs: '42')),
378 const Test(
379 '''
380 class C { static const o = 0; }
381 m() { C.o = 42; }
382 ''',
383 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
384 name: 'o',
385 rhs: '42')),
386 const Test.clazz(
387 '''
388 class C {
389 static const o = 0;
390 m() { o = 42; }
391 }
392 ''',
393 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
394 name: 'o',
395 rhs: '42')),
396 const Test.clazz(
397 '''
398 class C {
399 static const o = 0;
400 m() { C.o = 42; }
401 }
402 ''',
403 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
404 name: 'o',
405 rhs: '42')),
406 const Test.prefix(
407 '''
408 class C {
409 static const o = 0;
410 }
411 ''',
412 'm() { p.C.o = 42; }',
413 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
414 name: 'o',
415 rhs: '42')),
319 ], 416 ],
320 'Static properties': const [ 417 'Static properties': const [
321 // Static properties 418 // Static properties
322 const Test( 419 const Test(
323 ''' 420 '''
324 class C { 421 class C {
325 static get o => null; 422 static get o => null;
326 } 423 }
327 m() => C.o; 424 m() => C.o;
328 ''', 425 ''',
(...skipping 19 matching lines...) Expand all
348 element: 'getter(C#o)')), 445 element: 'getter(C#o)')),
349 const Test.prefix( 446 const Test.prefix(
350 ''' 447 '''
351 class C { 448 class C {
352 static get o => null; 449 static get o => null;
353 } 450 }
354 ''', 451 ''',
355 'm() => p.C.o;', 452 'm() => p.C.o;',
356 const Visit(VisitKind.VISIT_STATIC_GETTER_GET, 453 const Visit(VisitKind.VISIT_STATIC_GETTER_GET,
357 element: 'getter(C#o)')), 454 element: 'getter(C#o)')),
455 // TODO(johnniwinther): Expected [VISIT_STATIC_GETTER_SET] instead.
456 const Test(
457 '''
458 class C { static get o => 42; }
459 m() { C.o = 42; }
460 ''',
461 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
462 name: 'o',
463 rhs: '42')),
464 const Test.clazz(
465 '''
466 class C {
467 static static get o => 42;
468 m() { o = 42; }
469 }
470 ''',
471 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
472 name: 'o',
473 rhs: '42')),
474 const Test.clazz(
475 '''
476 class C {
477 static static get o => 42;
478 m() { C.o = 42; }
479 }
480 ''',
481 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
482 name: 'o',
483 rhs: '42')),
484 const Test.prefix(
485 '''
486 class C {
487 static static get o => 42;
488 }
489 ''',
490 'm() { p.C.o = 42; }',
491 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
492 name: 'o',
493 rhs: '42')),
494 // TODO(johnniwinther): Expected [VISIT_STATIC_SETTER_GET] instead.
495 const Test(
496 '''
497 class C {
498 static set o(_) {}
499 }
500 m() => C.o;
501 ''',
502 const Visit(VisitKind.VISIT_UNRESOLVED_GET,
503 name: 'o')),
504 const Test.clazz(
505 '''
506 class C {
507 static set o(_) {}
508 m() => o;
509 }
510 ''',
511 const Visit(VisitKind.VISIT_UNRESOLVED_GET,
512 name: 'o')),
513 const Test.clazz(
514 '''
515 class C {
516 static set o(_) {}
517 m() => C.o;
518 }
519 ''',
520 const Visit(VisitKind.VISIT_UNRESOLVED_GET,
521 name: 'o')),
522 const Test.prefix(
523 '''
524 class C {
525 static set o(_) {}
526 }
527 ''',
528 'm() => p.C.o;',
529 const Visit(VisitKind.VISIT_UNRESOLVED_GET,
530 name: 'o')),
358 const Test( 531 const Test(
359 ''' 532 '''
360 class C { static set o(_) {} } 533 class C { static set o(_) {} }
361 m() { C.o = 42; } 534 m() { C.o = 42; }
362 ''', 535 ''',
363 const Visit(VisitKind.VISIT_STATIC_SETTER_SET, 536 const Visit(VisitKind.VISIT_STATIC_SETTER_SET,
364 element: 'setter(C#o)', 537 element: 'setter(C#o)',
365 rhs: '42')), 538 rhs: '42')),
366 const Test.clazz( 539 const Test.clazz(
367 ''' 540 '''
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 const Test.prefix( 597 const Test.prefix(
425 ''' 598 '''
426 class C { 599 class C {
427 static get o => null; 600 static get o => null;
428 } 601 }
429 ''', 602 ''',
430 'm() { p.C.o(null, 42); }', 603 'm() { p.C.o(null, 42); }',
431 const Visit(VisitKind.VISIT_STATIC_GETTER_INVOKE, 604 const Visit(VisitKind.VISIT_STATIC_GETTER_INVOKE,
432 element: 'getter(C#o)', 605 element: 'getter(C#o)',
433 arguments: '(null,42)')), 606 arguments: '(null,42)')),
607 // TODO(johnniwinther): Expect [VISIT_STATIC_SETTER_INVOKE] instead.
608 const Test(
609 '''
610 class C { static set o(_) {} }
611 m() => C.o(null, 42);
612 ''',
613 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
614 name: 'o',
615 arguments: '(null,42)')),
616 const Test.clazz(
617 '''
618 class C {
619 static set o(_) {}
620 m() { o(null, 42); }
621 }
622 ''',
623 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
624 name: 'o',
625 arguments: '(null,42)')),
626 const Test.clazz(
627 '''
628 class C {
629 static set o(_) {}
630 m() { C.o(null, 42); }
631 }
632 ''',
633 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
634 name: 'o',
635 arguments: '(null,42)')),
636 const Test.prefix(
637 '''
638 class C {
639 static set o(_) {}
640 }
641 ''',
642 'm() { p.C.o(null, 42); }',
643 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
644 name: 'o',
645 arguments: '(null,42)')),
434 ], 646 ],
435 'Static functions': const [ 647 'Static functions': const [
436 // Static functions 648 // Static functions
437 const Test( 649 const Test(
438 ''' 650 '''
439 class C { static o(a, b) {} } 651 class C { static o(a, b) {} }
440 m() => C.o; 652 m() => C.o;
441 ''', 653 ''',
442 const Visit(VisitKind.VISIT_STATIC_FUNCTION_GET, 654 const Visit(VisitKind.VISIT_STATIC_FUNCTION_GET,
443 element: 'function(C#o)')), 655 element: 'function(C#o)')),
(...skipping 17 matching lines...) Expand all
461 element: 'function(C#o)')), 673 element: 'function(C#o)')),
462 const Test.prefix( 674 const Test.prefix(
463 ''' 675 '''
464 class C { static o(a, b) {} } 676 class C { static o(a, b) {} }
465 ''', 677 ''',
466 ''' 678 '''
467 m() => p.C.o; 679 m() => p.C.o;
468 ''', 680 ''',
469 const Visit(VisitKind.VISIT_STATIC_FUNCTION_GET, 681 const Visit(VisitKind.VISIT_STATIC_FUNCTION_GET,
470 element: 'function(C#o)')), 682 element: 'function(C#o)')),
683 // TODO(johnniwinther): Expect [VISIT_STATIC_FUNCTION_SET] instead.
471 const Test( 684 const Test(
472 ''' 685 '''
473 class C { static o(a, b) {} } 686 class C { static o(a, b) {} }
687 m() { C.o = 42; }
688 ''',
689 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
690 name: 'o',
691 rhs: '42')),
692 const Test.clazz(
693 '''
694 class C {
695 static o(a, b) {}
696 m() { o = 42; }
697 }
698 ''',
699 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
700 name: 'o',
701 rhs: '42')),
702 const Test.clazz(
703 '''
704 class C {
705 static o(a, b) {}
706 m() { C.o = 42; }
707 }
708 ''',
709 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
710 name: 'o',
711 rhs: '42')),
712 const Test.prefix(
713 '''
714 class C { static o(a, b) {} }
715 ''',
716 '''
717 m() { p.C.o = 42; }
718 ''',
719 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
720 name: 'o',
721 rhs: '42')),
722 const Test(
723 '''
724 class C { static o(a, b) {} }
474 m() => C.o(null, 42); 725 m() => C.o(null, 42);
475 ''', 726 ''',
476 const Visit(VisitKind.VISIT_STATIC_FUNCTION_INVOKE, 727 const Visit(VisitKind.VISIT_STATIC_FUNCTION_INVOKE,
477 element: 'function(C#o)', 728 element: 'function(C#o)',
478 arguments: '(null,42)')), 729 arguments: '(null,42)')),
479 const Test.clazz( 730 const Test.clazz(
480 ''' 731 '''
481 class C { 732 class C {
482 static o(a, b) {} 733 static o(a, b) {}
483 m() { o(null, 42); } 734 m() { o(null, 42); }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 element: 'field(o)', 791 element: 'field(o)',
541 rhs: '42')), 792 rhs: '42')),
542 const Test.prefix( 793 const Test.prefix(
543 ''' 794 '''
544 var o; 795 var o;
545 ''', 796 ''',
546 'm() { p.o = 42; }', 797 'm() { p.o = 42; }',
547 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_SET, 798 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_SET,
548 element: 'field(o)', 799 element: 'field(o)',
549 rhs: '42')), 800 rhs: '42')),
801 // TODO(johnniwinther): Expect [VISIT_FINAL_TOP_LEVEL_FIELD_SET] instead.
802 const Test(
803 '''
804 final o = 0;
805 m() { o = 42; }
806 ''',
807 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
808 name: 'o',
809 rhs: '42')),
810 const Test.prefix(
811 '''
812 final o = 0;
813 ''',
814 'm() { p.o = 42; }',
815 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
816 name: 'o',
817 rhs: '42')),
818 const Test(
819 '''
820 const o = 0;
821 m() { o = 42; }
822 ''',
823 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
824 name: 'o',
825 rhs: '42')),
826 const Test.prefix(
827 '''
828 const o = 0;
829 ''',
830 'm() { p.o = 42; }',
831 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
832 name: 'o',
833 rhs: '42')),
550 const Test( 834 const Test(
551 ''' 835 '''
552 var o; 836 var o;
553 m() { o(null, 42); } 837 m() { o(null, 42); }
554 ''', 838 ''',
555 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_INVOKE, 839 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_INVOKE,
556 element: 'field(o)', 840 element: 'field(o)',
557 arguments: '(null,42)')), 841 arguments: '(null,42)')),
558 const Test.prefix( 842 const Test.prefix(
559 ''' 843 '''
(...skipping 21 matching lines...) Expand all
581 element: 'getter(o)')), 865 element: 'getter(o)')),
582 const Test.prefix( 866 const Test.prefix(
583 ''' 867 '''
584 get o => null; 868 get o => null;
585 ''', 869 ''',
586 ''' 870 '''
587 m() => p.o; 871 m() => p.o;
588 ''', 872 ''',
589 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_GET, 873 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_GET,
590 element: 'getter(o)')), 874 element: 'getter(o)')),
875 // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_SETTER_GET] instead.
591 const Test( 876 const Test(
592 ''' 877 '''
593 set o(_) {} 878 set o(_) {}
879 m() => o;
880 ''',
881 const Visit(VisitKind.VISIT_UNRESOLVED_GET,
882 name: 'o')),
883 const Test.prefix(
884 '''
885 set o(_) {}
886 ''',
887 '''
888 m() => p.o;
889 ''',
890 const Visit(VisitKind.VISIT_UNRESOLVED_GET,
891 name: 'o')),
892 // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_GETTER_SET] instead.
893 const Test(
894 '''
895 get o => null;
896 m() { o = 42; }
897 ''',
898 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
899 name: 'o',
900 rhs: '42')),
901 const Test.prefix(
902 '''
903 get o => null;
904 ''',
905 'm() { p.o = 42; }',
906 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
907 name: 'o',
908 rhs: '42')),
909 const Test(
910 '''
911 set o(_) {}
594 m() { o = 42; } 912 m() { o = 42; }
595 ''', 913 ''',
596 const Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_SET, 914 const Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_SET,
597 element: 'setter(o)', 915 element: 'setter(o)',
598 rhs: '42')), 916 rhs: '42')),
599 const Test.prefix( 917 const Test.prefix(
600 ''' 918 '''
601 set o(_) {} 919 set o(_) {}
602 ''', 920 ''',
603 'm() { p.o = 42; }', 921 'm() { p.o = 42; }',
604 const Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_SET, 922 const Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_SET,
605 element: 'setter(o)', 923 element: 'setter(o)',
606 rhs: '42')), 924 rhs: '42')),
607 const Test( 925 const Test(
608 ''' 926 '''
609 get o => null; 927 get o => null;
610 m() => o(null, 42); 928 m() => o(null, 42);
611 ''', 929 ''',
612 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_INVOKE, 930 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_INVOKE,
613 element: 'getter(o)', 931 element: 'getter(o)',
614 arguments: '(null,42)')), 932 arguments: '(null,42)')),
615 const Test.prefix( 933 const Test.prefix(
616 ''' 934 '''
617 get o => null; 935 get o => null;
618 ''', 936 ''',
619 'm() { p.o(null, 42); }', 937 'm() { p.o(null, 42); }',
620 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_INVOKE, 938 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_INVOKE,
621 element: 'getter(o)', 939 element: 'getter(o)',
622 arguments: '(null,42)')), 940 arguments: '(null,42)')),
941 // TODO(johnniwinther): Expected [VISIT_TOP_LEVEL_SETTER_INVOKE] instead.
942 const Test(
943 '''
944 set o(_) {}
945 m() => o(null, 42);
946 ''',
947 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
948 name: 'o',
949 arguments: '(null,42)')),
950 const Test.prefix(
951 '''
952 set o(_) {}
953 ''',
954 'm() { p.o(null, 42); }',
955 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
956 name: 'o',
957 arguments: '(null,42)')),
623 ], 958 ],
624 'Top level functions': const [ 959 'Top level functions': const [
625 // Top level functions 960 // Top level functions
626 const Test( 961 const Test(
627 ''' 962 '''
628 o(a, b) {} 963 o(a, b) {}
629 m() => o; 964 m() => o;
630 ''', 965 ''',
631 const Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_GET, 966 const Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_GET,
632 element: 'function(o)')), 967 element: 'function(o)')),
(...skipping 21 matching lines...) Expand all
654 const Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_INVOKE, 989 const Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_INVOKE,
655 element: 'function(o)', 990 element: 'function(o)',
656 arguments: '(null,42)')), 991 arguments: '(null,42)')),
657 const Test( 992 const Test(
658 ''' 993 '''
659 m() => o(null, 42); 994 m() => o(null, 42);
660 ''', 995 ''',
661 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, 996 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
662 name: 'o', 997 name: 'o',
663 arguments: '(null,42)')), 998 arguments: '(null,42)')),
999 // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_FUNCTION_SET] instead.
1000 const Test(
1001 '''
1002 o(a, b) {}
1003 m() { o = 42; }
1004 ''',
1005 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
1006 name: 'o',
1007 rhs: '42')),
1008 const Test.prefix(
1009 '''
1010 o(a, b) {}
1011 ''',
1012 'm() { p.o = 42; }',
1013 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
1014 name: 'o',
1015 rhs: '42')),
664 ], 1016 ],
665 'Dynamic properties': const [ 1017 'Dynamic properties': const [
666 // Dynamic properties 1018 // Dynamic properties
667 const Test('m(o) => o.foo;', 1019 const Test('m(o) => o.foo;',
668 const [ 1020 const [
669 const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_GET, 1021 const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_GET,
670 receiver: 'o', 1022 receiver: 'o',
671 name: 'foo'), 1023 name: 'foo'),
672 const Visit(VisitKind.VISIT_PARAMETER_GET, 1024 const Visit(VisitKind.VISIT_PARAMETER_GET,
673 element: 'parameter(m#o)'), 1025 element: 'parameter(m#o)'),
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 class B { 1179 class B {
828 var o; 1180 var o;
829 } 1181 }
830 class C extends B { 1182 class C extends B {
831 m() { super.o = 42; } 1183 m() { super.o = 42; }
832 } 1184 }
833 ''', 1185 ''',
834 const Visit(VisitKind.VISIT_SUPER_FIELD_SET, 1186 const Visit(VisitKind.VISIT_SUPER_FIELD_SET,
835 element: 'field(B#o)', 1187 element: 'field(B#o)',
836 rhs: '42')), 1188 rhs: '42')),
1189 // TODO(johnniwinther): Expect [VISIT_FINAL_SUPER_FIELD_SET] instead.
1190 const Test.clazz(
1191 '''
1192 class B {
1193 final o = 0;
1194 }
1195 class C extends B {
1196 m() { super.o = 42; }
1197 }
1198 ''',
1199 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
1200 name: 'o',
1201 rhs: '42')),
837 const Test.clazz( 1202 const Test.clazz(
838 ''' 1203 '''
839 class B { 1204 class B {
840 var o; 1205 var o;
841 } 1206 }
842 class C extends B { 1207 class C extends B {
843 m() { super.o(null, 42); } 1208 m() { super.o(null, 42); }
844 } 1209 }
845 ''', 1210 ''',
846 const Visit(VisitKind.VISIT_SUPER_FIELD_INVOKE, 1211 const Visit(VisitKind.VISIT_SUPER_FIELD_INVOKE,
(...skipping 15 matching lines...) Expand all
862 ''' 1227 '''
863 class B { 1228 class B {
864 get o => null; 1229 get o => null;
865 } 1230 }
866 class C extends B { 1231 class C extends B {
867 m() => super.o; 1232 m() => super.o;
868 } 1233 }
869 ''', 1234 ''',
870 const Visit(VisitKind.VISIT_SUPER_GETTER_GET, 1235 const Visit(VisitKind.VISIT_SUPER_GETTER_GET,
871 element: 'getter(B#o)')), 1236 element: 'getter(B#o)')),
1237 // TODO(johnniwinther): Expect [VISIT_SUPER_SETTER_GET] instead.
872 const Test.clazz( 1238 const Test.clazz(
873 ''' 1239 '''
874 class B { 1240 class B {
1241 set o(_) {}
1242 }
1243 class C extends B {
1244 m() => super.o;
1245 }
1246 ''',
1247 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GET)),
1248 // TODO(johnniwinther): Expect [VISIT_SUPER_GETTER_SET] instead.
1249 const Test.clazz(
1250 '''
1251 class B {
1252 get o => 0;
1253 }
1254 class C extends B {
1255 m() { super.o = 42; }
1256 }
1257 ''',
1258 const Visit(VisitKind.VISIT_UNRESOLVED_SET,
1259 name: 'o',
1260 rhs: '42')),
1261 const Test.clazz(
1262 '''
1263 class B {
875 set o(_) {} 1264 set o(_) {}
876 } 1265 }
877 class C extends B { 1266 class C extends B {
878 m() { super.o = 42; } 1267 m() { super.o = 42; }
879 } 1268 }
880 ''', 1269 ''',
881 const Visit(VisitKind.VISIT_SUPER_SETTER_SET, 1270 const Visit(VisitKind.VISIT_SUPER_SETTER_SET,
882 element: 'setter(B#o)', 1271 element: 'setter(B#o)',
883 rhs: '42')), 1272 rhs: '42')),
884 const Test.clazz( 1273 const Test.clazz(
885 ''' 1274 '''
886 class B { 1275 class B {
887 get o => null; 1276 get o => null;
888 } 1277 }
889 class C extends B { 1278 class C extends B {
890 m() { super.o(null, 42); } 1279 m() { super.o(null, 42); }
891 } 1280 }
892 ''', 1281 ''',
893 const Visit(VisitKind.VISIT_SUPER_GETTER_INVOKE, 1282 const Visit(VisitKind.VISIT_SUPER_GETTER_INVOKE,
894 element: 'getter(B#o)', 1283 element: 'getter(B#o)',
895 arguments: '(null,42)')), 1284 arguments: '(null,42)')),
1285 // TODO(johnniwinther): Expect [VISIT_SUPER_SETTER_INVOKE] instead.
1286 const Test.clazz(
1287 '''
1288 class B {
1289 set o(_) {}
1290 }
1291 class C extends B {
1292 m() { super.o(null, 42); }
1293 }
1294 ''',
1295 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INVOKE,
1296 arguments: '(null,42)')),
896 ], 1297 ],
897 'Super methods': const [ 1298 'Super methods': const [
898 // Super methods 1299 // Super methods
899 const Test.clazz( 1300 const Test.clazz(
900 ''' 1301 '''
901 class B { 1302 class B {
902 o(a, b) {} 1303 o(a, b) {}
903 } 1304 }
904 class C extends B { 1305 class C extends B {
905 m() => super.o; 1306 m() => super.o;
(...skipping 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after
3866 VisitKind.VISIT_SUPER_FIELD_FIELD_PREFIX, 4267 VisitKind.VISIT_SUPER_FIELD_FIELD_PREFIX,
3867 VisitKind.VISIT_SUPER_FIELD_FIELD_POSTFIX, 4268 VisitKind.VISIT_SUPER_FIELD_FIELD_POSTFIX,
3868 VisitKind.VISIT_SUPER_METHOD_SETTER_COMPOUND, 4269 VisitKind.VISIT_SUPER_METHOD_SETTER_COMPOUND,
3869 VisitKind.VISIT_SUPER_METHOD_SETTER_PREFIX, 4270 VisitKind.VISIT_SUPER_METHOD_SETTER_PREFIX,
3870 VisitKind.VISIT_SUPER_METHOD_SETTER_POSTFIX, 4271 VisitKind.VISIT_SUPER_METHOD_SETTER_POSTFIX,
3871 VisitKind.VISIT_SUPER_NOT_EQUALS, 4272 VisitKind.VISIT_SUPER_NOT_EQUALS,
3872 VisitKind.VISIT_CLASS_TYPE_LITERAL_SET, 4273 VisitKind.VISIT_CLASS_TYPE_LITERAL_SET,
3873 VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET, 4274 VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET,
3874 VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET, 4275 VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET,
3875 VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET, 4276 VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET,
4277 VisitKind.VISIT_FINAL_PARAMETER_SET,
4278 VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET,
4279 VisitKind.VISIT_LOCAL_FUNCTION_SET,
4280 VisitKind.VISIT_STATIC_GETTER_SET,
4281 VisitKind.VISIT_STATIC_SETTER_GET,
4282 VisitKind.VISIT_STATIC_SETTER_INVOKE,
4283 VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
4284 VisitKind.VISIT_STATIC_FUNCTION_SET,
4285 VisitKind.VISIT_FINAL_TOP_LEVEL_FIELD_SET,
4286 VisitKind.VISIT_TOP_LEVEL_GETTER_SET,
4287 VisitKind.VISIT_TOP_LEVEL_SETTER_GET,
4288 VisitKind.VISIT_TOP_LEVEL_SETTER_INVOKE,
4289 VisitKind.VISIT_TOP_LEVEL_FUNCTION_SET,
4290 VisitKind.VISIT_FINAL_SUPER_FIELD_SET,
4291 VisitKind.VISIT_SUPER_GETTER_SET,
4292 VisitKind.VISIT_SUPER_SETTER_GET,
4293 VisitKind.VISIT_SUPER_SETTER_INVOKE,
4294 VisitKind.VISIT_SUPER_METHOD_SET,
3876 ]; 4295 ];
3877 4296
3878 main(List<String> arguments) { 4297 main(List<String> arguments) {
3879 Set<VisitKind> kinds = new Set<VisitKind>.from(VisitKind.values); 4298 Set<VisitKind> kinds = new Set<VisitKind>.from(VisitKind.values);
3880 asyncTest(() => Future.forEach([ 4299 asyncTest(() => Future.forEach([
3881 () { 4300 () {
3882 return test( 4301 return test(
3883 kinds, 4302 kinds,
3884 arguments, 4303 arguments,
3885 SEND_TESTS, 4304 SEND_TESTS,
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
4085 ConstantExpression constant, 4504 ConstantExpression constant,
4086 NodeList arguments, 4505 NodeList arguments,
4087 CallStructure callStructure, 4506 CallStructure callStructure,
4088 arg) { 4507 arg) {
4089 visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_INVOKE, 4508 visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_INVOKE,
4090 constant: constant.getText(), arguments: arguments)); 4509 constant: constant.getText(), arguments: arguments));
4091 apply(arguments, arg); 4510 apply(arguments, arg);
4092 } 4511 }
4093 4512
4094 @override 4513 @override
4095 errorClassTypeLiteralSet( 4514 visitClassTypeLiteralSet(
4096 SendSet node, 4515 SendSet node,
4097 ConstantExpression constant, 4516 ConstantExpression constant,
4098 Node rhs, 4517 Node rhs,
4099 arg) { 4518 arg) {
4100 visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_INVOKE, 4519 visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_INVOKE,
4101 constant: constant.getText(), rhs: rhs)); 4520 constant: constant.getText(), rhs: rhs));
4102 apply(rhs, arg); 4521 super.visitClassTypeLiteralSet(node, constant, rhs, arg);
4103 } 4522 }
4104 4523
4105 @override 4524 @override
4106 visitNotEquals( 4525 visitNotEquals(
4107 Send node, 4526 Send node,
4108 Node left, 4527 Node left,
4109 Node right, 4528 Node right,
4110 arg) { 4529 arg) {
4111 visits.add(new Visit(VisitKind.VISIT_NOT_EQUALS, 4530 visits.add(new Visit(VisitKind.VISIT_NOT_EQUALS,
4112 left: left, right: right)); 4531 left: left, right: right));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
4192 Send node, 4611 Send node,
4193 ConstantExpression constant, 4612 ConstantExpression constant,
4194 NodeList arguments, 4613 NodeList arguments,
4195 CallStructure callStructure, 4614 CallStructure callStructure,
4196 arg) { 4615 arg) {
4197 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_INVOKE, 4616 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_INVOKE,
4198 constant: constant.getText(), arguments: arguments)); 4617 constant: constant.getText(), arguments: arguments));
4199 } 4618 }
4200 4619
4201 @override 4620 @override
4202 errorDynamicTypeLiteralSet( 4621 visitDynamicTypeLiteralSet(
4203 Send node, 4622 Send node,
4204 ConstantExpression constant, 4623 ConstantExpression constant,
4205 Node rhs, 4624 Node rhs,
4206 arg) { 4625 arg) {
4207 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET, 4626 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET,
4208 rhs: rhs)); 4627 rhs: rhs));
4209 apply(rhs, arg); 4628 super.visitDynamicTypeLiteralSet(node, constant, rhs, arg);
Johnni Winther 2015/05/22 11:46:02 Changed to test the implementation of TraversalSen
4210 } 4629 }
4211 4630
4212 @override 4631 @override
4213 visitExpressionInvoke( 4632 visitExpressionInvoke(
4214 Send node, 4633 Send node,
4215 Node expression, 4634 Node expression,
4216 NodeList arguments, 4635 NodeList arguments,
4217 Selector selector, 4636 Selector selector,
4218 arg) { 4637 arg) {
4219 visits.add(new Visit(VisitKind.VISIT_EXPRESSION_INVOKE, 4638 visits.add(new Visit(VisitKind.VISIT_EXPRESSION_INVOKE,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
4269 @override 4688 @override
4270 visitLocalFunctionGet( 4689 visitLocalFunctionGet(
4271 Send node, 4690 Send node,
4272 LocalFunctionElement function, 4691 LocalFunctionElement function,
4273 arg) { 4692 arg) {
4274 visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_GET, 4693 visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_GET,
4275 element: function)); 4694 element: function));
4276 } 4695 }
4277 4696
4278 @override 4697 @override
4698 visitLocalFunctionSet(
4699 SendSet node,
4700 LocalFunctionElement function,
4701 Node rhs,
4702 arg) {
4703 visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_SET,
4704 element: function, rhs: rhs));
4705 super.visitLocalFunctionSet(node, function, rhs, arg);
4706 }
4707
4708 @override
4279 visitLocalFunctionInvoke( 4709 visitLocalFunctionInvoke(
4280 Send node, 4710 Send node,
4281 LocalFunctionElement function, 4711 LocalFunctionElement function,
4282 NodeList arguments, 4712 NodeList arguments,
4283 CallStructure callStructure, 4713 CallStructure callStructure,
4284 arg) { 4714 arg) {
4285 visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_INVOKE, 4715 visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_INVOKE,
4286 element: function, arguments: arguments, selector: callStructure)); 4716 element: function, arguments: arguments, selector: callStructure));
4287 apply(arguments, arg); 4717 apply(arguments, arg);
4288 } 4718 }
(...skipping 20 matching lines...) Expand all
4309 } 4739 }
4310 4740
4311 @override 4741 @override
4312 visitLocalVariableSet( 4742 visitLocalVariableSet(
4313 SendSet node, 4743 SendSet node,
4314 LocalVariableElement variable, 4744 LocalVariableElement variable,
4315 Node rhs, 4745 Node rhs,
4316 arg) { 4746 arg) {
4317 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_SET, 4747 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_SET,
4318 element: variable, rhs: rhs)); 4748 element: variable, rhs: rhs));
4319 apply(rhs, arg); 4749 super.visitLocalVariableSet(node, variable, rhs, arg);
4320 } 4750 }
4321 4751
4322 @override 4752 @override
4753 visitFinalLocalVariableSet(
4754 SendSet node,
4755 LocalVariableElement variable,
4756 Node rhs,
4757 arg) {
4758 visits.add(new Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET,
4759 element: variable, rhs: rhs));
4760 super.visitFinalLocalVariableSet(node, variable, rhs, arg);
4761 }
4762
4763 @override
4323 visitParameterGet( 4764 visitParameterGet(
4324 Send node, 4765 Send node,
4325 ParameterElement parameter, 4766 ParameterElement parameter,
4326 arg) { 4767 arg) {
4327 visits.add(new Visit(VisitKind.VISIT_PARAMETER_GET, element: parameter)); 4768 visits.add(new Visit(VisitKind.VISIT_PARAMETER_GET, element: parameter));
4328 } 4769 }
4329 4770
4330 @override 4771 @override
4331 visitParameterInvoke( 4772 visitParameterInvoke(
4332 Send node, 4773 Send node,
4333 ParameterElement parameter, 4774 ParameterElement parameter,
4334 NodeList arguments, 4775 NodeList arguments,
4335 CallStructure callStructure, 4776 CallStructure callStructure,
4336 arg) { 4777 arg) {
4337 visits.add(new Visit(VisitKind.VISIT_PARAMETER_INVOKE, 4778 visits.add(new Visit(VisitKind.VISIT_PARAMETER_INVOKE,
4338 element: parameter, arguments: arguments, selector: callStructure)); 4779 element: parameter, arguments: arguments, selector: callStructure));
4339 apply(arguments, arg); 4780 apply(arguments, arg);
4340 } 4781 }
4341 4782
4342 @override 4783 @override
4343 visitParameterSet( 4784 visitParameterSet(
4344 SendSet node, 4785 SendSet node,
4345 ParameterElement parameter, 4786 ParameterElement parameter,
4346 Node rhs, 4787 Node rhs,
4347 arg) { 4788 arg) {
4348 visits.add(new Visit(VisitKind.VISIT_PARAMETER_SET, 4789 visits.add(new Visit(VisitKind.VISIT_PARAMETER_SET,
4349 element: parameter, rhs: rhs)); 4790 element: parameter, rhs: rhs));
4350 apply(rhs, arg); 4791 super.visitParameterSet(node, parameter, rhs, arg);
4351 } 4792 }
4352 4793
4353 @override 4794 @override
4795 visitFinalParameterSet(
4796 SendSet node,
4797 ParameterElement parameter,
4798 Node rhs,
4799 arg) {
4800 visits.add(new Visit(VisitKind.VISIT_FINAL_PARAMETER_SET,
4801 element: parameter, rhs: rhs));
4802 super.visitFinalParameterSet(node, parameter, rhs, arg);
4803 }
4804
4805 @override
4354 visitStaticFieldGet( 4806 visitStaticFieldGet(
4355 Send node, 4807 Send node,
4356 FieldElement field, 4808 FieldElement field,
4357 arg) { 4809 arg) {
4358 visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_GET, element: field)); 4810 visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_GET, element: field));
4359 } 4811 }
4360 4812
4361 @override 4813 @override
4362 visitStaticFieldInvoke( 4814 visitStaticFieldInvoke(
4363 Send node, 4815 Send node,
4364 FieldElement field, 4816 FieldElement field,
4365 NodeList arguments, 4817 NodeList arguments,
4366 CallStructure callStructure, 4818 CallStructure callStructure,
4367 arg) { 4819 arg) {
4368 visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_INVOKE, 4820 visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_INVOKE,
4369 element: field, arguments: arguments)); 4821 element: field, arguments: arguments));
4370 apply(arguments, arg); 4822 apply(arguments, arg);
4371 } 4823 }
4372 4824
4373 @override 4825 @override
4374 visitStaticFieldSet( 4826 visitStaticFieldSet(
4375 SendSet node, 4827 SendSet node,
4376 FieldElement field, 4828 FieldElement field,
4377 Node rhs, 4829 Node rhs,
4378 arg) { 4830 arg) {
4379 visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_SET, 4831 visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_SET,
4380 element: field, rhs: rhs)); 4832 element: field, rhs: rhs));
4381 apply(rhs, arg); 4833 super.visitStaticFieldSet(node, field, rhs, arg);
4382 } 4834 }
4383 4835
4384 @override 4836 @override
4837 visitFinalStaticFieldSet(
4838 SendSet node,
4839 FieldElement field,
4840 Node rhs,
4841 arg) {
4842 visits.add(new Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
4843 element: field, rhs: rhs));
4844 super.visitFinalStaticFieldSet(node, field, rhs, arg);
4845 }
4846
4847 @override
4385 visitStaticFunctionGet( 4848 visitStaticFunctionGet(
4386 Send node, 4849 Send node,
4387 MethodElement function, 4850 MethodElement function,
4388 arg) { 4851 arg) {
4389 visits.add(new Visit(VisitKind.VISIT_STATIC_FUNCTION_GET, 4852 visits.add(new Visit(VisitKind.VISIT_STATIC_FUNCTION_GET,
4390 element: function)); 4853 element: function));
4391 } 4854 }
4392 4855
4393 @override 4856 @override
4857 visitStaticFunctionSet(
4858 SendSet node,
4859 MethodElement function,
4860 Node rhs,
4861 arg) {
4862 visits.add(new Visit(VisitKind.VISIT_STATIC_FUNCTION_SET,
4863 element: function, rhs: rhs));
4864 super.visitStaticFunctionSet(node, function, rhs, arg);
4865 }
4866
4867 @override
4394 visitStaticFunctionInvoke( 4868 visitStaticFunctionInvoke(
4395 Send node, 4869 Send node,
4396 MethodElement function, 4870 MethodElement function,
4397 NodeList arguments, 4871 NodeList arguments,
4398 CallStructure callStructure, 4872 CallStructure callStructure,
4399 arg) { 4873 arg) {
4400 visits.add(new Visit(VisitKind.VISIT_STATIC_FUNCTION_INVOKE, 4874 visits.add(new Visit(VisitKind.VISIT_STATIC_FUNCTION_INVOKE,
4401 element: function, arguments: arguments)); 4875 element: function, arguments: arguments));
4402 apply(arguments, arg); 4876 super.visitStaticFunctionInvoke(
4877 node, function, arguments, callStructure, arg);
4403 } 4878 }
4404 4879
4405 @override 4880 @override
4406 visitStaticFunctionIncompatibleInvoke( 4881 visitStaticFunctionIncompatibleInvoke(
4407 Send node, 4882 Send node,
4408 MethodElement function, 4883 MethodElement function,
4409 NodeList arguments, 4884 NodeList arguments,
4410 CallStructure callStructure, 4885 CallStructure callStructure,
4411 arg) { 4886 arg) {
4412 visits.add(new Visit(VisitKind.VISIT_STATIC_FUNCTION_INCOMPATIBLE_INVOKE, 4887 visits.add(new Visit(VisitKind.VISIT_STATIC_FUNCTION_INCOMPATIBLE_INVOKE,
4413 element: function, arguments: arguments)); 4888 element: function, arguments: arguments));
4414 apply(arguments, arg); 4889 apply(arguments, arg);
4415 } 4890 }
4416 4891
4417 @override 4892 @override
4418 visitStaticGetterGet( 4893 visitStaticGetterGet(
4419 Send node, 4894 Send node,
4420 FunctionElement getter, 4895 FunctionElement getter,
4421 arg) { 4896 arg) {
4422 visits.add(new Visit(VisitKind.VISIT_STATIC_GETTER_GET, 4897 visits.add(new Visit(VisitKind.VISIT_STATIC_GETTER_GET,
4423 element: getter)); 4898 element: getter));
4899 super.visitStaticGetterGet(node, getter, arg);
4424 } 4900 }
4425 4901
4426 @override 4902 @override
4903 visitStaticGetterSet(
4904 SendSet node,
4905 MethodElement getter,
4906 Node rhs,
4907 arg) {
4908 visits.add(new Visit(VisitKind.VISIT_STATIC_GETTER_SET,
4909 element: getter, rhs: rhs));
4910 super.visitStaticGetterSet(node, getter, rhs, arg);
4911 }
4912
4913 @override
4427 visitStaticGetterInvoke( 4914 visitStaticGetterInvoke(
4428 Send node, 4915 Send node,
4429 FunctionElement getter, 4916 FunctionElement getter,
4430 NodeList arguments, 4917 NodeList arguments,
4431 CallStructure callStructure, 4918 CallStructure callStructure,
4432 arg) { 4919 arg) {
4433 visits.add(new Visit(VisitKind.VISIT_STATIC_GETTER_INVOKE, 4920 visits.add(new Visit(VisitKind.VISIT_STATIC_GETTER_INVOKE,
4434 element: getter, arguments: arguments)); 4921 element: getter, arguments: arguments));
4435 apply(arguments, arg); 4922 super.visitStaticGetterInvoke(node, getter, arguments, callStructure, arg);
4436 } 4923 }
4437 4924
4438 @override 4925 @override
4926 visitStaticSetterInvoke(
4927 Send node,
4928 FunctionElement setter,
4929 NodeList arguments,
4930 CallStructure callStructure,
4931 arg) {
4932 visits.add(new Visit(VisitKind.VISIT_STATIC_SETTER_INVOKE,
4933 element: setter, arguments: arguments));
4934 super.visitStaticSetterInvoke(node, setter, arguments, callStructure, arg);
4935 }
4936
4937 @override
4938 visitStaticSetterGet(
4939 Send node,
4940 FunctionElement getter,
4941 arg) {
4942 visits.add(new Visit(VisitKind.VISIT_STATIC_SETTER_GET,
4943 element: getter));
4944 super.visitStaticSetterGet(node, getter, arg);
4945 }
4946
4947 @override
4439 visitStaticSetterSet( 4948 visitStaticSetterSet(
4440 SendSet node, 4949 SendSet node,
4441 FunctionElement setter, 4950 FunctionElement setter,
4442 Node rhs, 4951 Node rhs,
4443 arg) { 4952 arg) {
4444 visits.add(new Visit(VisitKind.VISIT_STATIC_SETTER_SET, 4953 visits.add(new Visit(VisitKind.VISIT_STATIC_SETTER_SET,
4445 element: setter, rhs: rhs)); 4954 element: setter, rhs: rhs));
4446 apply(rhs, arg); 4955 super.visitStaticSetterSet(node, setter, rhs, arg);
4447 } 4956 }
4448 4957
4449 @override 4958 @override
4450 visitSuperBinary( 4959 visitSuperBinary(
4451 Send node, 4960 Send node,
4452 FunctionElement function, 4961 FunctionElement function,
4453 BinaryOperator operator, 4962 BinaryOperator operator,
4454 Node argument, 4963 Node argument,
4455 arg) { 4964 arg) {
4456 visits.add(new Visit(VisitKind.VISIT_SUPER_BINARY, 4965 visits.add(new Visit(VisitKind.VISIT_SUPER_BINARY,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
4570 } 5079 }
4571 5080
4572 @override 5081 @override
4573 visitTopLevelFieldSet( 5082 visitTopLevelFieldSet(
4574 SendSet node, 5083 SendSet node,
4575 FieldElement field, 5084 FieldElement field,
4576 Node rhs, 5085 Node rhs,
4577 arg) { 5086 arg) {
4578 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_SET, 5087 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_SET,
4579 element: field, rhs: rhs)); 5088 element: field, rhs: rhs));
4580 apply(rhs, arg); 5089 super.visitTopLevelFieldSet(node, field, rhs, arg);
4581 } 5090 }
4582 5091
4583 @override 5092 @override
5093 visitFinalTopLevelFieldSet(
5094 SendSet node,
5095 FieldElement field,
5096 Node rhs,
5097 arg) {
5098 visits.add(new Visit(VisitKind.VISIT_FINAL_TOP_LEVEL_FIELD_SET,
5099 element: field, rhs: rhs));
5100 super.visitFinalTopLevelFieldSet(node, field, rhs, arg);
5101 }
5102
5103 @override
4584 visitTopLevelFunctionGet( 5104 visitTopLevelFunctionGet(
4585 Send node, 5105 Send node,
4586 MethodElement function, 5106 MethodElement function,
4587 arg) { 5107 arg) {
4588 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_GET, 5108 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_GET,
4589 element: function)); 5109 element: function));
4590 } 5110 }
4591 5111
4592 @override 5112 @override
5113 visitTopLevelFunctionSet(
5114 SendSet node,
5115 MethodElement function,
5116 Node rhs,
5117 arg) {
5118 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_SET,
5119 element: function, rhs: rhs));
5120 super.visitTopLevelFunctionSet(node, function, rhs, arg);
5121 }
5122
5123 @override
4593 visitTopLevelFunctionInvoke( 5124 visitTopLevelFunctionInvoke(
4594 Send node, 5125 Send node,
4595 MethodElement function, 5126 MethodElement function,
4596 NodeList arguments, 5127 NodeList arguments,
4597 CallStructure callStructure, 5128 CallStructure callStructure,
4598 arg) { 5129 arg) {
4599 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_INVOKE, 5130 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_INVOKE,
4600 element: function, arguments: arguments)); 5131 element: function, arguments: arguments));
4601 apply(arguments, arg); 5132 apply(arguments, arg);
4602 } 5133 }
(...skipping 10 matching lines...) Expand all
4613 apply(arguments, arg); 5144 apply(arguments, arg);
4614 } 5145 }
4615 5146
4616 @override 5147 @override
4617 visitTopLevelGetterGet( 5148 visitTopLevelGetterGet(
4618 Send node, 5149 Send node,
4619 FunctionElement getter, 5150 FunctionElement getter,
4620 arg) { 5151 arg) {
4621 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_GET, 5152 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_GET,
4622 element: getter)); 5153 element: getter));
5154 super.visitTopLevelGetterGet(node, getter, arg);
4623 } 5155 }
4624 5156
4625 @override 5157 @override
5158 visitTopLevelSetterGet(
5159 Send node,
5160 FunctionElement setter,
5161 arg) {
5162 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_GET,
5163 element: setter));
5164 super.visitTopLevelSetterGet(node, setter, arg);
5165 }
5166
5167 @override
4626 visitTopLevelGetterInvoke( 5168 visitTopLevelGetterInvoke(
4627 Send node, 5169 Send node,
4628 FunctionElement getter, 5170 FunctionElement getter,
4629 NodeList arguments, 5171 NodeList arguments,
4630 CallStructure callStructure, 5172 CallStructure callStructure,
4631 arg) { 5173 arg) {
4632 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_INVOKE, 5174 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_INVOKE,
4633 element: getter, arguments: arguments)); 5175 element: getter, arguments: arguments));
4634 apply(arguments, arg); 5176 super.visitTopLevelGetterInvoke(
5177 node, getter, arguments, callStructure, arg);
4635 } 5178 }
4636 5179
4637 @override 5180 @override
5181 visitTopLevelSetterInvoke(
5182 Send node,
5183 FunctionElement setter,
5184 NodeList arguments,
5185 CallStructure callStructure,
5186 arg) {
5187 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_INVOKE,
5188 element: setter, arguments: arguments));
5189 super.visitTopLevelSetterInvoke(
5190 node, setter, arguments, callStructure, arg);
5191 }
5192
5193 @override
5194 visitTopLevelGetterSet(
5195 SendSet node,
5196 FunctionElement getter,
5197 Node rhs,
5198 arg) {
5199 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_SET,
5200 element: getter, rhs: rhs));
5201 super.visitTopLevelGetterSet(node, getter, rhs, arg);
5202 }
5203
5204 @override
4638 visitTopLevelSetterSet( 5205 visitTopLevelSetterSet(
4639 SendSet node, 5206 SendSet node,
4640 FunctionElement setter, 5207 FunctionElement setter,
4641 Node rhs, 5208 Node rhs,
4642 arg) { 5209 arg) {
4643 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_SET, 5210 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_SET,
4644 element: setter, rhs: rhs)); 5211 element: setter, rhs: rhs));
4645 apply(rhs, arg); 5212 super.visitTopLevelSetterSet(node, setter, rhs, arg);
4646 } 5213 }
4647 5214
4648 @override 5215 @override
4649 visitTypeVariableTypeLiteralGet( 5216 visitTypeVariableTypeLiteralGet(
4650 Send node, 5217 Send node,
4651 TypeVariableElement element, 5218 TypeVariableElement element,
4652 arg) { 5219 arg) {
4653 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_GET, 5220 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_GET,
4654 element: element)); 5221 element: element));
4655 } 5222 }
4656 5223
4657 @override 5224 @override
4658 visitTypeVariableTypeLiteralInvoke( 5225 visitTypeVariableTypeLiteralInvoke(
4659 Send node, 5226 Send node,
4660 TypeVariableElement element, 5227 TypeVariableElement element,
4661 NodeList arguments, 5228 NodeList arguments,
4662 CallStructure callStructure, 5229 CallStructure callStructure,
4663 arg) { 5230 arg) {
4664 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_INVOKE, 5231 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_INVOKE,
4665 element: element, arguments: arguments)); 5232 element: element, arguments: arguments));
4666 apply(arguments, arg); 5233 apply(arguments, arg);
4667 } 5234 }
4668 5235
4669 @override 5236 @override
4670 errorTypeVariableTypeLiteralSet( 5237 visitTypeVariableTypeLiteralSet(
4671 SendSet node, 5238 SendSet node,
4672 TypeVariableElement element, 5239 TypeVariableElement element,
4673 Node rhs, 5240 Node rhs,
4674 arg) { 5241 arg) {
4675 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET, 5242 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET,
4676 element: element, rhs: rhs)); 5243 element: element, rhs: rhs));
4677 apply(rhs, arg); 5244 super.visitTypeVariableTypeLiteralSet(node, element, rhs, arg);
4678 } 5245 }
4679 5246
4680 @override 5247 @override
4681 visitTypedefTypeLiteralGet( 5248 visitTypedefTypeLiteralGet(
4682 Send node, 5249 Send node,
4683 ConstantExpression constant, 5250 ConstantExpression constant,
4684 arg) { 5251 arg) {
4685 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_GET, 5252 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_GET,
4686 constant: constant.getText())); 5253 constant: constant.getText()));
4687 } 5254 }
4688 5255
4689 @override 5256 @override
4690 visitTypedefTypeLiteralInvoke( 5257 visitTypedefTypeLiteralInvoke(
4691 Send node, 5258 Send node,
4692 ConstantExpression constant, 5259 ConstantExpression constant,
4693 NodeList arguments, 5260 NodeList arguments,
4694 CallStructure callStructure, 5261 CallStructure callStructure,
4695 arg) { 5262 arg) {
4696 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_INVOKE, 5263 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_INVOKE,
4697 constant: constant.getText(), arguments: arguments)); 5264 constant: constant.getText(), arguments: arguments));
4698 apply(arguments, arg); 5265 apply(arguments, arg);
4699 } 5266 }
4700 5267
4701 @override 5268 @override
4702 errorTypedefTypeLiteralSet( 5269 visitTypedefTypeLiteralSet(
4703 SendSet node, 5270 SendSet node,
4704 ConstantExpression constant, 5271 ConstantExpression constant,
4705 Node rhs, 5272 Node rhs,
4706 arg) { 5273 arg) {
4707 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET, 5274 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET,
4708 constant: constant.getText(), rhs: rhs)); 5275 constant: constant.getText(), rhs: rhs));
4709 apply(rhs, arg); 5276 super.visitTypedefTypeLiteralSet(node, constant, rhs, arg);
4710 } 5277 }
4711 5278
4712 @override 5279 @override
4713 visitUnary( 5280 visitUnary(
4714 Send node, 5281 Send node,
4715 UnaryOperator operator, 5282 UnaryOperator operator,
4716 Node expression, 5283 Node expression,
4717 arg) { 5284 arg) {
4718 visits.add(new Visit(VisitKind.VISIT_UNARY, 5285 visits.add(new Visit(VisitKind.VISIT_UNARY,
4719 expression: expression, operator: operator)); 5286 expression: expression, operator: operator));
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
4770 } 5337 }
4771 5338
4772 @override 5339 @override
4773 visitSuperFieldSet( 5340 visitSuperFieldSet(
4774 SendSet node, 5341 SendSet node,
4775 FieldElement field, 5342 FieldElement field,
4776 Node rhs, 5343 Node rhs,
4777 arg) { 5344 arg) {
4778 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_SET, 5345 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_SET,
4779 element: field, rhs: rhs)); 5346 element: field, rhs: rhs));
4780 apply(rhs, arg); 5347 super.visitSuperFieldSet(node, field, rhs, arg);
4781 } 5348 }
4782 5349
4783 @override 5350 @override
5351 visitFinalSuperFieldSet(
5352 SendSet node,
5353 FieldElement field,
5354 Node rhs,
5355 arg) {
5356 visits.add(new Visit(VisitKind.VISIT_FINAL_SUPER_FIELD_SET,
5357 element: field, rhs: rhs));
5358 super.visitFinalSuperFieldSet(node, field, rhs, arg);
5359 }
5360
5361 @override
4784 visitSuperMethodGet( 5362 visitSuperMethodGet(
4785 Send node, 5363 Send node,
4786 MethodElement method, 5364 MethodElement method,
4787 arg) { 5365 arg) {
4788 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_GET, element: method)); 5366 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_GET, element: method));
4789 } 5367 }
4790 5368
4791 @override 5369 @override
5370 visitSuperMethodSet(
5371 SendSet node,
5372 MethodElement method,
5373 Node rhs,
5374 arg) {
5375 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_SET,
5376 element: method, rhs: rhs));
5377 super.visitSuperMethodSet(node, method, rhs, arg);
5378 }
5379
5380 @override
4792 visitSuperMethodInvoke( 5381 visitSuperMethodInvoke(
4793 Send node, 5382 Send node,
4794 MethodElement method, 5383 MethodElement method,
4795 NodeList arguments, 5384 NodeList arguments,
4796 CallStructure callStructure, 5385 CallStructure callStructure,
4797 arg) { 5386 arg) {
4798 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_INVOKE, 5387 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_INVOKE,
4799 element: method, arguments: arguments)); 5388 element: method, arguments: arguments));
4800 apply(arguments, arg); 5389 apply(arguments, arg);
4801 } 5390 }
4802 5391
4803 @override 5392 @override
4804 visitSuperMethodIncompatibleInvoke( 5393 visitSuperMethodIncompatibleInvoke(
4805 Send node, 5394 Send node,
4806 MethodElement method, 5395 MethodElement method,
4807 NodeList arguments, 5396 NodeList arguments,
4808 CallStructure callStructure, 5397 CallStructure callStructure,
4809 arg) { 5398 arg) {
4810 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_INCOMPATIBLE_INVOKE, 5399 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_INCOMPATIBLE_INVOKE,
4811 element: method, arguments: arguments)); 5400 element: method, arguments: arguments));
4812 apply(arguments, arg); 5401 apply(arguments, arg);
4813 } 5402 }
4814 5403
4815 @override 5404 @override
4816 visitSuperGetterGet( 5405 visitSuperGetterGet(
4817 Send node, 5406 Send node,
4818 FunctionElement getter, 5407 FunctionElement getter,
4819 arg) { 5408 arg) {
4820 visits.add(new Visit(VisitKind.VISIT_SUPER_GETTER_GET, element: getter)); 5409 visits.add(new Visit(VisitKind.VISIT_SUPER_GETTER_GET, element: getter));
5410 super.visitSuperGetterGet(node, getter, arg);
4821 } 5411 }
4822 5412
4823 @override 5413 @override
5414 visitSuperSetterGet(
5415 Send node,
5416 FunctionElement setter,
5417 arg) {
5418 visits.add(new Visit(VisitKind.VISIT_SUPER_SETTER_GET, element: setter));
5419 super.visitSuperSetterGet(node, setter, arg);
5420 }
5421
5422 @override
4824 visitSuperGetterInvoke( 5423 visitSuperGetterInvoke(
4825 Send node, 5424 Send node,
4826 FunctionElement getter, 5425 FunctionElement getter,
4827 NodeList arguments, 5426 NodeList arguments,
4828 CallStructure callStructure, 5427 CallStructure callStructure,
4829 arg) { 5428 arg) {
4830 visits.add(new Visit(VisitKind.VISIT_SUPER_GETTER_INVOKE, 5429 visits.add(new Visit(VisitKind.VISIT_SUPER_GETTER_INVOKE,
4831 element: getter, arguments: arguments)); 5430 element: getter, arguments: arguments));
4832 apply(arguments, arg); 5431 super.visitSuperGetterInvoke(node, getter, arguments, callStructure, arg);
4833 } 5432 }
4834 5433
4835 @override 5434 @override
5435 visitSuperSetterInvoke(
5436 Send node,
5437 FunctionElement setter,
5438 NodeList arguments,
5439 CallStructure callStructure,
5440 arg) {
5441 visits.add(new Visit(VisitKind.VISIT_SUPER_SETTER_INVOKE,
5442 element: setter, arguments: arguments));
5443 super.visitSuperSetterInvoke(node, setter, arguments, callStructure, arg);
5444 }
5445
5446 @override
5447 visitSuperGetterSet(
5448 SendSet node,
5449 FunctionElement getter,
5450 Node rhs,
5451 arg) {
5452 visits.add(new Visit(VisitKind.VISIT_SUPER_GETTER_SET,
5453 element: getter, rhs: rhs));
5454 super.visitSuperGetterSet(node, getter, rhs, arg);
5455 }
5456
5457 @override
4836 visitSuperSetterSet( 5458 visitSuperSetterSet(
4837 SendSet node, 5459 SendSet node,
4838 FunctionElement setter, 5460 FunctionElement setter,
4839 Node rhs, 5461 Node rhs,
4840 arg) { 5462 arg) {
4841 visits.add(new Visit(VisitKind.VISIT_SUPER_SETTER_SET, 5463 visits.add(new Visit(VisitKind.VISIT_SUPER_SETTER_SET,
4842 element: setter, rhs: rhs)); 5464 element: setter, rhs: rhs));
4843 apply(rhs, arg); 5465 super.visitSuperSetterSet(node, setter, rhs, arg);
4844 } 5466 }
4845 5467
4846 @override 5468 @override
4847 visitSuperUnary( 5469 visitSuperUnary(
4848 Send node, 5470 Send node,
4849 UnaryOperator operator, 5471 UnaryOperator operator,
4850 FunctionElement function, 5472 FunctionElement function,
4851 arg) { 5473 arg) {
4852 visits.add(new Visit(VisitKind.VISIT_SUPER_UNARY, 5474 visits.add(new Visit(VisitKind.VISIT_SUPER_UNARY,
4853 element: function, operator: operator)); 5475 element: function, operator: operator));
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
5876 6498
5877 @override 6499 @override
5878 visitUnresolvedGet( 6500 visitUnresolvedGet(
5879 Send node, 6501 Send node,
5880 Element element, 6502 Element element,
5881 arg) { 6503 arg) {
5882 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_GET, name: element.name)); 6504 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_GET, name: element.name));
5883 } 6505 }
5884 6506
5885 @override 6507 @override
6508 visitUnresolvedSet(
6509 Send node,
6510 Element element,
6511 Node rhs,
6512 arg) {
6513 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SET,
6514 name: element.name, rhs: rhs));
6515 super.visitUnresolvedSet(node, element, rhs, arg);
6516 }
6517
6518 @override
5886 visitUnresolvedInvoke( 6519 visitUnresolvedInvoke(
5887 Send node, 6520 Send node,
5888 Element element, 6521 Element element,
5889 NodeList arguments, 6522 NodeList arguments,
5890 Selector selector, 6523 Selector selector,
5891 arg) { 6524 arg) {
5892 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, 6525 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
5893 name: element.name, arguments: arguments)); 6526 name: element.name, arguments: arguments));
6527 super.visitUnresolvedInvoke(node, element, arguments, selector, arg);
5894 } 6528 }
5895 6529
5896 @override 6530 @override
5897 visitUnresolvedPostfix( 6531 visitUnresolvedPostfix(
5898 Send node, 6532 Send node,
5899 ErroneousElement element, 6533 ErroneousElement element,
5900 IncDecOperator operator, 6534 IncDecOperator operator,
5901 arg) { 6535 arg) {
5902 visits.add(new Visit( 6536 visits.add(new Visit(
5903 VisitKind.VISIT_UNRESOLVED_POSTFIX, operator: operator)); 6537 VisitKind.VISIT_UNRESOLVED_POSTFIX, operator: operator));
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
7129 } 7763 }
7130 } 7764 }
7131 7765
7132 enum VisitKind { 7766 enum VisitKind {
7133 VISIT_PARAMETER_GET, 7767 VISIT_PARAMETER_GET,
7134 VISIT_PARAMETER_SET, 7768 VISIT_PARAMETER_SET,
7135 VISIT_PARAMETER_INVOKE, 7769 VISIT_PARAMETER_INVOKE,
7136 VISIT_PARAMETER_COMPOUND, 7770 VISIT_PARAMETER_COMPOUND,
7137 VISIT_PARAMETER_PREFIX, 7771 VISIT_PARAMETER_PREFIX,
7138 VISIT_PARAMETER_POSTFIX, 7772 VISIT_PARAMETER_POSTFIX,
7773 VISIT_FINAL_PARAMETER_SET,
7139 VISIT_FINAL_PARAMETER_COMPOUND, 7774 VISIT_FINAL_PARAMETER_COMPOUND,
7140 VISIT_FINAL_PARAMETER_PREFIX, 7775 VISIT_FINAL_PARAMETER_PREFIX,
7141 VISIT_FINAL_PARAMETER_POSTFIX, 7776 VISIT_FINAL_PARAMETER_POSTFIX,
7142 7777
7143 VISIT_LOCAL_VARIABLE_GET, 7778 VISIT_LOCAL_VARIABLE_GET,
7144 VISIT_LOCAL_VARIABLE_SET, 7779 VISIT_LOCAL_VARIABLE_SET,
7145 VISIT_LOCAL_VARIABLE_INVOKE, 7780 VISIT_LOCAL_VARIABLE_INVOKE,
7146 VISIT_LOCAL_VARIABLE_COMPOUND, 7781 VISIT_LOCAL_VARIABLE_COMPOUND,
7147 VISIT_LOCAL_VARIABLE_PREFIX, 7782 VISIT_LOCAL_VARIABLE_PREFIX,
7148 VISIT_LOCAL_VARIABLE_POSTFIX, 7783 VISIT_LOCAL_VARIABLE_POSTFIX,
7149 VISIT_LOCAL_VARIABLE_DECL, 7784 VISIT_LOCAL_VARIABLE_DECL,
7150 VISIT_LOCAL_CONSTANT_DECL, 7785 VISIT_LOCAL_CONSTANT_DECL,
7786 VISIT_FINAL_LOCAL_VARIABLE_SET,
7151 VISIT_FINAL_LOCAL_VARIABLE_COMPOUND, 7787 VISIT_FINAL_LOCAL_VARIABLE_COMPOUND,
7152 VISIT_FINAL_LOCAL_VARIABLE_PREFIX, 7788 VISIT_FINAL_LOCAL_VARIABLE_PREFIX,
7153 VISIT_FINAL_LOCAL_VARIABLE_POSTFIX, 7789 VISIT_FINAL_LOCAL_VARIABLE_POSTFIX,
7154 7790
7155 VISIT_LOCAL_FUNCTION_GET, 7791 VISIT_LOCAL_FUNCTION_GET,
7156 VISIT_LOCAL_FUNCTION_INVOKE, 7792 VISIT_LOCAL_FUNCTION_INVOKE,
7157 VISIT_LOCAL_FUNCTION_DECL, 7793 VISIT_LOCAL_FUNCTION_DECL,
7158 VISIT_CLOSURE_DECL, 7794 VISIT_CLOSURE_DECL,
7795 VISIT_LOCAL_FUNCTION_SET,
7159 VISIT_LOCAL_FUNCTION_COMPOUND, 7796 VISIT_LOCAL_FUNCTION_COMPOUND,
7160 VISIT_LOCAL_FUNCTION_PREFIX, 7797 VISIT_LOCAL_FUNCTION_PREFIX,
7161 VISIT_LOCAL_FUNCTION_POSTFIX, 7798 VISIT_LOCAL_FUNCTION_POSTFIX,
7162 7799
7163 VISIT_STATIC_FIELD_GET, 7800 VISIT_STATIC_FIELD_GET,
7164 VISIT_STATIC_FIELD_SET, 7801 VISIT_STATIC_FIELD_SET,
7165 VISIT_STATIC_FIELD_INVOKE, 7802 VISIT_STATIC_FIELD_INVOKE,
7166 VISIT_STATIC_FIELD_COMPOUND, 7803 VISIT_STATIC_FIELD_COMPOUND,
7167 VISIT_STATIC_FIELD_PREFIX, 7804 VISIT_STATIC_FIELD_PREFIX,
7168 VISIT_STATIC_FIELD_POSTFIX, 7805 VISIT_STATIC_FIELD_POSTFIX,
7169 VISIT_STATIC_FIELD_DECL, 7806 VISIT_STATIC_FIELD_DECL,
7170 VISIT_STATIC_CONSTANT_DECL, 7807 VISIT_STATIC_CONSTANT_DECL,
7171 7808
7172 VISIT_STATIC_GETTER_GET, 7809 VISIT_STATIC_GETTER_GET,
7810 VISIT_STATIC_GETTER_SET,
7811 VISIT_STATIC_GETTER_INVOKE,
7812
7813 VISIT_STATIC_SETTER_GET,
7173 VISIT_STATIC_SETTER_SET, 7814 VISIT_STATIC_SETTER_SET,
7174 VISIT_STATIC_GETTER_INVOKE, 7815 VISIT_STATIC_SETTER_INVOKE,
7816
7175 VISIT_STATIC_GETTER_SETTER_COMPOUND, 7817 VISIT_STATIC_GETTER_SETTER_COMPOUND,
7176 VISIT_STATIC_METHOD_SETTER_COMPOUND, 7818 VISIT_STATIC_METHOD_SETTER_COMPOUND,
7177 VISIT_STATIC_GETTER_SETTER_PREFIX, 7819 VISIT_STATIC_GETTER_SETTER_PREFIX,
7178 VISIT_STATIC_GETTER_SETTER_POSTFIX, 7820 VISIT_STATIC_GETTER_SETTER_POSTFIX,
7821
7179 VISIT_STATIC_GETTER_DECL, 7822 VISIT_STATIC_GETTER_DECL,
7180 VISIT_STATIC_SETTER_DECL, 7823 VISIT_STATIC_SETTER_DECL,
7824
7825 VISIT_FINAL_STATIC_FIELD_SET,
7181 VISIT_STATIC_FINAL_FIELD_COMPOUND, 7826 VISIT_STATIC_FINAL_FIELD_COMPOUND,
7182 VISIT_STATIC_FINAL_FIELD_POSTFIX, 7827 VISIT_STATIC_FINAL_FIELD_POSTFIX,
7183 VISIT_STATIC_FINAL_FIELD_PREFIX, 7828 VISIT_STATIC_FINAL_FIELD_PREFIX,
7184 7829
7185 VISIT_STATIC_FUNCTION_GET, 7830 VISIT_STATIC_FUNCTION_GET,
7831 VISIT_STATIC_FUNCTION_SET,
7186 VISIT_STATIC_FUNCTION_INVOKE, 7832 VISIT_STATIC_FUNCTION_INVOKE,
7187 VISIT_STATIC_FUNCTION_INCOMPATIBLE_INVOKE, 7833 VISIT_STATIC_FUNCTION_INCOMPATIBLE_INVOKE,
7188 VISIT_STATIC_FUNCTION_DECL, 7834 VISIT_STATIC_FUNCTION_DECL,
7189 VISIT_STATIC_METHOD_SETTER_PREFIX, 7835 VISIT_STATIC_METHOD_SETTER_PREFIX,
7190 VISIT_STATIC_METHOD_SETTER_POSTFIX, 7836 VISIT_STATIC_METHOD_SETTER_POSTFIX,
7191 7837
7192 VISIT_UNRESOLVED_STATIC_GETTER_COMPOUND, 7838 VISIT_UNRESOLVED_STATIC_GETTER_COMPOUND,
7193 VISIT_UNRESOLVED_STATIC_SETTER_COMPOUND, 7839 VISIT_UNRESOLVED_STATIC_SETTER_COMPOUND,
7194 VISIT_STATIC_METHOD_COMPOUND, 7840 VISIT_STATIC_METHOD_COMPOUND,
7195 VISIT_UNRESOLVED_STATIC_GETTER_PREFIX, 7841 VISIT_UNRESOLVED_STATIC_GETTER_PREFIX,
7196 VISIT_UNRESOLVED_STATIC_SETTER_PREFIX, 7842 VISIT_UNRESOLVED_STATIC_SETTER_PREFIX,
7197 VISIT_STATIC_METHOD_PREFIX, 7843 VISIT_STATIC_METHOD_PREFIX,
7198 VISIT_UNRESOLVED_STATIC_GETTER_POSTFIX, 7844 VISIT_UNRESOLVED_STATIC_GETTER_POSTFIX,
7199 VISIT_UNRESOLVED_STATIC_SETTER_POSTFIX, 7845 VISIT_UNRESOLVED_STATIC_SETTER_POSTFIX,
7200 VISIT_STATIC_METHOD_POSTFIX, 7846 VISIT_STATIC_METHOD_POSTFIX,
7201 7847
7202 VISIT_TOP_LEVEL_FIELD_GET, 7848 VISIT_TOP_LEVEL_FIELD_GET,
7203 VISIT_TOP_LEVEL_FIELD_SET, 7849 VISIT_TOP_LEVEL_FIELD_SET,
7204 VISIT_TOP_LEVEL_FIELD_INVOKE, 7850 VISIT_TOP_LEVEL_FIELD_INVOKE,
7851 VISIT_FINAL_TOP_LEVEL_FIELD_SET,
7205 VISIT_TOP_LEVEL_FIELD_COMPOUND, 7852 VISIT_TOP_LEVEL_FIELD_COMPOUND,
7206 VISIT_TOP_LEVEL_FIELD_PREFIX, 7853 VISIT_TOP_LEVEL_FIELD_PREFIX,
7207 VISIT_TOP_LEVEL_FIELD_POSTFIX, 7854 VISIT_TOP_LEVEL_FIELD_POSTFIX,
7208 VISIT_TOP_LEVEL_FIELD_DECL, 7855 VISIT_TOP_LEVEL_FIELD_DECL,
7209 VISIT_TOP_LEVEL_CONSTANT_DECL, 7856 VISIT_TOP_LEVEL_CONSTANT_DECL,
7210 VISIT_TOP_LEVEL_FINAL_FIELD_COMPOUND, 7857 VISIT_TOP_LEVEL_FINAL_FIELD_COMPOUND,
7211 VISIT_TOP_LEVEL_FINAL_FIELD_POSTFIX, 7858 VISIT_TOP_LEVEL_FINAL_FIELD_POSTFIX,
7212 VISIT_TOP_LEVEL_FINAL_FIELD_PREFIX, 7859 VISIT_TOP_LEVEL_FINAL_FIELD_PREFIX,
7213 7860
7214 VISIT_TOP_LEVEL_GETTER_GET, 7861 VISIT_TOP_LEVEL_GETTER_GET,
7862 VISIT_TOP_LEVEL_GETTER_SET,
7863 VISIT_TOP_LEVEL_GETTER_INVOKE,
7864 VISIT_TOP_LEVEL_SETTER_GET,
7215 VISIT_TOP_LEVEL_SETTER_SET, 7865 VISIT_TOP_LEVEL_SETTER_SET,
7216 VISIT_TOP_LEVEL_GETTER_INVOKE, 7866 VISIT_TOP_LEVEL_SETTER_INVOKE,
7217 VISIT_TOP_LEVEL_GETTER_SETTER_COMPOUND, 7867 VISIT_TOP_LEVEL_GETTER_SETTER_COMPOUND,
7218 VISIT_TOP_LEVEL_GETTER_SETTER_PREFIX, 7868 VISIT_TOP_LEVEL_GETTER_SETTER_PREFIX,
7219 VISIT_TOP_LEVEL_GETTER_SETTER_POSTFIX, 7869 VISIT_TOP_LEVEL_GETTER_SETTER_POSTFIX,
7220 VISIT_TOP_LEVEL_GETTER_DECL, 7870 VISIT_TOP_LEVEL_GETTER_DECL,
7221 VISIT_TOP_LEVEL_SETTER_DECL, 7871 VISIT_TOP_LEVEL_SETTER_DECL,
7222 7872
7223 VISIT_TOP_LEVEL_FUNCTION_GET, 7873 VISIT_TOP_LEVEL_FUNCTION_GET,
7874 VISIT_TOP_LEVEL_FUNCTION_SET,
7224 VISIT_TOP_LEVEL_FUNCTION_INVOKE, 7875 VISIT_TOP_LEVEL_FUNCTION_INVOKE,
7225 VISIT_TOP_LEVEL_FUNCTION_INCOMPATIBLE_INVOKE, 7876 VISIT_TOP_LEVEL_FUNCTION_INCOMPATIBLE_INVOKE,
7226 VISIT_TOP_LEVEL_FUNCTION_DECL, 7877 VISIT_TOP_LEVEL_FUNCTION_DECL,
7227 VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND, 7878 VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND,
7228 VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX, 7879 VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX,
7229 VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX, 7880 VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX,
7230 7881
7231 VISIT_UNRESOLVED_TOP_LEVEL_GETTER_COMPOUND, 7882 VISIT_UNRESOLVED_TOP_LEVEL_GETTER_COMPOUND,
7232 VISIT_UNRESOLVED_TOP_LEVEL_SETTER_COMPOUND, 7883 VISIT_UNRESOLVED_TOP_LEVEL_SETTER_COMPOUND,
7233 VISIT_TOP_LEVEL_METHOD_COMPOUND, 7884 VISIT_TOP_LEVEL_METHOD_COMPOUND,
(...skipping 16 matching lines...) Expand all
7250 7901
7251 VISIT_THIS_PROPERTY_GET, 7902 VISIT_THIS_PROPERTY_GET,
7252 VISIT_THIS_PROPERTY_SET, 7903 VISIT_THIS_PROPERTY_SET,
7253 VISIT_THIS_PROPERTY_INVOKE, 7904 VISIT_THIS_PROPERTY_INVOKE,
7254 VISIT_THIS_PROPERTY_COMPOUND, 7905 VISIT_THIS_PROPERTY_COMPOUND,
7255 VISIT_THIS_PROPERTY_PREFIX, 7906 VISIT_THIS_PROPERTY_PREFIX,
7256 VISIT_THIS_PROPERTY_POSTFIX, 7907 VISIT_THIS_PROPERTY_POSTFIX,
7257 7908
7258 VISIT_SUPER_FIELD_GET, 7909 VISIT_SUPER_FIELD_GET,
7259 VISIT_SUPER_FIELD_SET, 7910 VISIT_SUPER_FIELD_SET,
7911 VISIT_FINAL_SUPER_FIELD_SET,
7260 VISIT_SUPER_FIELD_INVOKE, 7912 VISIT_SUPER_FIELD_INVOKE,
7261 VISIT_SUPER_FIELD_COMPOUND, 7913 VISIT_SUPER_FIELD_COMPOUND,
7262 VISIT_SUPER_FIELD_PREFIX, 7914 VISIT_SUPER_FIELD_PREFIX,
7263 VISIT_SUPER_FIELD_POSTFIX, 7915 VISIT_SUPER_FIELD_POSTFIX,
7264 VISIT_SUPER_FINAL_FIELD_COMPOUND, 7916 VISIT_SUPER_FINAL_FIELD_COMPOUND,
7265 VISIT_SUPER_FINAL_FIELD_PREFIX, 7917 VISIT_SUPER_FINAL_FIELD_PREFIX,
7266 VISIT_SUPER_FINAL_FIELD_POSTFIX, 7918 VISIT_SUPER_FINAL_FIELD_POSTFIX,
7267 VISIT_SUPER_FIELD_FIELD_COMPOUND, 7919 VISIT_SUPER_FIELD_FIELD_COMPOUND,
7268 VISIT_SUPER_FIELD_FIELD_PREFIX, 7920 VISIT_SUPER_FIELD_FIELD_PREFIX,
7269 VISIT_SUPER_FIELD_FIELD_POSTFIX, 7921 VISIT_SUPER_FIELD_FIELD_POSTFIX,
7270 7922
7271 VISIT_SUPER_GETTER_GET, 7923 VISIT_SUPER_GETTER_GET,
7924 VISIT_SUPER_GETTER_SET,
7925 VISIT_SUPER_GETTER_INVOKE,
7926 VISIT_SUPER_SETTER_GET,
7272 VISIT_SUPER_SETTER_SET, 7927 VISIT_SUPER_SETTER_SET,
7273 VISIT_SUPER_GETTER_INVOKE, 7928 VISIT_SUPER_SETTER_INVOKE,
7274 VISIT_SUPER_GETTER_SETTER_COMPOUND, 7929 VISIT_SUPER_GETTER_SETTER_COMPOUND,
7275 VISIT_SUPER_GETTER_FIELD_COMPOUND, 7930 VISIT_SUPER_GETTER_FIELD_COMPOUND,
7276 VISIT_SUPER_FIELD_SETTER_COMPOUND, 7931 VISIT_SUPER_FIELD_SETTER_COMPOUND,
7277 VISIT_SUPER_GETTER_SETTER_PREFIX, 7932 VISIT_SUPER_GETTER_SETTER_PREFIX,
7278 VISIT_SUPER_GETTER_FIELD_PREFIX, 7933 VISIT_SUPER_GETTER_FIELD_PREFIX,
7279 VISIT_SUPER_FIELD_SETTER_PREFIX, 7934 VISIT_SUPER_FIELD_SETTER_PREFIX,
7280 VISIT_SUPER_GETTER_SETTER_POSTFIX, 7935 VISIT_SUPER_GETTER_SETTER_POSTFIX,
7281 VISIT_SUPER_GETTER_FIELD_POSTFIX, 7936 VISIT_SUPER_GETTER_FIELD_POSTFIX,
7282 VISIT_SUPER_FIELD_SETTER_POSTFIX, 7937 VISIT_SUPER_FIELD_SETTER_POSTFIX,
7283 7938
7284 VISIT_SUPER_METHOD_GET, 7939 VISIT_SUPER_METHOD_GET,
7940 VISIT_SUPER_METHOD_SET,
7285 VISIT_SUPER_METHOD_INVOKE, 7941 VISIT_SUPER_METHOD_INVOKE,
7286 VISIT_SUPER_METHOD_INCOMPATIBLE_INVOKE, 7942 VISIT_SUPER_METHOD_INCOMPATIBLE_INVOKE,
7287 VISIT_SUPER_METHOD_SETTER_COMPOUND, 7943 VISIT_SUPER_METHOD_SETTER_COMPOUND,
7288 VISIT_SUPER_METHOD_SETTER_PREFIX, 7944 VISIT_SUPER_METHOD_SETTER_PREFIX,
7289 VISIT_SUPER_METHOD_SETTER_POSTFIX, 7945 VISIT_SUPER_METHOD_SETTER_POSTFIX,
7290 VISIT_SUPER_METHOD_COMPOUND, 7946 VISIT_SUPER_METHOD_COMPOUND,
7291 VISIT_SUPER_METHOD_PREFIX, 7947 VISIT_SUPER_METHOD_PREFIX,
7292 VISIT_SUPER_METHOD_POSTFIX, 7948 VISIT_SUPER_METHOD_POSTFIX,
7293 7949
7294 VISIT_UNRESOLVED_GET, 7950 VISIT_UNRESOLVED_GET,
7951 VISIT_UNRESOLVED_SET,
7295 VISIT_UNRESOLVED_INVOKE, 7952 VISIT_UNRESOLVED_INVOKE,
7296 VISIT_UNRESOLVED_SUPER_GET, 7953 VISIT_UNRESOLVED_SUPER_GET,
7297 VISIT_UNRESOLVED_SUPER_INVOKE, 7954 VISIT_UNRESOLVED_SUPER_INVOKE,
7298 7955
7299 VISIT_BINARY, 7956 VISIT_BINARY,
7300 VISIT_INDEX, 7957 VISIT_INDEX,
7301 VISIT_EQUALS, 7958 VISIT_EQUALS,
7302 VISIT_NOT_EQUALS, 7959 VISIT_NOT_EQUALS,
7303 VISIT_INDEX_PREFIX, 7960 VISIT_INDEX_PREFIX,
7304 VISIT_INDEX_POSTFIX, 7961 VISIT_INDEX_POSTFIX,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
7413 VISIT_REQUIRED_INITIALIZING_FORMAL_DECL, 8070 VISIT_REQUIRED_INITIALIZING_FORMAL_DECL,
7414 VISIT_OPTIONAL_INITIALIZING_FORMAL_DECL, 8071 VISIT_OPTIONAL_INITIALIZING_FORMAL_DECL,
7415 VISIT_NAMED_INITIALIZING_FORMAL_DECL, 8072 VISIT_NAMED_INITIALIZING_FORMAL_DECL,
7416 8073
7417 VISIT_UNRESOLVED_COMPOUND, 8074 VISIT_UNRESOLVED_COMPOUND,
7418 VISIT_UNRESOLVED_PREFIX, 8075 VISIT_UNRESOLVED_PREFIX,
7419 VISIT_UNRESOLVED_POSTFIX, 8076 VISIT_UNRESOLVED_POSTFIX,
7420 8077
7421 // TODO(johnniwinther): Add tests for more error cases. 8078 // TODO(johnniwinther): Add tests for more error cases.
7422 } 8079 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698