mirror of
https://github.com/dart-lang/sdk
synced 2024-07-01 07:14:29 +00:00
[vm/concurrency] Remove --(no-)enable-isolate-groups flag usage in tests
This is a preparation CL to remove the --enable-isolate-groups flag in the VM. The following tests were only running in --no-enable-isolate-groups and are therefore obsolete now: - runtime/tests/vm/dart/regress_47468_test.dart - runtime/tests/vm/dart_2/regress_47468_test.dart - tests/lib/isolate/illegal_msg_function_test.dart - tests/lib_2/isolate/illegal_msg_function_test.dart TEST=Changes tests only. Change-Id: I6257cb667eebca66a649614d3010139dd2cdd3ab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219100 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
2165f02867
commit
96d40d1caa
|
@ -34,8 +34,7 @@ Future<void> main() async {
|
|||
final rpRun = ReceivePort();
|
||||
final int nWarmup = 17; // enough runs to trigger optimized compilation
|
||||
final int nWarmupFactorial = 2584;
|
||||
// With --enable-isolate-groups runs for about 8 seconds.
|
||||
// Should not be run witout --enable-isolate-groups as it would be too slow.
|
||||
// Runs for about 8 seconds.
|
||||
final int n = 21;
|
||||
final int nFactorial = 17711;
|
||||
final beforeRss = ProcessInfo.currentRss;
|
||||
|
@ -48,8 +47,7 @@ Future<void> main() async {
|
|||
final watch = Stopwatch();
|
||||
watch.start();
|
||||
|
||||
// For the benefit of enable-isolate-groups configuration, warm up target
|
||||
// isolate code by running couple iterations in the main isolate.
|
||||
// Warm up code by running a couple iterations in the main isolate.
|
||||
await Isolate.spawn(fibonacciRecursive, [rpWarmup.sendPort, nWarmup]);
|
||||
Expect.equals(nWarmupFactorial, await rpWarmup.first);
|
||||
|
||||
|
@ -60,7 +58,7 @@ Future<void> main() async {
|
|||
|
||||
final done = watch.elapsedMicroseconds;
|
||||
|
||||
print('IsolateFibonacci_$n.Calculation(RunTimeRaw): ${done-warmup} us.');
|
||||
print('IsolateFibonacci_$n.DeltaPeak(MemoryUse): ${maxRss-beforeRss}');
|
||||
print('IsolateFibonacci_$n.Calculation(RunTimeRaw): ${done - warmup} us.');
|
||||
print('IsolateFibonacci_$n.DeltaPeak(MemoryUse): ${maxRss - beforeRss}');
|
||||
rssTimer.cancel();
|
||||
}
|
||||
|
|
|
@ -34,8 +34,7 @@ Future<void> main() async {
|
|||
final rpRun = ReceivePort();
|
||||
final int nWarmup = 17; // enough runs to trigger optimized compilation
|
||||
final int nWarmupFactorial = 2584;
|
||||
// With --enable-isolate-groups runs for about 8 seconds.
|
||||
// Should not be run witout --enable-isolate-groups as it would be too slow.
|
||||
// Runs for about 8 seconds.
|
||||
final int n = 21;
|
||||
final int nFactorial = 17711;
|
||||
final beforeRss = ProcessInfo.currentRss;
|
||||
|
@ -48,8 +47,7 @@ Future<void> main() async {
|
|||
final watch = Stopwatch();
|
||||
watch.start();
|
||||
|
||||
// For the benefit of enable-isolate-groups configuration, warm up target
|
||||
// isolate code by running couple iterations in the main isolate.
|
||||
// Warm up code by running a couple iterations in the main isolate.
|
||||
await Isolate.spawn(fibonacciRecursive, [rpWarmup.sendPort, nWarmup]);
|
||||
Expect.equals(nWarmupFactorial, await rpWarmup.first);
|
||||
|
||||
|
@ -60,7 +58,7 @@ Future<void> main() async {
|
|||
|
||||
final done = watch.elapsedMicroseconds;
|
||||
|
||||
print('IsolateFibonacci_$n.Calculation(RunTimeRaw): ${done-warmup} us.');
|
||||
print('IsolateFibonacci_$n.DeltaPeak(MemoryUse): ${maxRss-beforeRss}');
|
||||
print('IsolateFibonacci_$n.Calculation(RunTimeRaw): ${done - warmup} us.');
|
||||
print('IsolateFibonacci_$n.DeltaPeak(MemoryUse): ${maxRss - beforeRss}');
|
||||
rssTimer.cancel();
|
||||
}
|
||||
|
|
|
@ -158,16 +158,6 @@ Future<void> main() async {
|
|||
}
|
||||
|
||||
// Returns the set of isolate groups for which we should count the heap usage.
|
||||
//
|
||||
// We have two cases
|
||||
//
|
||||
// a) --enable-isolate-groups: All isolates will be within the same isolate
|
||||
// group.
|
||||
//
|
||||
// b) --no-enable-isolate-groups: All isolates will be within their own,
|
||||
// separate isolate group.
|
||||
//
|
||||
// In both cases we want to sum up the heap sizes of all isolate groups.
|
||||
Future<List<String>> getGroupIds(vm_service.VmService vmService) async {
|
||||
final groupIds = <String>{};
|
||||
final vm = await vmService.getVM();
|
||||
|
|
|
@ -160,16 +160,6 @@ Future<void> main() async {
|
|||
}
|
||||
|
||||
// Returns the set of isolate groups for which we should count the heap usage.
|
||||
//
|
||||
// We have two cases
|
||||
//
|
||||
// a) --enable-isolate-groups: All isolates will be within the same isolate
|
||||
// group.
|
||||
//
|
||||
// b) --no-enable-isolate-groups: All isolates will be within their own,
|
||||
// separate isolate group.
|
||||
//
|
||||
// In both cases we want to sum up the heap sizes of all isolate groups.
|
||||
Future<List<String>> getGroupIds(vm_service.VmService vmService) async {
|
||||
final groupIds = <String>{};
|
||||
final vm = await vmService.getVM();
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
import 'dart:isolate';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
// VMOptions=--verbose_debug --enable-isolate-groups
|
||||
// VMOptions=--verbose_debug
|
||||
|
||||
import 'break_on_function_many_child_isolates_test.dart';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
// VMOptions=--verbose_debug --enable-isolate-groups
|
||||
// VMOptions=--verbose_debug
|
||||
//
|
||||
// Tests breakpoint pausing and resuming with many isolates running and pausing
|
||||
// simultaneously.
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable_isolate_groups
|
||||
|
||||
import 'dart:isolate' as isolate;
|
||||
import 'package:observatory/object_graph.dart';
|
||||
import 'package:observatory/service_io.dart';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
// VMOptions=--verbose_debug --enable-isolate-groups
|
||||
// VMOptions=--verbose_debug
|
||||
|
||||
import 'break_on_function_many_child_isolates_test.dart';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
// VMOptions=--verbose_debug --enable-isolate-groups
|
||||
// VMOptions=--verbose_debug
|
||||
//
|
||||
// Tests breakpoint pausing and resuming with many isolates running and pausing
|
||||
// simultaneously.
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable_isolate_groups
|
||||
|
||||
// @dart = 2.7
|
||||
|
||||
import 'dart:isolate' as isolate;
|
||||
|
|
|
@ -146,13 +146,11 @@ final configurations = <TestRunner>[
|
|||
JitTestRunner('out/DebugX64', [
|
||||
'--disable-dart-dev',
|
||||
'--no-sound-null-safety',
|
||||
'--enable-isolate-groups',
|
||||
'runtime/tests/concurrency/generated_stress_test.dart.jit.dill',
|
||||
]),
|
||||
JitTestRunner('out/ReleaseX64', [
|
||||
'--disable-dart-dev',
|
||||
'--no-sound-null-safety',
|
||||
'--enable-isolate-groups',
|
||||
'--no-inline-alloc',
|
||||
'--use-slow-path',
|
||||
'--deoptimize-on-runtime-call-every=3',
|
||||
|
@ -165,7 +163,6 @@ final configurations = <TestRunner>[
|
|||
'-Dshard=$i',
|
||||
'-Dshards=$tsanShards',
|
||||
'--no-sound-null-safety',
|
||||
'--enable-isolate-groups',
|
||||
'runtime/tests/concurrency/generated_stress_test.dart.jit.dill',
|
||||
]),
|
||||
AotTestRunner('out/ReleaseX64', [
|
||||
|
@ -173,14 +170,12 @@ final configurations = <TestRunner>[
|
|||
'runtime/tests/concurrency/generated_stress_test.dart.aot.dill',
|
||||
], [
|
||||
'--no-sound-null-safety',
|
||||
'--enable-isolate-groups',
|
||||
]),
|
||||
AotTestRunner('out/DebugX64', [
|
||||
'--no-sound-null-safety',
|
||||
'runtime/tests/concurrency/generated_stress_test.dart.aot.dill',
|
||||
], [
|
||||
'--no-sound-null-safety',
|
||||
'--enable-isolate-groups',
|
||||
]),
|
||||
];
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
// Verify deferred library status is per-isolate, not per-isolate-group.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:isolate';
|
||||
import 'package:expect/expect.dart';
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
// VMOptions=--no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
|
||||
// The tests in this file will only succeed when isolate groups are enabled
|
||||
// (hence the VMOptions above).
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
|
||||
// The tests in this file will only succeed when isolate groups are enabled
|
||||
// (hence the VMOptions above).
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// SharedObjects=ffi_test_functions
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:ffi';
|
||||
|
@ -17,8 +16,6 @@ import 'package:ffi/ffi.dart';
|
|||
import 'test_utils.dart' show isArtificialReloadMode;
|
||||
import '../../../../../tests/ffi/dylib_utils.dart';
|
||||
|
||||
final bool isolateGroupsEnabled =
|
||||
Platform.executableArguments.contains('--enable-isolate-groups');
|
||||
final bool usesDwarfStackTraces = Platform.executableArguments
|
||||
.any((entry) => RegExp('--dwarf[-_]stack[-_]traces').hasMatch(entry));
|
||||
final bool hasSymbolicStackTraces = !usesDwarfStackTraces;
|
||||
|
@ -223,25 +220,7 @@ Future testJitOrAot() async {
|
|||
await testFatalError();
|
||||
}
|
||||
|
||||
Future testNotSupported() async {
|
||||
dynamic exception;
|
||||
try {
|
||||
FfiBindings.createLightweightIsolate('debug-name', Pointer.fromAddress(0));
|
||||
} catch (e) {
|
||||
exception = e;
|
||||
}
|
||||
Expect.contains(
|
||||
'Lightweight isolates need to be explicitly enabled by passing '
|
||||
'--enable-isolate-groups.',
|
||||
exception.toString());
|
||||
}
|
||||
|
||||
Future main(args) async {
|
||||
if (!isolateGroupsEnabled) {
|
||||
await testNotSupported();
|
||||
return;
|
||||
}
|
||||
|
||||
// This test should not run in hot-reload because of the way it is written
|
||||
// (embedder related code written in Dart instead of C)
|
||||
if (isArtificialReloadMode) return;
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
// VMOptions=--no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
|
||||
// The tests in this file will only succeed when isolate groups are enabled
|
||||
// (hence the VMOptions above).
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation --verify-store-buffer
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation --verify-store-buffer
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
// VMOptions=--no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation --verify-store-buffer
|
||||
// VMOptions=--enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation --verify-store-buffer
|
||||
|
||||
// The tests in this file are particularly for an implementation that tries to
|
||||
// allocate the entire graph in BFS order using a fast new space allocation
|
||||
|
|
|
@ -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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification --disable-thread-pool-limit
|
||||
// VMOptions=--disable-heap-verification --disable-thread-pool-limit
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
|
|
|
@ -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.
|
||||
|
||||
// VMOptions=--optimization-filter=foo --enable-isolate-groups --no-use-osr --optimization-counter-threshold=1 --deterministic
|
||||
// VMOptions=--optimization-filter=foo --no-use-osr --optimization-counter-threshold=1 --deterministic
|
||||
|
||||
// Important: This is a regression test for a concurrency issue, if this test
|
||||
// is flaky it is essentially failing!
|
||||
|
|
|
@ -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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:math' as math;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
import 'dart:async';
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// SharedObjects=ffi_test_functions
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:ffi';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:isolate';
|
||||
import 'dart:math';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
|
||||
// Regression test for https://github.com/dart-lang/sdk/issues/47468.
|
||||
// Verifies that the sending empty non-const maps works
|
||||
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
void main() async {
|
||||
final nonConstMap = <int, Object>{};
|
||||
final receivePort = ReceivePort();
|
||||
final sendPort = receivePort.sendPort;
|
||||
sendPort.send(nonConstMap);
|
||||
await receivePort.first;
|
||||
}
|
|
@ -2,8 +2,6 @@
|
|||
// 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.
|
||||
//
|
||||
// VMOptions=--enable-isolate-groups
|
||||
//
|
||||
// Validates functionality of Isolate.exit().
|
||||
|
||||
import 'dart:async';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
// This test ensures that the VM can kill the spawned isolate during VM
|
||||
|
|
|
@ -2,8 +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.
|
||||
|
||||
// VMOptions=--enable-asserts --enable-isolate-groups
|
||||
// VMOptions=--enable-asserts --no-enable-isolate-groups
|
||||
// VMOptions=--enable-asserts
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:isolate';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Test that validates that transferables are faster than regular typed data.
|
||||
|
||||
import 'dart:async';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Test that ensures correct exceptions are thrown when misusing
|
||||
// [TransferableTypedData].
|
||||
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
|
||||
// Verify deferred library status is per-isolate, not per-isolate-group.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:isolate';
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
// VMOptions=--no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
|
||||
// The tests in this file will only succeed when isolate groups are enabled
|
||||
// (hence the VMOptions above).
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
|
||||
// The tests in this file will only succeed when isolate groups are enabled
|
||||
// (hence the VMOptions above).
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
// @dart = 2.9
|
||||
|
||||
// SharedObjects=ffi_test_functions
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:ffi';
|
||||
|
@ -19,8 +18,6 @@ import 'package:ffi/ffi.dart';
|
|||
import 'test_utils.dart' show isArtificialReloadMode;
|
||||
import '../../../../../tests/ffi/dylib_utils.dart';
|
||||
|
||||
final bool isolateGroupsEnabled =
|
||||
Platform.executableArguments.contains('--enable-isolate-groups');
|
||||
final bool usesDwarfStackTraces = Platform.executableArguments
|
||||
.any((entry) => RegExp('--dwarf[-_]stack[-_]traces').hasMatch(entry));
|
||||
final bool hasSymbolicStackTraces = !usesDwarfStackTraces;
|
||||
|
@ -225,25 +222,7 @@ Future testJitOrAot() async {
|
|||
await testFatalError();
|
||||
}
|
||||
|
||||
Future testNotSupported() async {
|
||||
dynamic exception;
|
||||
try {
|
||||
FfiBindings.createLightweightIsolate('debug-name', Pointer.fromAddress(0));
|
||||
} catch (e) {
|
||||
exception = e;
|
||||
}
|
||||
Expect.contains(
|
||||
'Lightweight isolates need to be explicitly enabled by passing '
|
||||
'--enable-isolate-groups.',
|
||||
exception.toString());
|
||||
}
|
||||
|
||||
Future main(args) async {
|
||||
if (!isolateGroupsEnabled) {
|
||||
await testNotSupported();
|
||||
return;
|
||||
}
|
||||
|
||||
// This test should not run in hot-reload because of the way it is written
|
||||
// (embedder related code written in Dart instead of C)
|
||||
if (isArtificialReloadMode) return;
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
// VMOptions=--no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
// VMOptions=--enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation
|
||||
|
||||
// The tests in this file will only succeed when isolate groups are enabled
|
||||
// (hence the VMOptions above).
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation --verify-store-buffer
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation --verify-store-buffer
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
// VMOptions=--no-enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation --verify-store-buffer
|
||||
// VMOptions=--enable-fast-object-copy --gc-on-foc-slow-path --force-evacuation --verify-store-buffer
|
||||
|
||||
// The tests in this file are particularly for an implementation that tries to
|
||||
// allocate the entire graph in BFS order using a fast new space allocation
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification --disable-thread-pool-limit
|
||||
// VMOptions=--disable-heap-verification --disable-thread-pool-limit
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--optimization-filter=foo --enable-isolate-groups --no-use-osr --optimization-counter-threshold=1 --deterministic
|
||||
// VMOptions=--optimization-filter=foo --no-use-osr --optimization-counter-threshold=1 --deterministic
|
||||
|
||||
// Important: This is a regression test for a concurrency issue, if this test
|
||||
// is flaky it is essentially failing!
|
||||
|
|
|
@ -125,7 +125,6 @@ Future<Reloader> launchOn(String file, {bool verbose: false}) async {
|
|||
'--enable-vm-service:0',
|
||||
'--disable-dart-dev',
|
||||
'--disable-service-auth-codes',
|
||||
'--enable-isolate-groups',
|
||||
file
|
||||
];
|
||||
final env = Platform.environment;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:math' as math;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
import 'dart:async';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// @dart = 2.9
|
||||
|
||||
// SharedObjects=ffi_test_functions
|
||||
// VMOptions=--enable-isolate-groups --disable-heap-verification
|
||||
// VMOptions=--disable-heap-verification
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:ffi';
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:isolate';
|
||||
import 'dart:math';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
|
||||
// Regression test for https://github.com/dart-lang/sdk/issues/47468.
|
||||
// Verifies that the sending empty non-const maps works
|
||||
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
void main() async {
|
||||
final nonConstMap = <int, Object>{};
|
||||
final receivePort = ReceivePort();
|
||||
final sendPort = receivePort.sendPort;
|
||||
sendPort.send(nonConstMap);
|
||||
await receivePort.first;
|
||||
}
|
|
@ -2,8 +2,6 @@
|
|||
// 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.
|
||||
//
|
||||
// VMOptions=--enable-isolate-groups
|
||||
//
|
||||
// Validates functionality of Isolate.exit().
|
||||
|
||||
// @dart = 2.9
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
|
||||
// This test ensures that the VM can kill the spawned isolate during VM
|
||||
|
|
|
@ -2,8 +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.
|
||||
|
||||
// VMOptions=--enable-asserts --enable-isolate-groups
|
||||
// VMOptions=--enable-asserts --no-enable-isolate-groups
|
||||
// VMOptions=--enable-asserts
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Test that validates that transferables are faster than regular typed data.
|
||||
|
||||
import 'dart:async';
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Test that ensures correct exceptions are thrown when misusing
|
||||
// [TransferableTypedData].
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
//
|
||||
// Checks that the VM throws an appropriate exception when FFI objects are
|
||||
// passed between isolates.
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
//
|
||||
// Dart test program for testing dart:ffi function pointers with callbacks.
|
||||
//
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--stacktrace-every=100
|
||||
// VMOptions=--write-protect-code --no-dual-map-code
|
||||
// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
//
|
||||
// Checks that the VM throws an appropriate exception when FFI objects are
|
||||
// passed between isolates.
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
// Dart test program for testing dart:ffi function pointers with callbacks.
|
||||
//
|
||||
// SharedObjects=ffi_test_functions
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--stacktrace-every=100
|
||||
// VMOptions=--use-slow-path
|
||||
// VMOptions=--use-slow-path --stacktrace-every=100
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Regression test case for http://dartbug.com/23244
|
||||
import 'dart:async';
|
||||
import 'dart:isolate';
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--optimization_counter_threshold=100 --no-background_compilation
|
||||
|
||||
// Test field type tracking and field list-length tracking in the presence of
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
// https://github.com/flutter/flutter/issues/89584.
|
||||
// Verifies a Field::RecordStore is not done before all fields populated.
|
||||
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
import 'dart:typed_data';
|
||||
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Regression test case for http://dartbug.com/23244
|
||||
import 'dart:async';
|
||||
import 'dart:isolate';
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--optimization_counter_threshold=100 --no-background_compilation
|
||||
|
||||
// Test field type tracking and field list-length tracking in the presence of
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
// https://github.com/flutter/flutter/issues/89584.
|
||||
// Verifies a Field::RecordStore is not done before all fields populated.
|
||||
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
import 'dart:typed_data';
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import "dart:isolate";
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import "dart:isolate";
|
||||
import "package:expect/expect.dart";
|
||||
import "package:async_helper/async_helper.dart";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Dart test program for testing that errors thrown from isolates are
|
||||
// processed correctly and don't result in crashes.
|
||||
|
||||
|
@ -16,9 +13,9 @@ import "package:async_helper/async_helper.dart";
|
|||
|
||||
class TestClass {
|
||||
TestClass.named(num this.fld1)
|
||||
// Should cause a compilation error (for the spawned isolate). It is a
|
||||
// runtime error for the test.
|
||||
: fld2 = this.fld1 // //# 01: compile-time error
|
||||
// Should cause a compilation error (for the spawned isolate). It is a
|
||||
// runtime error for the test.
|
||||
: fld2 = this.fld1 // //# 01: compile-time error
|
||||
;
|
||||
late num fld1;
|
||||
late num fld2;
|
||||
|
|
|
@ -2,9 +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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
|
||||
library CountTest;
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Dart test program for testing that isolates can communicate to isolates
|
||||
// other than the main isolate.
|
||||
|
||||
|
|
|
@ -2,13 +2,9 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library deferred_in_isolate2_test;
|
||||
|
||||
import 'dart:isolate';
|
||||
import 'dart:async';
|
||||
import 'package:async_helper/async_minitest.dart';
|
||||
|
||||
import 'deferred_in_isolate2_lib.dart' deferred as lib;
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
// Test that deferred libraries are supported from isolates other than the root
|
||||
// isolate.
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import "dart:isolate";
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library error_at_spawn;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -2,13 +2,9 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library error_at_spawnuri;
|
||||
|
||||
import "dart:isolate";
|
||||
import "dart:async";
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library error_exit_at_spawn;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library error_exit_at_spawnuri;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library exit_at_spawn;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library exit_at_spawn;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
|
||||
import "dart:isolate";
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import "dart:isolate";
|
||||
import "dart:async";
|
||||
import "package:expect/expect.dart";
|
||||
|
|
|
@ -2,20 +2,15 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
|
||||
import "dart:isolate";
|
||||
import "dart:io";
|
||||
import "dart:async";
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import "package:async_helper/async_helper.dart";
|
||||
|
||||
final bool isolateGroupsEnabled =
|
||||
Platform.executableArguments.contains('--enable-isolate-groups');
|
||||
|
||||
void toplevel(port, message) {
|
||||
port.send("toplevel:$message");
|
||||
}
|
||||
|
@ -65,38 +60,17 @@ void main() {
|
|||
// Sendables are top-level functions and static functions only.
|
||||
testSendable("toplevel", toplevel);
|
||||
testSendable("static", C.staticFunc);
|
||||
// Unsendables are any closure - instance methods or function expression.
|
||||
var c = new C();
|
||||
testUnsendable("instance method", c.instanceMethod);
|
||||
testUnsendable("static context expression", createFuncToplevel());
|
||||
testUnsendable("static context expression", C.createFuncStatic());
|
||||
testUnsendable("initializer context expression", c.initializer);
|
||||
testUnsendable("constructor context expression", c.body);
|
||||
testUnsendable("instance method context expression", c.createFuncMember());
|
||||
|
||||
// The result of `toplevel.call` and `staticFunc.call` may or may not be
|
||||
// identical to `toplevel` and `staticFunc` respectively. If they are not
|
||||
// equal, they may or may not be considered toplevel/static functions anyway,
|
||||
// and therefore sendable. The VM and dart2js currently disagree on whether
|
||||
// `toplevel` and `toplevel.call` are identical, both allow them to be sent.
|
||||
// If this is ever specified to something else, use:
|
||||
// testUnsendable("toplevel.call", toplevel.call);
|
||||
// testUnsendable("static.call", C.staticFunc.call);
|
||||
// instead.
|
||||
// These two tests should be considered canaries for accidental behavior
|
||||
// change rather than requirements.
|
||||
testSendable("toplevel", toplevel.call);
|
||||
testSendable("static", C.staticFunc.call);
|
||||
|
||||
// Callable objects are sendable if general objects are (VM yes, dart2js no).
|
||||
// It's unspecified whether arbitrary objects can be sent. If it is specified,
|
||||
// add a test that `new Callable()` is either sendable or unsendable.
|
||||
|
||||
// The call method of a callable object is a closure holding the object,
|
||||
// not a top-level or static function, so it should be blocked, just as
|
||||
// a normal method.
|
||||
testUnsendable("callable object", new Callable().call);
|
||||
|
||||
asyncEnd();
|
||||
return;
|
||||
}
|
||||
|
@ -179,51 +153,6 @@ void _call(initPort) {
|
|||
initPort.send(singleMessagePort(callFunc));
|
||||
}
|
||||
|
||||
void testUnsendable(name, func) {
|
||||
// Isolate group support does allow sending closures.
|
||||
if (isolateGroupsEnabled) return;
|
||||
|
||||
asyncStart();
|
||||
Isolate.spawn(nop, func).then<void>((v) => throw "allowed spawn direct?",
|
||||
onError: (e, s) {
|
||||
asyncEnd();
|
||||
});
|
||||
asyncStart();
|
||||
Isolate.spawn(nop, [func]).then<void>((v) => throw "allowed spawn wrapped?",
|
||||
onError: (e, s) {
|
||||
asyncEnd();
|
||||
});
|
||||
|
||||
asyncStart();
|
||||
var noReply = new RawReceivePort((_) {
|
||||
throw "Unexpected message: $_";
|
||||
});
|
||||
Expect.throws(() {
|
||||
noReply.sendPort.send(func);
|
||||
}, (_) => true, "send direct");
|
||||
Expect.throws(() {
|
||||
noReply.sendPort.send([func]);
|
||||
}, (_) => true, "send wrapped");
|
||||
scheduleMicrotask(() {
|
||||
noReply.close();
|
||||
asyncEnd();
|
||||
});
|
||||
|
||||
// Try sending through other isolate.
|
||||
asyncStart();
|
||||
echoPort((v) {
|
||||
Expect.equals(0, v);
|
||||
}).then((p) {
|
||||
try {
|
||||
p.send(func);
|
||||
} finally {
|
||||
p.send(0); // Closes echo port.
|
||||
}
|
||||
}).then<void>((p) => throw "unreachable 2", onError: (e, s) {
|
||||
asyncEnd();
|
||||
});
|
||||
}
|
||||
|
||||
void nop(_) {}
|
||||
|
||||
void callFunc(message) {
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library handle_error_test;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library handle_error_test;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library handle_error_test;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -1,43 +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.
|
||||
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library illegal_msg_function_test;
|
||||
|
||||
import "dart:isolate";
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import "package:async_helper/async_helper.dart";
|
||||
|
||||
echo(sendPort) {
|
||||
var port = new ReceivePort();
|
||||
sendPort.send(port.sendPort);
|
||||
port.listen((msg) {
|
||||
sendPort.send("echoing ${msg(1)}}");
|
||||
});
|
||||
}
|
||||
|
||||
void main() {
|
||||
asyncStart();
|
||||
|
||||
final port = new ReceivePort();
|
||||
|
||||
// Ignore returned Future.
|
||||
Isolate.spawn(echo, port.sendPort);
|
||||
|
||||
port.first.then((_snd) {
|
||||
SendPort snd = _snd;
|
||||
int function(x) => x + 2;
|
||||
try {
|
||||
snd.send(function);
|
||||
} catch (e) {
|
||||
// Expected behavior.
|
||||
port.close();
|
||||
asyncEnd();
|
||||
return;
|
||||
}
|
||||
Expect.fail("Should not be reached. Message sending didn't throw.");
|
||||
});
|
||||
}
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library illegal_msg_mirror_test;
|
||||
|
||||
import "dart:isolate";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import "dart:async";
|
||||
import "dart:isolate";
|
||||
import "dart:typed_data";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import "dart:isolate";
|
||||
|
||||
import "package:async_helper/async_helper.dart";
|
||||
|
|
|
@ -2,9 +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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
|
||||
// Dart test program for testing isolate communication with
|
||||
// complex messages.
|
||||
|
|
|
@ -2,9 +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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups --no-enable-fast-object-copy
|
||||
// VMOptions=--enable-isolate-groups --enable-fast-object-copy
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
// VMOptions=--no-enable-fast-object-copy
|
||||
// VMOptions=--enable-fast-object-copy
|
||||
|
||||
library isolate_current_test;
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
library IsolateImportNegativeTest;
|
||||
|
||||
// Omitting the following import is an error:
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
import "package:expect/expect.dart";
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
import "package:expect/expect.dart";
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import 'dart:isolate';
|
||||
import "package:expect/expect.dart";
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// VMOptions=--enable-isolate-groups
|
||||
// VMOptions=--no-enable-isolate-groups
|
||||
|
||||
import "dart:isolate";
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user