98356d3ed8
This reverts commit a437b4b469.
Reason for revert: Build on Windows appears broken.
Original change's description:
> Re-land "[vm/kernel/precomp] Remove procedures from entry points files."
>
> The original revision is in Patchset 1.
>
> Due to idiosyncrasies of the legacy VM parser, we need to put the @pragma definition
> on both the original and patched definition. Hopefully we can remove these extra definitions
> once Dart 1 AOT is fully obsolete.
>
> Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
> Change-Id: I2515dee2bbf14cece5e75450b1951d45f1250959
> Reviewed-on: https://dart-review.googlesource.com/65545
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Samir Jindel <sjindel@google.com>
TBR=lrn@google.com,alexmarkov@google.com,sjindel@google.com
Change-Id: I783dcd6f00d1f31907d90651ffbf80a6af1fb98d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/65960
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
64 lines
1.8 KiB
Dart
64 lines
1.8 KiB
Dart
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// part of "core_patch.dart";
|
|
|
|
@patch
|
|
class List<E> {
|
|
@patch
|
|
factory List([int length]) native "List_new";
|
|
|
|
@patch
|
|
factory List.filled(int length, E fill, {bool growable: false}) {
|
|
// All error handling on the length parameter is done at the implementation
|
|
// of new _List.
|
|
var result = growable ? new _GrowableList<E>(length) : new _List<E>(length);
|
|
if (fill != null) {
|
|
for (int i = 0; i < length; i++) {
|
|
result[i] = fill;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
@patch
|
|
factory List.from(Iterable elements, {bool growable: true}) {
|
|
if (elements is EfficientLengthIterable) {
|
|
int length = elements.length;
|
|
var list = growable ? new _GrowableList<E>(length) : new _List<E>(length);
|
|
if (length > 0) {
|
|
// Avoid creating iterator unless necessary.
|
|
int i = 0;
|
|
for (var element in elements) {
|
|
list[i++] = element;
|
|
}
|
|
}
|
|
return list;
|
|
}
|
|
List<E> list = new _GrowableList<E>(0);
|
|
for (E e in elements) {
|
|
list.add(e);
|
|
}
|
|
if (growable) return list;
|
|
return makeListFixedLength(list);
|
|
}
|
|
|
|
@patch
|
|
factory List.unmodifiable(Iterable elements) {
|
|
final result = new List<E>.from(elements, growable: false);
|
|
return makeFixedListUnmodifiable(result);
|
|
}
|
|
|
|
// Factory constructing a mutable List from a parser generated List literal.
|
|
// [elements] contains elements that are already type checked.
|
|
factory List._fromLiteral(List elements) {
|
|
if (elements.isEmpty) {
|
|
return new _GrowableList<E>(0);
|
|
}
|
|
var result = new _GrowableList<E>.withData(elements);
|
|
result._setLength(elements.length);
|
|
return result;
|
|
}
|
|
}
|