Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart

Issue 16538002: Move lib from sdk/lib/_internal/compiler/implementation to _internal root. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart (revision 23664)
+++ sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart (working copy)
@@ -1,65 +0,0 @@
-// 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.
-
-// Patch file for the dart:isolate library.
-
-import 'dart:_isolate_helper' show IsolateNatives,
- lazyPort,
- ReceivePortImpl,
- CloseToken,
- JsIsolateSink;
-
-patch class _Isolate {
- patch static ReceivePort get port {
- if (lazyPort == null) {
- lazyPort = new ReceivePort();
- }
- return lazyPort;
- }
-
- patch static SendPort spawnFunction(void topLevelFunction(),
- [bool unhandledExceptionCallback(IsolateUnhandledException e)]) {
- if (unhandledExceptionCallback != null) {
- // TODO(9012): Implement the UnhandledExceptionCallback.
- throw new UnimplementedError(
- "spawnFunction with unhandledExceptionCallback");
- }
- return IsolateNatives.spawnFunction(topLevelFunction);
- }
-
- patch static SendPort spawnUri(String uri) {
- return IsolateNatives.spawn(null, uri, false);
- }
-}
-
-patch bool _isCloseToken(var object) {
- return identical(object, const CloseToken());
-}
-
-/** Default factory for receive ports. */
-patch class ReceivePort {
- patch factory ReceivePort() {
- return new ReceivePortImpl();
- }
-}
-
-patch class MessageBox {
- patch MessageBox.oneShot() : this._oneShot(new ReceivePort());
- MessageBox._oneShot(ReceivePort receivePort)
- : stream = new IsolateStream._fromOriginalReceivePortOneShot(receivePort),
- sink = new JsIsolateSink.fromPort(receivePort.toSendPort());
-
- patch MessageBox() : this._(new ReceivePort());
- MessageBox._(ReceivePort receivePort)
- : stream = new IsolateStream._fromOriginalReceivePort(receivePort),
- sink = new JsIsolateSink.fromPort(receivePort.toSendPort());
-}
-
-patch IsolateSink streamSpawnFunction(
- void topLevelFunction(),
- [bool unhandledExceptionCallback(IsolateUnhandledException e)]) {
- SendPort sendPort = spawnFunction(topLevelFunction,
- unhandledExceptionCallback);
- return new JsIsolateSink.fromPort(sendPort);
-}

Powered by Google App Engine
This is Rietveld 408576698