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

Side by Side Diff: pkg/compiler/lib/src/resolution/semantic_visitor.dart

Issue 1112563002: Refactor SsaBuilder.visitStaticSend and visitGetterSend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. 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 | Annotate | Revision Log
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; 5 library dart2js.semantics_visitor;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../dart2jslib.dart' show invariant; 8 import '../dart2jslib.dart' show invariant;
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 /// } 730 /// }
731 /// m() { C.foo(null, 42); } 731 /// m() { C.foo(null, 42); }
732 /// 732 ///
733 R visitStaticFunctionInvoke( 733 R visitStaticFunctionInvoke(
734 Send node, 734 Send node,
735 MethodElement function, 735 MethodElement function,
736 NodeList arguments, 736 NodeList arguments,
737 CallStructure callStructure, 737 CallStructure callStructure,
738 A arg); 738 A arg);
739 739
740 /// Invocation of the static [function] with incompatible [arguments].
741 ///
742 /// For instance
743 /// class C {
744 /// static foo(a, b) {}
745 /// }
746 /// m() { C.foo(null); }
747 ///
748 R visitStaticFunctionIncompatibleInvoke(
749 Send node,
750 MethodElement function,
751 NodeList arguments,
752 CallStructure callStructure,
753 A arg);
754
740 /// Assignment of [rhs] to the static [function]. 755 /// Assignment of [rhs] to the static [function].
741 /// 756 ///
742 /// For instance 757 /// For instance
743 /// class C { 758 /// class C {
744 /// static foo(a, b) {} 759 /// static foo(a, b) {}
745 /// } 760 /// }
746 /// m() { C.foo = rhs; } 761 /// m() { C.foo = rhs; }
747 /// 762 ///
748 R errorStaticFunctionSet( 763 R errorStaticFunctionSet(
749 Send node, 764 Send node,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 /// foo(a, b) {}; 915 /// foo(a, b) {};
901 /// m() { foo(null, 42); } 916 /// m() { foo(null, 42); }
902 /// 917 ///
903 R visitTopLevelFunctionInvoke( 918 R visitTopLevelFunctionInvoke(
904 Send node, 919 Send node,
905 MethodElement function, 920 MethodElement function,
906 NodeList arguments, 921 NodeList arguments,
907 CallStructure callStructure, 922 CallStructure callStructure,
908 A arg); 923 A arg);
909 924
925 /// Invocation of the top level [function] with incompatible [arguments].
926 ///
927 /// For instance
928 /// class C {
929 /// static foo(a, b) {}
930 /// }
931 /// m() { C.foo(null); }
932 ///
933 R visitTopLevelFunctionIncompatibleInvoke(
934 Send node,
935 MethodElement function,
936 NodeList arguments,
937 CallStructure callStructure,
938 A arg);
939
910 /// Assignment of [rhs] to the top level [function]. 940 /// Assignment of [rhs] to the top level [function].
911 /// 941 ///
912 /// For instance 942 /// For instance
913 /// foo(a, b) {}; 943 /// foo(a, b) {};
914 /// m() { foo = rhs; } 944 /// m() { foo = rhs; }
915 /// 945 ///
916 R errorTopLevelFunctionSet( 946 R errorTopLevelFunctionSet(
917 Send node, 947 Send node,
918 MethodElement function, 948 MethodElement function,
919 Node rhs, 949 Node rhs,
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 /// class C {} 2705 /// class C {}
2676 /// m1() => unresolved; 2706 /// m1() => unresolved;
2677 /// m2() => prefix.unresolved; 2707 /// m2() => prefix.unresolved;
2678 /// m3() => Unresolved.foo; 2708 /// m3() => Unresolved.foo;
2679 /// m4() => unresolved.foo; 2709 /// m4() => unresolved.foo;
2680 /// m5() => unresolved.Foo.bar; 2710 /// m5() => unresolved.Foo.bar;
2681 /// m6() => C.unresolved; 2711 /// m6() => C.unresolved;
2682 /// m7() => prefix.C.unresolved; 2712 /// m7() => prefix.C.unresolved;
2683 /// 2713 ///
2684 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 2714 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
2685 R errorUnresolvedGet( 2715 R visitUnresolvedGet(
2686 Send node, 2716 Send node,
2687 Element element, 2717 Element element,
2688 A arg); 2718 A arg);
2689 2719
2690 /// Read of the unresolved super [element]. 2720 /// Read of the unresolved super [element].
2691 /// 2721 ///
2692 /// For instance 2722 /// For instance
2693 /// class B {} 2723 /// class B {}
2694 /// class C { 2724 /// class C {
2695 /// m() => super.foo; 2725 /// m() => super.foo;
(...skipping 29 matching lines...) Expand all
2725 /// class C {} 2755 /// class C {}
2726 /// m1() => unresolved(null, 42); 2756 /// m1() => unresolved(null, 42);
2727 /// m2() => prefix.unresolved(null, 42); 2757 /// m2() => prefix.unresolved(null, 42);
2728 /// m3() => Unresolved.foo(null, 42); 2758 /// m3() => Unresolved.foo(null, 42);
2729 /// m4() => unresolved.foo(null, 42); 2759 /// m4() => unresolved.foo(null, 42);
2730 /// m5() => unresolved.Foo.bar(null, 42); 2760 /// m5() => unresolved.Foo.bar(null, 42);
2731 /// m6() => C.unresolved(null, 42); 2761 /// m6() => C.unresolved(null, 42);
2732 /// m7() => prefix.C.unresolved(null, 42); 2762 /// m7() => prefix.C.unresolved(null, 42);
2733 /// 2763 ///
2734 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 2764 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
2735 R errorUnresolvedInvoke( 2765 R visitUnresolvedInvoke(
2736 Send node, 2766 Send node,
2737 Element element, 2767 Element element,
2738 NodeList arguments, 2768 NodeList arguments,
2739 Selector selector, 2769 Selector selector,
2740 A arg); 2770 A arg);
2741 2771
2742 /// Invocation of the unresolved super [element] with [arguments]. 2772 /// Invocation of the unresolved super [element] with [arguments].
2743 /// 2773 ///
2744 /// For instance 2774 /// For instance
2745 /// class B {} 2775 /// class B {}
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3600 /// C() : this._(42); 3630 /// C() : this._(42);
3601 /// } 3631 /// }
3602 /// 3632 ///
3603 R errorUnresolvedThisConstructorInvoke( 3633 R errorUnresolvedThisConstructorInvoke(
3604 Send node, 3634 Send node,
3605 Element element, 3635 Element element,
3606 NodeList arguments, 3636 NodeList arguments,
3607 Selector selector, 3637 Selector selector,
3608 A arg); 3638 A arg);
3609 } 3639 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698