OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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 library fletch.bytecodes; | 5 library fletch.bytecodes; |
6 | 6 |
7 import 'dart:typed_data' show | 7 import 'dart:typed_data' show |
8 ByteData, | 8 ByteData, |
9 Endianness, | 9 Endianness, |
10 Uint8List; | 10 Uint8List; |
11 | 11 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void addUint64(int value) { | 88 void addUint64(int value) { |
89 growBytes(8); | 89 growBytes(8); |
90 view.setUint64(position, value, Endianness.LITTLE_ENDIAN); | 90 view.setUint64(position, value, Endianness.LITTLE_ENDIAN); |
91 position += 8; | 91 position += 8; |
92 } | 92 } |
93 | 93 |
94 void sendOn(Sink<List<int>> sink) { | 94 void sendOn(Sink<List<int>> sink) { |
95 sink.add(new Uint8List.view(list.buffer, list.offsetInBytes, position)); | 95 sink.add(new Uint8List.view(list.buffer, list.offsetInBytes, position)); |
96 } | 96 } |
97 } | 97 } |
OLD | NEW |