| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'dart:core' hide Symbol; | 5 import 'dart:core' hide Symbol; |
| 6 | 6 |
| 7 @patch List makeListFixedLength(List growableList) | 7 @patch |
| 8 List makeListFixedLength(List growableList) |
| 8 native "Internal_makeListFixedLength"; | 9 native "Internal_makeListFixedLength"; |
| 9 | 10 |
| 10 @patch List makeFixedListUnmodifiable(List fixedLengthList) | 11 @patch |
| 12 List makeFixedListUnmodifiable(List fixedLengthList) |
| 11 native "Internal_makeFixedListUnmodifiable"; | 13 native "Internal_makeFixedListUnmodifiable"; |
| 12 | 14 |
| 13 class VMLibraryHooks { | 15 class VMLibraryHooks { |
| 14 // Example: "dart:isolate _Timer._factory" | 16 // Example: "dart:isolate _Timer._factory" |
| 15 static var timerFactory; | 17 static var timerFactory; |
| 16 | 18 |
| 17 // Example: "dart:io _EventHandler._sendData" | 19 // Example: "dart:io _EventHandler._sendData" |
| 18 static var eventHandlerSendData; | 20 static var eventHandlerSendData; |
| 19 | 21 |
| 20 // A nullary closure that answers the current clock value in milliseconds. | 22 // A nullary closure that answers the current clock value in milliseconds. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 41 bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) { | 43 bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) { |
| 42 return cid >= lowerLimit && cid <= upperLimit; | 44 return cid >= lowerLimit && cid <= upperLimit; |
| 43 } | 45 } |
| 44 | 46 |
| 45 bool _classRangeCheckNegative(int cid, int lowerLimit, int upperLimit) { | 47 bool _classRangeCheckNegative(int cid, int lowerLimit, int upperLimit) { |
| 46 return cid < lowerLimit || cid > upperLimit; | 48 return cid < lowerLimit || cid > upperLimit; |
| 47 } | 49 } |
| 48 | 50 |
| 49 // Utility class now only used by the VM. | 51 // Utility class now only used by the VM. |
| 50 class Lists { | 52 class Lists { |
| 51 static void copy(List src, int srcStart, | 53 static void copy(List src, int srcStart, List dst, int dstStart, int count) { |
| 52 List dst, int dstStart, int count) { | |
| 53 if (srcStart < dstStart) { | 54 if (srcStart < dstStart) { |
| 54 for (int i = srcStart + count - 1, j = dstStart + count - 1; | 55 for (int i = srcStart + count - 1, j = dstStart + count - 1; |
| 55 i >= srcStart; i--, j--) { | 56 i >= srcStart; |
| 57 i--, j--) { |
| 56 dst[j] = src[i]; | 58 dst[j] = src[i]; |
| 57 } | 59 } |
| 58 } else { | 60 } else { |
| 59 for (int i = srcStart, j = dstStart; i < srcStart + count; i++, j++) { | 61 for (int i = srcStart, j = dstStart; i < srcStart + count; i++, j++) { |
| 60 dst[j] = src[i]; | 62 dst[j] = src[i]; |
| 61 } | 63 } |
| 62 } | 64 } |
| 63 } | 65 } |
| 64 } | 66 } |
| OLD | NEW |