Chromium Code Reviews| 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 @patch List makeListFixedLength(List growableList) | 5 @patch List makeListFixedLength(List growableList) |
| 6 native "Internal_makeListFixedLength"; | 6 native "Internal_makeListFixedLength"; |
| 7 | 7 |
| 8 @patch List makeFixedListUnmodifiable(List fixedLengthList) | 8 @patch List makeFixedListUnmodifiable(List fixedLengthList) |
| 9 native "Internal_makeFixedListUnmodifiable"; | 9 native "Internal_makeFixedListUnmodifiable"; |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 | 36 |
| 37 bool _inquireIs64Bit() native "Internal_inquireIs64Bit"; | 37 bool _inquireIs64Bit() native "Internal_inquireIs64Bit"; |
| 38 | 38 |
| 39 bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) { | 39 bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) { |
| 40 return cid >= lowerLimit && cid <= upperLimit; | 40 return cid >= lowerLimit && cid <= upperLimit; |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool _classRangeCheckNegative(int cid, int lowerLimit, int upperLimit) { | 43 bool _classRangeCheckNegative(int cid, int lowerLimit, int upperLimit) { |
| 44 return cid < lowerLimit || cid > upperLimit; | 44 return cid < lowerLimit || cid > upperLimit; |
| 45 } | 45 } |
| 46 | |
| 47 // Utility class now only used by the VM. | |
| 48 class Lists { | |
| 49 static void copy(List src, int srcStart, | |
|
floitsch
2017/02/15 17:11:38
Nit: use full names.
That said: I don't think this
Lasse Reichstein Nielsen
2017/02/17 11:25:20
Correct. I dare not touch it, since it seems to be
| |
| 50 List dst, int dstStart, int count) { | |
| 51 if (srcStart < dstStart) { | |
| 52 for (int i = srcStart + count - 1, j = dstStart + count - 1; | |
| 53 i >= srcStart; i--, j--) { | |
| 54 dst[j] = src[i]; | |
| 55 } | |
| 56 } else { | |
| 57 for (int i = srcStart, j = dstStart; i < srcStart + count; i++, j++) { | |
| 58 dst[j] = src[i]; | |
| 59 } | |
| 60 } | |
| 61 } | |
| 62 } | |
| OLD | NEW |