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