| OLD | NEW |
| 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; | 5 library dart2js.ir_builder; |
| 6 | 6 |
| 7 import 'ir_nodes.dart' as ir; | 7 import 'ir_nodes.dart' as ir; |
| 8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
| 9 import '../dart2jslib.dart'; | 9 import '../dart2jslib.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 ir.InvokeStatic invoke = | 1173 ir.InvokeStatic invoke = |
| 1174 new ir.InvokeStatic(element, selector, k, [arg]); | 1174 new ir.InvokeStatic(element, selector, k, [arg]); |
| 1175 add(new ir.LetCont(k, invoke)); | 1175 add(new ir.LetCont(k, invoke)); |
| 1176 return arg; | 1176 return arg; |
| 1177 } else if (node.receiver == null) { | 1177 } else if (node.receiver == null) { |
| 1178 // Nodes that fall in this case: | 1178 // Nodes that fall in this case: |
| 1179 // - Unresolved top-level | 1179 // - Unresolved top-level |
| 1180 // - Assignment to final variable (will not be resolved) | 1180 // - Assignment to final variable (will not be resolved) |
| 1181 return giveup(node, 'SendSet: non-local, non-static, but no receiver'); | 1181 return giveup(node, 'SendSet: non-local, non-static, but no receiver'); |
| 1182 } else { | 1182 } else { |
| 1183 if (element != null && Elements.isUnresolved(element)) return giveup(); | 1183 if (element != null && Elements.isUnresolved(element)) { |
| 1184 return giveup(node); |
| 1185 } |
| 1184 | 1186 |
| 1185 // Setter or index-setter invocation | 1187 // Setter or index-setter invocation |
| 1186 assert(node.receiver != null); | 1188 assert(node.receiver != null); |
| 1187 | 1189 |
| 1188 if (node.receiver.isSuper()) return giveup(node, 'Super SendSet'); | 1190 if (node.receiver.isSuper()) return giveup(node, 'Super SendSet'); |
| 1189 | 1191 |
| 1190 ir.Primitive receiver = node.receiver == null | 1192 ir.Primitive receiver = node.receiver == null |
| 1191 ? lookupThis() | 1193 ? lookupThis() |
| 1192 : visit(node.receiver); | 1194 : visit(node.receiver); |
| 1193 ir.Parameter v = new ir.Parameter(null); | 1195 ir.Parameter v = new ir.Parameter(null); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 if (e == ABORT_IRNODE_BUILDER) return null; | 1312 if (e == ABORT_IRNODE_BUILDER) return null; |
| 1311 rethrow; | 1313 rethrow; |
| 1312 } | 1314 } |
| 1313 } | 1315 } |
| 1314 | 1316 |
| 1315 void internalError(String reason, {ast.Node node}) { | 1317 void internalError(String reason, {ast.Node node}) { |
| 1316 giveup(node); | 1318 giveup(node); |
| 1317 } | 1319 } |
| 1318 } | 1320 } |
| 1319 | 1321 |
| OLD | NEW |