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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/semantic_visitor.dart » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closurelib; 7 import '../closure.dart' as closurelib;
8 import '../closure.dart' hide ClosureScope; 8 import '../closure.dart' hide ClosureScope;
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 788
789 @override 789 @override
790 ir.Primitive visitSuperMethodGet( 790 ir.Primitive visitSuperMethodGet(
791 ast.Send node, 791 ast.Send node,
792 MethodElement method, 792 MethodElement method,
793 _) { 793 _) {
794 return irBuilder.buildSuperMethodGet(method); 794 return irBuilder.buildSuperMethodGet(method);
795 } 795 }
796 796
797 @override 797 @override
798 ir.Primitive visitUnresolvedGet(
799 ast.Send node,
800 Element element,
801 _) {
802 return giveup(node, 'visitUnresolvedGet');
803 }
804
805 @override
798 ir.Primitive visitUnresolvedSuperGet( 806 ir.Primitive visitUnresolvedSuperGet(
799 ast.Send node, 807 ast.Send node,
800 Element element, 808 Element element,
801 _) { 809 _) {
802 return giveup(node, 'visitUnresolvedSuperGet'); 810 return giveup(node, 'visitUnresolvedSuperGet');
803 } 811 }
804 812
805 @override 813 @override
806 ir.Primitive visitThisGet(ast.Identifier node, _) { 814 ir.Primitive visitThisGet(ast.Identifier node, _) {
807 return irBuilder.buildThis(); 815 return irBuilder.buildThis();
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 // TODO(karlklose): support foreign functions. 1129 // TODO(karlklose): support foreign functions.
1122 if (function.isForeign(compiler.backend)) { 1130 if (function.isForeign(compiler.backend)) {
1123 return giveup(node, 'handleStaticFunctionInvoke: foreign: $function'); 1131 return giveup(node, 'handleStaticFunctionInvoke: foreign: $function');
1124 } 1132 }
1125 return irBuilder.buildStaticFunctionInvocation(function, callStructure, 1133 return irBuilder.buildStaticFunctionInvocation(function, callStructure,
1126 translateStaticArguments(arguments, function, callStructure), 1134 translateStaticArguments(arguments, function, callStructure),
1127 sourceInformation: sourceInformationBuilder.buildCall(node)); 1135 sourceInformation: sourceInformationBuilder.buildCall(node));
1128 } 1136 }
1129 1137
1130 @override 1138 @override
1139 ir.Primitive handleStaticFunctionIncompatibleInvoke(
1140 ast.Send node,
1141 MethodElement function,
1142 ast.NodeList arguments,
1143 CallStructure callStructure,
1144 _) {
1145 return giveup(node, 'handleStaticFunctionIncompatibleInvoke');
1146 }
1147
1148 @override
1131 ir.Primitive handleStaticGetterInvoke( 1149 ir.Primitive handleStaticGetterInvoke(
1132 ast.Send node, 1150 ast.Send node,
1133 FunctionElement getter, 1151 FunctionElement getter,
1134 ast.NodeList arguments, 1152 ast.NodeList arguments,
1135 CallStructure callStructure, 1153 CallStructure callStructure,
1136 _) { 1154 _) {
1137 if (getter.isForeign(compiler.backend)) { 1155 if (getter.isForeign(compiler.backend)) {
1138 return giveup(node, 'handleStaticGetterInvoke: foreign: $getter'); 1156 return giveup(node, 'handleStaticGetterInvoke: foreign: $getter');
1139 } 1157 }
1140 ir.Primitive target = irBuilder.buildStaticGetterGet(getter); 1158 ir.Primitive target = irBuilder.buildStaticGetterGet(getter);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 ir.Primitive visitSuperMethodIncompatibleInvoke( 1202 ir.Primitive visitSuperMethodIncompatibleInvoke(
1185 ast.Send node, 1203 ast.Send node,
1186 MethodElement method, 1204 MethodElement method,
1187 ast.NodeList arguments, 1205 ast.NodeList arguments,
1188 CallStructure callStructure, 1206 CallStructure callStructure,
1189 _) { 1207 _) {
1190 return giveup(node, 'visitSuperMethodIncompatibleInvoke'); 1208 return giveup(node, 'visitSuperMethodIncompatibleInvoke');
1191 } 1209 }
1192 1210
1193 @override 1211 @override
1212 ir.Primitive visitUnresolvedInvoke(
1213 ast.Send node,
1214 Element element,
1215 ast.NodeList arguments,
1216 Selector selector,
1217 _) {
1218 return giveup(node, 'visitUnresolvedInvoke');
1219 }
1220
1221 @override
1194 ir.Primitive visitUnresolvedSuperInvoke( 1222 ir.Primitive visitUnresolvedSuperInvoke(
1195 ast.Send node, 1223 ast.Send node,
1196 MethodElement method, 1224 Element element,
1197 ast.NodeList arguments, 1225 ast.NodeList arguments,
1198 Selector selector, 1226 Selector selector,
1199 _) { 1227 _) {
1200 return giveup(node, 'visitUnresolvedSuperInvoke'); 1228 return giveup(node, 'visitUnresolvedSuperInvoke');
1201 } 1229 }
1202 1230
1203 @override 1231 @override
1204 ir.Primitive visitThisInvoke( 1232 ir.Primitive visitThisInvoke(
1205 ast.Send node, 1233 ast.Send node,
1206 ast.NodeList arguments, 1234 ast.NodeList arguments,
(...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after
2878 node.body = replacementFor(node.body); 2906 node.body = replacementFor(node.body);
2879 } 2907 }
2880 } 2908 }
2881 2909
2882 /// Visit a just-deleted subterm and unlink all [Reference]s in it. 2910 /// Visit a just-deleted subterm and unlink all [Reference]s in it.
2883 class RemovalVisitor extends ir.RecursiveVisitor { 2911 class RemovalVisitor extends ir.RecursiveVisitor {
2884 processReference(ir.Reference reference) { 2912 processReference(ir.Reference reference) {
2885 reference.unlink(); 2913 reference.unlink();
2886 } 2914 }
2887 } 2915 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/semantic_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698