mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:30:32 +00:00
Fix various nits in VM patch files.
R=vegorov@google.com Review-Url: https://codereview.chromium.org/2705593002 .
This commit is contained in:
parent
7a1772c634
commit
00bed94e0c
|
@ -6,7 +6,7 @@ library builtin;
|
|||
// NOTE: Do not import 'dart:io' in builtin.
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:_internal';
|
||||
import 'dart:_internal' hide Symbol;
|
||||
import 'dart:isolate';
|
||||
import 'dart:typed_data';
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ class _ProcessImpl extends _ProcessImplNativeWrapper implements Process {
|
|||
|
||||
_ProcessImpl(String path,
|
||||
List<String> arguments,
|
||||
String this._workingDirectory,
|
||||
this._workingDirectory,
|
||||
Map<String, String> environment,
|
||||
bool includeParentEnvironment,
|
||||
bool runInShell,
|
||||
|
|
|
@ -144,9 +144,7 @@ class _InternetAddress implements InternetAddress {
|
|||
|
||||
Future<InternetAddress> reverse() => _NativeSocket.reverseLookup(this);
|
||||
|
||||
_InternetAddress(String this.address,
|
||||
String this._host,
|
||||
List<int> this._in_addr);
|
||||
_InternetAddress(this.address, this._host, this._in_addr);
|
||||
|
||||
factory _InternetAddress.parse(String address) {
|
||||
if (address is !String) {
|
||||
|
@ -1527,7 +1525,7 @@ class _Socket extends Stream<List<int>> implements Socket {
|
|||
var _subscription;
|
||||
var _detachReady;
|
||||
|
||||
_Socket(RawSocket this._raw) {
|
||||
_Socket(this._raw) {
|
||||
_controller = new StreamController<List<int>>(sync: true,
|
||||
onListen: _onSubscriptionStateChange,
|
||||
onCancel: _onSubscriptionStateChange,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import "dart:_internal";
|
||||
import "dart:_internal" hide Symbol;
|
||||
|
||||
// We need to pass the value as first argument and leave the second and third
|
||||
// arguments empty (used for error handling).
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// 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.
|
||||
|
||||
import 'dart:typed_data' show Uint32List;
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// 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.
|
||||
|
||||
import 'dart:typed_data' show Uint32List;
|
||||
|
||||
// Hash table with open addressing that separates the index from keys/values.
|
||||
|
||||
abstract class _HashFieldBase {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'dart:isolate';
|
||||
import 'dart:_internal';
|
||||
import 'dart:_internal' hide Symbol;
|
||||
|
||||
@patch bool debugger({bool when: true,
|
||||
String message}) native "Developer_debugger";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import "dart:collection" show HashMap;
|
||||
import "dart:_internal";
|
||||
import "dart:_internal" hide Symbol;
|
||||
|
||||
@patch class ReceivePort {
|
||||
@patch factory ReceivePort() = _ReceivePortImpl;
|
||||
|
|
|
@ -99,11 +99,11 @@ double _log(double x) native "Math_log";
|
|||
|
||||
class _Random implements Random {
|
||||
// Internal state of the random number generator.
|
||||
final _state;
|
||||
final Uint32List _state;
|
||||
static const _kSTATE_LO = 0;
|
||||
static const _kSTATE_HI = 1; // Unused in Dart code.
|
||||
|
||||
_Random._withState(Uint32List this._state);
|
||||
_Random._withState(this._state);
|
||||
|
||||
// The algorithm used here is Multiply with Carry (MWC) with a Base b = 2^32.
|
||||
// http://en.wikipedia.org/wiki/Multiply-with-carry
|
||||
|
|
|
@ -9,7 +9,7 @@ final _emptyList = new UnmodifiableListView([]);
|
|||
|
||||
class _InternalMirrorError {
|
||||
final String _msg;
|
||||
const _InternalMirrorError(String this._msg);
|
||||
const _InternalMirrorError(this._msg);
|
||||
String toString() => _msg;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// 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.
|
||||
|
||||
import 'dart:typed_data' show Uint16List;
|
||||
|
||||
@patch class StringBuffer {
|
||||
static const int _BUFFER_SIZE = 64;
|
||||
static const int _PARTS_TO_COMPACT = 128;
|
||||
|
|
|
@ -1287,9 +1287,7 @@ class _ExternalTwoByteString extends _StringBase implements String {
|
|||
|
||||
|
||||
class _StringMatch implements Match {
|
||||
const _StringMatch(int this.start,
|
||||
String this.input,
|
||||
String this.pattern);
|
||||
const _StringMatch(this.start, this.input, this.pattern);
|
||||
|
||||
int get end => start + pattern.length;
|
||||
String operator[](int g) => group(g);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import "dart:_internal";
|
||||
import "dart:_internal" hide Symbol;
|
||||
import "dart:collection" show ListBase;
|
||||
import 'dart:math' show Random;
|
||||
|
||||
|
|
|
@ -9,9 +9,16 @@ def writePatch(output_file_name, input_file_names):
|
|||
dart_file_names = filter(lambda name: name.endswith('.dart'),
|
||||
input_file_names)
|
||||
with open(output_file_name, 'w') as output_file:
|
||||
is_first = True
|
||||
for dart_file_name in dart_file_names:
|
||||
with open(dart_file_name, 'r') as dart_file:
|
||||
output_file.write(dart_file.read())
|
||||
if is_first:
|
||||
output_file.write(dart_file.read())
|
||||
is_first = False
|
||||
else:
|
||||
for line in dart_file.readlines():
|
||||
if not line.startswith("import "):
|
||||
output_file.write(line)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -30,7 +30,7 @@ class DeferredLibrary {
|
|||
* Thrown when a deferred library fails to load.
|
||||
*/
|
||||
class DeferredLoadException implements Exception {
|
||||
DeferredLoadException(String this._s);
|
||||
DeferredLoadException(this._s);
|
||||
String toString() => "DeferredLoadException: '$_s'";
|
||||
final String _s;
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
library dart.collection;
|
||||
|
||||
import 'dart:_internal';
|
||||
import 'dart:_internal' hide Symbol;
|
||||
import 'dart:math' show Random; // Used by ListMixin.shuffle.
|
||||
|
||||
part 'collections.dart';
|
||||
|
|
|
@ -15,7 +15,7 @@ class _SplayTreeNode<K> {
|
|||
_SplayTreeNode<K> left;
|
||||
_SplayTreeNode<K> right;
|
||||
|
||||
_SplayTreeNode(K this.key);
|
||||
_SplayTreeNode(this.key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ class _SplayTreeNode<K> {
|
|||
*/
|
||||
class _SplayTreeMapNode<K, V> extends _SplayTreeNode<K> {
|
||||
V value;
|
||||
_SplayTreeMapNode(K key, V this.value) : super(key);
|
||||
_SplayTreeMapNode(K key, this.value) : super(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -193,7 +193,7 @@ abstract class StringConversionSinkMixin implements StringConversionSink {
|
|||
*/
|
||||
class _StringSinkConversionSink extends StringConversionSinkBase {
|
||||
StringSink _stringSink;
|
||||
_StringSinkConversionSink(StringSink this._stringSink);
|
||||
_StringSinkConversionSink(this._stringSink);
|
||||
|
||||
void close() {}
|
||||
void addSlice(String str, int start, int end, bool isLast) {
|
||||
|
|
|
@ -159,9 +159,7 @@ class ArgumentError extends Error {
|
|||
* names differ from the interface, it might be more useful to use the
|
||||
* interface method's argument name (or just rename arguments to match).
|
||||
*/
|
||||
ArgumentError.value(value,
|
||||
[String this.name,
|
||||
String this.message])
|
||||
ArgumentError.value(value, [this.name, this.message])
|
||||
: invalidValue = value,
|
||||
_hasValue = true;
|
||||
|
||||
|
@ -499,7 +497,7 @@ class UnsupportedError extends Error {
|
|||
*/
|
||||
class UnimplementedError extends Error implements UnsupportedError {
|
||||
final String message;
|
||||
UnimplementedError([String this.message]);
|
||||
UnimplementedError([this.message]);
|
||||
String toString() => (this.message != null
|
||||
? "UnimplementedError: $message"
|
||||
: "UnimplementedError");
|
||||
|
|
|
@ -33,7 +33,7 @@ js: js/dart2js/js_dart2js.dart
|
|||
js_util: js_util/dart2js/js_util_dart2js.dart
|
||||
math: math/math.dart
|
||||
mirrors: mirrors/mirrors.dart
|
||||
nativewrappers: html/dart2js/nativewrappers.dart
|
||||
nativewrappers: html/dartium/nativewrappers.dart
|
||||
typed_data: typed_data/typed_data.dart
|
||||
_native_typed_data: _internal/js_runtime/lib/native_typed_data.dart
|
||||
svg: svg/dart2js/svg_dart2js.dart
|
||||
|
|
|
@ -23,7 +23,7 @@ io: io/io.dart
|
|||
isolate: isolate/isolate.dart
|
||||
math: math/math.dart
|
||||
mirrors: mirrors/mirrors.dart
|
||||
nativewrappers: html/dart2js/nativewrappers.dart
|
||||
nativewrappers: html/dartium/nativewrappers.dart
|
||||
typed_data: typed_data/typed_data.dart
|
||||
_native_typed_data: _internal/js_runtime/lib/native_typed_data.dart
|
||||
html: unsupported:
|
||||
|
|
|
@ -27,7 +27,7 @@ js: js/dart2js/js_dart2js.dart
|
|||
js_util: js_util/dart2js/js_util_dart2js.dart
|
||||
math: math/math.dart
|
||||
mirrors: mirrors/mirrors.dart
|
||||
nativewrappers: html/dart2js/nativewrappers.dart
|
||||
nativewrappers: html/dartium/nativewrappers.dart
|
||||
typed_data: typed_data/typed_data.dart
|
||||
_native_typed_data: _internal/js_runtime/lib/native_typed_data.dart
|
||||
svg: svg/dart2js/svg_dart2js.dart
|
||||
|
|
|
@ -357,7 +357,7 @@ class MappedIterable<S, T> extends Iterable<T> {
|
|||
return new MappedIterable<S, T>._(iterable, function);
|
||||
}
|
||||
|
||||
MappedIterable._(this._iterable, T this._f(S element));
|
||||
MappedIterable._(this._iterable, this._f);
|
||||
|
||||
Iterator<T> get iterator => new MappedIterator<S, T>(_iterable.iterator, _f);
|
||||
|
||||
|
@ -383,7 +383,7 @@ class MappedIterator<S, T> extends Iterator<T> {
|
|||
final Iterator<S> _iterator;
|
||||
final _Transformation<S, T> _f;
|
||||
|
||||
MappedIterator(this._iterator, T this._f(S element));
|
||||
MappedIterator(this._iterator, this._f);
|
||||
|
||||
bool moveNext() {
|
||||
if (_iterator.moveNext()) {
|
||||
|
@ -406,7 +406,7 @@ class MappedListIterable<S, T> extends ListIterable<T> {
|
|||
final Iterable<S> _source;
|
||||
final _Transformation<S, T> _f;
|
||||
|
||||
MappedListIterable(this._source, T this._f(S value));
|
||||
MappedListIterable(this._source, this._f);
|
||||
|
||||
int get length => _source.length;
|
||||
T elementAt(int index) => _f(_source.elementAt(index));
|
||||
|
@ -419,7 +419,7 @@ class WhereIterable<E> extends Iterable<E> {
|
|||
final Iterable<E> _iterable;
|
||||
final _ElementPredicate<E> _f;
|
||||
|
||||
WhereIterable(this._iterable, bool this._f(E element));
|
||||
WhereIterable(this._iterable, this._f);
|
||||
|
||||
Iterator<E> get iterator => new WhereIterator<E>(_iterable.iterator, _f);
|
||||
|
||||
|
@ -431,7 +431,7 @@ class WhereIterator<E> extends Iterator<E> {
|
|||
final Iterator<E> _iterator;
|
||||
final _ElementPredicate _f;
|
||||
|
||||
WhereIterator(this._iterator, bool this._f(E element));
|
||||
WhereIterator(this._iterator, this._f);
|
||||
|
||||
bool moveNext() {
|
||||
while (_iterator.moveNext()) {
|
||||
|
@ -451,7 +451,7 @@ class ExpandIterable<S, T> extends Iterable<T> {
|
|||
final Iterable<S> _iterable;
|
||||
final _ExpandFunction<S, T> _f;
|
||||
|
||||
ExpandIterable(this._iterable, Iterable<T> this._f(S element));
|
||||
ExpandIterable(this._iterable, this._f);
|
||||
|
||||
Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, _f);
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ class ExpandIterator<S, T> implements Iterator<T> {
|
|||
Iterator<T> _currentExpansion = const EmptyIterator();
|
||||
T _current;
|
||||
|
||||
ExpandIterator(this._iterator, Iterable<T> this._f(S element));
|
||||
ExpandIterator(this._iterator, this._f);
|
||||
|
||||
T get current => _current;
|
||||
|
||||
|
@ -548,7 +548,7 @@ class TakeWhileIterable<E> extends Iterable<E> {
|
|||
final Iterable<E> _iterable;
|
||||
final _ElementPredicate<E> _f;
|
||||
|
||||
TakeWhileIterable(this._iterable, bool this._f(E element));
|
||||
TakeWhileIterable(this._iterable, this._f);
|
||||
|
||||
Iterator<E> get iterator {
|
||||
return new TakeWhileIterator<E>(_iterable.iterator, _f);
|
||||
|
@ -560,7 +560,7 @@ class TakeWhileIterator<E> extends Iterator<E> {
|
|||
final _ElementPredicate<E> _f;
|
||||
bool _isFinished = false;
|
||||
|
||||
TakeWhileIterator(this._iterator, bool this._f(E element));
|
||||
TakeWhileIterator(this._iterator, this._f);
|
||||
|
||||
bool moveNext() {
|
||||
if (_isFinished) return false;
|
||||
|
@ -641,7 +641,7 @@ class SkipWhileIterable<E> extends Iterable<E> {
|
|||
final Iterable<E> _iterable;
|
||||
final _ElementPredicate<E> _f;
|
||||
|
||||
SkipWhileIterable(this._iterable, bool this._f(E element));
|
||||
SkipWhileIterable(this._iterable, this._f);
|
||||
|
||||
Iterator<E> get iterator {
|
||||
return new SkipWhileIterator<E>(_iterable.iterator, _f);
|
||||
|
@ -653,7 +653,7 @@ class SkipWhileIterator<E> extends Iterator<E> {
|
|||
final _ElementPredicate<E> _f;
|
||||
bool _hasSkipped = false;
|
||||
|
||||
SkipWhileIterator(this._iterator, bool this._f(E element));
|
||||
SkipWhileIterator(this._iterator, this._f);
|
||||
|
||||
bool moveNext() {
|
||||
if (!_hasSkipped) {
|
||||
|
|
|
@ -172,7 +172,7 @@ class _FileStreamConsumer extends StreamConsumer<List<int>> {
|
|||
File _file;
|
||||
Future<RandomAccessFile> _openFuture;
|
||||
|
||||
_FileStreamConsumer(File this._file, FileMode mode) {
|
||||
_FileStreamConsumer(this._file, FileMode mode) {
|
||||
_openFuture = _file.open(mode: mode);
|
||||
}
|
||||
|
||||
|
|
|
@ -2007,7 +2007,7 @@ class HttpException implements IOException {
|
|||
final String message;
|
||||
final Uri uri;
|
||||
|
||||
const HttpException(String this.message, {Uri this.uri});
|
||||
const HttpException(this.message, {this.uri});
|
||||
|
||||
String toString() {
|
||||
var b = new StringBuffer()
|
||||
|
|
|
@ -612,7 +612,7 @@ class _HeaderValue implements HeaderValue {
|
|||
Map<String, String> _parameters;
|
||||
Map<String, String> _unmodifiableParameters;
|
||||
|
||||
_HeaderValue([String this._value = "", Map<String, String> parameters]) {
|
||||
_HeaderValue([this._value = "", Map<String, String> parameters]) {
|
||||
if (parameters != null) {
|
||||
_parameters = new HashMap<String, String>.from(parameters);
|
||||
}
|
||||
|
|
|
@ -1673,7 +1673,7 @@ class _HttpClient implements HttpClient {
|
|||
|
||||
String userAgent = _getHttpVersion();
|
||||
|
||||
_HttpClient(SecurityContext this._context);
|
||||
_HttpClient(this._context);
|
||||
|
||||
void set idleTimeout(Duration timeout) {
|
||||
_idleTimeout = timeout;
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
library dart.io;
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:_internal';
|
||||
import 'dart:_internal' hide Symbol;
|
||||
import 'dart:collection' show HashMap,
|
||||
HashSet,
|
||||
Queue,
|
||||
|
@ -204,10 +204,11 @@ import 'dart:collection' show HashMap,
|
|||
LinkedListEntry,
|
||||
UnmodifiableMapView;
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
import 'dart:developer' hide log;
|
||||
import 'dart:isolate';
|
||||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:nativewrappers';
|
||||
|
||||
part 'bytes_builder.dart';
|
||||
part 'common.dart';
|
||||
|
|
|
@ -446,12 +446,12 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
|
|||
int requestedPort,
|
||||
this.is_server,
|
||||
this.context,
|
||||
RawSocket this._socket,
|
||||
this._socket,
|
||||
this._socketSubscription,
|
||||
this._bufferedData,
|
||||
this.requestClientCertificate,
|
||||
this.requireClientCertificate,
|
||||
this.onBadCertificate(X509Certificate certificate),
|
||||
this.onBadCertificate,
|
||||
List<String> supportedProtocols) {
|
||||
if (context == null) {
|
||||
context = SecurityContext.defaultContext;
|
||||
|
|
Loading…
Reference in a new issue