| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch 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 // The dart:fletch.ffi library is a low-level 'foreign function interface' | 5 // The dart:fletch.ffi library is a low-level 'foreign function interface' |
| 6 // library that allows Dart code to call arbitrary native platform | 6 // library that allows Dart code to call arbitrary native platform |
| 7 // code defined outside the VM. | 7 // code defined outside the VM. |
| 8 library dart.fletch.ffi; | 8 library dart.fletch.ffi; |
| 9 | 9 |
| 10 import 'dart:_fletch_system' as fletch; | 10 import 'dart:fletch._system' as fletch; |
| 11 import 'dart:fletch'; | 11 import 'dart:fletch'; |
| 12 import 'dart:typed_data'; | 12 import 'dart:typed_data'; |
| 13 | 13 |
| 14 part 'utf.dart'; | 14 part 'utf.dart'; |
| 15 | 15 |
| 16 abstract class Foreign { | 16 abstract class Foreign { |
| 17 int get address; | 17 int get address; |
| 18 | 18 |
| 19 const Foreign(); | 19 const Foreign(); |
| 20 | 20 |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 | 627 |
| 628 String toString() { | 628 String toString() { |
| 629 // Don't include the '\0' character in the encoded string. | 629 // Don't include the '\0' character in the encoded string. |
| 630 var encodedString = new List(length - 1); | 630 var encodedString = new List(length - 1); |
| 631 for (int i = 0; i < length - 1; ++i) { | 631 for (int i = 0; i < length - 1; ++i) { |
| 632 encodedString[i] = getUint8(i); | 632 encodedString[i] = getUint8(i); |
| 633 } | 633 } |
| 634 return _decodeUtf8(encodedString); | 634 return _decodeUtf8(encodedString); |
| 635 } | 635 } |
| 636 } | 636 } |
| OLD | NEW |