Files
sdk/runtime/lib/internal_patch.dart
T
Kevin Millikin fdb4c100e0 Move _fatal from dart:core to dart:_internal
_fatal was a private function in dart:core which was called from a
different library (dart:async).  It's not clear how it was supposed to
work or if it even did.  The uses in dart:async don't appear to be
covered by tests.

Move it to dart:_internal which exists exactly for sharing things
between the dart: libraries.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2684033006 .
2017-02-09 12:46:51 +01:00

49 lines
1.5 KiB
Dart

// Copyright (c) 2013, 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.
@patch List makeListFixedLength(List growableList)
native "Internal_makeListFixedLength";
@patch List makeFixedListUnmodifiable(List fixedLengthList)
native "Internal_makeFixedListUnmodifiable";
class VMLibraryHooks {
// Example: "dart:isolate _Timer._factory"
static var timerFactory;
// Example: "dart:io _EventHandler._sendData"
static var eventHandlerSendData;
// A nullary closure that answers the current clock value in milliseconds.
// Example: "dart:io _EventHandler._timerMillisecondClock"
static var timerMillisecondClock;
// Implementation of Resource.readAsBytes.
static var resourceReadAsBytes;
// Implementation of package root/map provision.
static var packageRootString;
static var packageConfigString;
static var packageRootUriFuture;
static var packageConfigUriFuture;
static var resolvePackageUriFuture;
static var platformScript;
}
final bool is64Bit = _inquireIs64Bit();
bool _inquireIs64Bit() native "Internal_inquireIs64Bit";
bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) {
return cid >= lowerLimit && cid <= upperLimit;
}
bool _classRangeCheckNegative(int cid, int lowerLimit, int upperLimit) {
return cid < lowerLimit || cid > upperLimit;
}
// Equivalent of calling FATAL from C++ code.
fatal(msg) native "DartInternal_fatal";