| Index: lib/isolate/isolate_frog.dart
|
| diff --git a/lib/isolate/isolate_frog.dart b/lib/isolate/isolate_frog.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..52a6686f14fcb509b1698a968f628860a4e62553
|
| --- /dev/null
|
| +++ b/lib/isolate/isolate_frog.dart
|
| @@ -0,0 +1,31 @@
|
| +// Copyright (c) 2011, 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.
|
| +
|
| +
|
| +// Dart isolate's API and implementation for frog.
|
| +#library("dart:isolate");
|
| +
|
| +#source("isolate_api.dart");
|
| +#source("frog/compiler_hooks.dart");
|
| +#source("frog/isolateimpl.dart");
|
| +#source("frog/ports.dart");
|
| +#source("frog/messages.dart");
|
| +#native("frog/natives.js");
|
| +
|
| +/** Default factory for [Isolate2]. */
|
| +class _IsolateFactory {
|
| +
|
| + factory Isolate2.fromCode(Function topLevelFunction) {
|
| + final name = _IsolateNatives._getJSFunctionName(topLevelFunction);
|
| + if (name == null) {
|
| + throw new UnsupportedOperationException(
|
| + "only top-level functions can be spawned.");
|
| + }
|
| + return new _Isolate2Impl(_IsolateNatives._spawn2(name, null, false));
|
| + }
|
| +
|
| + factory Isolate2.fromUri(String uri) {
|
| + return new _Isolate2Impl(_IsolateNatives._spawn2(null, uri, false));
|
| + }
|
| +}
|
|
|