OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_nodes_sexpr; | 5 library dart2js.ir_nodes_sexpr; |
6 | 6 |
7 import '../constants/values.dart'; | 7 import '../constants/values.dart'; |
8 import '../util/util.dart'; | 8 import '../util/util.dart'; |
9 import 'cps_ir_nodes.dart'; | 9 import 'cps_ir_nodes.dart'; |
10 import '../universe/call_structure.dart' show | 10 import '../universe/call_structure.dart' show |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 String visitTypeTestViaFlag(TypeTestViaFlag node) { | 270 String visitTypeTestViaFlag(TypeTestViaFlag node) { |
271 String interceptor = access(node.interceptor); | 271 String interceptor = access(node.interceptor); |
272 return '(TypeTestViaFlag $interceptor ${node.dartType})'; | 272 return '(TypeTestViaFlag $interceptor ${node.dartType})'; |
273 } | 273 } |
274 | 274 |
275 String visitLiteralList(LiteralList node) { | 275 String visitLiteralList(LiteralList node) { |
276 String values = node.values.map(access).join(' '); | 276 String values = node.values.map(access).join(' '); |
277 return '(LiteralList ($values))'; | 277 return '(LiteralList ($values))'; |
278 } | 278 } |
279 | 279 |
280 String visitLiteralMap(LiteralMap node) { | |
281 String keys = node.entries.map((e) => access(e.key)).join(' '); | |
282 String values = node.entries.map((e) => access(e.value)).join(' '); | |
283 return '(LiteralMap ($keys) ($values))'; | |
284 } | |
285 | |
286 String visitSetField(SetField node) { | 280 String visitSetField(SetField node) { |
287 String object = access(node.object); | 281 String object = access(node.object); |
288 String field = node.field.name; | 282 String field = node.field.name; |
289 String value = access(node.value); | 283 String value = access(node.value); |
290 return '(SetField $object $field $value)'; | 284 return '(SetField $object $field $value)'; |
291 } | 285 } |
292 | 286 |
293 String visitGetField(GetField node) { | 287 String visitGetField(GetField node) { |
294 String object = access(node.object); | 288 String object = access(node.object); |
295 String field = node.field.name; | 289 String field = node.field.name; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 void setReturnContinuation(Continuation node) { | 512 void setReturnContinuation(Continuation node) { |
519 assert(!_names.containsKey(node) || _names[node] == 'return'); | 513 assert(!_names.containsKey(node) || _names[node] == 'return'); |
520 _names[node] = 'return'; | 514 _names[node] = 'return'; |
521 } | 515 } |
522 | 516 |
523 String getName(Node node) { | 517 String getName(Node node) { |
524 if (!_names.containsKey(node)) return 'MISSING_NAME'; | 518 if (!_names.containsKey(node)) return 'MISSING_NAME'; |
525 return _names[node]; | 519 return _names[node]; |
526 } | 520 } |
527 } | 521 } |
OLD | NEW |