| Index: lib/core/future_impl.dart
|
| diff --git a/lib/coreimpl/future_implementation.dart b/lib/core/future_impl.dart
|
| similarity index 93%
|
| rename from lib/coreimpl/future_implementation.dart
|
| rename to lib/core/future_impl.dart
|
| index 8e1efd0ed858fa56007148cb01b4de488fb8553b..bbae82d1667ffaff49b056c537143ee23b10d050 100644
|
| --- a/lib/coreimpl/future_implementation.dart
|
| +++ b/lib/core/future_impl.dart
|
| @@ -1,7 +1,7 @@
|
| // Copyright 2012 Google Inc. All Rights Reserved.
|
| // Dart core library.
|
|
|
| -class FutureImpl<T> implements Future<T> {
|
| +class _FutureImpl<T> implements Future<T> {
|
|
|
| bool _isComplete = false;
|
|
|
| @@ -41,13 +41,13 @@ class FutureImpl<T> implements Future<T> {
|
| */
|
| final List<Function> _completionListeners;
|
|
|
| - FutureImpl()
|
| + _FutureImpl()
|
| : _successListeners = [],
|
| _exceptionHandlers = [],
|
| _completionListeners = [];
|
|
|
| - factory FutureImpl.immediate(T value) {
|
| - final res = new FutureImpl();
|
| + factory _FutureImpl.immediate(T value) {
|
| + final res = new _FutureImpl();
|
| res._setValue(value);
|
| return res;
|
| }
|
| @@ -56,7 +56,7 @@ class FutureImpl<T> implements Future<T> {
|
| if (!isComplete) {
|
| throw new FutureNotCompleteException();
|
| }
|
| - if (_exception !== null) {
|
| + if (_exception != null) {
|
| throw new FutureUnhandledException(_exception, stackTrace);
|
| }
|
| return _value;
|
| @@ -81,7 +81,7 @@ class FutureImpl<T> implements Future<T> {
|
| }
|
|
|
| bool get hasValue {
|
| - return isComplete && _exception === null;
|
| + return isComplete && _exception == null;
|
| }
|
|
|
| void then(void onSuccess(T value)) {
|
| @@ -119,7 +119,7 @@ class FutureImpl<T> implements Future<T> {
|
| _isComplete = true;
|
|
|
| try {
|
| - if (_exception !== null) {
|
| + if (_exception != null) {
|
| for (Function handler in _exceptionHandlers) {
|
| // Explicitly check for true here so that if the handler returns null,
|
| // we don't get an exception in checked mode.
|
| @@ -157,7 +157,7 @@ class FutureImpl<T> implements Future<T> {
|
| }
|
|
|
| void _setException(Object exception, Object stackTrace) {
|
| - if (exception === null) {
|
| + if (exception == null) {
|
| // null is not a legal value for the exception of a Future.
|
| throw new ArgumentError(null);
|
| }
|
| @@ -250,11 +250,11 @@ class FutureImpl<T> implements Future<T> {
|
| }
|
| }
|
|
|
| -class CompleterImpl<T> implements Completer<T> {
|
| +class _CompleterImpl<T> implements Completer<T> {
|
|
|
| - final FutureImpl<T> _futureImpl;
|
| + final _FutureImpl<T> _futureImpl;
|
|
|
| - CompleterImpl() : _futureImpl = new FutureImpl() {}
|
| + _CompleterImpl() : _futureImpl = new _FutureImpl() {}
|
|
|
| Future<T> get future {
|
| return _futureImpl;
|
| @@ -268,3 +268,4 @@ class CompleterImpl<T> implements Completer<T> {
|
| _futureImpl._setException(exception, stackTrace);
|
| }
|
| }
|
| +
|
|
|