| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 import 'package:kernel/frontend/accessors.dart' | 6 import 'package:kernel/frontend/accessors.dart' |
| 7 show | 7 show |
| 8 Accessor, | 8 Accessor, |
| 9 IndexAccessor, | 9 IndexAccessor, |
| 10 NullAwarePropertyAccessor, | 10 NullAwarePropertyAccessor, |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 NodeList arguments, | 1318 NodeList arguments, |
| 1319 CallStructure callStructure, | 1319 CallStructure callStructure, |
| 1320 _) { | 1320 _) { |
| 1321 return new ir.InvalidExpression(); | 1321 return new ir.InvalidExpression(); |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 @override | 1324 @override |
| 1325 ir.PropertyGet visitDynamicPropertyGet( | 1325 ir.PropertyGet visitDynamicPropertyGet( |
| 1326 Send node, Node receiver, Name name, _) { | 1326 Send node, Node receiver, Name name, _) { |
| 1327 return associateNode( | 1327 return associateNode( |
| 1328 new ir.PropertyGet(visitForValue(receiver), nameToIrName(name)), node); | 1328 new ir.PropertyGet(visitForValue(receiver), nameToIrName(name)) |
| 1329 ..fileOffset = node.selector.getBeginToken().charOffset, |
| 1330 node); |
| 1329 } | 1331 } |
| 1330 | 1332 |
| 1331 @override | 1333 @override |
| 1332 ir.MethodInvocation visitDynamicPropertyInvoke( | 1334 ir.MethodInvocation visitDynamicPropertyInvoke( |
| 1333 Send node, Node receiver, NodeList arguments, Selector selector, _) { | 1335 Send node, Node receiver, NodeList arguments, Selector selector, _) { |
| 1334 return associateNode( | 1336 return associateNode( |
| 1335 buildInvokeSelector( | 1337 buildInvokeSelector( |
| 1336 visitForValue(receiver), selector, buildArguments(arguments)), | 1338 visitForValue(receiver), selector, buildArguments(arguments)) |
| 1339 ..fileOffset = node.selector.getBeginToken().charOffset, |
| 1337 node); | 1340 node); |
| 1338 } | 1341 } |
| 1339 | 1342 |
| 1340 @override | 1343 @override |
| 1341 ir.Expression handleDynamicCompounds( | 1344 ir.Expression handleDynamicCompounds( |
| 1342 Send node, Node receiver, Name name, CompoundRhs rhs, _) { | 1345 Send node, Node receiver, Name name, CompoundRhs rhs, _) { |
| 1343 ir.Expression receiverNode = | 1346 ir.Expression receiverNode = |
| 1344 receiver == null ? new ir.ThisExpression() : visitForValue(receiver); | 1347 receiver == null ? new ir.ThisExpression() : visitForValue(receiver); |
| 1345 ir.Expression compound = buildCompound( | 1348 ir.Expression compound = buildCompound( |
| 1346 PropertyAccessor.make(receiverNode, nameToIrName(name), null, null), | 1349 PropertyAccessor.make(receiverNode, nameToIrName(name), null, null), |
| (...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2940 : this(null, true, node, initializers); | 2943 : this(null, true, node, initializers); |
| 2941 | 2944 |
| 2942 accept(ir.Visitor v) => throw "unsupported"; | 2945 accept(ir.Visitor v) => throw "unsupported"; |
| 2943 | 2946 |
| 2944 visitChildren(ir.Visitor v) => throw "unsupported"; | 2947 visitChildren(ir.Visitor v) => throw "unsupported"; |
| 2945 | 2948 |
| 2946 String toString() { | 2949 String toString() { |
| 2947 return "IrFunction($kind, $isConstructor, $node, $initializers)"; | 2950 return "IrFunction($kind, $isConstructor, $node, $initializers)"; |
| 2948 } | 2951 } |
| 2949 } | 2952 } |
| OLD | NEW |