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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 library kernel.ast_to_binary; | 4 library kernel.ast_to_binary; |
5 | 5 |
6 import '../ast.dart'; | 6 import '../ast.dart'; |
7 import '../import_table.dart'; | 7 import '../import_table.dart'; |
8 import 'tag.dart'; | 8 import 'tag.dart'; |
9 import 'dart:convert'; | 9 import 'dart:convert'; |
10 import 'dart:typed_data'; | 10 import 'dart:typed_data'; |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 494 |
495 visitSuperPropertySet(SuperPropertySet node) { | 495 visitSuperPropertySet(SuperPropertySet node) { |
496 writeByte(Tag.SuperPropertySet); | 496 writeByte(Tag.SuperPropertySet); |
497 writeName(node.name); | 497 writeName(node.name); |
498 writeNode(node.value); | 498 writeNode(node.value); |
499 writeReference(node.interfaceTargetReference); | 499 writeReference(node.interfaceTargetReference); |
500 } | 500 } |
501 | 501 |
502 visitDirectPropertyGet(DirectPropertyGet node) { | 502 visitDirectPropertyGet(DirectPropertyGet node) { |
503 writeByte(Tag.DirectPropertyGet); | 503 writeByte(Tag.DirectPropertyGet); |
| 504 writeOffset(node, node.fileOffset); |
504 writeNode(node.receiver); | 505 writeNode(node.receiver); |
505 writeReference(node.targetReference); | 506 writeReference(node.targetReference); |
506 } | 507 } |
507 | 508 |
508 visitDirectPropertySet(DirectPropertySet node) { | 509 visitDirectPropertySet(DirectPropertySet node) { |
509 writeByte(Tag.DirectPropertySet); | 510 writeByte(Tag.DirectPropertySet); |
| 511 writeOffset(node, node.fileOffset); |
510 writeNode(node.receiver); | 512 writeNode(node.receiver); |
511 writeReference(node.targetReference); | 513 writeReference(node.targetReference); |
512 writeNode(node.value); | 514 writeNode(node.value); |
513 } | 515 } |
514 | 516 |
515 visitStaticGet(StaticGet node) { | 517 visitStaticGet(StaticGet node) { |
516 writeByte(Tag.StaticGet); | 518 writeByte(Tag.StaticGet); |
517 writeOffset(node, node.fileOffset); | 519 writeOffset(node, node.fileOffset); |
518 writeReference(node.targetReference); | 520 writeReference(node.targetReference); |
519 } | 521 } |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 void flush() { | 1282 void flush() { |
1281 _sink.add(_buffer.sublist(0, length)); | 1283 _sink.add(_buffer.sublist(0, length)); |
1282 _buffer = new Uint8List(SIZE); | 1284 _buffer = new Uint8List(SIZE); |
1283 length = 0; | 1285 length = 0; |
1284 } | 1286 } |
1285 | 1287 |
1286 void flushAndDestroy() { | 1288 void flushAndDestroy() { |
1287 _sink.add(_buffer.sublist(0, length)); | 1289 _sink.add(_buffer.sublist(0, length)); |
1288 } | 1290 } |
1289 } | 1291 } |
OLD | NEW |