mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
This reverts commit 4e7a31262e
.
Windows bots are broken now.
R=zra@google.com
BUG=
Review URL: https://codereview.chromium.org/2451893004 .
This commit is contained in:
parent
1ed9dc3ac0
commit
12968edb9c
3
BUILD.gn
3
BUILD.gn
|
@ -29,7 +29,6 @@ group("runtime") {
|
||||||
"runtime/bin:process_test",
|
"runtime/bin:process_test",
|
||||||
"runtime/bin:test_extension",
|
"runtime/bin:test_extension",
|
||||||
"runtime/bin:sample_extension",
|
"runtime/bin:sample_extension",
|
||||||
"runtime/vm:patched_sdk",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +36,6 @@ group("runtime_precompiled") {
|
||||||
deps = [
|
deps = [
|
||||||
"runtime/bin:dart_precompiled_runtime",
|
"runtime/bin:dart_precompiled_runtime",
|
||||||
"runtime/bin:dart_bootstrap($host_toolchain)",
|
"runtime/bin:dart_bootstrap($host_toolchain)",
|
||||||
"runtime/vm:patched_sdk",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +48,6 @@ group("runtime_and_noopt") {
|
||||||
"runtime/bin:process_test",
|
"runtime/bin:process_test",
|
||||||
"runtime/bin:test_extension",
|
"runtime/bin:test_extension",
|
||||||
"runtime/bin:sample_extension",
|
"runtime/bin:sample_extension",
|
||||||
"runtime/vm:patched_sdk",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
dart.gyp
4
dart.gyp
|
@ -30,7 +30,6 @@
|
||||||
'runtime/dart-runtime.gyp:process_test',
|
'runtime/dart-runtime.gyp:process_test',
|
||||||
'runtime/dart-runtime.gyp:test_extension',
|
'runtime/dart-runtime.gyp:test_extension',
|
||||||
'runtime/dart-runtime.gyp:sample_extension',
|
'runtime/dart-runtime.gyp:sample_extension',
|
||||||
'runtime/dart-runtime.gyp:generate_patched_sdk#host',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -42,7 +41,6 @@
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'runtime/dart-runtime.gyp:dart_precompiled_runtime',
|
'runtime/dart-runtime.gyp:dart_precompiled_runtime',
|
||||||
'runtime/dart-runtime.gyp:dart_bootstrap#host',
|
'runtime/dart-runtime.gyp:dart_bootstrap#host',
|
||||||
'runtime/dart-runtime.gyp:generate_patched_sdk#host',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -59,10 +57,8 @@
|
||||||
'runtime/dart-runtime.gyp:process_test',
|
'runtime/dart-runtime.gyp:process_test',
|
||||||
'runtime/dart-runtime.gyp:test_extension',
|
'runtime/dart-runtime.gyp:test_extension',
|
||||||
'runtime/dart-runtime.gyp:sample_extension',
|
'runtime/dart-runtime.gyp:sample_extension',
|
||||||
'runtime/dart-runtime.gyp:generate_patched_sdk#host',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
'target_name': 'create_sdk',
|
'target_name': 'create_sdk',
|
||||||
'type': 'none',
|
'type': 'none',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
// 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
|
// for details. All rights solveserved. Use of this source code is governed by a
|
||||||
// BSD-style license that can be found in the LICENSE file.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
library builtin;
|
library builtin;
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
import 'dart:nativewrappers';
|
|
||||||
|
|
||||||
@patch class _IOCrypto {
|
@patch class _IOCrypto {
|
||||||
@patch static Uint8List getRandomBytes(int count)
|
@patch static Uint8List getRandomBytes(int count)
|
||||||
native "Crypto_GetRandomBytes";
|
native "Crypto_GetRandomBytes";
|
||||||
|
@ -12,4 +10,4 @@ import 'dart:nativewrappers';
|
||||||
_setupHooks() {
|
_setupHooks() {
|
||||||
VMLibraryHooks.eventHandlerSendData = _EventHandler._sendData;
|
VMLibraryHooks.eventHandlerSendData = _EventHandler._sendData;
|
||||||
VMLibraryHooks.timerMillisecondClock = _EventHandler._timerMillisecondClock;
|
VMLibraryHooks.timerMillisecondClock = _EventHandler._timerMillisecondClock;
|
||||||
}
|
}
|
|
@ -2,6 +2,8 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'dart:nativewrappers';
|
||||||
|
|
||||||
@patch class _EventHandler {
|
@patch class _EventHandler {
|
||||||
@patch static void _sendData(Object sender,
|
@patch static void _sendData(Object sender,
|
||||||
SendPort sendPort,
|
SendPort sendPort,
|
||||||
|
|
|
@ -125,9 +125,9 @@ class _SignalController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static _setSignalHandler(int signal)
|
@patch static _setSignalHandler(int signal)
|
||||||
native "Process_SetSignalHandler";
|
native "Process_SetSignalHandler";
|
||||||
static int _clearSignalHandler(int signal)
|
@patch static int _clearSignalHandler(int signal)
|
||||||
native "Process_ClearSignalHandler";
|
native "Process_ClearSignalHandler";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// BSD-style license that can be found in the LICENSE file.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
@patch class _StdIOUtils {
|
@patch class _StdIOUtils {
|
||||||
@patch static Stdin _getStdioInputStream() {
|
static Stdin _getStdioInputStream() {
|
||||||
switch (_getStdioHandleType(0)) {
|
switch (_getStdioHandleType(0)) {
|
||||||
case _STDIO_HANDLE_TYPE_TERMINAL:
|
case _STDIO_HANDLE_TYPE_TERMINAL:
|
||||||
case _STDIO_HANDLE_TYPE_PIPE:
|
case _STDIO_HANDLE_TYPE_PIPE:
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@patch static _getStdioOutputStream(int fd) {
|
static _getStdioOutputStream(int fd) {
|
||||||
assert(fd == 1 || fd == 2);
|
assert(fd == 1 || fd == 2);
|
||||||
switch (_getStdioHandleType(fd)) {
|
switch (_getStdioHandleType(fd)) {
|
||||||
case _STDIO_HANDLE_TYPE_TERMINAL:
|
case _STDIO_HANDLE_TYPE_TERMINAL:
|
||||||
|
@ -29,12 +29,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@patch static int _socketType(Socket socket) {
|
static int _socketType(Socket socket) {
|
||||||
if (socket is _Socket) return _nativeSocketType(socket._nativeSocket);
|
if (socket is _Socket) return _nativeSocketType(socket._nativeSocket);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@patch static int _nativeSocketType(_NativeSocket nativeSocket) {
|
static int _nativeSocketType(_NativeSocket nativeSocket) {
|
||||||
var result = _getSocketType(nativeSocket);
|
var result = _getSocketType(nativeSocket);
|
||||||
if (result is OSError) {
|
if (result is OSError) {
|
||||||
throw new FileSystemException(
|
throw new FileSystemException(
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@patch static _getStdioHandleType(int fd) native "File_GetStdioHandleType";
|
static _getStdioHandleType(int fd) native "File_GetStdioHandleType";
|
||||||
}
|
}
|
||||||
|
|
||||||
@patch class Stdin {
|
@patch class Stdin {
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
import 'dart:typed_data';
|
|
||||||
import 'dart:_internal' as internal;
|
|
||||||
|
|
||||||
@patch class HashMap<K, V> {
|
@patch class HashMap<K, V> {
|
||||||
@patch factory HashMap({ bool equals(K key1, K key2),
|
@patch factory HashMap({ bool equals(K key1, K key2),
|
||||||
int hashCode(K key),
|
int hashCode(K key),
|
||||||
bool isValidKey(potentialKey) }) {
|
bool isValidKey(potentialKey) }) {
|
||||||
if (isValidKey == null) {
|
if (isValidKey == null) {
|
||||||
if (hashCode == null) {
|
if (hashCode == null) {
|
||||||
if (equals == null) {
|
if (equals == null) {
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
'sources': [
|
'sources': [
|
||||||
# collection_patch.dart needs to be the first dart file because it contains
|
|
||||||
# imports.
|
|
||||||
'collection_patch.dart',
|
'collection_patch.dart',
|
||||||
'compact_hash.dart',
|
'compact_hash.dart',
|
||||||
'linked_hash_map.cc',
|
'linked_hash_map.cc',
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'dart:typed_data';
|
||||||
|
import 'dart:_internal' as internal;
|
||||||
|
|
||||||
// Hash table with open addressing that separates the index from keys/values.
|
// Hash table with open addressing that separates the index from keys/values.
|
||||||
|
|
||||||
abstract class _HashFieldBase {
|
abstract class _HashFieldBase {
|
||||||
|
|
|
@ -2,13 +2,8 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
import "dart:async";
|
|
||||||
import "dart:collection" show LinkedList, LinkedListEntry;
|
|
||||||
import 'dart:convert' show ASCII, JSON;
|
|
||||||
import "dart:isolate";
|
|
||||||
import "dart:math";
|
import "dart:math";
|
||||||
import "dart:typed_data";
|
import "dart:typed_data";
|
||||||
import 'dart:_internal' as internal;
|
|
||||||
|
|
||||||
// Equivalent of calling FATAL from C++ code.
|
// Equivalent of calling FATAL from C++ code.
|
||||||
_fatal(msg) native "DartCore_fatal";
|
_fatal(msg) native "DartCore_fatal";
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
// BSD-style license that can be found in the LICENSE file.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
import 'dart:isolate';
|
import 'dart:isolate';
|
||||||
import 'dart:_internal';
|
|
||||||
|
|
||||||
@patch bool debugger({bool when: true,
|
@patch bool debugger({bool when: true,
|
||||||
String message}) native "Developer_debugger";
|
String message}) native "Developer_debugger";
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
{
|
{
|
||||||
'sources': [
|
'sources': [
|
||||||
'developer.cc',
|
'developer.cc',
|
||||||
# developer.dart needs to be the first dart file because it contains
|
|
||||||
# imports.
|
|
||||||
'developer.dart',
|
'developer.dart',
|
||||||
'profiler.cc',
|
'profiler.cc',
|
||||||
'profiler.dart',
|
'profiler.dart',
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'dart:_internal' as internal;
|
||||||
|
import 'dart:convert' show JSON;
|
||||||
|
|
||||||
@patch class Error {
|
@patch class Error {
|
||||||
@patch static String _objectToString(Object object) {
|
@patch static String _objectToString(Object object) {
|
||||||
return Object._toString(object);
|
return Object._toString(object);
|
||||||
|
@ -203,7 +206,6 @@ class _InternalError {
|
||||||
// that no information is available.
|
// that no information is available.
|
||||||
final int _invocation_type;
|
final int _invocation_type;
|
||||||
|
|
||||||
@patch
|
|
||||||
NoSuchMethodError(Object this._receiver,
|
NoSuchMethodError(Object this._receiver,
|
||||||
Symbol this._memberName,
|
Symbol this._memberName,
|
||||||
List this._arguments,
|
List this._arguments,
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
// VM implementation of int.
|
// VM implementation of int.
|
||||||
|
|
||||||
|
import 'dart:_internal' as internal;
|
||||||
|
|
||||||
@patch class int {
|
@patch class int {
|
||||||
|
|
||||||
@patch const factory int.fromEnvironment(String name,
|
@patch const factory int.fromEnvironment(String name,
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import "dart:async";
|
||||||
|
import "dart:isolate";
|
||||||
|
|
||||||
// This type corresponds to the VM-internal class LibraryPrefix.
|
// This type corresponds to the VM-internal class LibraryPrefix.
|
||||||
class _LibraryPrefix {
|
class _LibraryPrefix {
|
||||||
bool _load() native "LibraryPrefix_load";
|
bool _load() native "LibraryPrefix_load";
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
|
|
||||||
// VM-specific implementation of the dart:mirrors library.
|
// VM-specific implementation of the dart:mirrors library.
|
||||||
|
|
||||||
|
import "dart:collection" show UnmodifiableListView, UnmodifiableMapView;
|
||||||
|
import "dart:async" show Future;
|
||||||
|
|
||||||
var dirty = false;
|
var dirty = false;
|
||||||
final emptyList = new UnmodifiableListView([]);
|
final emptyList = new UnmodifiableListView([]);
|
||||||
final emptyMap = new UnmodifiableMapView({});
|
final emptyMap = new UnmodifiableMapView({});
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
import "dart:async" show Future;
|
|
||||||
import "dart:collection" show UnmodifiableListView, UnmodifiableMapView;
|
|
||||||
import "dart:_internal" as internal;
|
import "dart:_internal" as internal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
'sources': [
|
'sources': [
|
||||||
'mirrors.cc',
|
'mirrors.cc',
|
||||||
'mirrors.h',
|
'mirrors.h',
|
||||||
# mirrors_patch.dart needs to be the first dart file because it contains
|
|
||||||
# imports.
|
|
||||||
'mirrors_patch.dart',
|
'mirrors_patch.dart',
|
||||||
'mirrors_impl.dart',
|
'mirrors_impl.dart',
|
||||||
'mirror_reference.dart',
|
'mirror_reference.dart',
|
||||||
|
|
|
@ -5,7 +5,14 @@
|
||||||
// Dart core library.
|
// Dart core library.
|
||||||
|
|
||||||
@patch class Null {
|
@patch class Null {
|
||||||
|
|
||||||
|
factory Null._uninstantiable() {
|
||||||
|
throw new UnsupportedError("class Null cannot be instantiated");
|
||||||
|
}
|
||||||
|
|
||||||
static const _HASH_CODE = 2011; // The year Dart was announced and a prime.
|
static const _HASH_CODE = 2011; // The year Dart was announced and a prime.
|
||||||
int get hashCode => _HASH_CODE;
|
int get hashCode => _HASH_CODE;
|
||||||
int get _identityHashCode => _HASH_CODE;
|
int get _identityHashCode => _HASH_CODE;
|
||||||
|
|
||||||
|
String toString() => 'null';
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
@patch class Object {
|
@patch class Object {
|
||||||
|
|
||||||
// The VM has its own implementation of equals.
|
// The VM has its own implementation of equals.
|
||||||
@patch bool operator ==(other) native "Object_equals";
|
bool operator ==(other) native "Object_equals";
|
||||||
|
|
||||||
// Helpers used to implement hashCode. If a hashCode is used, we remember it
|
// Helpers used to implement hashCode. If a hashCode is used, we remember it
|
||||||
// in a weak table in the VM. A new hashCode value is calculated using a
|
// in a weak table in the VM. A new hashCode value is calculated using a
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'dart:_internal';
|
||||||
|
|
||||||
@patch class UserTag {
|
@patch class UserTag {
|
||||||
@patch factory UserTag(String label) {
|
@patch factory UserTag(String label) {
|
||||||
return new _UserTag(label);
|
return new _UserTag(label);
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import "dart:collection" show LinkedList, LinkedListEntry;
|
||||||
|
|
||||||
@patch class RegExp {
|
@patch class RegExp {
|
||||||
@patch factory RegExp(String source,
|
@patch factory RegExp(String source,
|
||||||
{bool multiLine: false,
|
{bool multiLine: false,
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'dart:_internal';
|
||||||
|
|
||||||
@patch bool _isDartStreamEnabled() native "Timeline_isDartStreamEnabled";
|
@patch bool _isDartStreamEnabled() native "Timeline_isDartStreamEnabled";
|
||||||
|
|
||||||
@patch int _getTraceClock() native "Timeline_getTraceClock";
|
@patch int _getTraceClock() native "Timeline_getTraceClock";
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// Unlike the other SDK libraries, this file is not a patch that is applied to
|
|
||||||
// dart:typed_data. Instead, it completely replaces the implementation from the
|
|
||||||
// SDK.
|
|
||||||
library dart.typed_data;
|
library dart.typed_data;
|
||||||
|
|
||||||
import "dart:_internal";
|
import "dart:_internal";
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
// 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.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import "dart:convert" show ASCII;
|
||||||
|
|
||||||
// VM implementation of Uri.
|
// VM implementation of Uri.
|
||||||
typedef Uri _UriBaseClosure();
|
typedef Uri _UriBaseClosure();
|
||||||
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
from optparse import OptionParser
|
|
||||||
|
|
||||||
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:
|
|
||||||
for dart_file_name in dart_file_names:
|
|
||||||
with open(dart_file_name, 'r') as dart_file:
|
|
||||||
output_file.write(dart_file.read())
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
parser = OptionParser()
|
|
||||||
parser.add_option('--output', action='store', type='string',
|
|
||||||
help='output file path')
|
|
||||||
(options, args) = parser.parse_args()
|
|
||||||
if not options.output:
|
|
||||||
parser.error('missing --output option\n')
|
|
||||||
if len(args) == 0:
|
|
||||||
parser.error('no input files given\n')
|
|
||||||
writePatch(options.output, args)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -141,13 +141,17 @@ static_library("libdart_vm_nosnapshot_with_precompiler") {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template("process_library_source") {
|
template("generate_library_source") {
|
||||||
|
assert(defined(invoker.libname), "Need libname in $target_name")
|
||||||
assert(defined(invoker.filename), "Need a filename in $target_name")
|
assert(defined(invoker.filename), "Need a filename in $target_name")
|
||||||
|
assert(defined(invoker.kind), "Need kind in $target_name")
|
||||||
assert(defined(invoker.output), "Need output in $target_name")
|
assert(defined(invoker.output), "Need output in $target_name")
|
||||||
assert(defined(invoker.path), "Need path in $target_name")
|
assert(defined(invoker.path), "Need path in $target_name")
|
||||||
action(target_name) {
|
action(target_name) {
|
||||||
visibility = [ ":*" ] # Only targets in this file can see this.
|
visibility = [ ":*" ] # Only targets in this file can see this.
|
||||||
|
libname = invoker.libname
|
||||||
filename = invoker.filename
|
filename = invoker.filename
|
||||||
|
kind = invoker.kind
|
||||||
path = invoker.path
|
path = invoker.path
|
||||||
|
|
||||||
lib_sources_gypi =
|
lib_sources_gypi =
|
||||||
|
@ -158,37 +162,20 @@ template("process_library_source") {
|
||||||
lib_sources =
|
lib_sources =
|
||||||
rebase_path(lib_sources_gypi.sources, ".", path)
|
rebase_path(lib_sources_gypi.sources, ".", path)
|
||||||
|
|
||||||
script = invoker.script
|
|
||||||
inputs = invoker.inputs + [script]
|
|
||||||
inputs += lib_sources
|
|
||||||
outputs = [invoker.output]
|
|
||||||
args = invoker.args + rebase_path(lib_sources, root_build_dir)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template("generate_library_source") {
|
|
||||||
assert(defined(invoker.libname), "Need libname in $target_name")
|
|
||||||
assert(defined(invoker.filename), "Need a filename in $target_name")
|
|
||||||
assert(defined(invoker.kind), "Need kind in $target_name")
|
|
||||||
assert(defined(invoker.output), "Need output in $target_name")
|
|
||||||
assert(defined(invoker.path), "Need path in $target_name")
|
|
||||||
|
|
||||||
process_library_source(target_name) {
|
|
||||||
libname = invoker.libname
|
|
||||||
filename = invoker.filename
|
|
||||||
kind = invoker.kind
|
|
||||||
output = invoker.output
|
|
||||||
path = invoker.path
|
|
||||||
script = "../tools/gen_library_src_paths.py"
|
script = "../tools/gen_library_src_paths.py"
|
||||||
inputs = ["../lib/libgen_in.cc"]
|
inputs = [
|
||||||
|
"../tools/gen_library_src_paths.py",
|
||||||
|
"../lib/libgen_in.cc",
|
||||||
|
]
|
||||||
|
inputs += lib_sources
|
||||||
|
outputs = [ invoker.output, ]
|
||||||
args = [
|
args = [
|
||||||
"--output", rebase_path(invoker.output, root_build_dir),
|
"--output", rebase_path(invoker.output, root_build_dir),
|
||||||
"--input_cc", rebase_path("../lib/libgen_in.cc", root_build_dir),
|
"--input_cc", rebase_path("../lib/libgen_in.cc", root_build_dir),
|
||||||
"--include", "vm/bootstrap.h",
|
"--include", "vm/bootstrap.h",
|
||||||
"--var_name", "dart::Bootstrap::${libname}_${kind}_paths_",
|
"--var_name", "dart::Bootstrap::${libname}_${kind}_paths_",
|
||||||
"--library_name", "dart:${libname}",
|
"--library_name", "dart:${libname}",] +
|
||||||
]
|
rebase_path(lib_sources, root_build_dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,104 +299,3 @@ generate_core_libraries("core_libraries") {
|
||||||
["_vmservice", "vmservice", true, "../../sdk/lib/vmservice", "../lib"],
|
["_vmservice", "vmservice", true, "../../sdk/lib/vmservice", "../lib"],
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template("concatenate_patch") {
|
|
||||||
assert(defined(invoker.libname), "Need a name in $target_name")
|
|
||||||
assert(defined(invoker.dir), "Need a dir in $target_name")
|
|
||||||
assert(defined(invoker.output), "Need an output in $target_name")
|
|
||||||
|
|
||||||
process_library_source(target_name) {
|
|
||||||
output = invoker.output
|
|
||||||
path = "../${invoker.dir}"
|
|
||||||
filename = invoker.libname
|
|
||||||
script = "../tools/concatenate_patches.py"
|
|
||||||
args = [ "--output", rebase_path(output, root_build_dir)]
|
|
||||||
inputs = []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template("generate_patched_sdk") {
|
|
||||||
assert(defined(invoker.libraries), "Need libraries in $target_name")
|
|
||||||
|
|
||||||
concatenation_target_names = []
|
|
||||||
concatenation_files = []
|
|
||||||
|
|
||||||
# Concatenate vm library patches.
|
|
||||||
foreach(library, invoker.libraries) {
|
|
||||||
name = library[1]
|
|
||||||
|
|
||||||
target_output = "$target_gen_dir/patches/${name}_patch.dart"
|
|
||||||
concatenate_patch("concatenate_${name}_patch") {
|
|
||||||
libname = name
|
|
||||||
dir = library[0]
|
|
||||||
output = target_output
|
|
||||||
}
|
|
||||||
concatenation_target_names += [ ":concatenate_${name}_patch" ]
|
|
||||||
concatenation_files += [ target_output ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Build the patched sdk out of the concatenated patches and the special
|
|
||||||
# libraries.
|
|
||||||
action(target_name) {
|
|
||||||
deps = concatenation_target_names
|
|
||||||
|
|
||||||
patches_dir = "$target_gen_dir/patches"
|
|
||||||
patched_sdk_dir = "$target_gen_dir/patched_sdk"
|
|
||||||
|
|
||||||
script = "../../tools/patch_sdk.py"
|
|
||||||
|
|
||||||
# We list all files which make up the sdk (modulo patches) and get them back
|
|
||||||
# as a GN list object.
|
|
||||||
shared_sdk_sources = exec_script(
|
|
||||||
"../../tools/list_dart_files.py", ["../../sdk/lib"], "list lines")
|
|
||||||
|
|
||||||
# We list the `patch_sdk.dart` tool here because the [script] (which is
|
|
||||||
# implicitly an input) will call it.
|
|
||||||
inputs = [ "../../tools/patch_sdk.dart" ]
|
|
||||||
# Files below are not patches, they will not be in [concatenation_files] but
|
|
||||||
# the `patch_sdk.dart` script will copy them into the patched sdk.
|
|
||||||
inputs += [
|
|
||||||
"../lib/typed_data.dart",
|
|
||||||
"../bin/builtin.dart",
|
|
||||||
"../bin/vmservice/vmservice_io.dart",
|
|
||||||
"../bin/vmservice/loader.dart",
|
|
||||||
"../bin/vmservice/server.dart",
|
|
||||||
]
|
|
||||||
# Add all the normal sdk sources.
|
|
||||||
inputs += shared_sdk_sources
|
|
||||||
# Add all the concatenated patch files.
|
|
||||||
inputs += concatenation_files
|
|
||||||
|
|
||||||
outputs = [
|
|
||||||
# Instead of listing all outputs we list a single well-known one.
|
|
||||||
"${patched_sdk_dir}/lib/core/core.dart",
|
|
||||||
]
|
|
||||||
|
|
||||||
args = [
|
|
||||||
"vm",
|
|
||||||
rebase_path("../../sdk"),
|
|
||||||
rebase_path(patches_dir, root_build_dir),
|
|
||||||
rebase_path(patched_sdk_dir, root_build_dir),
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
generate_patched_sdk("patched_sdk") {
|
|
||||||
libraries = [
|
|
||||||
["lib", "async"],
|
|
||||||
["lib", "collection"],
|
|
||||||
["lib", "convert"],
|
|
||||||
["lib", "core"],
|
|
||||||
["lib", "developer"],
|
|
||||||
["lib", "internal"],
|
|
||||||
["lib", "isolate"],
|
|
||||||
["lib", "math"],
|
|
||||||
["lib", "mirrors"],
|
|
||||||
["lib", "profiler"],
|
|
||||||
["lib", "vmservice"],
|
|
||||||
["bin", "io"],
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
|
@ -967,10 +967,6 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# Unlike the other libraries in the SDK, dart:typed_data is not
|
|
||||||
# implemented as a patch applied to the base SDK implementation.
|
|
||||||
# Instead the VM has a complete replacement library and the
|
|
||||||
# implementation in the SDK is ignored.
|
|
||||||
'target_name': 'generate_typed_data_cc_file',
|
'target_name': 'generate_typed_data_cc_file',
|
||||||
'type': 'none',
|
'type': 'none',
|
||||||
'toolsets':['host'],
|
'toolsets':['host'],
|
||||||
|
@ -1238,453 +1234,5 @@
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'target_name': 'generate_patched_sdk',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'dependencies': [
|
|
||||||
'generate_async_library_patch',
|
|
||||||
'generate_collection_library_patch',
|
|
||||||
'generate_convert_library_patch',
|
|
||||||
'generate_core_library_patch',
|
|
||||||
'generate_developer_library_patch',
|
|
||||||
'generate_internal_library_patch',
|
|
||||||
'generate_io_library_patch',
|
|
||||||
'generate_isolate_library_patch',
|
|
||||||
'generate_math_library_patch',
|
|
||||||
'generate_mirrors_library_patch',
|
|
||||||
'generate_profiler_library_patch',
|
|
||||||
'generate_vmservice_library_patch',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'patch_sdk',
|
|
||||||
'inputs': [
|
|
||||||
'<!@(["python", "../tools/list_files.py",' '"dart$",' '"sdk/lib"])',
|
|
||||||
'../../tools/patch_sdk.py',
|
|
||||||
'../../tools/patch_sdk.dart',
|
|
||||||
# Unlike the other libraries in the SDK, dart:typed_data is not
|
|
||||||
# implemented as a patch applied to the base SDK implementation.
|
|
||||||
# Instead the VM has a complete replacement library and the
|
|
||||||
# implementation in the SDK is ignored.
|
|
||||||
'../lib/typed_data.dart',
|
|
||||||
# Unlike the other libraries in the SDK, dart:_builtin and
|
|
||||||
# dart:nativewrappers are only available for the Dart VM.
|
|
||||||
'../bin/builtin.dart',
|
|
||||||
'../bin/vmservice/vmservice_io.dart',
|
|
||||||
'../bin/vmservice/loader.dart',
|
|
||||||
'../bin/vmservice/server.dart',
|
|
||||||
'<(gen_source_dir)/patches/async_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/collection_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/convert_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/core_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/developer_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/internal_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/io_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/isolate_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/math_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/mirrors_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/profiler_patch.dart',
|
|
||||||
'<(gen_source_dir)/patches/vmservice_patch.dart',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
# Instead of listing all outputs we list a single well-known one.
|
|
||||||
'<(gen_source_dir)/patched_sdk/lib/core/core.dart',
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'../tools/patch_sdk.py',
|
|
||||||
'vm',
|
|
||||||
'../sdk',
|
|
||||||
'<(gen_source_dir)/patches',
|
|
||||||
'<(gen_source_dir)/patched_sdk',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'async',
|
|
||||||
'library_uri': 'dart:async',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/async_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'collection',
|
|
||||||
'library_uri': 'dart:collection',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/collection_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'convert',
|
|
||||||
'library_uri': 'dart:convert',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/convert_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'core',
|
|
||||||
'library_uri': 'dart:core',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/core_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'developer',
|
|
||||||
'library_uri': 'dart:developer',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/developer_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'internal',
|
|
||||||
'library_uri': 'dart:_internal',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/internal_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'io',
|
|
||||||
'library_uri': 'dart:io',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../bin/io_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'isolate',
|
|
||||||
'library_uri': 'dart:isolate',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/isolate_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'math',
|
|
||||||
'library_uri': 'dart:math',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/math_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'mirrors',
|
|
||||||
'library_uri': 'dart:mirrors',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/mirrors_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'profiler',
|
|
||||||
'library_uri': 'dart:profiler',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/profiler_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'variables': {
|
|
||||||
'library_name': 'vmservice',
|
|
||||||
'library_uri': 'dart:_vmservice',
|
|
||||||
},
|
|
||||||
'target_name': 'generate_<(library_name)_library_patch',
|
|
||||||
'type': 'none',
|
|
||||||
'toolsets': ['host'],
|
|
||||||
'includes': [
|
|
||||||
'../lib/vmservice_sources.gypi',
|
|
||||||
],
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'concatenate_<(library_name)_patches',
|
|
||||||
'inputs': [
|
|
||||||
'../tools/concatenate_patches.py',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
|
||||||
],
|
|
||||||
'action': [
|
|
||||||
'python',
|
|
||||||
'tools/concatenate_patches.py',
|
|
||||||
'--output',
|
|
||||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
|
||||||
'<@(_sources)',
|
|
||||||
],
|
|
||||||
'message': 'Generating <(library_uri) patch.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,31 +4,9 @@
|
||||||
|
|
||||||
library nativewrappers;
|
library nativewrappers;
|
||||||
|
|
||||||
class NativeFieldWrapperClass1 {
|
|
||||||
NativeFieldWrapperClass1() {
|
|
||||||
throw new UnsupportedError(
|
|
||||||
"Generative constructors not supported on native types.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class NativeFieldWrapperClass2 {
|
class NativeFieldWrapperClass2 {
|
||||||
NativeFieldWrapperClass2() {
|
NativeFieldWrapperClass2() {
|
||||||
throw new UnsupportedError(
|
throw new UnsupportedError(
|
||||||
"Generative constructors not supported on native types.");
|
"Generative constructors not supported on native types.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class NativeFieldWrapperClass3 {
|
|
||||||
NativeFieldWrapperClass3() {
|
|
||||||
throw new UnsupportedError(
|
|
||||||
"Generative constructors not supported on native types.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class NativeFieldWrapperClass4 {
|
|
||||||
NativeFieldWrapperClass4() {
|
|
||||||
throw new UnsupportedError(
|
|
||||||
"Generative constructors not supported on native types.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,645 +0,0 @@
|
||||||
# Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
# Disable tests globally for kernel.
|
|
||||||
[ $compiler == rasta || $compiler == rastap || $compiler == dartk || $compiler == dartkp ]
|
|
||||||
Language/Metadata/*: Skip # No support for metadata ATM.
|
|
||||||
LibTest/async/DeferredLibrary/DeferredLibrary_A01_t01: Skip # No support for deferred libraries.
|
|
||||||
LibTest/isolate/*: Skip # No support for isolates ATM.
|
|
||||||
|
|
||||||
# Override tests marked as failing elsewhere.
|
|
||||||
[ $compiler == dartk || $compiler == dartkp ]
|
|
||||||
Language/Libraries_and_Scripts/Exports/reexport_t01: Pass
|
|
||||||
|
|
||||||
# Disable tests known to use await/async syntax if we don't run the
|
|
||||||
# transformer.
|
|
||||||
[ $kernel_transformers != continuation ]
|
|
||||||
Language/Expressions/Await_Expressions/*: Skip
|
|
||||||
Language/Expressions/Function_Invocation/async_*: Skip
|
|
||||||
Language/Expressions/Function_Invocation/sync_generator_*: Skip
|
|
||||||
Language/Expressions/Identifier_Reference/async_*: Skip
|
|
||||||
Language/Statements/Break/async_*: Skip
|
|
||||||
Language/Statements/Continue/async_*: Skip
|
|
||||||
Language/Statements/For/Asynchronous_For_in/*: Skip
|
|
||||||
Language/Statements/Return/generator_*: Skip
|
|
||||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/*: Skip
|
|
||||||
Language/Statements/Yield_and_Yield_Each/Yield/*: Skip
|
|
||||||
|
|
||||||
# Our buildbot is currently running dartk tests without
|
|
||||||
# `$kernel_transformers == continuation` because the await/async transformer
|
|
||||||
# creates new classes defined in patch files and dartk doesn't handle patch
|
|
||||||
# files yet.
|
|
||||||
|
|
||||||
# dartk: JIT failures
|
|
||||||
[ $compiler == dartk && $runtime == vm ]
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: RuntimeError
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t01: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t03: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t04: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t05: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t06: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/initializing_formals_execution_t02: RuntimeError
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/initializing_this_t02: Crash
|
|
||||||
Language/Classes/Getters/static_getter_t02: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t08: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t09: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t10: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t11: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t12: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t13: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t14: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t15: CompileTimeError
|
|
||||||
Language/Classes/definition_t23: CompileTimeError
|
|
||||||
Language/Enums/declaration_equivalent_t01: RuntimeError
|
|
||||||
Language/Enums/syntax_t08: MissingCompileTimeError
|
|
||||||
Language/Enums/syntax_t09: MissingCompileTimeError
|
|
||||||
Language/Expressions/Assignment/indexed_expression_super_t01: RuntimeError
|
|
||||||
Language/Expressions/Assignment/indexed_expression_super_t02: RuntimeError
|
|
||||||
Language/Expressions/Assignment/indexed_expression_super_t04: RuntimeError
|
|
||||||
Language/Expressions/Assignment/super_assignment_failed_t01: RuntimeError
|
|
||||||
Language/Expressions/Assignment/super_assignment_failed_t02: RuntimeError
|
|
||||||
Language/Expressions/Assignment/super_assignment_t06: RuntimeError
|
|
||||||
Language/Expressions/Assignment/super_assignment_value_t02: RuntimeError
|
|
||||||
Language/Expressions/Constants/exception_t01: MissingCompileTimeError
|
|
||||||
Language/Expressions/Constants/exception_t02: MissingCompileTimeError
|
|
||||||
Language/Expressions/Constants/string_length_t01: Crash
|
|
||||||
Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Expressions/Function_Invocation/Function_Expression_Invocation/not_a_function_expression_t01: RuntimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/function_expr_invocation_t03: RuntimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/function_expr_invocation_t04: RuntimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t03: MissingCompileTimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: MissingCompileTimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/static_method_invocation_t02: RuntimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_identifier_t35: Pass
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_identifier_t36: Pass
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_identifier_t37: Pass
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t14: Pass
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t17: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t18: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t21: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t22: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t23: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t24: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t25: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t26: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t27: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t28: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t29: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t30: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t31: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t32: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/evaluation_property_extraction_t03: RuntimeError
|
|
||||||
Language/Expressions/Identifier_Reference/evaluation_type_parameter_t01: RuntimeError
|
|
||||||
Language/Expressions/Identifier_Reference/evaluation_type_parameter_t02: MissingCompileTimeError
|
|
||||||
Language/Expressions/Instance_Creation/Const/canonicalized_t05: RuntimeError
|
|
||||||
Language/Expressions/Instance_Creation/New/evaluation_t12: RuntimeError
|
|
||||||
Language/Expressions/Instance_Creation/New/evaluation_t19: RuntimeError
|
|
||||||
Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError
|
|
||||||
Language/Expressions/Lookup/Method_Lookup/superclass_t08: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/accessible_instance_member_t05: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/evaluation_t07: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t18: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t10: MissingCompileTimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/evaluation_t05: Crash
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t01: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t02: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t03: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t04: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Expressions/Object_Identity/string_t01: RuntimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/named_parameters_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/positional_parameters_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/deferred_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t01: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t02: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t03: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t04: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t05: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t06: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t09: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t09: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/expression_evaluation_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Closurization/named_parameters_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Closurization/positional_parameters_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/deferred_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_access_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_assignment_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t09: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t10: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t11: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t12: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t13: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t14: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t15: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t16: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t17: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_unary_bitwise_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t01: RuntimeError
|
|
||||||
Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t02: RuntimeError
|
|
||||||
Language/Expressions/Spawning_an_Isolate/new_isolate_t01: Crash
|
|
||||||
Language/Expressions/Strings/adjacent_strings_t02: RuntimeError
|
|
||||||
Language/Expressions/Type_Test/evaluation_t10: RuntimeError
|
|
||||||
Language/Functions/External_Functions/not_connected_to_a_body_t01: RuntimeError
|
|
||||||
Language/Functions/Formal_Parameters/syntax_t04: MissingCompileTimeError
|
|
||||||
Language/Functions/Formal_Parameters/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Functions/Formal_Parameters/syntax_t12: MissingCompileTimeError
|
|
||||||
Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t01: CompileTimeError
|
|
||||||
Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t02: CompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Exports/invalid_uri_t02: Pass
|
|
||||||
Language/Libraries_and_Scripts/Exports/syntax_t01: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Exports/syntax_t04: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Exports/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Exports/syntax_t06: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Imports/deferred_import_t01: RuntimeError
|
|
||||||
Language/Libraries_and_Scripts/Imports/deferred_import_t02: RuntimeError
|
|
||||||
Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: CompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Imports/invalid_uri_t02: Pass
|
|
||||||
Language/Libraries_and_Scripts/Imports/static_type_t01: RuntimeError
|
|
||||||
Language/Libraries_and_Scripts/Parts/compilation_t02: Crash
|
|
||||||
Language/Libraries_and_Scripts/Parts/syntax_t06: Pass
|
|
||||||
Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Crash
|
|
||||||
Language/Libraries_and_Scripts/Scripts/top_level_main_t02: Crash
|
|
||||||
Language/Libraries_and_Scripts/Scripts/top_level_main_t05: Crash
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t01: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t03: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t04: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t06: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t07: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t08: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t09: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t10: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t15: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t17: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t18: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t19: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t20: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t21: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t22: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t23: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t24: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t25: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t26: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t27: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t29: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t02: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t03: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t04: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t06: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t07: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t08: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t09: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t10: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t11: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t12: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t13: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t14: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t15: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t16: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t17: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t18: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t19: MissingCompileTimeError
|
|
||||||
Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError
|
|
||||||
Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError
|
|
||||||
Language/Mixins/Mixin_Application/syntax_t16: Crash
|
|
||||||
Language/Statements/Break/label_t03: MissingCompileTimeError
|
|
||||||
Language/Statements/Break/label_t04: MissingCompileTimeError
|
|
||||||
Language/Statements/Continue/label_t07: MissingCompileTimeError
|
|
||||||
Language/Statements/Labels/syntax_t03: Pass
|
|
||||||
Language/Statements/Rethrow/execution_t04: RuntimeError
|
|
||||||
Language/Statements/Switch/syntax_t02: Pass
|
|
||||||
Language/Statements/Try/catch_scope_t01: RuntimeError
|
|
||||||
Language/Types/Interface_Types/subtype_t44: RuntimeError
|
|
||||||
Language/Types/Static_Types/deferred_type_t01: RuntimeError
|
|
||||||
Language/Variables/final_or_static_initialization_t01: MissingCompileTimeError
|
|
||||||
Language/Variables/final_or_static_initialization_t02: MissingCompileTimeError
|
|
||||||
Language/Variables/final_or_static_initialization_t03: MissingCompileTimeError
|
|
||||||
Language/Variables/final_t04: MissingCompileTimeError
|
|
||||||
Language/Variables/final_t05: MissingCompileTimeError
|
|
||||||
Language/Variables/final_t06: MissingCompileTimeError
|
|
||||||
Language/Variables/final_t07: MissingCompileTimeError
|
|
||||||
LibTest/core/Invocation/isAccessor_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/isAccessor_A01_t02: RuntimeError
|
|
||||||
LibTest/core/Invocation/isGetter_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/isGetter_A01_t02: RuntimeError
|
|
||||||
LibTest/core/Invocation/isMethod_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/isMethod_A01_t02: RuntimeError
|
|
||||||
LibTest/core/Invocation/isSetter_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/isSetter_A01_t02: RuntimeError
|
|
||||||
LibTest/core/Invocation/memberName_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/namedArguments_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/positionalArguments_A01_t01: RuntimeError
|
|
||||||
|
|
||||||
# dartk: precompilation failures
|
|
||||||
[ $compiler == dartkp && $runtime == dart_precompiled ]
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: RuntimeError
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t01: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t03: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t04: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t05: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/formal_parameter_t06: Crash
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/initializing_formals_execution_t02: RuntimeError
|
|
||||||
Language/Classes/Constructors/Generative_Constructors/initializing_this_t02: Crash
|
|
||||||
Language/Classes/Getters/static_getter_t02: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t08: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t09: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t10: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t11: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t12: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t13: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t14: CompileTimeError
|
|
||||||
Language/Classes/Setters/name_t15: CompileTimeError
|
|
||||||
Language/Classes/definition_t23: CompileTimeError
|
|
||||||
Language/Enums/declaration_equivalent_t01: RuntimeError
|
|
||||||
Language/Enums/syntax_t08: MissingCompileTimeError
|
|
||||||
Language/Enums/syntax_t09: MissingCompileTimeError
|
|
||||||
Language/Expressions/Assignment/indexed_expression_super_t01: RuntimeError
|
|
||||||
Language/Expressions/Assignment/indexed_expression_super_t02: RuntimeError
|
|
||||||
Language/Expressions/Assignment/indexed_expression_super_t04: RuntimeError
|
|
||||||
Language/Expressions/Assignment/super_assignment_failed_t01: RuntimeError
|
|
||||||
Language/Expressions/Assignment/super_assignment_failed_t02: RuntimeError
|
|
||||||
Language/Expressions/Assignment/super_assignment_t06: RuntimeError
|
|
||||||
Language/Expressions/Assignment/super_assignment_value_t02: RuntimeError
|
|
||||||
Language/Expressions/Constants/exception_t01: Crash
|
|
||||||
Language/Expressions/Constants/exception_t02: Crash
|
|
||||||
Language/Expressions/Constants/string_length_t01: Crash
|
|
||||||
Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Expressions/Function_Invocation/Function_Expression_Invocation/not_a_function_expression_t01: Crash
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/function_expr_invocation_t03: RuntimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/function_expr_invocation_t04: RuntimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t03: MissingCompileTimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: MissingCompileTimeError
|
|
||||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/static_method_invocation_t02: RuntimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_identifier_t35: Pass
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_identifier_t36: Pass
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_identifier_t37: Pass
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t14: Pass
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t17: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t18: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t21: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t22: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t23: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t24: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t25: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t26: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t27: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t28: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t29: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t30: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t31: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t32: MissingCompileTimeError
|
|
||||||
Language/Expressions/Identifier_Reference/evaluation_property_extraction_t03: RuntimeError
|
|
||||||
Language/Expressions/Identifier_Reference/evaluation_type_parameter_t01: RuntimeError
|
|
||||||
Language/Expressions/Instance_Creation/New/evaluation_t12: RuntimeError
|
|
||||||
Language/Expressions/Instance_Creation/New/evaluation_t19: RuntimeError
|
|
||||||
Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError
|
|
||||||
Language/Expressions/Lookup/Method_Lookup/superclass_t08: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/accessible_instance_member_t05: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/evaluation_t07: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t18: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t10: MissingCompileTimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/evaluation_t05: Crash
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t01: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t02: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t03: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t04: RuntimeError
|
|
||||||
Language/Expressions/Method_Invocation/Super_Invocation/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Expressions/Multiplicative_Expressions/syntax_t01: Crash
|
|
||||||
Language/Expressions/Null/instance_of_class_null_t01: Crash
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/identical_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/named_parameters_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Closurization/positional_parameters_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/closurization_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/deferred_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malbounded_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/malformed_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/no_such_method_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/not_class_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Anonymous_Constructor_Extraction/static_type_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t01: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t02: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t03: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t04: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t05: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/class_object_member_t06: Pass
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/expression_evaluation_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/getter_lookup_t09: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/method_lookup_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/no_accessible_member_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/setter_lookup_t09: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/General_Closurization/static_type_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/expression_evaluation_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Closurization/identical_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Closurization/named_parameters_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Closurization/positional_parameters_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/deferred_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malbounded_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/malformed_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/no_such_method_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/not_class_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Named_Constructor_Extraction/static_type_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/getter_closurization_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_named_params_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_closurization_positional_params_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/method_identical_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_access_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_list_assignment_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t09: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t10: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t11: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t12: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t13: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t14: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t15: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t16: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_t17: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/operator_closurization_unary_bitwise_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t01: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t02: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t03: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t04: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t05: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t06: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t07: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Ordinary_Member_Closurization/setter_closurization_t08: CompileTimeError
|
|
||||||
Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t01: RuntimeError
|
|
||||||
Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t02: RuntimeError
|
|
||||||
Language/Expressions/Type_Test/evaluation_t10: RuntimeError
|
|
||||||
Language/Expressions/Unary_Expressions/syntax_t10: Crash
|
|
||||||
Language/Functions/External_Functions/not_connected_to_a_body_t01: RuntimeError
|
|
||||||
Language/Functions/Formal_Parameters/syntax_t04: MissingCompileTimeError
|
|
||||||
Language/Functions/Formal_Parameters/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Functions/Formal_Parameters/syntax_t12: MissingCompileTimeError
|
|
||||||
Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t01: CompileTimeError
|
|
||||||
Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t02: CompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Exports/invalid_uri_t02: Pass
|
|
||||||
Language/Libraries_and_Scripts/Exports/syntax_t01: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Exports/syntax_t04: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Exports/syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Exports/syntax_t06: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Imports/deferred_import_t01: RuntimeError
|
|
||||||
Language/Libraries_and_Scripts/Imports/deferred_import_t02: RuntimeError
|
|
||||||
Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: CompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/Imports/invalid_uri_t02: Pass
|
|
||||||
Language/Libraries_and_Scripts/Imports/static_type_t01: RuntimeError
|
|
||||||
Language/Libraries_and_Scripts/Parts/compilation_t02: Crash
|
|
||||||
Language/Libraries_and_Scripts/Parts/syntax_t06: Pass
|
|
||||||
Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Crash
|
|
||||||
Language/Libraries_and_Scripts/Scripts/top_level_main_t02: Crash
|
|
||||||
Language/Libraries_and_Scripts/Scripts/top_level_main_t05: Crash
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t01: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t03: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t04: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t06: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t07: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t08: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t09: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t10: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t15: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t17: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t18: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t19: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t20: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t21: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t22: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t23: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t24: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t25: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t26: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t27: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/definition_syntax_t29: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t02: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t03: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t04: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t05: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t06: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t07: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t08: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t09: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t10: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t11: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t12: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t13: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t14: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t15: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t16: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t17: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t18: MissingCompileTimeError
|
|
||||||
Language/Libraries_and_Scripts/top_level_syntax_t19: MissingCompileTimeError
|
|
||||||
Language/Statements/Break/label_t03: MissingCompileTimeError
|
|
||||||
Language/Statements/Break/label_t04: MissingCompileTimeError
|
|
||||||
Language/Statements/Continue/label_t07: MissingCompileTimeError
|
|
||||||
Language/Statements/Labels/syntax_t03: Pass
|
|
||||||
Language/Statements/Rethrow/execution_t04: RuntimeError
|
|
||||||
Language/Statements/Switch/syntax_t02: Pass
|
|
||||||
Language/Statements/Try/catch_scope_t01: RuntimeError
|
|
||||||
Language/Types/Interface_Types/subtype_t44: RuntimeError
|
|
||||||
Language/Types/Static_Types/deferred_type_t01: RuntimeError
|
|
||||||
Language/Variables/final_or_static_initialization_t01: MissingCompileTimeError
|
|
||||||
Language/Variables/final_or_static_initialization_t02: MissingCompileTimeError
|
|
||||||
Language/Variables/final_or_static_initialization_t03: MissingCompileTimeError
|
|
||||||
Language/Variables/final_t04: MissingCompileTimeError
|
|
||||||
Language/Variables/final_t05: MissingCompileTimeError
|
|
||||||
Language/Variables/final_t06: MissingCompileTimeError
|
|
||||||
Language/Variables/final_t07: MissingCompileTimeError
|
|
||||||
LibTest/core/Invocation/isAccessor_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/isAccessor_A01_t02: Crash
|
|
||||||
LibTest/core/Invocation/isGetter_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/isGetter_A01_t02: Crash
|
|
||||||
LibTest/core/Invocation/isMethod_A01_t01: Crash
|
|
||||||
LibTest/core/Invocation/isMethod_A01_t02: RuntimeError
|
|
||||||
LibTest/core/Invocation/isSetter_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/isSetter_A01_t02: Crash
|
|
||||||
LibTest/core/Invocation/memberName_A01_t01: RuntimeError
|
|
||||||
LibTest/core/Invocation/namedArguments_A01_t01: Crash
|
|
||||||
LibTest/core/Invocation/positionalArguments_A01_t01: Crash
|
|
|
@ -1,9 +0,0 @@
|
||||||
# Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
unsorted/invocation_errors_test: RuntimeError
|
|
||||||
|
|
||||||
[ $compiler == dartk && $runtime == vm ]
|
|
||||||
|
|
||||||
[ $compiler == dartkp && $runtime == dart_precompiled ]
|
|
|
@ -1,28 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of class literals, is, and as expressions.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class C {}
|
|
||||||
|
|
||||||
class D extends C {}
|
|
||||||
|
|
||||||
test0() => C;
|
|
||||||
test1() => D;
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var c = new C();
|
|
||||||
var d = new D();
|
|
||||||
Expect.isTrue(test0() == C);
|
|
||||||
Expect.isTrue(test1() == D);
|
|
||||||
Expect.isTrue(c is C);
|
|
||||||
Expect.isTrue(c is! D);
|
|
||||||
Expect.isTrue(d is C);
|
|
||||||
Expect.isTrue(d is D);
|
|
||||||
Expect.isTrue(c as C == c);
|
|
||||||
Expect.isTrue(d as C == d);
|
|
||||||
Expect.isTrue(d as D == d);
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of block scoping.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
bool oracle() => true;
|
|
||||||
|
|
||||||
test0() {
|
|
||||||
var x = 'outer', y = x;
|
|
||||||
Expect.isTrue(x == 'outer');
|
|
||||||
Expect.isTrue(y == 'outer');
|
|
||||||
{ var x = 'inner';
|
|
||||||
Expect.isTrue(x == 'inner');
|
|
||||||
Expect.isTrue(y == 'outer');
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 'outer');
|
|
||||||
Expect.isTrue(y == 'outer');
|
|
||||||
|
|
||||||
if (oracle()) {
|
|
||||||
var y = 'inner';
|
|
||||||
Expect.isTrue(x == 'outer');
|
|
||||||
Expect.isTrue(y == 'inner');
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 'outer');
|
|
||||||
Expect.isTrue(y == 'outer');
|
|
||||||
}
|
|
||||||
|
|
||||||
var x = 'toplevel';
|
|
||||||
|
|
||||||
test1() {
|
|
||||||
var y = 'outer';
|
|
||||||
Expect.isTrue(x == 'toplevel');
|
|
||||||
Expect.isTrue(y == 'outer');
|
|
||||||
{ var x = 'inner';
|
|
||||||
Expect.isTrue(x == 'inner');
|
|
||||||
Expect.isTrue(y == 'outer');
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 'toplevel');
|
|
||||||
Expect.isTrue(y == 'outer');
|
|
||||||
|
|
||||||
if (oracle()) {
|
|
||||||
var y = 'inner';
|
|
||||||
Expect.isTrue(x == 'toplevel');
|
|
||||||
Expect.isTrue(y == 'inner');
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 'toplevel');
|
|
||||||
Expect.isTrue(y == 'outer');
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
test0();
|
|
||||||
test1();
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
testFor() {
|
|
||||||
int current;
|
|
||||||
for (int i = 0; i < 100; i++) {
|
|
||||||
current = i;
|
|
||||||
if (i > 41) break;
|
|
||||||
}
|
|
||||||
Expect.isTrue(current == 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
testWhile() {
|
|
||||||
int i = 0;
|
|
||||||
while (i < 100) {
|
|
||||||
if (++i > 41) break;
|
|
||||||
}
|
|
||||||
Expect.isTrue(i == 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
testDoWhile() {
|
|
||||||
int i = 0;
|
|
||||||
do {
|
|
||||||
if (++i > 41) break;
|
|
||||||
} while (i < 100);
|
|
||||||
Expect.isTrue(i == 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
testLabledBreakOutermost() {
|
|
||||||
int i = 0;
|
|
||||||
outer: {
|
|
||||||
middle: {
|
|
||||||
while (i < 100) {
|
|
||||||
if (++i > 41) break outer;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(i == 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
testLabledBreakMiddle() {
|
|
||||||
int i = 0;
|
|
||||||
outer: {
|
|
||||||
middle: {
|
|
||||||
while (i < 100) {
|
|
||||||
if (++i > 41) break middle;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(i == 43);
|
|
||||||
}
|
|
||||||
|
|
||||||
testLabledBreakInner() {
|
|
||||||
int i = 0;
|
|
||||||
outer: {
|
|
||||||
middle: {
|
|
||||||
while (i < 100) {
|
|
||||||
if (++i > 41) break;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(i == 44);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
testFor();
|
|
||||||
testWhile();
|
|
||||||
testDoWhile();
|
|
||||||
testLabledBreakOutermost();
|
|
||||||
testLabledBreakMiddle();
|
|
||||||
testLabledBreakInner();
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
f(fun) => fun();
|
|
||||||
class A {
|
|
||||||
identity(arg) {
|
|
||||||
return f(() {
|
|
||||||
print(this);
|
|
||||||
return f(() {
|
|
||||||
return this;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var a = new A();
|
|
||||||
Expect.isTrue(identical(a.identity(42), a));
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class Base {
|
|
||||||
int constant1000() => 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Foo extends Base {
|
|
||||||
final int base;
|
|
||||||
Foo(this.base);
|
|
||||||
|
|
||||||
nestedAdderFunction(a, b, c, d, e) {
|
|
||||||
var result = a + b;
|
|
||||||
return () {
|
|
||||||
var result2 = c + d;
|
|
||||||
return () {
|
|
||||||
return base + result + result2 + e;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
nestedAdderFunction2(a, b, c, d, e) {
|
|
||||||
var result = a + b;
|
|
||||||
return () {
|
|
||||||
var base = super.constant1000;
|
|
||||||
var result2 = c + d;
|
|
||||||
return () {
|
|
||||||
return base() + result + result2 + e;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nestedAdderFunction(a, b, c, d, e) {
|
|
||||||
var result = a + b;
|
|
||||||
return () {
|
|
||||||
var result2 = c + d;
|
|
||||||
return () {
|
|
||||||
return result + result2 + e;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(nestedAdderFunction(1, 2, 3, 4, 5)()() == 15);
|
|
||||||
|
|
||||||
var foo = new Foo(100);
|
|
||||||
Expect.isTrue(foo.nestedAdderFunction(1, 2, 3, 4, 5)()() == 115);
|
|
||||||
Expect.isTrue(foo.nestedAdderFunction2(1, 2, 3, 4, 5)()() == 1015);
|
|
||||||
|
|
||||||
var funs = [];
|
|
||||||
for (int i = 0; i < 3; i++) {
|
|
||||||
funs.add(() => i);
|
|
||||||
}
|
|
||||||
Expect.isTrue((funs[0]() + funs[1]() + funs[2]()) == 3);
|
|
||||||
|
|
||||||
var funs2 = [];
|
|
||||||
for (var i in [0, 1, 2]) {
|
|
||||||
funs2.add(() => i);
|
|
||||||
}
|
|
||||||
Expect.isTrue((funs2[0]() + funs2[1]() + funs2[2]()) == 3);
|
|
||||||
}
|
|
|
@ -1,142 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of conditional expressions and statements and negation.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
mkTrue() => true;
|
|
||||||
mkFalse() => false;
|
|
||||||
|
|
||||||
check(b) {
|
|
||||||
Expect.isTrue(b);
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
// Check that ?: gets the right answer.
|
|
||||||
Expect.isTrue((mkTrue() ? 0 : 1) == 0);
|
|
||||||
Expect.isTrue((mkFalse() ? 0 : 1) == 1);
|
|
||||||
// Check that it doesn't evaluate all subexpressions.
|
|
||||||
mkTrue() ? Expect.isTrue(true) : Expect.isTrue(false);
|
|
||||||
mkFalse() ? Expect.isTrue(false) : Expect.isTrue(true);
|
|
||||||
|
|
||||||
// Check that && and || get the right answers.
|
|
||||||
Expect.isTrue(mkTrue() && mkTrue());
|
|
||||||
Expect.isTrue(!(mkTrue() && mkFalse()));
|
|
||||||
Expect.isTrue(!(mkFalse() && mkTrue()));
|
|
||||||
Expect.isTrue(!(mkFalse() && mkFalse()));
|
|
||||||
Expect.isTrue(mkTrue() || mkTrue());
|
|
||||||
Expect.isTrue(mkTrue() || mkFalse());
|
|
||||||
Expect.isTrue(mkFalse() || mkTrue());
|
|
||||||
Expect.isTrue(!(mkFalse() || mkFalse()));
|
|
||||||
|
|
||||||
// Check that they don't evaluate both subexpressions.
|
|
||||||
mkTrue() && check(true);
|
|
||||||
mkFalse() && check(false);
|
|
||||||
mkTrue() || check(true);
|
|
||||||
mkFalse() || check(true);
|
|
||||||
|
|
||||||
// Check that if works.
|
|
||||||
if (mkTrue()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
if (mkFalse()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
if (!mkTrue()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
if (!mkFalse()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check that ?:, &&, and || work for control flow.
|
|
||||||
if (mkTrue() ? mkTrue() : mkFalse()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
if (mkTrue() ? mkFalse() : mkTrue()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
if (mkFalse() ? mkTrue() : mkFalse()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
if (mkFalse() ? mkFalse() : mkTrue()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
if (mkTrue() && mkTrue()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
if (mkTrue() && mkFalse()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
if (mkFalse() && mkTrue()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
if (mkFalse() && mkFalse()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
if (mkTrue() || mkTrue()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
if (mkTrue() || mkFalse()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
if (mkFalse() || mkTrue()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
if (mkFalse() || mkFalse()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} else {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test empty else branches.
|
|
||||||
if (mkTrue()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
if (mkFalse()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
var x = 0;
|
|
||||||
if (mkTrue()) {
|
|
||||||
x = 1;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 1);
|
|
||||||
if (mkFalse()) {
|
|
||||||
x = 2;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 1);
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
const X = const bool.fromEnvironment('foobar');
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(X == false);
|
|
||||||
}
|
|
|
@ -1,100 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
const int42 = 40 + 2;
|
|
||||||
const stringAB = 'a' + 'b';
|
|
||||||
const stringAB2 = 'a' + 'b';
|
|
||||||
const list123 = const [1, 2, 3];
|
|
||||||
const mapABC = const {'a' : 'b', 'b': 'c'};
|
|
||||||
|
|
||||||
const boxInt42 = const Box(int42);
|
|
||||||
const boxStringAB = const Box(stringAB);
|
|
||||||
|
|
||||||
class Box {
|
|
||||||
final value;
|
|
||||||
const Box(this.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
returnPositional([a = const Box('posi' + 'tional')]) => a;
|
|
||||||
|
|
||||||
returnNamed({a: const Box('nam' + 'ed')}) => a;
|
|
||||||
|
|
||||||
returnSwitchCasedValue(value) {
|
|
||||||
switch (value) {
|
|
||||||
case const Box(42): return 42;
|
|
||||||
case const Box('abc'): return 'abc';
|
|
||||||
case const Box(const Box('abc')): return const Box('abc');
|
|
||||||
default: return 'default';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testConstantExpressions() {
|
|
||||||
Expect.isTrue(identical(const Box(40 + 2), const Box(40 + 2)));
|
|
||||||
Expect.isTrue(identical(const Box('a' + 'b'), const Box('ab')));
|
|
||||||
Expect.isTrue(identical(const Box(const Box(40 + 2)),
|
|
||||||
const Box(const Box(42))));
|
|
||||||
Expect.isTrue(identical(const Box(const Box('a' + 'b')),
|
|
||||||
const Box(const Box('ab'))));
|
|
||||||
}
|
|
||||||
|
|
||||||
testConstantFieldValues() {
|
|
||||||
Expect.isTrue(identical(42, int42));
|
|
||||||
Expect.isTrue(identical(stringAB, stringAB2));
|
|
||||||
Expect.isTrue(identical(const Box(42), boxInt42));
|
|
||||||
Expect.isTrue(identical(const Box('ab'), boxStringAB));
|
|
||||||
}
|
|
||||||
|
|
||||||
testConstantFunctionParameters() {
|
|
||||||
Expect.isTrue(identical(const Box('positional'), returnPositional()));
|
|
||||||
Expect.isTrue(identical(const Box('named'), returnNamed()));
|
|
||||||
Expect.isTrue(identical(const Box('abc'),
|
|
||||||
returnPositional(const Box('abc'))));
|
|
||||||
Expect.isTrue(identical(const Box('def'),
|
|
||||||
returnNamed(a: const Box('def'))));
|
|
||||||
}
|
|
||||||
|
|
||||||
testConstantSwitchExpressions() {
|
|
||||||
Expect.isTrue(returnSwitchCasedValue(const Box(42)) == 42);
|
|
||||||
Expect.isTrue(returnSwitchCasedValue(const Box('abc')) == 'abc');
|
|
||||||
Expect.isTrue(returnSwitchCasedValue(const Box(const Box('abc')))
|
|
||||||
== const Box('abc'));
|
|
||||||
Expect.isTrue(returnSwitchCasedValue(const Box('go-to-default'))
|
|
||||||
== 'default');
|
|
||||||
}
|
|
||||||
|
|
||||||
testConstantLocalVariables() {
|
|
||||||
const a = 'a';
|
|
||||||
const b = a + 'b';
|
|
||||||
const c = b + 'c';
|
|
||||||
const box = const Box(c);
|
|
||||||
Expect.isTrue(identical(const Box('abc'), box));
|
|
||||||
}
|
|
||||||
|
|
||||||
testComplextConstLiterals() {
|
|
||||||
Expect.isTrue(identical(const [1, 2, 3], const [1, 2, 3]));
|
|
||||||
Expect.isTrue(identical(const [1, 2, 3], list123));
|
|
||||||
Expect.isTrue(identical(const {'a': 'b', 'b': 'c'}, const {'a': 'b', 'b': 'c'}));
|
|
||||||
Expect.isTrue(identical(const {'a': 'b', 'b': 'c'}, mapABC));
|
|
||||||
|
|
||||||
Expect.isTrue(mapABC['a'] == 'b');
|
|
||||||
Expect.isTrue(mapABC['b'] == 'c');
|
|
||||||
Expect.isTrue(mapABC.length == 2);
|
|
||||||
|
|
||||||
Expect.isTrue(list123[0] == 1);
|
|
||||||
Expect.isTrue(list123[1] == 2);
|
|
||||||
Expect.isTrue(list123[2] == 3);
|
|
||||||
Expect.isTrue(list123.length == 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
testConstantExpressions();
|
|
||||||
testConstantFieldValues();
|
|
||||||
testConstantFunctionParameters();
|
|
||||||
testConstantSwitchExpressions();
|
|
||||||
testComplextConstLiterals();
|
|
||||||
testConstantExpressions();
|
|
||||||
testConstantLocalVariables();
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'dart:io' as io;
|
|
||||||
|
|
||||||
// We use this class until we support more language features to use
|
|
||||||
// `package:expect`.
|
|
||||||
class Expect {
|
|
||||||
static void isTrue(bool condition) {
|
|
||||||
if (!condition) {
|
|
||||||
print("Expect.isTrue(cond) failed. io.exit(1)ing");
|
|
||||||
io.exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'dart:typed_data';
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
var list = [1, 2, 3];
|
|
||||||
|
|
||||||
class Foo {
|
|
||||||
final value;
|
|
||||||
Foo(this.value) {}
|
|
||||||
|
|
||||||
factory Foo.fac(value) {
|
|
||||||
return new Foo(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(new Uint8List.fromList(list)[1] == 2);
|
|
||||||
Expect.isTrue(new Foo.fac(10).value == 10);
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class A {
|
|
||||||
Function fun;
|
|
||||||
A(this.fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
globalFunctionPositional(int a, [int b = 42]) => a + b;
|
|
||||||
|
|
||||||
globalFunctionNamed(int a, {int b: 42}) => a + b;
|
|
||||||
|
|
||||||
class Foo {
|
|
||||||
int base;
|
|
||||||
|
|
||||||
Foo(this.base);
|
|
||||||
|
|
||||||
methodFunctionPositional(int a, [int b = 42]) => base + a + b;
|
|
||||||
|
|
||||||
methodFunctionNamed(int a, {int b: 42}) => base + a + b;
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(new A(globalFunctionPositional).fun(1, 2) == 3);
|
|
||||||
Expect.isTrue(new A(globalFunctionPositional).fun(1) == 43);
|
|
||||||
Expect.isTrue(new A(globalFunctionNamed).fun(1, b: 2) == 3);
|
|
||||||
Expect.isTrue(new A(globalFunctionNamed).fun(1) == 43);
|
|
||||||
|
|
||||||
var foo = new Foo(100);
|
|
||||||
Expect.isTrue(new A(foo.methodFunctionPositional).fun(1, 2) == 103);
|
|
||||||
Expect.isTrue(new A(foo.methodFunctionPositional).fun(1) == 143);
|
|
||||||
Expect.isTrue(new A(foo.methodFunctionNamed).fun(1, b: 2) == 103);
|
|
||||||
Expect.isTrue(new A(foo.methodFunctionNamed).fun(1) == 143);
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
// Test that the context depth is correct in the presence of control flow,
|
|
||||||
// specifically branching and joining in the presence of break. The
|
|
||||||
// implementation uses the context depth after the else block of an if/then/else
|
|
||||||
// as the context depth at the join point. This test has an extra context
|
|
||||||
// allocated in the (untaken) else branch so it tests that compiling the
|
|
||||||
// (untaken) break properly tracks the context depth.
|
|
||||||
|
|
||||||
test(list) {
|
|
||||||
// The loops force creation of a new context, otherwise context allocated
|
|
||||||
// variables might be hoisted to an outer context.
|
|
||||||
do {
|
|
||||||
if (list.length > 1) {
|
|
||||||
do {
|
|
||||||
var sum = 0;
|
|
||||||
addem() {
|
|
||||||
for (var x in list) sum += x;
|
|
||||||
}
|
|
||||||
addem();
|
|
||||||
Expect.isTrue(sum == 15);
|
|
||||||
L: if (sum != 15) {
|
|
||||||
// Unreachable.
|
|
||||||
do {
|
|
||||||
var product = 1;
|
|
||||||
multiplyem() {
|
|
||||||
for (var x in list) product *= n;
|
|
||||||
}
|
|
||||||
multiplyem();
|
|
||||||
Expect.isTrue(false);
|
|
||||||
break L;
|
|
||||||
} while (false);
|
|
||||||
}
|
|
||||||
} while (false);
|
|
||||||
}
|
|
||||||
} while (false);
|
|
||||||
Expect.isTrue(list.length == 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main() {
|
|
||||||
test([1, 2, 3, 4, 5]);
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of for-in loops and list literals.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
fact4() {
|
|
||||||
var f = 1;
|
|
||||||
for (var n in [1, 2, 3, 4]) {
|
|
||||||
f *= n;
|
|
||||||
}
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
fact5() {
|
|
||||||
var f = 1, n;
|
|
||||||
for (n in [1, 2, 3, 4, 5]) {
|
|
||||||
f *= n;
|
|
||||||
}
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
var global;
|
|
||||||
fact6() {
|
|
||||||
var f = 1;
|
|
||||||
for (global in [1, 2, 3, 4, 5, 6]) {
|
|
||||||
f *= global;
|
|
||||||
}
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(fact4() == 24);
|
|
||||||
Expect.isTrue(fact5() == 120);
|
|
||||||
Expect.isTrue(fact6() == 720);
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
var field;
|
|
||||||
|
|
||||||
get getField {
|
|
||||||
print('B.getField');
|
|
||||||
return field;
|
|
||||||
}
|
|
||||||
|
|
||||||
set setField(value) {
|
|
||||||
print('B.setField');
|
|
||||||
field = value;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var result;
|
|
||||||
|
|
||||||
result = (field = 42);
|
|
||||||
Expect.isTrue(result == 42);
|
|
||||||
Expect.isTrue(field == 42);
|
|
||||||
Expect.isTrue(getField == 42);
|
|
||||||
|
|
||||||
result = (setField = 99);
|
|
||||||
Expect.isTrue(result == 99);
|
|
||||||
Expect.isTrue(field == 99);
|
|
||||||
Expect.isTrue(getField == 99);
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
var intField = 1;
|
|
||||||
var doubleField = 3.1415;
|
|
||||||
var stringField = "hello";
|
|
||||||
var nullField = null;
|
|
||||||
var nullField2;
|
|
||||||
var composed = "hello" + " " + "world";
|
|
||||||
|
|
||||||
class A {
|
|
||||||
static var intField = 1;
|
|
||||||
static var doubleField = 3.1415;
|
|
||||||
static var stringField = "hello";
|
|
||||||
static var nullField = null;
|
|
||||||
static var nullField2;
|
|
||||||
static var composed = "hello" + " " + "world";
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(intField == 1);
|
|
||||||
Expect.isTrue(doubleField == 3.1415);
|
|
||||||
Expect.isTrue(stringField == "hello");
|
|
||||||
Expect.isTrue(nullField == null);
|
|
||||||
Expect.isTrue(nullField2 == null);
|
|
||||||
Expect.isTrue(composed == "hello world");
|
|
||||||
|
|
||||||
Expect.isTrue(A.intField == 1);
|
|
||||||
Expect.isTrue(A.doubleField == 3.1415);
|
|
||||||
Expect.isTrue(A.stringField == "hello");
|
|
||||||
Expect.isTrue(A.nullField == null);
|
|
||||||
Expect.isTrue(A.nullField2 == null);
|
|
||||||
Expect.isTrue(A.composed == "hello world");
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
main() {
|
|
||||||
foo(1, 2);
|
|
||||||
print('---');
|
|
||||||
foo(1, 2, d: 12);
|
|
||||||
print('---');
|
|
||||||
foo(1, 2, c: 11, e: 13);
|
|
||||||
|
|
||||||
print('=====');
|
|
||||||
|
|
||||||
bar(1, 2);
|
|
||||||
print('---');
|
|
||||||
bar(1, 2, 3);
|
|
||||||
print('---');
|
|
||||||
bar(1, 2, 3, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
foo(a, b, {c, d, e}) {
|
|
||||||
print(a);
|
|
||||||
print(b);
|
|
||||||
print(c);
|
|
||||||
print(d);
|
|
||||||
print(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
bar(a, b, [c, d]) {
|
|
||||||
print(a);
|
|
||||||
print(b);
|
|
||||||
print(c);
|
|
||||||
print(d);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class A {
|
|
||||||
var field;
|
|
||||||
|
|
||||||
get getField {
|
|
||||||
return field;
|
|
||||||
}
|
|
||||||
|
|
||||||
set setField(value) {
|
|
||||||
field = value;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var result;
|
|
||||||
var a = new A();
|
|
||||||
|
|
||||||
Expect.isTrue(a.field == null);
|
|
||||||
Expect.isTrue(a.getField == null);
|
|
||||||
|
|
||||||
result = (a.field = 42);
|
|
||||||
Expect.isTrue(result == 42);
|
|
||||||
Expect.isTrue(a.field == 42);
|
|
||||||
Expect.isTrue(a.getField == 42);
|
|
||||||
|
|
||||||
result = (a.setField = 99);
|
|
||||||
Expect.isTrue(result == 99);
|
|
||||||
Expect.isTrue(a.field == 99);
|
|
||||||
Expect.isTrue(a.getField == 99);
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Erroneous cases of invocations.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
test0(x) {
|
|
||||||
print('test0');
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
// Incorrect number of arguments, should be NoSuchMethodError but crashes.
|
|
||||||
test0(0, 1);
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of invocations.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
test0(x) {
|
|
||||||
Expect.isTrue(x == 'argument0');
|
|
||||||
return 'return0';
|
|
||||||
}
|
|
||||||
|
|
||||||
class C0 {
|
|
||||||
static test1(x) {
|
|
||||||
Expect.isTrue(x == 'argument1');
|
|
||||||
return 'return1';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class C1 {
|
|
||||||
test2(x) {
|
|
||||||
Expect.isTrue(x == 'argument2');
|
|
||||||
return 'return2';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class C2 {
|
|
||||||
C2.test3(x) {
|
|
||||||
Expect.isTrue(x == 'argument3');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(test0('argument0') == 'return0');
|
|
||||||
Expect.isTrue(C0.test1('argument1') == 'return1');
|
|
||||||
Expect.isTrue(new C1().test2('argument2') == 'return2');
|
|
||||||
var c = new C2.test3('argument3');
|
|
||||||
Expect.isTrue(c is C2);
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class A {
|
|
||||||
var intField = 1;
|
|
||||||
var doubleField = 3.1415;
|
|
||||||
var stringField = "hello";
|
|
||||||
var o;
|
|
||||||
|
|
||||||
A(this.o);
|
|
||||||
}
|
|
||||||
|
|
||||||
class B extends A {
|
|
||||||
var nullField = null;
|
|
||||||
var nullField2;
|
|
||||||
|
|
||||||
var n;
|
|
||||||
var m;
|
|
||||||
|
|
||||||
B(this.n, o) : super(o), m = "m";
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var o = new B("n", "o");
|
|
||||||
Expect.isTrue(o.intField == 1);
|
|
||||||
Expect.isTrue(o.doubleField == 3.1415);
|
|
||||||
Expect.isTrue(o.stringField == "hello");
|
|
||||||
Expect.isTrue(o.nullField == null);
|
|
||||||
Expect.isTrue(o.nullField2 == null);
|
|
||||||
Expect.isTrue(o.m == 'm');
|
|
||||||
Expect.isTrue(o.n == 'n');
|
|
||||||
Expect.isTrue(o.o == 'o');
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
class A {
|
|
||||||
A() {
|
|
||||||
print("A");
|
|
||||||
}
|
|
||||||
|
|
||||||
hello() {
|
|
||||||
print("A.hello()");
|
|
||||||
}
|
|
||||||
|
|
||||||
hello1(a) {
|
|
||||||
print("A.hello1()");
|
|
||||||
print(a);
|
|
||||||
}
|
|
||||||
|
|
||||||
foo(a, [b]) {
|
|
||||||
print("A.foo()");
|
|
||||||
print(a);
|
|
||||||
print(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
bar(a, {b}) {
|
|
||||||
print("A.bar()");
|
|
||||||
print(a);
|
|
||||||
print(b);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
print("before constructor");
|
|
||||||
var a = new A();
|
|
||||||
print("============");
|
|
||||||
a.hello();
|
|
||||||
print('-----(obj):');
|
|
||||||
print(a);
|
|
||||||
print('-----');
|
|
||||||
a.hello1(1);
|
|
||||||
print('-----');
|
|
||||||
a.foo(1);
|
|
||||||
print('-----');
|
|
||||||
a.foo(1, 2);
|
|
||||||
print('-----');
|
|
||||||
print("============");
|
|
||||||
a.bar(1);
|
|
||||||
print('-----');
|
|
||||||
a.bar(1, b: 2);
|
|
||||||
print("============");
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var a = [1];
|
|
||||||
Expect.isTrue((a..add(42))[1] == 42);
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of reading and writing to variables.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
test0() {
|
|
||||||
var x0 = 0, x1;
|
|
||||||
Expect.isTrue(x0 == 0);
|
|
||||||
Expect.isTrue(x1 == null);
|
|
||||||
x0 = 1;
|
|
||||||
Expect.isTrue(x0 == 1);
|
|
||||||
Expect.isTrue((x0 = 2) == 2);
|
|
||||||
Expect.isTrue(x0 == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
var x2 = 0, x3;
|
|
||||||
|
|
||||||
test1() {
|
|
||||||
Expect.isTrue(x2 == 0);
|
|
||||||
Expect.isTrue(x3 == null);
|
|
||||||
x2 = 1;
|
|
||||||
Expect.isTrue(x2 == 1);
|
|
||||||
Expect.isTrue((x2 = 2) == 2);
|
|
||||||
Expect.isTrue(x2 == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
class C {
|
|
||||||
static var x4 = 0;
|
|
||||||
static var x5;
|
|
||||||
}
|
|
||||||
|
|
||||||
test3() {
|
|
||||||
Expect.isTrue(C.x4 == 0);
|
|
||||||
Expect.isTrue(C.x5 == null);
|
|
||||||
C.x4 = 1;
|
|
||||||
Expect.isTrue(C.x4 == 1);
|
|
||||||
Expect.isTrue((C.x4 = 2) == 2);
|
|
||||||
Expect.isTrue(C.x4 == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
class D {
|
|
||||||
var x6 = 0;
|
|
||||||
var x7;
|
|
||||||
}
|
|
||||||
|
|
||||||
test4() {
|
|
||||||
var d = new D();
|
|
||||||
Expect.isTrue(d.x6 == 0);
|
|
||||||
Expect.isTrue(d.x7 == null);
|
|
||||||
d.x6 = 1;
|
|
||||||
Expect.isTrue(d.x6 == 1);
|
|
||||||
Expect.isTrue((d.x6 = 2) == 2);
|
|
||||||
Expect.isTrue(d.x6 == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
test0();
|
|
||||||
test1();
|
|
||||||
test3();
|
|
||||||
test4();
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of function expressions and function statements.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var even;
|
|
||||||
odd(n) => n > 0 && even(n - 1);
|
|
||||||
even = (n) => n == 0 || odd(n - 1);
|
|
||||||
|
|
||||||
Expect.isTrue(even(0));
|
|
||||||
Expect.isTrue(!odd(0));
|
|
||||||
|
|
||||||
Expect.isTrue(odd(1));
|
|
||||||
Expect.isTrue(!even(1));
|
|
||||||
|
|
||||||
Expect.isTrue(even(42));
|
|
||||||
Expect.isTrue(!odd(42));
|
|
||||||
|
|
||||||
Expect.isTrue(odd(101));
|
|
||||||
Expect.isTrue(!even(101));
|
|
||||||
}
|
|
|
@ -1,91 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of loops.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
fact(n) {
|
|
||||||
var f = 1;
|
|
||||||
while (n > 0) {
|
|
||||||
f *= n;
|
|
||||||
--n;
|
|
||||||
}
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
fib(n) {
|
|
||||||
if (n == 0) return 0;
|
|
||||||
var previous = 0, current = 1;
|
|
||||||
while (n > 1) {
|
|
||||||
var temp = current;
|
|
||||||
current += previous;
|
|
||||||
previous = temp;
|
|
||||||
--n;
|
|
||||||
}
|
|
||||||
return current;
|
|
||||||
}
|
|
||||||
|
|
||||||
mkTrue() => true;
|
|
||||||
mkFalse() => false;
|
|
||||||
|
|
||||||
check(b) {
|
|
||||||
Expect.isTrue(b);
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
test0() {
|
|
||||||
while (mkTrue()) {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
test1() {
|
|
||||||
while (mkFalse()) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
test2() {
|
|
||||||
do {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
} while (mkFalse());
|
|
||||||
Expect.isTrue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
test3() {
|
|
||||||
do {
|
|
||||||
Expect.isTrue(true);
|
|
||||||
return;
|
|
||||||
} while (check(false));
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(fact(0) == 1);
|
|
||||||
Expect.isTrue(fact(1) == 1);
|
|
||||||
Expect.isTrue(fact(5) == 120);
|
|
||||||
Expect.isTrue(fact(42) ==
|
|
||||||
1405006117752879898543142606244511569936384000000000);
|
|
||||||
Expect.isTrue(fact(3.14159) == 1.0874982674320444);
|
|
||||||
|
|
||||||
Expect.isTrue(fib(0) == 0);
|
|
||||||
Expect.isTrue(fib(1) == 1);
|
|
||||||
Expect.isTrue(fib(2) == 1);
|
|
||||||
Expect.isTrue(fib(3) == 2);
|
|
||||||
Expect.isTrue(fib(4) == 3);
|
|
||||||
Expect.isTrue(fib(5) == 5);
|
|
||||||
Expect.isTrue(fib(6) == 8);
|
|
||||||
Expect.isTrue(fib(7) == 13);
|
|
||||||
Expect.isTrue(fib(42) == 267914296);
|
|
||||||
Expect.isTrue(fib(3.14159) == 3);
|
|
||||||
|
|
||||||
test0();
|
|
||||||
test1();
|
|
||||||
test2();
|
|
||||||
test3();
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var map = {
|
|
||||||
'k1': 'v1',
|
|
||||||
'k2': 'v2',
|
|
||||||
1: 2,
|
|
||||||
1.5 : 1.2,
|
|
||||||
3: 3.14,
|
|
||||||
};
|
|
||||||
|
|
||||||
Expect.isTrue(map.length == 5);
|
|
||||||
|
|
||||||
map['foo'] = 'bar';
|
|
||||||
|
|
||||||
Expect.isTrue(map['k1'] == 'v1');
|
|
||||||
Expect.isTrue(map['k2'] == 'v2');
|
|
||||||
Expect.isTrue(map[1] == 2);
|
|
||||||
Expect.isTrue(map[1.5] == 1.2);
|
|
||||||
Expect.isTrue(map[3] == 3.14);
|
|
||||||
Expect.isTrue(map['foo'] == 'bar');
|
|
||||||
Expect.isTrue(map.length == 6);
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class Base {
|
|
||||||
baseFoo() {
|
|
||||||
print('Base.baseFoo()');
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
foo() {
|
|
||||||
print('Base.foo()');
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Mixin {
|
|
||||||
mixinFoo() {
|
|
||||||
print('Mixin.mixinFoo()');
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
foo() {
|
|
||||||
print('Mixin.foo()');
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Mixin2 {
|
|
||||||
mixin2Foo() {
|
|
||||||
print('Mixin2.mixin2Foo()');
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
foo() {
|
|
||||||
print('Mixin2.foo()');
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Sub extends Base with Mixin, Mixin2 {
|
|
||||||
subFoo() {
|
|
||||||
print('Sub.subFoo()');
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
foo() {
|
|
||||||
print('Sub.foo()');
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var o = new Sub();
|
|
||||||
|
|
||||||
Expect.isTrue(o.baseFoo() == 1);
|
|
||||||
Expect.isTrue(o.mixinFoo() == 2);
|
|
||||||
Expect.isTrue(o.mixin2Foo() == 3);
|
|
||||||
Expect.isTrue(o.subFoo() == 4);
|
|
||||||
Expect.isTrue(o.foo() == 4);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class A {
|
|
||||||
noSuchMethod(Invocation invocation) {
|
|
||||||
var s = '|${invocation.memberName}|';
|
|
||||||
for (var a in invocation.positionalArguments) {
|
|
||||||
s = '$s$a|';
|
|
||||||
}
|
|
||||||
invocation.namedArguments.forEach((Symbol k, v) {
|
|
||||||
s = '$s$k/$v|';
|
|
||||||
});
|
|
||||||
print(s);
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var o = new A();
|
|
||||||
Expect.isTrue(o.fun() == '|Symbol("fun")|');
|
|
||||||
Expect.isTrue(o.fun(1) == '|Symbol("fun")|1|');
|
|
||||||
Expect.isTrue(o.fun(1, 2) == '|Symbol("fun")|1|2|');
|
|
||||||
Expect.isTrue(o.fun(1, b: 2) ==
|
|
||||||
'|Symbol("fun")|1|Symbol("b")/2|');
|
|
||||||
Expect.isTrue(o.fun(1, a: 1, b: 2) ==
|
|
||||||
'|Symbol("fun")|1|Symbol("a")/1|Symbol("b")/2|');
|
|
||||||
Expect.isTrue(o.fun(1, b: 2, a: 1) ==
|
|
||||||
'|Symbol("fun")|1|Symbol("a")/1|Symbol("b")/2|');
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
mkOne() => 1;
|
|
||||||
mkNull() => null;
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue((mkOne() ?? 2) == 1);
|
|
||||||
Expect.isTrue((mkNull() ?? 2) == 2);
|
|
||||||
}
|
|
|
@ -1,67 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
testNormalRethrow() {
|
|
||||||
var x = 0;
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 0);
|
|
||||||
x++;
|
|
||||||
rethrow;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 0);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
testNormalRethrow2() {
|
|
||||||
var x = 0;
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} on int catch (e) {
|
|
||||||
Expect.isTrue(e == 0);
|
|
||||||
x++;
|
|
||||||
rethrow;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 0);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
testRethrowWithinTryRethrow() {
|
|
||||||
var x = 0;
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} on int catch (e) {
|
|
||||||
Expect.isTrue(e == 0);
|
|
||||||
x++;
|
|
||||||
try {
|
|
||||||
x++;
|
|
||||||
rethrow;
|
|
||||||
} finally {
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 0);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
testNormalRethrow();
|
|
||||||
testNormalRethrow2();
|
|
||||||
testRethrowWithinTryRethrow();
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of return (and imports, literals, ==, and static methods).
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
test0() {}
|
|
||||||
|
|
||||||
test1() { return; }
|
|
||||||
|
|
||||||
test3() { return 3; }
|
|
||||||
|
|
||||||
test4() => 4;
|
|
||||||
|
|
||||||
test5() {
|
|
||||||
return 5;
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(test0() == null);
|
|
||||||
Expect.isTrue(test1() == null);
|
|
||||||
Expect.isTrue(test3() == 3);
|
|
||||||
Expect.isTrue(test4() == 4);
|
|
||||||
Expect.isTrue(test5() == 5);
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
// Tests of literals (and imports, return, ==, and static methods).
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
test0() {
|
|
||||||
return 'Hello, world!';
|
|
||||||
}
|
|
||||||
|
|
||||||
test1() {
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
|
|
||||||
test2() {
|
|
||||||
return 2.71828;
|
|
||||||
}
|
|
||||||
|
|
||||||
test3() {
|
|
||||||
return 6.022e23;
|
|
||||||
}
|
|
||||||
|
|
||||||
test4() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
test5() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
test6() {
|
|
||||||
return 1405006117752879898543142606244511569936384000000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(test0() == 'Hello, world!');
|
|
||||||
Expect.isTrue(test1() == 42);
|
|
||||||
Expect.isTrue(test2() == 2.71828);
|
|
||||||
Expect.isTrue(test3() == 6.022e23);
|
|
||||||
Expect.isTrue(test4());
|
|
||||||
Expect.isTrue(test5() == false);
|
|
||||||
Expect.isTrue(
|
|
||||||
test6() == 1405006117752879898543142606244511569936384000000000);
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var sb = new StringBuffer();
|
|
||||||
sb.writeln('hello world :)');
|
|
||||||
print(sb);
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class A {
|
|
||||||
toString() => 'hello';
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue('begin ${new A()} end' == 'begin hello end');
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.md file.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
String log;
|
|
||||||
init() { log = ''; }
|
|
||||||
logit(msg) { return log = '$log$msg'; }
|
|
||||||
|
|
||||||
class Base {
|
|
||||||
var b;
|
|
||||||
Base.arg0() : b = logit('b') {
|
|
||||||
logit('B');
|
|
||||||
}
|
|
||||||
Base.arg1(a) : b = logit('b') {
|
|
||||||
logit('B');
|
|
||||||
}
|
|
||||||
Base.arg2(a, b) : b = logit('b') {
|
|
||||||
logit('B');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Sub extends Base {
|
|
||||||
var x;
|
|
||||||
var s;
|
|
||||||
Sub.arg0() : x = logit('x'), super.arg0(), s = logit('s') {
|
|
||||||
logit('S');
|
|
||||||
}
|
|
||||||
Sub.arg1(a) : x = logit('x'), super.arg1(logit('1')), s = logit('s') {
|
|
||||||
logit('S');
|
|
||||||
}
|
|
||||||
Sub.arg2(a, b) : x = logit('x'), super.arg2(logit('1'), logit('2')), s = logit('s') {
|
|
||||||
logit('S');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test(fun(), String result) {
|
|
||||||
init();
|
|
||||||
fun();
|
|
||||||
Expect.isTrue(log == result);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
test(() => new Sub.arg0(), 'xsbBS');
|
|
||||||
test(() => new Sub.arg1(1), 'x1sbBS');
|
|
||||||
test(() => new Sub.arg2(1, 2), 'x12sbBS');
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class Base {
|
|
||||||
var field;
|
|
||||||
|
|
||||||
method(x) {
|
|
||||||
print(x);
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
set setter(x) {
|
|
||||||
print(x);
|
|
||||||
field = x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Mixin {
|
|
||||||
method(x) {
|
|
||||||
return super.method(x + 'Mixin');
|
|
||||||
}
|
|
||||||
|
|
||||||
set setter(x) {
|
|
||||||
super.setter = x + 'Mixin';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Sub extends Base with Mixin {
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var object = new Sub();
|
|
||||||
Expect.isTrue(object.method('x') == 'xMixin');
|
|
||||||
object.setter = 'y';
|
|
||||||
Expect.isTrue(object.field == 'yMixin');
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class A {
|
|
||||||
var field = 9;
|
|
||||||
var called = false;
|
|
||||||
|
|
||||||
superMethod() {
|
|
||||||
Expect.isTrue(field == 10);
|
|
||||||
called = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class B extends A {
|
|
||||||
doit() {
|
|
||||||
Expect.isTrue((super.field = 10) == 10);
|
|
||||||
Expect.isTrue(super.superMethod());
|
|
||||||
if (called) {
|
|
||||||
Expect.isTrue((super.field = 11) == 11);
|
|
||||||
}
|
|
||||||
return super.field;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class C extends B {
|
|
||||||
set field(v) {
|
|
||||||
throw 'should not happen';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var c = new C();
|
|
||||||
Expect.isTrue(c.field == 9);
|
|
||||||
Expect.isTrue(c.doit() == 11);
|
|
||||||
Expect.isTrue(c.field == 11);
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class A {
|
|
||||||
A() {
|
|
||||||
print("A");
|
|
||||||
}
|
|
||||||
|
|
||||||
hello() {
|
|
||||||
print("A.hello()");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
hello1(a) {
|
|
||||||
print("A.hello1()");
|
|
||||||
print(a);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
foo(a, [b]) {
|
|
||||||
print("A.foo()");
|
|
||||||
print(a);
|
|
||||||
print(b);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bar(a, {b}) {
|
|
||||||
print("A.bar()");
|
|
||||||
print(a);
|
|
||||||
print(b);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class B extends A {
|
|
||||||
hello() {
|
|
||||||
print("B.hello()");
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
bar(a, {b}) {
|
|
||||||
print("B.bar()");
|
|
||||||
print(a);
|
|
||||||
print(b);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var o = new B();
|
|
||||||
|
|
||||||
// Base class methods.
|
|
||||||
Expect.isTrue(o.hello1(1) == 1);
|
|
||||||
Expect.isTrue(o.foo(1) == 1);
|
|
||||||
Expect.isTrue(o.foo(1, 2) == 1);
|
|
||||||
|
|
||||||
// Overwritten methods.
|
|
||||||
Expect.isTrue(o.hello() == 2);
|
|
||||||
Expect.isTrue(o.bar(1) == 2);
|
|
||||||
Expect.isTrue(o.bar(1, b: 2) == 2);
|
|
||||||
}
|
|
|
@ -1,174 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
mkOne() => 1;
|
|
||||||
mkTwo() => 2;
|
|
||||||
|
|
||||||
testNormal() {
|
|
||||||
int result;
|
|
||||||
switch(mkOne()) {
|
|
||||||
case 0:
|
|
||||||
result = 0;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
result = 1;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
result = 2;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
result = 3;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Expect.isTrue(result == 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
testDefault() {
|
|
||||||
int result;
|
|
||||||
switch(null) {
|
|
||||||
case 0:
|
|
||||||
result = 0;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
result = 1;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
result = 2;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
result = 3;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Expect.isTrue(result == 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
testFallThrough() {
|
|
||||||
int result;
|
|
||||||
switch(mkOne()) {
|
|
||||||
case 0:
|
|
||||||
result = 0;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
case 2:
|
|
||||||
result = 2;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
result = 3;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Expect.isTrue(result == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
testContinue() {
|
|
||||||
int result;
|
|
||||||
switch(mkTwo()) {
|
|
||||||
case 0:
|
|
||||||
result = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
setitto1:
|
|
||||||
case 1:
|
|
||||||
result = 1;
|
|
||||||
continue setitto3;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
result = 2;
|
|
||||||
continue setitto1;
|
|
||||||
|
|
||||||
setitto3:
|
|
||||||
default:
|
|
||||||
result = 3;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Expect.isTrue(result == 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
testOnlyDefault() {
|
|
||||||
int result;
|
|
||||||
switch(mkTwo()) {
|
|
||||||
default:
|
|
||||||
result = 42;
|
|
||||||
}
|
|
||||||
Expect.isTrue(result == 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
testOnlyDefaultWithBreak() {
|
|
||||||
int result;
|
|
||||||
switch(mkTwo()) {
|
|
||||||
default:
|
|
||||||
result = 42;
|
|
||||||
}
|
|
||||||
Expect.isTrue(result == 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
String testReturn() {
|
|
||||||
switch(mkOne()) {
|
|
||||||
case 0: return "bad";
|
|
||||||
case 1: return "good";
|
|
||||||
default: return "bad";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
regressionTest() {
|
|
||||||
Expect.isTrue(regressionTestHelper(0, 0) == -1);
|
|
||||||
Expect.isTrue(regressionTestHelper(4, 0) == -1);
|
|
||||||
Expect.isTrue(regressionTestHelper(4, 1) == 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
regressionTestHelper(i, j) {
|
|
||||||
switch (i) {
|
|
||||||
case 4:
|
|
||||||
switch (j) {
|
|
||||||
case 1:
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
regressionTest2() {
|
|
||||||
var state = 1;
|
|
||||||
while (state < 2) {
|
|
||||||
switch (state) {
|
|
||||||
case 1:
|
|
||||||
state++;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
case 4:
|
|
||||||
// We will translate this currently to an empty [Fragment] which can
|
|
||||||
// cause issues if we would like to append/prepend to it.
|
|
||||||
assert(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [1];
|
|
||||||
}
|
|
||||||
|
|
||||||
regressionTest3() {
|
|
||||||
f(x) {
|
|
||||||
switch (x) {
|
|
||||||
case 1:
|
|
||||||
return 2;
|
|
||||||
case 2:
|
|
||||||
}
|
|
||||||
throw new UnsupportedError("Unexpected constant kind.");
|
|
||||||
}
|
|
||||||
Expect.isTrue(f(1) == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
testNormal();
|
|
||||||
testDefault();
|
|
||||||
testFallThrough();
|
|
||||||
testContinue();
|
|
||||||
testOnlyDefault();
|
|
||||||
testOnlyDefaultWithBreak();
|
|
||||||
regressionTest();
|
|
||||||
regressionTest2();
|
|
||||||
regressionTest3();
|
|
||||||
|
|
||||||
var result = testReturn();
|
|
||||||
Expect.isTrue(result == "good");
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue('${#abc}' == 'Symbol("abc")');
|
|
||||||
Expect.isTrue('${#abc.xzy}' == 'Symbol("abc.xzy")');
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class Foo {
|
|
||||||
capture() {
|
|
||||||
return () {
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
captureFirst(a, b) {
|
|
||||||
return () {
|
|
||||||
print(a);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
captureLast(a, b) {
|
|
||||||
return () {
|
|
||||||
print(b);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var foo = new Foo();
|
|
||||||
Expect.isTrue(identical(foo, (foo.capture())()));
|
|
||||||
Expect.isTrue(identical(foo, (foo.captureFirst(1, 2))()));
|
|
||||||
Expect.isTrue(identical(foo, (foo.captureLast(1, 2))()));
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class A {
|
|
||||||
getThis() => this;
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
var a = new A();
|
|
||||||
Expect.isTrue(a == a.getThis());
|
|
||||||
Expect.isTrue(identical(a, a.getThis()));
|
|
||||||
}
|
|
|
@ -1,190 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
testSimpleThrowCatch() {
|
|
||||||
var x = 1;
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} on int catch (e) {
|
|
||||||
Expect.isTrue(e == 1);
|
|
||||||
Expect.isTrue(x == 2);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
testNestedThrowCatch() {
|
|
||||||
var x = 1;
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 1);
|
|
||||||
Expect.isTrue(x == 2);
|
|
||||||
x++;
|
|
||||||
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 3);
|
|
||||||
Expect.isTrue(x == 4);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
testNestedThrowCatch2() {
|
|
||||||
var x = 1;
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 1);
|
|
||||||
Expect.isTrue(x == 2);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
throw x++;
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 3);
|
|
||||||
Expect.isTrue(x == 4);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
testSiblingThrowCatch() {
|
|
||||||
var x = 1;
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 1);
|
|
||||||
Expect.isTrue(x == 2);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} catch (e) {
|
|
||||||
Expect.isTrue(e == 3);
|
|
||||||
Expect.isTrue(x == 4);
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
|
|
||||||
Expect.isTrue(x == 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
testTypedCatch() {
|
|
||||||
var good = false;
|
|
||||||
try {
|
|
||||||
throw 1;
|
|
||||||
} on int catch (e) {
|
|
||||||
Expect.isTrue(e == 1);
|
|
||||||
good = true;
|
|
||||||
} on String catch (_) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
}
|
|
||||||
Expect.isTrue(good);
|
|
||||||
}
|
|
||||||
|
|
||||||
testTypedCatch2() {
|
|
||||||
var good = false;
|
|
||||||
try {
|
|
||||||
throw 'a';
|
|
||||||
} on int catch (_) {
|
|
||||||
Expect.isTrue(false);
|
|
||||||
} on String catch (e) {
|
|
||||||
Expect.isTrue(e == 'a');
|
|
||||||
good = true;
|
|
||||||
}
|
|
||||||
Expect.isTrue(good);
|
|
||||||
}
|
|
||||||
|
|
||||||
testThrowNull() {
|
|
||||||
var good = false;
|
|
||||||
try {
|
|
||||||
throw null;
|
|
||||||
} on NullThrownError catch (_) {
|
|
||||||
good = true;
|
|
||||||
}
|
|
||||||
Expect.isTrue(good);
|
|
||||||
}
|
|
||||||
|
|
||||||
testFinally() {
|
|
||||||
var x = 0;
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} catch (_) {
|
|
||||||
x++;
|
|
||||||
} finally {
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
testFinally2() {
|
|
||||||
var x = 0;
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} catch (_) {
|
|
||||||
x++;
|
|
||||||
} finally {
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
testFinally3() {
|
|
||||||
try {
|
|
||||||
var x = 0;
|
|
||||||
try {
|
|
||||||
throw x++;
|
|
||||||
} finally {
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 2);
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
testSuccessfulBody() {
|
|
||||||
var x = 0;
|
|
||||||
try {
|
|
||||||
x++;
|
|
||||||
} finally {
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
Expect.isTrue(x == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
testSuccessfulBody2() {
|
|
||||||
var x = 0;
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
x++;
|
|
||||||
} finally {
|
|
||||||
x++;
|
|
||||||
throw 1;
|
|
||||||
}
|
|
||||||
} on int {}
|
|
||||||
Expect.isTrue(x == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
testSimpleThrowCatch();
|
|
||||||
testNestedThrowCatch();
|
|
||||||
testNestedThrowCatch2();
|
|
||||||
testSiblingThrowCatch();
|
|
||||||
testTypedCatch();
|
|
||||||
testTypedCatch2();
|
|
||||||
testThrowNull();
|
|
||||||
testFinally();
|
|
||||||
testFinally2();
|
|
||||||
testFinally3();
|
|
||||||
testSuccessfulBody();
|
|
||||||
testSuccessfulBody2();
|
|
||||||
}
|
|
|
@ -1,91 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'package:expect/expect.dart';
|
|
||||||
|
|
||||||
throwValue(val) => throw val;
|
|
||||||
|
|
||||||
f1() {
|
|
||||||
var a = 0;
|
|
||||||
var b = 0;
|
|
||||||
var c = 0;
|
|
||||||
var d = 0;
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
try {
|
|
||||||
for (var j = 0; j < 11; j++) {
|
|
||||||
try {
|
|
||||||
capture() => [i, j, a, b, c, d];
|
|
||||||
throwValue(j == 10 ? "${j}" : j);
|
|
||||||
} on num catch (e) {
|
|
||||||
a += j;
|
|
||||||
b -= e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
c++;
|
|
||||||
d += int.parse(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [a, b, c, d];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
f2() {
|
|
||||||
var a = 0;
|
|
||||||
var b = 0;
|
|
||||||
var c = 0;
|
|
||||||
var d = 0;
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
try {
|
|
||||||
for (var j = 0; j < 11; j++) {
|
|
||||||
try {
|
|
||||||
capture() => [i, j, a, b, c, d];
|
|
||||||
throwValue(j == 10 ? "${j}" : j);
|
|
||||||
} on num catch (e) {
|
|
||||||
a += j;
|
|
||||||
b -= e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
capture() => e;
|
|
||||||
c++;
|
|
||||||
d += int.parse(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [a, b, c, d];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
f3() {
|
|
||||||
var a = 0;
|
|
||||||
var b = 0;
|
|
||||||
var c = 0;
|
|
||||||
var d = 0;
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
try {
|
|
||||||
for (var j = 0; j < 11; j++) {
|
|
||||||
try {
|
|
||||||
capture() => [i, j, a, b, c, d];
|
|
||||||
throwValue(j == 10 ? "${j}" : j);
|
|
||||||
} on num catch (e) {
|
|
||||||
a += j;
|
|
||||||
b -= e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
capture() => e;
|
|
||||||
c++;
|
|
||||||
d += int.parse(e);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [a, b, c, d];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.listEquals([450, -450, 10, 100], f1());
|
|
||||||
Expect.listEquals([450, -450, 10, 100], f2());
|
|
||||||
Expect.listEquals([450, -450, 10, 100], f3());
|
|
||||||
}
|
|
|
@ -1,158 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
testSimpleBreak() {
|
|
||||||
var x = 1;
|
|
||||||
while (true) {
|
|
||||||
try {
|
|
||||||
x++;
|
|
||||||
break;
|
|
||||||
} finally {
|
|
||||||
x++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
testReturnFinally() {
|
|
||||||
try {
|
|
||||||
return 1;
|
|
||||||
} finally {
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testNestedReturnFinally() {
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
return 1;
|
|
||||||
} finally {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testReturnInsideLoop() {
|
|
||||||
while (true) {
|
|
||||||
try {
|
|
||||||
print("hello");
|
|
||||||
} finally {
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testStopContinueInsideLoop() {
|
|
||||||
while (true) {
|
|
||||||
try {
|
|
||||||
continue;
|
|
||||||
} finally {
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testStopBreakInsideLoop() {
|
|
||||||
var foo = 1;
|
|
||||||
while (true) {
|
|
||||||
try {
|
|
||||||
if (foo == 1) {
|
|
||||||
// 1st iteration we break.
|
|
||||||
break;
|
|
||||||
} else if (foo == 2) {
|
|
||||||
// 2nd iteration we return.
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
// 1st iteration we overrwrite break with continue.
|
|
||||||
if (foo == 1) {
|
|
||||||
foo++;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
// Let return work
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return foo;
|
|
||||||
}
|
|
||||||
|
|
||||||
testStopBreakInsideLoop2() {
|
|
||||||
var foo = 1;
|
|
||||||
while (true) {
|
|
||||||
try {
|
|
||||||
if (foo == 1) {
|
|
||||||
// 1st iteration we break.
|
|
||||||
break;
|
|
||||||
} else if (foo == 2) {
|
|
||||||
// 2nd iteration we return.
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
// 1st iteration we overrwrite break with continue.
|
|
||||||
if (foo == 1) {
|
|
||||||
foo++;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
// 2nd iteration we overrwrite return with break.
|
|
||||||
foo = 42;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return foo;
|
|
||||||
}
|
|
||||||
|
|
||||||
testStopContinueInsideSwitch() {
|
|
||||||
var foo = 1;
|
|
||||||
switch (foo) {
|
|
||||||
jump5:
|
|
||||||
case 5:
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
try {
|
|
||||||
continue jump5;
|
|
||||||
} finally {
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testStopContinueInsideSwitch2() {
|
|
||||||
var foo = 1;
|
|
||||||
switch (foo) {
|
|
||||||
jump5:
|
|
||||||
case 5:
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
jump42:
|
|
||||||
case 5:
|
|
||||||
return 42;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
try {
|
|
||||||
continue jump5;
|
|
||||||
} finally {
|
|
||||||
continue jump42;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(testSimpleBreak() == 3);
|
|
||||||
Expect.isTrue(testReturnFinally() == 42);
|
|
||||||
Expect.isTrue(testNestedReturnFinally() == 42);
|
|
||||||
Expect.isTrue(testReturnInsideLoop() == 42);
|
|
||||||
Expect.isTrue(testStopContinueInsideLoop() == 42);
|
|
||||||
Expect.isTrue(testStopBreakInsideLoop() == 42);
|
|
||||||
Expect.isTrue(testStopBreakInsideLoop2() == 42);
|
|
||||||
Expect.isTrue(testStopContinueInsideLoop() == 42);
|
|
||||||
Expect.isTrue(testStopContinueInsideSwitch() == 42);
|
|
||||||
Expect.isTrue(testStopContinueInsideSwitch2() == 42);
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class Box<T> {
|
|
||||||
T value;
|
|
||||||
|
|
||||||
Box(this.value);
|
|
||||||
|
|
||||||
factory Box.a(T v) => new Box(v);
|
|
||||||
factory Box.b(T v) = Box<T>;
|
|
||||||
factory Box.c(T v) => new Box(v);
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
Expect.isTrue(new Box<int>(1).value == 1);
|
|
||||||
Expect.isTrue(new Box<int>.a(1).value == 1);
|
|
||||||
Expect.isTrue(new Box<int>.b(1).value == 1);
|
|
||||||
Expect.isTrue(new Box<int>.c(1).value == 1);
|
|
||||||
}
|
|
|
@ -1,202 +0,0 @@
|
||||||
// Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import 'expect.dart';
|
|
||||||
|
|
||||||
class TypeTester<T> {
|
|
||||||
const TypeTester();
|
|
||||||
bool isCorrectType(object) => object is T;
|
|
||||||
}
|
|
||||||
|
|
||||||
class ClosureTypeTester<T> {
|
|
||||||
const ClosureTypeTester();
|
|
||||||
bool isCorrectType(object) => (() => object is T)();
|
|
||||||
}
|
|
||||||
|
|
||||||
class Base<A, B> {
|
|
||||||
final A a;
|
|
||||||
final B b;
|
|
||||||
const Base(this.a, this.b);
|
|
||||||
const factory Base.fac(A a, B b) = Base<A, B>;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Sub1<C, D> extends Base<C, C> {
|
|
||||||
final D d;
|
|
||||||
const Sub1(C a, this.d) : super(a, a);
|
|
||||||
const factory Sub1.fac(C a, D d) = Sub1<C, D>;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Sub2<C, D> extends Base<D, C> {
|
|
||||||
const Sub2(C a, D b) : super(b, a);
|
|
||||||
const factory Sub2.fac(C a, D b) = Sub2<C, D>;
|
|
||||||
}
|
|
||||||
|
|
||||||
class G<T> { }
|
|
||||||
class I { }
|
|
||||||
class A implements I { }
|
|
||||||
class B extends A { }
|
|
||||||
class C {}
|
|
||||||
|
|
||||||
testConstantLiteralTypes() {
|
|
||||||
Expect.isTrue(const [1] is List);
|
|
||||||
Expect.isTrue(const [1] is List<int>);
|
|
||||||
Expect.isTrue(const [1] is List<String>);
|
|
||||||
Expect.isTrue(const <int>[1] is List);
|
|
||||||
Expect.isTrue(const <int>[1] is List<int>);
|
|
||||||
Expect.isTrue(!(const <int>[1] is List<String>));
|
|
||||||
Expect.isTrue(const {"a": 1} is Map);
|
|
||||||
Expect.isTrue(const {"a": 1} is Map<String, int>);
|
|
||||||
Expect.isTrue(const {"a": 1} is Map<int, String>);
|
|
||||||
Expect.isTrue(const <String, int>{"a": 1} is Map);
|
|
||||||
Expect.isTrue(const <String, int>{"a": 1} is Map<String, int>);
|
|
||||||
Expect.isTrue(!(const <String, int>{"a": 1} is Map<int, String>));
|
|
||||||
}
|
|
||||||
|
|
||||||
testNonConstantLiteralTypes() {
|
|
||||||
Expect.isTrue([1] is List);
|
|
||||||
Expect.isTrue([1] is List<int>);
|
|
||||||
Expect.isTrue([1] is List<String>);
|
|
||||||
Expect.isTrue(<int>[1] is List);
|
|
||||||
Expect.isTrue(<int>[1] is List<int>);
|
|
||||||
Expect.isTrue(!(<int>[1] is List<String>));
|
|
||||||
}
|
|
||||||
|
|
||||||
testParametrizedClass() {
|
|
||||||
Expect.isTrue(new Base<int, int>(1, 1) is Base<int, int>);
|
|
||||||
Expect.isTrue(new Base<int, int>(1, 1) is Base);
|
|
||||||
Expect.isTrue(new Base<int, int>(1, 1) is Base<Object, Object>);
|
|
||||||
Expect.isTrue(!(new Base<int, int>(1, 1) is Base<int, String>));
|
|
||||||
Expect.isTrue(!(new Base<int, int>(1, 1) is Base<String, int>));
|
|
||||||
Expect.isTrue(new Sub1<int, String>(1, "1") is Base<int, int>);
|
|
||||||
Expect.isTrue(new Sub1<int, String>(1, "1") is Base);
|
|
||||||
Expect.isTrue(new Sub1<int, String>(1, "1") is Sub1<int, String>);
|
|
||||||
Expect.isTrue(new Sub1<int, String>(1, "1") is Sub1);
|
|
||||||
Expect.isTrue(!(new Sub1<int, String>(1, "1") is Base<String, int>));
|
|
||||||
Expect.isTrue(!(new Sub1<int, String>(1, "1") is Base<int, String>));
|
|
||||||
Expect.isTrue(!(new Sub1<int, String>(1, "1") is Sub1<String, String>));
|
|
||||||
Expect.isTrue(new Sub2<int, String>(1, "1") is Base<String, int>);
|
|
||||||
Expect.isTrue(new Sub2<int, String>(1, "1") is Base);
|
|
||||||
Expect.isTrue(new Sub2<int, String>(1, "1") is Sub2<int, String>);
|
|
||||||
Expect.isTrue(new Sub2<int, String>(1, "1") is Sub2);
|
|
||||||
Expect.isTrue(!(new Sub2<int, String>(1, "1") is Base<int, int>));
|
|
||||||
Expect.isTrue(!(new Sub2<int, String>(1, "1") is Base<int, String>));
|
|
||||||
Expect.isTrue(!(new Sub2<int, String>(1, "1") is Sub2<String, String>));
|
|
||||||
}
|
|
||||||
|
|
||||||
testTypeTester() {
|
|
||||||
Expect.isTrue(new TypeTester<int>().isCorrectType(10));
|
|
||||||
Expect.isTrue(!new TypeTester<int>().isCorrectType("abc"));
|
|
||||||
Expect.isTrue(new TypeTester<List<int>>().isCorrectType([1]));
|
|
||||||
Expect.isTrue(new TypeTester<List<int>>().isCorrectType(<int>[1]));
|
|
||||||
Expect.isTrue(!new TypeTester<List<int>>().isCorrectType(<String>["1"]));
|
|
||||||
Expect.isTrue(new TypeTester<Base<String, int>>()
|
|
||||||
.isCorrectType(new Sub2<int, String>(1, "1")));
|
|
||||||
Expect.isTrue(new TypeTester<Sub2<int, String>>()
|
|
||||||
.isCorrectType(new Sub2<int, String>(1, "1")));
|
|
||||||
}
|
|
||||||
|
|
||||||
testClosureTypeTester() {
|
|
||||||
Expect.isTrue(new ClosureTypeTester<int>().isCorrectType(10));
|
|
||||||
Expect.isTrue(!new ClosureTypeTester<int>().isCorrectType("abc"));
|
|
||||||
Expect.isTrue(new ClosureTypeTester<List<int>>().isCorrectType([1]));
|
|
||||||
Expect.isTrue(new ClosureTypeTester<List<int>>().isCorrectType(<int>[1]));
|
|
||||||
Expect.isTrue(!new ClosureTypeTester<List<int>>()
|
|
||||||
.isCorrectType(<String>["1"]));
|
|
||||||
Expect.isTrue(new ClosureTypeTester<Base<String, int>>()
|
|
||||||
.isCorrectType(new Sub2<int, String>(1, "1")));
|
|
||||||
Expect.isTrue(new ClosureTypeTester<Sub2<int, String>>()
|
|
||||||
.isCorrectType(new Sub2<int, String>(1, "1")));
|
|
||||||
}
|
|
||||||
|
|
||||||
testConstTypeArguments() {
|
|
||||||
Expect.isTrue(const Sub1<int, String>(1, "1") is Sub1<int, String>);
|
|
||||||
Expect.isTrue(const Sub1<int, String>.fac(1, "1") is Sub1<int, String>);
|
|
||||||
Expect.isTrue(!(const Sub1<int, String>(1, "1") is Sub1<String, String>));
|
|
||||||
Expect.isTrue(!(const Sub1<int, String>.fac(1, "1") is Sub1<String, String>));
|
|
||||||
|
|
||||||
Expect.isTrue(const ClosureTypeTester<List<Base<int, String>>>()
|
|
||||||
.isCorrectType(
|
|
||||||
const <Base<int, String>>[const Base<int, String>(1, "2")]));
|
|
||||||
Expect.isTrue(const ClosureTypeTester<List<Base<int, String>>>()
|
|
||||||
.isCorrectType(
|
|
||||||
const <Base<int, String>>[const Base<int, String>.fac(1, "2")]));
|
|
||||||
Expect.isTrue(!const ClosureTypeTester<List<Base<int, String>>>()
|
|
||||||
.isCorrectType(
|
|
||||||
const <Base<String, String>>[const Base<String, String>("1", "2")]));
|
|
||||||
Expect.isTrue(!const ClosureTypeTester<List<Base<int, String>>>()
|
|
||||||
.isCorrectType(
|
|
||||||
const <Base<String, String>>[const Base<String, String>.fac("1", "2")]));
|
|
||||||
|
|
||||||
Expect.isTrue(const TypeTester<Sub2<int, String>>()
|
|
||||||
.isCorrectType(const Sub2<int, String>(1, "1")));
|
|
||||||
Expect.isTrue(const TypeTester<Sub2<int, String>>()
|
|
||||||
.isCorrectType(const Sub2<int, String>.fac(1, "1")));
|
|
||||||
Expect.isTrue(!const TypeTester<Sub2<int, String>>()
|
|
||||||
.isCorrectType(const Sub2<String, String>("a", "b")));
|
|
||||||
Expect.isTrue(!const TypeTester<Sub2<int, String>>()
|
|
||||||
.isCorrectType(const Sub2<String, String>.fac("a", "b")));
|
|
||||||
}
|
|
||||||
|
|
||||||
testNoBound() {
|
|
||||||
new G<int>();
|
|
||||||
new G<num>();
|
|
||||||
new G<Function>();
|
|
||||||
new G<Object>();
|
|
||||||
new G();
|
|
||||||
new G();
|
|
||||||
new G<G>();
|
|
||||||
}
|
|
||||||
|
|
||||||
testSubtypeChecker() {
|
|
||||||
Expect.isTrue(new TypeTester<num>().isCorrectType(1));
|
|
||||||
Expect.isTrue(new TypeTester<num>().isCorrectType(1.0));
|
|
||||||
Expect.isTrue(new TypeTester<A>().isCorrectType(new B()));
|
|
||||||
Expect.isTrue(new TypeTester<Object>().isCorrectType(new C()));
|
|
||||||
Expect.isTrue(new TypeTester<I>().isCorrectType(new A()));
|
|
||||||
}
|
|
||||||
|
|
||||||
testFunctionTypes() {
|
|
||||||
fun(int x, String y) => "${x}${y}";
|
|
||||||
Expect.isTrue(fun is FunctionType);
|
|
||||||
Expect.isTrue(nan is FunctionType);
|
|
||||||
Expect.isTrue(nan is Function);
|
|
||||||
}
|
|
||||||
|
|
||||||
num nan(double d, Pattern p) => double.NAN;
|
|
||||||
|
|
||||||
typedef int FunctionType(num _, Pattern __);
|
|
||||||
|
|
||||||
|
|
||||||
testLiteralTypeArguments() {
|
|
||||||
Expect.isTrue(new Foo<String, int>().foo() is List<String>);
|
|
||||||
Expect.isTrue(new Foo<int, String>().bar() is Map<int, String>);
|
|
||||||
}
|
|
||||||
|
|
||||||
class Foo<T1, T2> {
|
|
||||||
foo() => <T1>[];
|
|
||||||
bar() => <T1, T2>{};
|
|
||||||
}
|
|
||||||
|
|
||||||
regressionTest1() {
|
|
||||||
Expect.isTrue(!StaticTypeTester.isInt('abc'));
|
|
||||||
}
|
|
||||||
|
|
||||||
class StaticTypeTester<T> {
|
|
||||||
static isInt(x) => x is int;
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
testConstantLiteralTypes();
|
|
||||||
testNonConstantLiteralTypes();
|
|
||||||
testParametrizedClass();
|
|
||||||
testTypeTester();
|
|
||||||
testClosureTypeTester();
|
|
||||||
testConstTypeArguments();
|
|
||||||
testNoBound();
|
|
||||||
testSubtypeChecker();
|
|
||||||
testFunctionTypes();
|
|
||||||
testLiteralTypeArguments();
|
|
||||||
regressionTest1();
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,720 +0,0 @@
|
||||||
# Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
# These tests currently take too long. Remove when they are fixed.
|
|
||||||
[ $compiler == dartk || $compiler == rasta ]
|
|
||||||
large_class_declaration_test: Skip
|
|
||||||
large_implicit_getter_test: Skip
|
|
||||||
larger_implicit_getter_test: Skip
|
|
||||||
|
|
||||||
# Our buildbot is currently running dartk tests without
|
|
||||||
# `$kernel_transformers == continuation` because the await/async transformer
|
|
||||||
# creates new classes defined in patch files and dartk doesn't handle patch
|
|
||||||
# files yet.
|
|
||||||
|
|
||||||
# dartk: JIT failures
|
|
||||||
[ $compiler == dartk && $runtime == vm ]
|
|
||||||
accessor_conflict_export2_test: RuntimeError
|
|
||||||
accessor_conflict_export_test: RuntimeError
|
|
||||||
accessor_conflict_import2_test: RuntimeError
|
|
||||||
accessor_conflict_import_prefixed2_test: RuntimeError
|
|
||||||
accessor_conflict_import_prefixed_test: RuntimeError
|
|
||||||
accessor_conflict_import_test: RuntimeError
|
|
||||||
assertion_test: RuntimeError
|
|
||||||
async_break_in_finally_test: RuntimeError
|
|
||||||
async_control_structures_test: RuntimeError
|
|
||||||
async_star_cancel_and_throw_in_finally_test: RuntimeError
|
|
||||||
async_star_cancel_while_paused_test: RuntimeError
|
|
||||||
async_star_regression_fisk_test: Crash
|
|
||||||
async_star_stream_take_test: Timeout
|
|
||||||
async_star_take_reyield_test: Timeout
|
|
||||||
async_star_test: Crash
|
|
||||||
async_throw_in_catch_test/forceAwait: RuntimeError
|
|
||||||
async_throw_in_catch_test/none: RuntimeError
|
|
||||||
asyncstar_throw_in_catch_test: Timeout
|
|
||||||
asyncstar_yield_test: Timeout
|
|
||||||
asyncstar_yieldstar_test: Timeout
|
|
||||||
await_exceptions_test: RuntimeError
|
|
||||||
await_future_test: RuntimeError
|
|
||||||
await_regression_test: RuntimeError
|
|
||||||
bad_constructor_test/05: CompileTimeError
|
|
||||||
bad_raw_string_negative_test: Fail
|
|
||||||
cha_deopt1_test: RuntimeError
|
|
||||||
cha_deopt2_test: RuntimeError
|
|
||||||
cha_deopt3_test: RuntimeError
|
|
||||||
closure_type_variable_test: RuntimeError
|
|
||||||
closures_initializer_test: RuntimeError
|
|
||||||
compile_time_constant12_test: Crash
|
|
||||||
compile_time_constant_k_test/01: RuntimeError
|
|
||||||
compile_time_constant_k_test/02: RuntimeError
|
|
||||||
compile_time_constant_k_test/03: RuntimeError
|
|
||||||
compile_time_constant_o_test/01: RuntimeError
|
|
||||||
compile_time_constant_o_test/02: RuntimeError
|
|
||||||
config_import_test: RuntimeError
|
|
||||||
conflicting_type_variable_and_setter_test: CompileTimeError
|
|
||||||
const_dynamic_type_literal_test/02: RuntimeError
|
|
||||||
const_error_multiply_initialized_test/02: RuntimeError
|
|
||||||
const_error_multiply_initialized_test/04: RuntimeError
|
|
||||||
const_evaluation_test/01: RuntimeError
|
|
||||||
const_for_in_variable_test/01: MissingCompileTimeError
|
|
||||||
const_locals_test: RuntimeError
|
|
||||||
const_nested_test: RuntimeError
|
|
||||||
const_string_test: RuntimeError
|
|
||||||
constructor2_test: RuntimeError
|
|
||||||
constructor3_test: RuntimeError
|
|
||||||
constructor5_test: RuntimeError
|
|
||||||
constructor6_test: RuntimeError
|
|
||||||
constructor_duplicate_final_test/01: MissingRuntimeError
|
|
||||||
constructor_duplicate_final_test/02: MissingRuntimeError
|
|
||||||
constructor_duplicate_final_test/03: MissingCompileTimeError
|
|
||||||
constructor_named_arguments_test/01: Crash
|
|
||||||
cyclic_type2_test: CompileTimeError
|
|
||||||
cyclic_type_test/00: RuntimeError
|
|
||||||
cyclic_type_test/01: RuntimeError
|
|
||||||
cyclic_type_test/02: CompileTimeError
|
|
||||||
cyclic_type_test/03: RuntimeError
|
|
||||||
cyclic_type_test/04: CompileTimeError
|
|
||||||
cyclic_type_variable_test/01: Crash
|
|
||||||
cyclic_type_variable_test/02: Crash
|
|
||||||
cyclic_type_variable_test/03: Crash
|
|
||||||
cyclic_type_variable_test/04: Crash
|
|
||||||
cyclic_type_variable_test/none: Crash
|
|
||||||
deep_nesting1_negative_test: Crash
|
|
||||||
deep_nesting2_negative_test: Crash
|
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
|
||||||
deferred_closurize_load_library_test: Crash
|
|
||||||
deferred_constant_list_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/none: RuntimeError
|
|
||||||
deferred_constraints_constants_test/reference_after_load: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/as_operation: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/catch_check: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/is_check: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new_before_load: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new_generic1: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new_generic2: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new_generic3: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/none: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/static_method: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation1: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_generic1: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_generic2: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_generic3: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_generic4: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_non_deferred: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_null: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_top_level: RuntimeError
|
|
||||||
deferred_function_type_test: RuntimeError
|
|
||||||
deferred_global_test: RuntimeError
|
|
||||||
deferred_import_core_test: RuntimeError
|
|
||||||
deferred_inheritance_constraints_test/redirecting_constructor: RuntimeError
|
|
||||||
deferred_inlined_test: RuntimeError
|
|
||||||
deferred_load_constants_test/none: RuntimeError
|
|
||||||
deferred_load_inval_code_test: RuntimeError
|
|
||||||
deferred_load_library_wrong_args_test/none: RuntimeError
|
|
||||||
deferred_mixin_test: RuntimeError
|
|
||||||
deferred_no_such_method_test: RuntimeError
|
|
||||||
deferred_not_loaded_check_test: RuntimeError
|
|
||||||
deferred_only_constant_test: RuntimeError
|
|
||||||
deferred_optimized_test: RuntimeError
|
|
||||||
deferred_redirecting_factory_test: RuntimeError
|
|
||||||
deferred_regression_22995_test: RuntimeError
|
|
||||||
deferred_shadow_load_library_test: RuntimeError
|
|
||||||
deferred_shared_and_unshared_classes_test: RuntimeError
|
|
||||||
deferred_static_seperate_test: RuntimeError
|
|
||||||
deferred_super_dependency_test/01: RuntimeError
|
|
||||||
deferred_type_dependency_test/as: RuntimeError
|
|
||||||
deferred_type_dependency_test/is: RuntimeError
|
|
||||||
deferred_type_dependency_test/none: RuntimeError
|
|
||||||
deferred_type_dependency_test/type_annotation: RuntimeError
|
|
||||||
duplicate_export_negative_test: Fail
|
|
||||||
enum_duplicate_test/01: RuntimeError
|
|
||||||
enum_duplicate_test/02: RuntimeError
|
|
||||||
enum_duplicate_test/none: RuntimeError
|
|
||||||
enum_mirror_test: RuntimeError
|
|
||||||
enum_private_test/01: RuntimeError
|
|
||||||
enum_private_test/02: RuntimeError
|
|
||||||
enum_private_test/none: RuntimeError
|
|
||||||
enum_syntax_test/05: MissingCompileTimeError
|
|
||||||
enum_syntax_test/06: MissingCompileTimeError
|
|
||||||
enum_test: RuntimeError
|
|
||||||
evaluation_redirecting_constructor_test: RuntimeError
|
|
||||||
example_constructor_test: RuntimeError
|
|
||||||
execute_finally8_test: RuntimeError
|
|
||||||
execute_finally9_test: RuntimeError
|
|
||||||
export_double_same_main_test: Crash
|
|
||||||
export_main_test: Crash
|
|
||||||
external_test/10: MissingRuntimeError
|
|
||||||
external_test/13: MissingRuntimeError
|
|
||||||
external_test/20: MissingRuntimeError
|
|
||||||
external_test/21: MissingCompileTimeError
|
|
||||||
external_test/24: MissingCompileTimeError
|
|
||||||
external_test/25: MissingCompileTimeError
|
|
||||||
f_bounded_equality_test: RuntimeError
|
|
||||||
field_initialization_order_test: RuntimeError
|
|
||||||
final_field_initialization_order_test: RuntimeError
|
|
||||||
final_super_field_set_test/01: RuntimeError
|
|
||||||
final_syntax_test/01: MissingCompileTimeError
|
|
||||||
final_syntax_test/02: MissingCompileTimeError
|
|
||||||
final_syntax_test/03: MissingCompileTimeError
|
|
||||||
final_syntax_test/04: MissingCompileTimeError
|
|
||||||
fixed_type_variable2_test/02: RuntimeError
|
|
||||||
fixed_type_variable2_test/04: RuntimeError
|
|
||||||
fixed_type_variable2_test/06: RuntimeError
|
|
||||||
fixed_type_variable_test/01: RuntimeError
|
|
||||||
fixed_type_variable_test/02: RuntimeError
|
|
||||||
fixed_type_variable_test/03: RuntimeError
|
|
||||||
fixed_type_variable_test/04: RuntimeError
|
|
||||||
fixed_type_variable_test/05: RuntimeError
|
|
||||||
fixed_type_variable_test/06: RuntimeError
|
|
||||||
for2_test: RuntimeError
|
|
||||||
for_variable_capture_test: RuntimeError
|
|
||||||
forwarding_factory_constructor_default_values_test: RuntimeError
|
|
||||||
function_subtype2_test: RuntimeError
|
|
||||||
function_subtype_bound_closure3_test: RuntimeError
|
|
||||||
function_subtype_bound_closure4_test: RuntimeError
|
|
||||||
function_subtype_cast1_test: RuntimeError
|
|
||||||
function_subtype_inline0_test: RuntimeError
|
|
||||||
function_subtype_local3_test: RuntimeError
|
|
||||||
function_subtype_local4_test: RuntimeError
|
|
||||||
function_subtype_not1_test: RuntimeError
|
|
||||||
function_type_alias2_test: RuntimeError
|
|
||||||
function_type_alias3_test: RuntimeError
|
|
||||||
function_type_alias4_test: RuntimeError
|
|
||||||
generic2_test: RuntimeError
|
|
||||||
generic_closure_test: RuntimeError
|
|
||||||
generic_creation_test: RuntimeError
|
|
||||||
generic_field_mixin2_test: RuntimeError
|
|
||||||
generic_field_mixin4_test: RuntimeError
|
|
||||||
generic_field_mixin5_test: RuntimeError
|
|
||||||
generic_functions_test: CompileTimeError
|
|
||||||
generic_inheritance_test: RuntimeError
|
|
||||||
generic_local_functions_test: CompileTimeError
|
|
||||||
generic_methods_function_type_test: CompileTimeError
|
|
||||||
generic_methods_new_test: CompileTimeError
|
|
||||||
generic_methods_test: CompileTimeError
|
|
||||||
generic_methods_type_expression_test: CompileTimeError
|
|
||||||
generic_sends_test: CompileTimeError
|
|
||||||
generic_test: RuntimeError
|
|
||||||
getter_closure_execution_order_test: RuntimeError
|
|
||||||
getter_setter_in_lib_test: RuntimeError
|
|
||||||
inferrer_closure_test: RuntimeError
|
|
||||||
initializing_formal_access_test: CompileTimeError
|
|
||||||
initializing_formal_capture_test: CompileTimeError
|
|
||||||
initializing_formal_final_test: CompileTimeError
|
|
||||||
initializing_formal_type_test: CompileTimeError
|
|
||||||
instance_creation_in_function_annotation_test: RuntimeError
|
|
||||||
invocation_mirror_test: RuntimeError
|
|
||||||
is_not_class2_test: RuntimeError
|
|
||||||
issue13474_test: RuntimeError
|
|
||||||
issue23244_test: Crash
|
|
||||||
issue_1751477_test: RuntimeError
|
|
||||||
least_upper_bound_expansive_test/01: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/02: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/03: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/04: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/05: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/06: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/07: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/08: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/09: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/10: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/11: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/12: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/none: CompileTimeError
|
|
||||||
library_env_test/has_html_support: RuntimeError
|
|
||||||
library_env_test/has_no_io_support: RuntimeError
|
|
||||||
library_env_test/has_no_mirror_support: RuntimeError
|
|
||||||
list_literal4_test: RuntimeError
|
|
||||||
main_not_a_function_test/01: Crash
|
|
||||||
malformed_test/none: RuntimeError
|
|
||||||
map_literal3_test: RuntimeError
|
|
||||||
map_literal4_test: RuntimeError
|
|
||||||
map_literal6_test: RuntimeError
|
|
||||||
metadata_test: CompileTimeError
|
|
||||||
method_override_test: RuntimeError
|
|
||||||
mixin_generic_test: RuntimeError
|
|
||||||
mixin_illegal_super_use_test/01: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/02: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/03: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/04: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/05: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/06: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/07: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/08: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/09: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/10: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/11: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/01: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/02: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/03: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/04: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/05: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/06: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/07: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/08: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/09: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/10: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/11: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/12: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/13: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/14: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/15: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/16: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/17: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/18: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/19: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/20: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/21: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/22: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/23: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/24: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/25: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/26: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/27: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/28: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/29: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/30: MissingCompileTimeError
|
|
||||||
mixin_illegal_syntax_test/13: CompileTimeError
|
|
||||||
mixin_illegal_syntax_test/none: CompileTimeError
|
|
||||||
mixin_mixin2_test: RuntimeError
|
|
||||||
mixin_mixin3_test: RuntimeError
|
|
||||||
mixin_mixin4_test: RuntimeError
|
|
||||||
mixin_mixin5_test: RuntimeError
|
|
||||||
mixin_mixin_bound2_test: RuntimeError
|
|
||||||
mixin_mixin_bound_test: RuntimeError
|
|
||||||
mixin_super_test: RuntimeError
|
|
||||||
mixin_type_parameters_simple_test: RuntimeError
|
|
||||||
mixin_type_parameters_super_extends_test: RuntimeError
|
|
||||||
mixin_type_parameters_super_test: RuntimeError
|
|
||||||
multiline_newline_test/01: CompileTimeError
|
|
||||||
multiline_newline_test/02: CompileTimeError
|
|
||||||
multiline_newline_test/03: CompileTimeError
|
|
||||||
multiline_newline_test/04: MissingCompileTimeError
|
|
||||||
multiline_newline_test/05: MissingCompileTimeError
|
|
||||||
multiline_newline_test/06: MissingCompileTimeError
|
|
||||||
multiline_newline_test/none: RuntimeError
|
|
||||||
named_parameters_type_test/01: MissingRuntimeError
|
|
||||||
named_parameters_type_test/02: MissingRuntimeError
|
|
||||||
named_parameters_type_test/03: MissingRuntimeError
|
|
||||||
no_main_test/01: Crash
|
|
||||||
not_enough_positional_arguments_test/01: CompileTimeError
|
|
||||||
not_enough_positional_arguments_test/02: Crash
|
|
||||||
not_enough_positional_arguments_test/05: Crash
|
|
||||||
null_test/none: RuntimeError
|
|
||||||
number_identifier_test/05: RuntimeError
|
|
||||||
positional_parameters_type_test/01: MissingRuntimeError
|
|
||||||
positional_parameters_type_test/02: MissingRuntimeError
|
|
||||||
prefix10_negative_test: Fail
|
|
||||||
prefix16_test: RuntimeError
|
|
||||||
prefix21_test: RuntimeError
|
|
||||||
redirecting_constructor_initializer_test: RuntimeError
|
|
||||||
redirecting_factory_default_values_test/none: RuntimeError
|
|
||||||
redirecting_factory_reflection_test: RuntimeError
|
|
||||||
regress_18713_test: RuntimeError
|
|
||||||
regress_22443_test: RuntimeError
|
|
||||||
regress_22700_test: RuntimeError
|
|
||||||
regress_23408_test: RuntimeError
|
|
||||||
regress_27164_test: CompileTimeError
|
|
||||||
regress_r24720_test: RuntimeError
|
|
||||||
reify_typevar_static_test/00: MissingCompileTimeError
|
|
||||||
reify_typevar_test: RuntimeError
|
|
||||||
script1_negative_test: Fail
|
|
||||||
script2_negative_test: Fail
|
|
||||||
setter_no_getter_call_test/none: RuntimeError
|
|
||||||
static_setter_get_test/01: RuntimeError
|
|
||||||
super_call3_test/01: Crash
|
|
||||||
super_call4_test: RuntimeError
|
|
||||||
super_getter_setter_test: RuntimeError
|
|
||||||
super_no_such_method1_test/01: RuntimeError
|
|
||||||
super_no_such_method2_test/01: RuntimeError
|
|
||||||
super_no_such_method3_test/01: RuntimeError
|
|
||||||
super_no_such_method4_test/01: RuntimeError
|
|
||||||
super_no_such_method5_test/01: RuntimeError
|
|
||||||
super_operator_index3_test: RuntimeError
|
|
||||||
super_operator_index4_test: RuntimeError
|
|
||||||
super_operator_index5_test: RuntimeError
|
|
||||||
super_operator_index6_test: RuntimeError
|
|
||||||
super_operator_index7_test: RuntimeError
|
|
||||||
super_operator_index8_test: RuntimeError
|
|
||||||
super_test: RuntimeError
|
|
||||||
switch7_negative_test: Fail
|
|
||||||
switch_try_catch_test: RuntimeError
|
|
||||||
sync_generator3_test/test2: RuntimeError
|
|
||||||
tearoff_basic_test: CompileTimeError
|
|
||||||
tearoff_constructor_basic_test: CompileTimeError
|
|
||||||
throw8_test: RuntimeError
|
|
||||||
try_catch_on_syntax_test/10: MissingRuntimeError
|
|
||||||
try_catch_on_syntax_test/11: MissingRuntimeError
|
|
||||||
try_finally_regress_25654_test: RuntimeError
|
|
||||||
type_checks_in_factory_method_test: RuntimeError
|
|
||||||
type_parameter_literal_test: RuntimeError
|
|
||||||
type_parameter_test/04: Crash
|
|
||||||
type_variable_conflict2_test/02: MissingCompileTimeError
|
|
||||||
type_variable_conflict2_test/06: MissingCompileTimeError
|
|
||||||
type_variable_conflict2_test/08: MissingCompileTimeError
|
|
||||||
type_variable_conflict2_test/10: MissingCompileTimeError
|
|
||||||
type_variable_function_type_test: RuntimeError
|
|
||||||
vm/debug_break_enabled_vm_test/01: CompileTimeError
|
|
||||||
vm/debug_break_enabled_vm_test/none: CompileTimeError
|
|
||||||
vm/optimized_guarded_field_isolates_test: Crash
|
|
||||||
vm/reflect_core_vm_test: CompileTimeError
|
|
||||||
vm/type_cast_vm_test: RuntimeError
|
|
||||||
vm/type_vm_test: RuntimeError
|
|
||||||
|
|
||||||
# dartk: precompilation failures
|
|
||||||
[ $compiler == dartkp && $runtime == dart_precompiled ]
|
|
||||||
accessor_conflict_export2_test: RuntimeError
|
|
||||||
accessor_conflict_export_test: RuntimeError
|
|
||||||
accessor_conflict_import2_test: RuntimeError
|
|
||||||
accessor_conflict_import_prefixed2_test: RuntimeError
|
|
||||||
accessor_conflict_import_prefixed_test: RuntimeError
|
|
||||||
accessor_conflict_import_test: RuntimeError
|
|
||||||
assertion_test: RuntimeError
|
|
||||||
async_break_in_finally_test: RuntimeError
|
|
||||||
async_control_structures_test: RuntimeError
|
|
||||||
async_star_cancel_and_throw_in_finally_test: RuntimeError
|
|
||||||
async_star_cancel_while_paused_test: RuntimeError
|
|
||||||
async_star_regression_fisk_test: Crash
|
|
||||||
async_star_stream_take_test: Timeout
|
|
||||||
async_star_take_reyield_test: Timeout
|
|
||||||
async_star_test: Crash
|
|
||||||
async_throw_in_catch_test/forceAwait: RuntimeError
|
|
||||||
async_throw_in_catch_test/none: RuntimeError
|
|
||||||
asyncstar_throw_in_catch_test: Timeout
|
|
||||||
asyncstar_yield_test: Timeout
|
|
||||||
asyncstar_yieldstar_test: Timeout
|
|
||||||
await_exceptions_test: RuntimeError
|
|
||||||
await_future_test: RuntimeError
|
|
||||||
await_regression_test: RuntimeError
|
|
||||||
bad_constructor_test/05: CompileTimeError
|
|
||||||
bad_raw_string_negative_test: Fail
|
|
||||||
cha_deopt1_test: RuntimeError
|
|
||||||
cha_deopt2_test: RuntimeError
|
|
||||||
cha_deopt3_test: RuntimeError
|
|
||||||
closure_type_variable_test: RuntimeError
|
|
||||||
closures_initializer_test: RuntimeError
|
|
||||||
compile_time_constant12_test: Crash
|
|
||||||
compile_time_constant_k_test/01: RuntimeError
|
|
||||||
compile_time_constant_k_test/02: RuntimeError
|
|
||||||
compile_time_constant_k_test/03: RuntimeError
|
|
||||||
compile_time_constant_o_test/01: RuntimeError
|
|
||||||
compile_time_constant_o_test/02: RuntimeError
|
|
||||||
config_import_test: RuntimeError
|
|
||||||
conflicting_type_variable_and_setter_test: CompileTimeError
|
|
||||||
const_dynamic_type_literal_test/02: RuntimeError
|
|
||||||
const_error_multiply_initialized_test/02: RuntimeError
|
|
||||||
const_error_multiply_initialized_test/04: RuntimeError
|
|
||||||
const_evaluation_test/01: Crash
|
|
||||||
const_for_in_variable_test/01: MissingCompileTimeError
|
|
||||||
const_nested_test: RuntimeError
|
|
||||||
constructor2_test: RuntimeError
|
|
||||||
constructor3_test: RuntimeError
|
|
||||||
constructor5_test: RuntimeError
|
|
||||||
constructor6_test: RuntimeError
|
|
||||||
constructor_duplicate_final_test/01: MissingRuntimeError
|
|
||||||
constructor_duplicate_final_test/02: MissingRuntimeError
|
|
||||||
constructor_duplicate_final_test/03: MissingCompileTimeError
|
|
||||||
constructor_named_arguments_test/01: Crash
|
|
||||||
cyclic_type2_test: CompileTimeError
|
|
||||||
cyclic_type_test/00: RuntimeError
|
|
||||||
cyclic_type_test/01: RuntimeError
|
|
||||||
cyclic_type_test/02: CompileTimeError
|
|
||||||
cyclic_type_test/03: RuntimeError
|
|
||||||
cyclic_type_test/04: CompileTimeError
|
|
||||||
cyclic_type_variable_test/01: Crash
|
|
||||||
cyclic_type_variable_test/02: Crash
|
|
||||||
cyclic_type_variable_test/03: Crash
|
|
||||||
cyclic_type_variable_test/04: Crash
|
|
||||||
cyclic_type_variable_test/none: Crash
|
|
||||||
deep_nesting1_negative_test: Crash
|
|
||||||
deep_nesting2_negative_test: Crash
|
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
|
||||||
deferred_closurize_load_library_test: Crash
|
|
||||||
deferred_constant_list_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/none: RuntimeError
|
|
||||||
deferred_constraints_constants_test/reference_after_load: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/as_operation: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/catch_check: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/is_check: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new_before_load: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new_generic1: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new_generic2: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/new_generic3: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/none: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/static_method: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation1: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_generic1: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_generic2: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_generic3: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_generic4: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_non_deferred: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_null: RuntimeError
|
|
||||||
deferred_constraints_type_annotation_test/type_annotation_top_level: RuntimeError
|
|
||||||
deferred_function_type_test: RuntimeError
|
|
||||||
deferred_global_test: RuntimeError
|
|
||||||
deferred_import_core_test: RuntimeError
|
|
||||||
deferred_inheritance_constraints_test/redirecting_constructor: RuntimeError
|
|
||||||
deferred_inlined_test: RuntimeError
|
|
||||||
deferred_load_constants_test/none: RuntimeError
|
|
||||||
deferred_load_inval_code_test: RuntimeError
|
|
||||||
deferred_load_library_wrong_args_test/none: RuntimeError
|
|
||||||
deferred_mixin_test: RuntimeError
|
|
||||||
deferred_no_such_method_test: RuntimeError
|
|
||||||
deferred_not_loaded_check_test: RuntimeError
|
|
||||||
deferred_only_constant_test: RuntimeError
|
|
||||||
deferred_optimized_test: RuntimeError
|
|
||||||
deferred_redirecting_factory_test: RuntimeError
|
|
||||||
deferred_regression_22995_test: RuntimeError
|
|
||||||
deferred_shadow_load_library_test: RuntimeError
|
|
||||||
deferred_shared_and_unshared_classes_test: RuntimeError
|
|
||||||
deferred_static_seperate_test: RuntimeError
|
|
||||||
deferred_super_dependency_test/01: RuntimeError
|
|
||||||
deferred_type_dependency_test/as: RuntimeError
|
|
||||||
deferred_type_dependency_test/is: RuntimeError
|
|
||||||
deferred_type_dependency_test/none: RuntimeError
|
|
||||||
deferred_type_dependency_test/type_annotation: RuntimeError
|
|
||||||
duplicate_export_negative_test: Fail
|
|
||||||
enum_duplicate_test/01: RuntimeError
|
|
||||||
enum_duplicate_test/02: RuntimeError
|
|
||||||
enum_duplicate_test/none: RuntimeError
|
|
||||||
enum_mirror_test: RuntimeError
|
|
||||||
enum_private_test/01: RuntimeError
|
|
||||||
enum_private_test/02: RuntimeError
|
|
||||||
enum_private_test/none: RuntimeError
|
|
||||||
enum_syntax_test/06: MissingCompileTimeError
|
|
||||||
enum_test: RuntimeError
|
|
||||||
evaluation_redirecting_constructor_test: RuntimeError
|
|
||||||
example_constructor_test: RuntimeError
|
|
||||||
execute_finally8_test: RuntimeError
|
|
||||||
execute_finally9_test: RuntimeError
|
|
||||||
export_double_same_main_test: Crash
|
|
||||||
export_main_test: Crash
|
|
||||||
external_test/10: MissingRuntimeError
|
|
||||||
external_test/13: MissingRuntimeError
|
|
||||||
external_test/20: MissingRuntimeError
|
|
||||||
external_test/21: MissingCompileTimeError
|
|
||||||
external_test/24: MissingCompileTimeError
|
|
||||||
external_test/25: MissingCompileTimeError
|
|
||||||
f_bounded_equality_test: RuntimeError
|
|
||||||
field_initialization_order_test: RuntimeError
|
|
||||||
final_field_initialization_order_test: RuntimeError
|
|
||||||
final_super_field_set_test/01: RuntimeError
|
|
||||||
final_syntax_test/01: MissingCompileTimeError
|
|
||||||
final_syntax_test/02: MissingCompileTimeError
|
|
||||||
final_syntax_test/03: MissingCompileTimeError
|
|
||||||
final_syntax_test/04: MissingCompileTimeError
|
|
||||||
fixed_type_variable2_test/02: RuntimeError
|
|
||||||
fixed_type_variable2_test/04: RuntimeError
|
|
||||||
fixed_type_variable2_test/06: RuntimeError
|
|
||||||
fixed_type_variable_test/01: RuntimeError
|
|
||||||
fixed_type_variable_test/02: RuntimeError
|
|
||||||
fixed_type_variable_test/03: RuntimeError
|
|
||||||
fixed_type_variable_test/04: RuntimeError
|
|
||||||
fixed_type_variable_test/05: RuntimeError
|
|
||||||
fixed_type_variable_test/06: RuntimeError
|
|
||||||
for2_test: RuntimeError
|
|
||||||
for_variable_capture_test: RuntimeError
|
|
||||||
forwarding_factory_constructor_default_values_test: RuntimeError
|
|
||||||
full_stacktrace1_test: RuntimeError
|
|
||||||
full_stacktrace2_test: RuntimeError
|
|
||||||
full_stacktrace3_test: RuntimeError
|
|
||||||
function_subtype2_test: RuntimeError
|
|
||||||
function_subtype_bound_closure3_test: RuntimeError
|
|
||||||
function_subtype_bound_closure4_test: RuntimeError
|
|
||||||
function_subtype_cast1_test: RuntimeError
|
|
||||||
function_subtype_inline0_test: RuntimeError
|
|
||||||
function_subtype_local3_test: RuntimeError
|
|
||||||
function_subtype_local4_test: RuntimeError
|
|
||||||
function_subtype_not1_test: RuntimeError
|
|
||||||
function_type_alias2_test: RuntimeError
|
|
||||||
function_type_alias3_test: RuntimeError
|
|
||||||
function_type_alias4_test: RuntimeError
|
|
||||||
generic2_test: RuntimeError
|
|
||||||
generic_closure_test: RuntimeError
|
|
||||||
generic_creation_test: RuntimeError
|
|
||||||
generic_field_mixin2_test: RuntimeError
|
|
||||||
generic_field_mixin4_test: RuntimeError
|
|
||||||
generic_field_mixin5_test: RuntimeError
|
|
||||||
generic_functions_test: CompileTimeError
|
|
||||||
generic_inheritance_test: RuntimeError
|
|
||||||
generic_local_functions_test: CompileTimeError
|
|
||||||
generic_methods_function_type_test: CompileTimeError
|
|
||||||
generic_methods_new_test: CompileTimeError
|
|
||||||
generic_methods_test: CompileTimeError
|
|
||||||
generic_methods_type_expression_test: CompileTimeError
|
|
||||||
generic_sends_test: CompileTimeError
|
|
||||||
generic_test: RuntimeError
|
|
||||||
getter_closure_execution_order_test: RuntimeError
|
|
||||||
getter_setter_in_lib_test: RuntimeError
|
|
||||||
if_null_assignment_static_test/35: Crash
|
|
||||||
inferrer_closure_test: RuntimeError
|
|
||||||
initializing_formal_access_test: CompileTimeError
|
|
||||||
initializing_formal_capture_test: CompileTimeError
|
|
||||||
initializing_formal_final_test: CompileTimeError
|
|
||||||
initializing_formal_type_test: CompileTimeError
|
|
||||||
instance_creation_in_function_annotation_test: Crash
|
|
||||||
invocation_mirror_invoke_on2_test: Crash
|
|
||||||
invocation_mirror_test: Crash
|
|
||||||
is_not_class2_test: RuntimeError
|
|
||||||
issue13474_test: RuntimeError
|
|
||||||
issue21079_test: Crash
|
|
||||||
issue22800_test: Crash
|
|
||||||
issue_1751477_test: RuntimeError
|
|
||||||
large_class_declaration_test: Timeout
|
|
||||||
least_upper_bound_expansive_test/01: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/02: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/03: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/04: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/05: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/06: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/07: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/08: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/09: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/10: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/11: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/12: CompileTimeError
|
|
||||||
least_upper_bound_expansive_test/none: CompileTimeError
|
|
||||||
library_env_test/has_html_support: RuntimeError
|
|
||||||
library_env_test/has_mirror_support: RuntimeError
|
|
||||||
library_env_test/has_no_io_support: RuntimeError
|
|
||||||
list_literal4_test: RuntimeError
|
|
||||||
main_not_a_function_test/01: Crash
|
|
||||||
malformed_test/none: RuntimeError
|
|
||||||
map_literal3_test: RuntimeError
|
|
||||||
map_literal4_test: RuntimeError
|
|
||||||
map_literal6_test: RuntimeError
|
|
||||||
metadata_test: CompileTimeError
|
|
||||||
method_override_test: RuntimeError
|
|
||||||
mixin_generic_test: RuntimeError
|
|
||||||
mixin_illegal_super_use_test/01: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/02: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/03: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/04: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/05: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/06: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/07: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/08: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/09: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/10: MissingCompileTimeError
|
|
||||||
mixin_illegal_super_use_test/11: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/01: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/02: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/03: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/04: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/05: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/06: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/07: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/08: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/09: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/10: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/11: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/12: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/13: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/14: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/15: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/16: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/17: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/18: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/19: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/20: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/21: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/22: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/23: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/24: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/25: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/26: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/27: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/28: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/29: MissingCompileTimeError
|
|
||||||
mixin_illegal_superclass_test/30: MissingCompileTimeError
|
|
||||||
mixin_illegal_syntax_test/13: CompileTimeError
|
|
||||||
mixin_illegal_syntax_test/none: CompileTimeError
|
|
||||||
mixin_mixin2_test: RuntimeError
|
|
||||||
mixin_mixin3_test: RuntimeError
|
|
||||||
mixin_mixin4_test: RuntimeError
|
|
||||||
mixin_mixin5_test: RuntimeError
|
|
||||||
mixin_mixin_bound2_test: RuntimeError
|
|
||||||
mixin_mixin_bound_test: RuntimeError
|
|
||||||
mixin_super_test: RuntimeError
|
|
||||||
mixin_type_parameters_simple_test: RuntimeError
|
|
||||||
mixin_type_parameters_super_extends_test: RuntimeError
|
|
||||||
mixin_type_parameters_super_test: RuntimeError
|
|
||||||
multiline_newline_test/01: CompileTimeError
|
|
||||||
multiline_newline_test/02: CompileTimeError
|
|
||||||
multiline_newline_test/03: CompileTimeError
|
|
||||||
multiline_newline_test/04: MissingCompileTimeError
|
|
||||||
multiline_newline_test/05: MissingCompileTimeError
|
|
||||||
multiline_newline_test/06: MissingCompileTimeError
|
|
||||||
multiline_newline_test/none: RuntimeError
|
|
||||||
named_parameters_type_test/01: MissingRuntimeError
|
|
||||||
named_parameters_type_test/02: MissingRuntimeError
|
|
||||||
named_parameters_type_test/03: MissingRuntimeError
|
|
||||||
no_main_test/01: Crash
|
|
||||||
not_enough_positional_arguments_test/01: CompileTimeError
|
|
||||||
not_enough_positional_arguments_test/02: MissingRuntimeError
|
|
||||||
not_enough_positional_arguments_test/05: Crash
|
|
||||||
null_test/none: RuntimeError
|
|
||||||
number_identifier_test/05: RuntimeError
|
|
||||||
positional_parameters_type_test/01: MissingRuntimeError
|
|
||||||
positional_parameters_type_test/02: MissingRuntimeError
|
|
||||||
prefix10_negative_test: Fail
|
|
||||||
prefix16_test: RuntimeError
|
|
||||||
prefix21_test: RuntimeError
|
|
||||||
redirecting_constructor_initializer_test: RuntimeError
|
|
||||||
redirecting_factory_default_values_test/none: RuntimeError
|
|
||||||
redirecting_factory_reflection_test: Crash
|
|
||||||
regress_18535_test: Crash
|
|
||||||
regress_18713_test: RuntimeError
|
|
||||||
regress_22443_test: RuntimeError
|
|
||||||
regress_22700_test: RuntimeError
|
|
||||||
regress_22777_test: Crash
|
|
||||||
regress_23408_test: RuntimeError
|
|
||||||
regress_26175_test: Crash
|
|
||||||
regress_27164_test: CompileTimeError
|
|
||||||
regress_r24720_test: RuntimeError
|
|
||||||
reify_typevar_test: RuntimeError
|
|
||||||
script1_negative_test: Fail
|
|
||||||
script2_negative_test: Fail
|
|
||||||
setter_no_getter_call_test/none: RuntimeError
|
|
||||||
stack_trace_test: RuntimeError
|
|
||||||
stacktrace_rethrow_error_test/none: RuntimeError
|
|
||||||
stacktrace_rethrow_error_test/withtraceparameter: RuntimeError
|
|
||||||
stacktrace_rethrow_nonerror_test: RuntimeError
|
|
||||||
static_setter_get_test/01: RuntimeError
|
|
||||||
super_call3_test/01: Crash
|
|
||||||
super_call4_test: RuntimeError
|
|
||||||
super_getter_setter_test: RuntimeError
|
|
||||||
super_no_such_method1_test/01: RuntimeError
|
|
||||||
super_no_such_method2_test/01: RuntimeError
|
|
||||||
super_no_such_method3_test/01: RuntimeError
|
|
||||||
super_no_such_method4_test/01: RuntimeError
|
|
||||||
super_no_such_method5_test/01: RuntimeError
|
|
||||||
super_operator_index3_test: RuntimeError
|
|
||||||
super_operator_index4_test: RuntimeError
|
|
||||||
super_operator_index5_test: RuntimeError
|
|
||||||
super_operator_index6_test: RuntimeError
|
|
||||||
super_operator_index7_test: RuntimeError
|
|
||||||
super_operator_index8_test: RuntimeError
|
|
||||||
super_test: RuntimeError
|
|
||||||
switch7_negative_test: Fail
|
|
||||||
switch_try_catch_test: RuntimeError
|
|
||||||
sync_generator3_test/test2: RuntimeError
|
|
||||||
tearoff_basic_test: CompileTimeError
|
|
||||||
tearoff_constructor_basic_test: CompileTimeError
|
|
||||||
throw8_test: RuntimeError
|
|
||||||
try_catch_on_syntax_test/10: MissingRuntimeError
|
|
||||||
try_catch_on_syntax_test/11: MissingRuntimeError
|
|
||||||
try_finally_regress_25654_test: RuntimeError
|
|
||||||
type_checks_in_factory_method_test: RuntimeError
|
|
||||||
type_parameter_literal_test: RuntimeError
|
|
||||||
type_parameter_test/04: Crash
|
|
||||||
type_variable_conflict2_test/02: MissingCompileTimeError
|
|
||||||
type_variable_function_type_test: RuntimeError
|
|
||||||
vm/debug_break_enabled_vm_test/01: CompileTimeError
|
|
||||||
vm/debug_break_enabled_vm_test/none: CompileTimeError
|
|
||||||
vm/reflect_core_vm_test: CompileTimeError
|
|
||||||
vm/type_cast_vm_test: RuntimeError
|
|
||||||
vm/type_vm_test: RuntimeError
|
|
|
@ -1,536 +0,0 @@
|
||||||
#!/usr/bin/env dart
|
|
||||||
// Copyright (c) 2015, 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.
|
|
||||||
|
|
||||||
/// Command line tool to merge the SDK libraries and our patch files.
|
|
||||||
/// This is currently designed as an offline tool, but we could automate it.
|
|
||||||
|
|
||||||
import 'dart:io';
|
|
||||||
import 'dart:math' as math;
|
|
||||||
|
|
||||||
import 'package:analyzer/analyzer.dart';
|
|
||||||
import 'package:analyzer/src/generated/sdk.dart';
|
|
||||||
import 'package:path/path.dart' as path;
|
|
||||||
|
|
||||||
void main(List<String> argv) {
|
|
||||||
var base = path.fromUri(Platform.script);
|
|
||||||
var dartDir = path.dirname(path.dirname(path.absolute(base)));
|
|
||||||
|
|
||||||
if (argv.length != 4 ||
|
|
||||||
!argv.isEmpty && argv.first != 'vm' && argv.first != 'ddc') {
|
|
||||||
var self = path.relative(base);
|
|
||||||
print('Usage: $self MODE SDK_DIR PATCH_DIR OUTPUT_DIR');
|
|
||||||
print('MODE must be one of ddc or vm.');
|
|
||||||
|
|
||||||
var toolDir = path.relative(path.dirname(base));
|
|
||||||
var sdkExample = path.join(toolDir, 'input_sdk');
|
|
||||||
var patchExample = path.join(sdkExample, 'patch');
|
|
||||||
var outExample =
|
|
||||||
path.relative(path.normalize(path.join('gen', 'patched_sdk')));
|
|
||||||
print('For example:');
|
|
||||||
print('\$ $self ddc $sdkExample $patchExample $outExample');
|
|
||||||
|
|
||||||
var repositoryDir = path.relative(path.dirname(path.dirname(base)));
|
|
||||||
sdkExample = path.relative(path.join(repositoryDir, 'sdk'));
|
|
||||||
patchExample = path.relative(path.join(repositoryDir, 'out', 'DebugX64',
|
|
||||||
'obj', 'gen', 'patch'));
|
|
||||||
outExample = path.relative(path.join(repositoryDir, 'out', 'DebugX64',
|
|
||||||
'obj', 'gen', 'patched_sdk'));
|
|
||||||
print('or:');
|
|
||||||
print('\$ $self vm $sdkExample $patchExample $outExample');
|
|
||||||
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
var mode = argv[0];
|
|
||||||
var input = argv[1];
|
|
||||||
var sdkLibIn = path.join(input, 'lib');
|
|
||||||
var patchIn = argv[2];
|
|
||||||
var sdkOut = path.join(argv[3], 'lib');
|
|
||||||
|
|
||||||
var privateIn = path.join(input, 'private');
|
|
||||||
var INTERNAL_PATH = '_internal/compiler/js_lib/';
|
|
||||||
|
|
||||||
// Copy and patch libraries.dart and version
|
|
||||||
var libContents = new File(path.join(sdkLibIn, '_internal',
|
|
||||||
'sdk_library_metadata', 'lib', 'libraries.dart')).readAsStringSync();
|
|
||||||
var patchedLibContents = libContents;
|
|
||||||
if (mode == 'vm') {
|
|
||||||
libContents = libContents.replaceAll(
|
|
||||||
' libraries = const {',
|
|
||||||
''' libraries = const {
|
|
||||||
|
|
||||||
"_builtin": const LibraryInfo(
|
|
||||||
"_builtin/_builtin.dart",
|
|
||||||
categories: "Client,Server",
|
|
||||||
implementation: true,
|
|
||||||
documented: false,
|
|
||||||
platforms: VM_PLATFORM),
|
|
||||||
|
|
||||||
"profiler": const LibraryInfo(
|
|
||||||
"profiler/profiler.dart",
|
|
||||||
maturity: Maturity.DEPRECATED,
|
|
||||||
documented: false),
|
|
||||||
|
|
||||||
"_vmservice": const LibraryInfo(
|
|
||||||
"vmservice/vmservice.dart",
|
|
||||||
implementation: true,
|
|
||||||
documented: false,
|
|
||||||
platforms: VM_PLATFORM),
|
|
||||||
|
|
||||||
"vmservice_io": const LibraryInfo(
|
|
||||||
"vmservice_io/vmservice_io.dart",
|
|
||||||
implementation: true,
|
|
||||||
documented: false,
|
|
||||||
platforms: VM_PLATFORM),
|
|
||||||
|
|
||||||
''');
|
|
||||||
}
|
|
||||||
_writeSync(
|
|
||||||
path.join(
|
|
||||||
sdkOut, '_internal', 'sdk_library_metadata', 'lib', 'libraries.dart'),
|
|
||||||
libContents);
|
|
||||||
if (mode == 'ddc') {
|
|
||||||
_writeSync(path.join(sdkOut, '..', 'version'),
|
|
||||||
new File(path.join(sdkLibIn, '..', 'version')).readAsStringSync());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse libraries.dart
|
|
||||||
var sdkLibraries = _getSdkLibraries(libContents);
|
|
||||||
|
|
||||||
// Enumerate core libraries and apply patches
|
|
||||||
for (SdkLibrary library in sdkLibraries) {
|
|
||||||
// TODO(jmesserly): analyzer does not handle the default case of
|
|
||||||
// "both platforms" correctly, and treats it as being supported on neither.
|
|
||||||
// So instead we skip explicitly marked as either VM or dart2js libs.
|
|
||||||
if (mode == 'ddc' ? libary.isVmLibrary : library.isDart2JsLibrary) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var libraryOut = path.join(sdkLibIn, library.path);
|
|
||||||
var libraryIn;
|
|
||||||
if (mode == 'vm' && library.path.contains('typed_data.dart')) {
|
|
||||||
// dart:typed_data is unlike the other libraries in the SDK. The VM does
|
|
||||||
// not apply a patch to the base SDK implementation of the library.
|
|
||||||
// Instead, the VM provides a replacement implementation and ignores the
|
|
||||||
// sources in the SDK.
|
|
||||||
libraryIn =
|
|
||||||
path.join(dartDir, 'runtime', 'lib', 'typed_data.dart');
|
|
||||||
} else if (mode == 'ddc' && library.path.contains(INTERNAL_PATH)) {
|
|
||||||
libraryIn =
|
|
||||||
path.join(privateIn, library.path.replaceAll(INTERNAL_PATH, ''));
|
|
||||||
} else {
|
|
||||||
libraryIn = libraryOut;
|
|
||||||
}
|
|
||||||
|
|
||||||
var libraryFile = new File(libraryIn);
|
|
||||||
if (libraryFile.existsSync()) {
|
|
||||||
var outPaths = <String>[libraryOut];
|
|
||||||
var libraryContents = libraryFile.readAsStringSync();
|
|
||||||
|
|
||||||
int inputModifyTime =
|
|
||||||
libraryFile.lastModifiedSync().millisecondsSinceEpoch;
|
|
||||||
var partFiles = <File>[];
|
|
||||||
for (var part in parseDirectives(libraryContents).directives) {
|
|
||||||
if (part is PartDirective) {
|
|
||||||
var partPath = part.uri.stringValue;
|
|
||||||
outPaths.add(path.join(path.dirname(libraryOut), partPath));
|
|
||||||
|
|
||||||
var partFile = new File(path.join(path.dirname(libraryIn), partPath));
|
|
||||||
partFiles.add(partFile);
|
|
||||||
inputModifyTime = math.max(inputModifyTime,
|
|
||||||
partFile.lastModifiedSync().millisecondsSinceEpoch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// See if we can find a patch file.
|
|
||||||
var patchPath = path.join(
|
|
||||||
patchIn, path.basenameWithoutExtension(libraryIn) + '_patch.dart');
|
|
||||||
|
|
||||||
var patchFile = new File(patchPath);
|
|
||||||
bool patchExists = patchFile.existsSync();
|
|
||||||
if (patchExists) {
|
|
||||||
inputModifyTime = math.max(inputModifyTime,
|
|
||||||
patchFile.lastModifiedSync().millisecondsSinceEpoch);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compute output paths
|
|
||||||
outPaths = outPaths
|
|
||||||
.map((p) => path.join(sdkOut, path.relative(p, from: sdkLibIn)))
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
// Compare output modify time with input modify time.
|
|
||||||
bool needsUpdate = false;
|
|
||||||
for (var outPath in outPaths) {
|
|
||||||
var outFile = new File(outPath);
|
|
||||||
if (!outFile.existsSync() ||
|
|
||||||
outFile.lastModifiedSync().millisecondsSinceEpoch <
|
|
||||||
inputModifyTime) {
|
|
||||||
needsUpdate = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (needsUpdate) {
|
|
||||||
var contents = <String>[libraryContents];
|
|
||||||
contents.addAll(partFiles.map((f) => f.readAsStringSync()));
|
|
||||||
if (patchExists) {
|
|
||||||
var patchContents = patchFile.readAsStringSync();
|
|
||||||
contents = _patchLibrary(
|
|
||||||
patchFile.toString(), contents, patchContents);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < outPaths.length; i++) {
|
|
||||||
if (path.basename(outPaths[i]) == 'internal.dart') {
|
|
||||||
contents[i] += '''
|
|
||||||
|
|
||||||
/// Marks a function as an external implementation ("native" in the Dart VM).
|
|
||||||
///
|
|
||||||
/// Provides a backend-specific String that can be used to identify the
|
|
||||||
/// function's implementation
|
|
||||||
class ExternalName {
|
|
||||||
final String name;
|
|
||||||
const ExternalName(this.name);
|
|
||||||
}
|
|
||||||
''';
|
|
||||||
}
|
|
||||||
|
|
||||||
_writeSync(outPaths[i], contents[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mode == 'vm') {
|
|
||||||
|
|
||||||
for (var tuple in [['_builtin', 'builtin.dart']]) {
|
|
||||||
var vmLibrary = tuple[0];
|
|
||||||
var dartFile = tuple[1];
|
|
||||||
|
|
||||||
// The "dart:_builtin" library is only available for the DartVM.
|
|
||||||
var builtinLibraryIn = path.join(dartDir, 'runtime', 'bin', dartFile);
|
|
||||||
var builtinLibraryOut = path.join(sdkOut, vmLibrary, '${vmLibrary}.dart');
|
|
||||||
_writeSync(builtinLibraryOut, new File(builtinLibraryIn).readAsStringSync());
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var file in ['loader.dart', 'server.dart', 'vmservice_io.dart']) {
|
|
||||||
var libraryIn = path.join(dartDir, 'runtime', 'bin', 'vmservice', file);
|
|
||||||
var libraryOut = path.join(sdkOut, 'vmservice_io', file);
|
|
||||||
_writeSync(libraryOut, new File(libraryIn).readAsStringSync());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Writes a file, creating the directory if needed.
|
|
||||||
void _writeSync(String filePath, String contents) {
|
|
||||||
var outDir = new Directory(path.dirname(filePath));
|
|
||||||
if (!outDir.existsSync()) outDir.createSync(recursive: true);
|
|
||||||
|
|
||||||
new File(filePath).writeAsStringSync(contents);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Merges dart:* library code with code from *_patch.dart file.
|
|
||||||
///
|
|
||||||
/// Takes a list of the library's parts contents, with the main library contents
|
|
||||||
/// first in the list, and the contents of the patch file.
|
|
||||||
///
|
|
||||||
/// The result will have `@patch` implementations merged into the correct place
|
|
||||||
/// (e.g. the class or top-level function declaration) and all other
|
|
||||||
/// declarations introduced by the patch will be placed into the main library
|
|
||||||
/// file.
|
|
||||||
///
|
|
||||||
/// This is purely a syntactic transformation. Unlike dart2js patch files, there
|
|
||||||
/// is no semantic meaning given to the *_patch files, and they do not magically
|
|
||||||
/// get their own library scope, etc.
|
|
||||||
///
|
|
||||||
/// Editorializing: the dart2js approach requires a Dart front end such as
|
|
||||||
/// package:analyzer to semantically model a feature beyond what is specified
|
|
||||||
/// in the Dart language. Since this feature is only for the convenience of
|
|
||||||
/// writing the dart:* libraries, and not a tool given to Dart developers, it
|
|
||||||
/// seems like a non-ideal situation. Instead we keep the preprocessing simple.
|
|
||||||
List<String> _patchLibrary(String name,
|
|
||||||
List<String> partsContents,
|
|
||||||
String patchContents) {
|
|
||||||
var results = <StringEditBuffer>[];
|
|
||||||
|
|
||||||
// Parse the patch first. We'll need to extract bits of this as we go through
|
|
||||||
// the other files.
|
|
||||||
final patchFinder = new PatchFinder.parseAndVisit(name, patchContents);
|
|
||||||
|
|
||||||
// Merge `external` declarations with the corresponding `@patch` code.
|
|
||||||
for (var partContent in partsContents) {
|
|
||||||
var partEdits = new StringEditBuffer(partContent);
|
|
||||||
var partUnit = parseCompilationUnit(partContent);
|
|
||||||
partUnit.accept(new PatchApplier(partEdits, patchFinder));
|
|
||||||
results.add(partEdits);
|
|
||||||
}
|
|
||||||
return new List<String>.from(results.map((e) => e.toString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Merge `@patch` declarations into `external` declarations.
|
|
||||||
class PatchApplier extends GeneralizingAstVisitor {
|
|
||||||
final StringEditBuffer edits;
|
|
||||||
final PatchFinder patch;
|
|
||||||
|
|
||||||
bool _isLibrary = true; // until proven otherwise.
|
|
||||||
|
|
||||||
PatchApplier(this.edits, this.patch);
|
|
||||||
|
|
||||||
@override
|
|
||||||
visitCompilationUnit(CompilationUnit node) {
|
|
||||||
super.visitCompilationUnit(node);
|
|
||||||
if (_isLibrary) _mergeUnpatched(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _merge(AstNode node, int pos) {
|
|
||||||
var code = patch.contents.substring(node.offset, node.end);
|
|
||||||
edits.insert(pos, '\n' + code);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Merges directives and declarations that are not `@patch` into the library.
|
|
||||||
void _mergeUnpatched(CompilationUnit unit) {
|
|
||||||
// Merge imports from the patch
|
|
||||||
// TODO(jmesserly): remove duplicate imports
|
|
||||||
|
|
||||||
// To patch a library, we must have a library directive
|
|
||||||
var libDir = unit.directives.first as LibraryDirective;
|
|
||||||
int importPos = unit.directives
|
|
||||||
.lastWhere((d) => d is ImportDirective, orElse: () => libDir)
|
|
||||||
.end;
|
|
||||||
for (var d in patch.unit.directives.where((d) => d is ImportDirective)) {
|
|
||||||
_merge(d, importPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
int partPos = unit.directives.last.end;
|
|
||||||
for (var d in patch.unit.directives.where((d) => d is PartDirective)) {
|
|
||||||
_merge(d, partPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Merge declarations from the patch
|
|
||||||
int declPos = edits.original.length;
|
|
||||||
for (var d in patch.mergeDeclarations) {
|
|
||||||
_merge(d, declPos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
visitPartOfDirective(PartOfDirective node) {
|
|
||||||
_isLibrary = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
visitFunctionDeclaration(FunctionDeclaration node) {
|
|
||||||
_maybePatch(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Merge patches and extensions into the class
|
|
||||||
@override
|
|
||||||
visitClassDeclaration(ClassDeclaration node) {
|
|
||||||
node.members.forEach(_maybePatch);
|
|
||||||
|
|
||||||
var mergeMembers = patch.mergeMembers[_qualifiedName(node)];
|
|
||||||
if (mergeMembers == null) return;
|
|
||||||
|
|
||||||
// Merge members from the patch
|
|
||||||
var pos = node.members.last.end;
|
|
||||||
for (var member in mergeMembers) {
|
|
||||||
var code = patch.contents.substring(member.offset, member.end);
|
|
||||||
edits.insert(pos, '\n\n ' + code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _maybePatch(AstNode node) {
|
|
||||||
if (node is FieldDeclaration) return;
|
|
||||||
|
|
||||||
var externalKeyword = (node as dynamic).externalKeyword;
|
|
||||||
if (externalKeyword == null) return;
|
|
||||||
|
|
||||||
var name = _qualifiedName(node);
|
|
||||||
var patchNode = patch.patches[name];
|
|
||||||
if (patchNode == null) {
|
|
||||||
print('warning: patch not found for $name: $node');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Annotation patchMeta = patchNode.metadata.lastWhere(_isPatchAnnotation);
|
|
||||||
int start = patchMeta.endToken.next.offset;
|
|
||||||
var code = patch.contents.substring(start, patchNode.end);
|
|
||||||
|
|
||||||
// For some node like static fields, the node's offset doesn't include
|
|
||||||
// the external keyword. Also starting from the keyword lets us preserve
|
|
||||||
// documentation comments.
|
|
||||||
edits.replace(externalKeyword.offset, node.end, code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class PatchFinder extends GeneralizingAstVisitor {
|
|
||||||
final String contents;
|
|
||||||
final CompilationUnit unit;
|
|
||||||
|
|
||||||
final Map patches = <String, Declaration>{};
|
|
||||||
final Map mergeMembers = <String, List<ClassMember>>{};
|
|
||||||
final List mergeDeclarations = <CompilationUnitMember>[];
|
|
||||||
|
|
||||||
PatchFinder.parseAndVisit(String name, String contents)
|
|
||||||
: contents = contents,
|
|
||||||
unit = parseCompilationUnit(contents, name: name) {
|
|
||||||
visitCompilationUnit(unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
visitCompilationUnitMember(CompilationUnitMember node) {
|
|
||||||
mergeDeclarations.add(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
visitClassDeclaration(ClassDeclaration node) {
|
|
||||||
if (_isPatch(node)) {
|
|
||||||
var members = <ClassMember>[];
|
|
||||||
for (var member in node.members) {
|
|
||||||
if (_isPatch(member)) {
|
|
||||||
patches[_qualifiedName(member)] = member;
|
|
||||||
} else {
|
|
||||||
members.add(member);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (members.isNotEmpty) {
|
|
||||||
mergeMembers[_qualifiedName(node)] = members;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mergeDeclarations.add(node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
visitFunctionDeclaration(FunctionDeclaration node) {
|
|
||||||
if (_isPatch(node)) {
|
|
||||||
patches[_qualifiedName(node)] = node;
|
|
||||||
} else {
|
|
||||||
mergeDeclarations.add(node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
visitFunctionBody(node) {} // skip method bodies
|
|
||||||
}
|
|
||||||
|
|
||||||
String _qualifiedName(Declaration node) {
|
|
||||||
var parent = node.parent;
|
|
||||||
var className = '';
|
|
||||||
if (parent is ClassDeclaration) {
|
|
||||||
className = parent.name.name + '.';
|
|
||||||
}
|
|
||||||
var name = (node as dynamic).name;
|
|
||||||
name = (name != null ? name.name : '');
|
|
||||||
|
|
||||||
var accessor = '';
|
|
||||||
if (node is MethodDeclaration) {
|
|
||||||
if (node.isGetter) accessor = 'get:';
|
|
||||||
else if (node.isSetter) accessor = 'set:';
|
|
||||||
}
|
|
||||||
return className + accessor + name;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool _isPatch(AnnotatedNode node) => node.metadata.any(_isPatchAnnotation);
|
|
||||||
|
|
||||||
bool _isPatchAnnotation(Annotation m) =>
|
|
||||||
m.name.name == 'patch' && m.constructorName == null && m.arguments == null;
|
|
||||||
|
|
||||||
/// Editable string buffer.
|
|
||||||
///
|
|
||||||
/// Applies a series of edits (insertions, removals, replacements) using
|
|
||||||
/// original location information, and composes them into the edited string.
|
|
||||||
///
|
|
||||||
/// For example, starting with a parsed AST with original source locations,
|
|
||||||
/// this type allows edits to be made without regards to other edits.
|
|
||||||
class StringEditBuffer {
|
|
||||||
final String original;
|
|
||||||
final _edits = <_StringEdit>[];
|
|
||||||
|
|
||||||
/// Creates a new transaction.
|
|
||||||
StringEditBuffer(this.original);
|
|
||||||
|
|
||||||
bool get hasEdits => _edits.length > 0;
|
|
||||||
|
|
||||||
/// Edit the original text, replacing text on the range [begin] and
|
|
||||||
/// exclusive [end] with the [replacement] string.
|
|
||||||
void replace(int begin, int end, String replacement) {
|
|
||||||
_edits.add(new _StringEdit(begin, end, replacement));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Insert [string] at [offset].
|
|
||||||
/// Equivalent to `replace(offset, offset, string)`.
|
|
||||||
void insert(int offset, String string) => replace(offset, offset, string);
|
|
||||||
|
|
||||||
/// Remove text from the range [begin] to exclusive [end].
|
|
||||||
/// Equivalent to `replace(begin, end, '')`.
|
|
||||||
void remove(int begin, int end) => replace(begin, end, '');
|
|
||||||
|
|
||||||
/// Applies all pending [edit]s and returns a new string.
|
|
||||||
///
|
|
||||||
/// This method is non-destructive: it does not discard existing edits or
|
|
||||||
/// change the [original] string. Further edits can be added and this method
|
|
||||||
/// can be called again.
|
|
||||||
///
|
|
||||||
/// Throws [UnsupportedError] if the edits were overlapping. If no edits were
|
|
||||||
/// made, the original string will be returned.
|
|
||||||
String toString() {
|
|
||||||
var sb = new StringBuffer();
|
|
||||||
if (_edits.length == 0) return original;
|
|
||||||
|
|
||||||
// Sort edits by start location.
|
|
||||||
_edits.sort();
|
|
||||||
|
|
||||||
int consumed = 0;
|
|
||||||
for (var edit in _edits) {
|
|
||||||
if (consumed > edit.begin) {
|
|
||||||
sb = new StringBuffer();
|
|
||||||
sb.write('overlapping edits. Insert at offset ');
|
|
||||||
sb.write(edit.begin);
|
|
||||||
sb.write(' but have consumed ');
|
|
||||||
sb.write(consumed);
|
|
||||||
sb.write(' input characters. List of edits:');
|
|
||||||
for (var e in _edits) {
|
|
||||||
sb.write('\n ');
|
|
||||||
sb.write(e);
|
|
||||||
}
|
|
||||||
throw new UnsupportedError(sb.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add characters from the original string between this edit and the last
|
|
||||||
// one, if any.
|
|
||||||
var betweenEdits = original.substring(consumed, edit.begin);
|
|
||||||
sb.write(betweenEdits);
|
|
||||||
sb.write(edit.replace);
|
|
||||||
consumed = edit.end;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add any text from the end of the original string that was not replaced.
|
|
||||||
sb.write(original.substring(consumed));
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _StringEdit implements Comparable<_StringEdit> {
|
|
||||||
final int begin;
|
|
||||||
final int end;
|
|
||||||
final String replace;
|
|
||||||
|
|
||||||
_StringEdit(this.begin, this.end, this.replace);
|
|
||||||
|
|
||||||
int get length => end - begin;
|
|
||||||
|
|
||||||
String toString() => '(Edit @ $begin,$end: "$replace")';
|
|
||||||
|
|
||||||
int compareTo(_StringEdit other) {
|
|
||||||
int diff = begin - other.begin;
|
|
||||||
if (diff != 0) return diff;
|
|
||||||
return end - other.end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<SdkLibrary> _getSdkLibraries(String contents) {
|
|
||||||
var libraryBuilder = new SdkLibrariesReader_LibraryBuilder(true);
|
|
||||||
parseCompilationUnit(contents).accept(libraryBuilder);
|
|
||||||
return libraryBuilder.librariesMap.sdkLibraries;
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# Copyright (c) 2016, 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.
|
|
||||||
|
|
||||||
import os
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import utils
|
|
||||||
|
|
||||||
def main():
|
|
||||||
dart = os.path.join(utils.CheckedInSdkPath(), 'bin', 'dart')
|
|
||||||
dart_file = os.path.join(os.path.dirname(__file__), 'patch_sdk.dart')
|
|
||||||
subprocess.check_call([dart, dart_file] + sys.argv[1:]);
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -17,8 +17,7 @@ class Co19TestSuite extends StandardTestSuite {
|
||||||
"tests/co19/co19-analyzer2.status",
|
"tests/co19/co19-analyzer2.status",
|
||||||
"tests/co19/co19-runtime.status",
|
"tests/co19/co19-runtime.status",
|
||||||
"tests/co19/co19-dart2js.status",
|
"tests/co19/co19-dart2js.status",
|
||||||
"tests/co19/co19-dartium.status",
|
"tests/co19/co19-dartium.status"
|
||||||
"tests/co19/co19-kernel.status"
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
bool isTestFile(String filename) => _testRegExp.hasMatch(filename);
|
bool isTestFile(String filename) => _testRegExp.hasMatch(filename);
|
||||||
|
|
|
@ -89,19 +89,6 @@ abstract class CompilerConfiguration {
|
||||||
arch: configuration['arch'],
|
arch: configuration['arch'],
|
||||||
useBlobs: useBlobs,
|
useBlobs: useBlobs,
|
||||||
isAndroid: configuration['system'] == 'android');
|
isAndroid: configuration['system'] == 'android');
|
||||||
case 'dartk':
|
|
||||||
return ComposedCompilerConfiguration.createDartKConfiguration(
|
|
||||||
isHostChecked: isHostChecked,
|
|
||||||
kernel_transformers: configuration['kernel_transformers'],
|
|
||||||
useSdk: useSdk);
|
|
||||||
case 'dartkp':
|
|
||||||
return ComposedCompilerConfiguration.createDartKPConfiguration(
|
|
||||||
isHostChecked: isHostChecked,
|
|
||||||
arch: configuration['arch'],
|
|
||||||
useBlobs: useBlobs,
|
|
||||||
isAndroid: configuration['system'] == 'android',
|
|
||||||
kernel_transformers: configuration['kernel_transformers'],
|
|
||||||
useSdk: useSdk);
|
|
||||||
case 'none':
|
case 'none':
|
||||||
return new NoneCompilerConfiguration(
|
return new NoneCompilerConfiguration(
|
||||||
isDebug: isDebug,
|
isDebug: isDebug,
|
||||||
|
@ -212,257 +199,6 @@ class NoneCompilerConfiguration extends CompilerConfiguration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The "dartk" compiler.
|
|
||||||
class DartKCompilerConfiguration extends CompilerConfiguration {
|
|
||||||
DartKCompilerConfiguration({bool isHostChecked, bool useSdk})
|
|
||||||
: super._subclass(isHostChecked: isHostChecked, useSdk: useSdk);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String computeCompilerPath(String buildDir) {
|
|
||||||
return 'third_party/pkg/kernel/bin/dartk.dart';
|
|
||||||
}
|
|
||||||
|
|
||||||
CompilationCommand computeCompilationCommand(
|
|
||||||
String outputFileName,
|
|
||||||
String buildDir,
|
|
||||||
CommandBuilder commandBuilder,
|
|
||||||
List arguments,
|
|
||||||
Map<String, String> environmentOverrides) {
|
|
||||||
var extraArguments = [
|
|
||||||
'--sdk',
|
|
||||||
'$buildDir/obj/gen/patched_sdk',
|
|
||||||
'--link',
|
|
||||||
'--target=vm',
|
|
||||||
'--out',
|
|
||||||
outputFileName
|
|
||||||
];
|
|
||||||
return commandBuilder.getKernelCompilationCommand(
|
|
||||||
'dartk',
|
|
||||||
outputFileName,
|
|
||||||
true,
|
|
||||||
bootstrapDependencies(buildDir),
|
|
||||||
computeCompilerPath(buildDir),
|
|
||||||
[]..addAll(arguments)..addAll(extraArguments),
|
|
||||||
environmentOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
CommandArtifact computeCompilationArtifact(
|
|
||||||
String buildDir,
|
|
||||||
String tempDir,
|
|
||||||
CommandBuilder commandBuilder,
|
|
||||||
List arguments,
|
|
||||||
Map<String, String> environmentOverrides) {
|
|
||||||
return new CommandArtifact(<Command>[
|
|
||||||
this.computeCompilationCommand('$tempDir/out.dill', buildDir,
|
|
||||||
CommandBuilder.instance, arguments, environmentOverrides)
|
|
||||||
], '$tempDir/out.dill', 'application/dart');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef List<String> CompilerArgumentsFunction(
|
|
||||||
List<String> globalArguments,
|
|
||||||
String previousCompilerOutput);
|
|
||||||
|
|
||||||
class PipelineCommand {
|
|
||||||
final CompilerConfiguration compilerConfiguration;
|
|
||||||
final CompilerArgumentsFunction _argumentsFunction;
|
|
||||||
|
|
||||||
PipelineCommand._(this.compilerConfiguration, this._argumentsFunction);
|
|
||||||
|
|
||||||
factory PipelineCommand.runWithGlobalArguments(CompilerConfiguration conf) {
|
|
||||||
return new PipelineCommand._(conf, (List<String> globalArguments,
|
|
||||||
String previousOutput) {
|
|
||||||
assert(previousOutput == null);
|
|
||||||
return globalArguments;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
factory PipelineCommand.runWithDartOrKernelFile(CompilerConfiguration conf) {
|
|
||||||
return new PipelineCommand._(conf, (List<String> globalArguments,
|
|
||||||
String previousOutput) {
|
|
||||||
var filtered = globalArguments
|
|
||||||
.where((String name) => name.endsWith('.dart') ||
|
|
||||||
name.endsWith('.dill'))
|
|
||||||
.toList();
|
|
||||||
assert(filtered.length == 1);
|
|
||||||
return filtered;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
factory PipelineCommand.runWithPreviousKernelOutput(
|
|
||||||
CompilerConfiguration conf) {
|
|
||||||
return new PipelineCommand._(conf, (List<String> globalArguments,
|
|
||||||
String previousOutput) {
|
|
||||||
assert(previousOutput.endsWith('.dill'));
|
|
||||||
return [previousOutput];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> extractArguments(List<String> globalArguments,
|
|
||||||
String previousOutput) {
|
|
||||||
return _argumentsFunction(globalArguments, previousOutput);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ComposedCompilerConfiguration extends CompilerConfiguration {
|
|
||||||
final List<PipelineCommand> pipelineCommands;
|
|
||||||
|
|
||||||
ComposedCompilerConfiguration(this.pipelineCommands)
|
|
||||||
: super._subclass();
|
|
||||||
|
|
||||||
CommandArtifact computeCompilationArtifact(
|
|
||||||
String buildDir,
|
|
||||||
String tempDir,
|
|
||||||
CommandBuilder commandBuilder,
|
|
||||||
List globalArguments,
|
|
||||||
Map<String, String> environmentOverrides) {
|
|
||||||
|
|
||||||
List<Command> allCommands = [];
|
|
||||||
|
|
||||||
// The first compilation command is as usual.
|
|
||||||
var arguments = pipelineCommands[0].extractArguments(globalArguments, null);
|
|
||||||
CommandArtifact artifact =
|
|
||||||
pipelineCommands[0].compilerConfiguration.computeCompilationArtifact(
|
|
||||||
buildDir, tempDir, commandBuilder, arguments, environmentOverrides);
|
|
||||||
allCommands.addAll(artifact.commands);
|
|
||||||
|
|
||||||
// The following compilation commands are based on the output of the
|
|
||||||
// previous one.
|
|
||||||
for (int i = 1; i < pipelineCommands.length; i++) {
|
|
||||||
PipelineCommand pc = pipelineCommands[i];
|
|
||||||
|
|
||||||
arguments = pc.extractArguments(globalArguments, artifact.filename);
|
|
||||||
artifact = pc.compilerConfiguration.computeCompilationArtifact(
|
|
||||||
buildDir, tempDir, commandBuilder, arguments, environmentOverrides);
|
|
||||||
|
|
||||||
allCommands.addAll(artifact.commands);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new CommandArtifact(
|
|
||||||
allCommands, artifact.filename, artifact.mimeType);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> computeCompilerArguments(vmOptions, sharedOptions, args) {
|
|
||||||
// The result will be passed as an input to [extractArguments]
|
|
||||||
// (i.e. the arguments to the [PipelineCommand]).
|
|
||||||
return new List<String>.from(sharedOptions)..addAll(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> computeRuntimeArguments(
|
|
||||||
RuntimeConfiguration runtimeConfiguration,
|
|
||||||
String buildDir,
|
|
||||||
TestInformation info,
|
|
||||||
List<String> vmOptions,
|
|
||||||
List<String> sharedOptions,
|
|
||||||
List<String> originalArguments,
|
|
||||||
CommandArtifact artifact) {
|
|
||||||
return <String>[artifact.filename];
|
|
||||||
}
|
|
||||||
|
|
||||||
static ComposedCompilerConfiguration createDartKPConfiguration(
|
|
||||||
{bool isHostChecked, String arch, bool useBlobs, bool isAndroid,
|
|
||||||
String kernel_transformers, bool useSdk}) {
|
|
||||||
var nested = [];
|
|
||||||
|
|
||||||
// Compile with dartk.
|
|
||||||
nested.add(new PipelineCommand.runWithGlobalArguments(
|
|
||||||
new DartKCompilerConfiguration(isHostChecked: isHostChecked,
|
|
||||||
useSdk: useSdk)));
|
|
||||||
|
|
||||||
// Run zero or more transformations.
|
|
||||||
addKernelTransformations(nested, kernel_transformers);
|
|
||||||
|
|
||||||
// Run the normal precompiler.
|
|
||||||
nested.add(new PipelineCommand.runWithPreviousKernelOutput(
|
|
||||||
new PrecompilerCompilerConfiguration(
|
|
||||||
arch: arch, useBlobs: useBlobs, isAndroid: isAndroid)));
|
|
||||||
|
|
||||||
return new ComposedCompilerConfiguration(nested);
|
|
||||||
}
|
|
||||||
|
|
||||||
static ComposedCompilerConfiguration createDartKConfiguration(
|
|
||||||
{bool isHostChecked, bool useSdk, String kernel_transformers}) {
|
|
||||||
var nested = [];
|
|
||||||
|
|
||||||
// Compile with dartk.
|
|
||||||
nested.add(new PipelineCommand.runWithGlobalArguments(
|
|
||||||
new DartKCompilerConfiguration(isHostChecked: isHostChecked,
|
|
||||||
useSdk: useSdk)));
|
|
||||||
|
|
||||||
// Run zero or more transformations.
|
|
||||||
addKernelTransformations(nested, kernel_transformers);
|
|
||||||
|
|
||||||
return new ComposedCompilerConfiguration(nested);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void addKernelTransformations(List<PipelineCommand> nested,
|
|
||||||
String kernel_transformers) {
|
|
||||||
if (kernel_transformers != null && kernel_transformers.length > 0) {
|
|
||||||
List<String> names = kernel_transformers.split(',');
|
|
||||||
for (var name in names) {
|
|
||||||
var transformation = new KernelTransformation(name);
|
|
||||||
nested.add(nested.isEmpty
|
|
||||||
? new PipelineCommand.runWithDartOrKernelFile(transformation)
|
|
||||||
: new PipelineCommand.runWithPreviousKernelOutput(transformation));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class KernelTransformation extends CompilerConfiguration {
|
|
||||||
final String transformation;
|
|
||||||
|
|
||||||
KernelTransformation(this.transformation) : super._subclass();
|
|
||||||
|
|
||||||
CommandArtifact computeCompilationArtifact(
|
|
||||||
String buildDir,
|
|
||||||
String tempDir,
|
|
||||||
CommandBuilder commandBuilder,
|
|
||||||
List arguments,
|
|
||||||
Map<String, String> environmentOverrides) {
|
|
||||||
assert(arguments.length == 1);
|
|
||||||
assert(arguments.last.contains('/'));
|
|
||||||
assert(arguments.last.endsWith('.dill'));
|
|
||||||
|
|
||||||
// The --kernel-transformers=a,b can be specified as
|
|
||||||
// a = <name>
|
|
||||||
// a = <name>:<path-to-transformer-executable>
|
|
||||||
int colonIndex = transformation.indexOf(':');
|
|
||||||
String transformationName = transformation;
|
|
||||||
String executable;
|
|
||||||
if (colonIndex > 0) {
|
|
||||||
executable = transformation.substring(colonIndex + 1);
|
|
||||||
transformationName = transformation.substring(0, colonIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The transformed output will be always written to a new file in the
|
|
||||||
// test-specific temporary directory.
|
|
||||||
var inputFile = arguments.last;
|
|
||||||
var baseInputFilename = inputFile.substring(
|
|
||||||
inputFile.lastIndexOf('/') + 1, inputFile.length - '.dill'.length);
|
|
||||||
var outputFile = '$tempDir/$baseInputFilename.$transformationName.dill';
|
|
||||||
|
|
||||||
// Use the user-supplied transformer or fall back to `transformer.dart`.
|
|
||||||
List<String> transformerArguments;
|
|
||||||
bool useBatchMode = false;
|
|
||||||
if (executable == null) {
|
|
||||||
executable = 'third_party/pkg/kernel/bin/transform.dart';
|
|
||||||
transformerArguments =
|
|
||||||
['-f', 'bin', '-t', transformation, '-o', outputFile, inputFile];
|
|
||||||
useBatchMode = true;
|
|
||||||
} else {
|
|
||||||
transformerArguments = [inputFile, outputFile];
|
|
||||||
}
|
|
||||||
|
|
||||||
var command = commandBuilder.getKernelTransformationCommand(
|
|
||||||
transformationName, executable, transformerArguments, outputFile,
|
|
||||||
environmentOverrides, useBatchMode);
|
|
||||||
|
|
||||||
return new CommandArtifact(
|
|
||||||
<Command>[ command ], outputFile, 'application/dart');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Common configuration for dart2js-based tools, such as, dart2js
|
/// Common configuration for dart2js-based tools, such as, dart2js
|
||||||
class Dart2xCompilerConfiguration extends CompilerConfiguration {
|
class Dart2xCompilerConfiguration extends CompilerConfiguration {
|
||||||
final String moniker;
|
final String moniker;
|
||||||
|
|
|
@ -42,7 +42,6 @@ final TEST_SUITE_DIRECTORIES = [
|
||||||
new Path('tests/corelib'),
|
new Path('tests/corelib'),
|
||||||
new Path('tests/html'),
|
new Path('tests/html'),
|
||||||
new Path('tests/isolate'),
|
new Path('tests/isolate'),
|
||||||
new Path('tests/kernel'),
|
|
||||||
new Path('tests/language'),
|
new Path('tests/language'),
|
||||||
new Path('tests/lib'),
|
new Path('tests/lib'),
|
||||||
new Path('tests/standalone'),
|
new Path('tests/standalone'),
|
||||||
|
|
|
@ -26,7 +26,6 @@ const List<String> defaultTestSelectors = const [
|
||||||
'pkg',
|
'pkg',
|
||||||
'analyze_library',
|
'analyze_library',
|
||||||
'service',
|
'service',
|
||||||
'kernel',
|
|
||||||
'observatory_ui'
|
'observatory_ui'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -76,15 +75,9 @@ class TestOptionsParser {
|
||||||
|
|
||||||
dart2app:
|
dart2app:
|
||||||
dart2appjit: Compile the Dart code into an app snapshot before running test
|
dart2appjit: Compile the Dart code into an app snapshot before running test
|
||||||
(only valid with dart_app runtime)
|
(only valid with dart_app runtime)''',
|
||||||
|
|
||||||
dartk: Compile the Dart source into Kernel before running test.
|
|
||||||
|
|
||||||
dartkp: Compiler the Dart source into Kernel and then Kernel into AOT
|
|
||||||
snapshot before running the test.''',
|
|
||||||
['-c', '--compiler'],
|
['-c', '--compiler'],
|
||||||
['none', 'precompiler', 'dart2js', 'dart2analyzer', 'dart2app',
|
['none', 'precompiler', 'dart2js', 'dart2analyzer', 'dart2app', 'dart2appjit'],
|
||||||
'dart2appjit', 'dartk', 'dartkp'],
|
|
||||||
'none'),
|
'none'),
|
||||||
// TODO(antonm): fix the option drt.
|
// TODO(antonm): fix the option drt.
|
||||||
new _TestOptionSpecification(
|
new _TestOptionSpecification(
|
||||||
|
@ -162,16 +155,6 @@ class TestOptionsParser {
|
||||||
'simdbc64',
|
'simdbc64',
|
||||||
],
|
],
|
||||||
'x64'),
|
'x64'),
|
||||||
new _TestOptionSpecification(
|
|
||||||
'kernel_transformers',
|
|
||||||
'The kernel transformations to apply in order (separated by comma). '
|
|
||||||
'A transformer can either be just a "name" (in which case it must be '
|
|
||||||
'available in kernel/bin/tansform.dart) or a "name:path" pair '
|
|
||||||
'(in which case "path" must point to an executable script which takes'
|
|
||||||
' `input-file` and `output-file` as arguments).',
|
|
||||||
['--kernel_transformers'],
|
|
||||||
[],
|
|
||||||
''),
|
|
||||||
new _TestOptionSpecification(
|
new _TestOptionSpecification(
|
||||||
'system',
|
'system',
|
||||||
'The operating system to run tests on',
|
'The operating system to run tests on',
|
||||||
|
@ -694,12 +677,6 @@ Note: currently only implemented for dart2js.''',
|
||||||
case 'precompiler':
|
case 'precompiler':
|
||||||
validRuntimes = const ['dart_precompiled'];
|
validRuntimes = const ['dart_precompiled'];
|
||||||
break;
|
break;
|
||||||
case 'dartk':
|
|
||||||
validRuntimes = const ['vm'];
|
|
||||||
break;
|
|
||||||
case 'dartkp':
|
|
||||||
validRuntimes = const ['dart_precompiled'];
|
|
||||||
break;
|
|
||||||
case 'none':
|
case 'none':
|
||||||
validRuntimes = const [
|
validRuntimes = const [
|
||||||
'vm',
|
'vm',
|
||||||
|
@ -710,13 +687,6 @@ Note: currently only implemented for dart2js.''',
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
var kernelCompilers = const ['dartk', 'dartkp'];
|
|
||||||
if (config['kernel_transformers']?.length > 0 &&
|
|
||||||
!kernelCompilers.contains(config['compiler'])) {
|
|
||||||
isValid = false;
|
|
||||||
print("Warning: The `--kernel_transformers` option can only be used in "
|
|
||||||
"combination with the ${kernelCompilers.join(', ')} compilers.");
|
|
||||||
}
|
|
||||||
if (!validRuntimes.contains(config['runtime'])) {
|
if (!validRuntimes.contains(config['runtime'])) {
|
||||||
isValid = false;
|
isValid = false;
|
||||||
print("Warning: combination of compiler '${config['compiler']}' and "
|
print("Warning: combination of compiler '${config['compiler']}' and "
|
||||||
|
@ -868,9 +838,9 @@ Note: currently only implemented for dart2js.''',
|
||||||
if (configuration['package_root'] == null &&
|
if (configuration['package_root'] == null &&
|
||||||
configuration['packages'] == null) {
|
configuration['packages'] == null) {
|
||||||
configuration['packages'] =
|
configuration['packages'] =
|
||||||
TestUtils.dartDirUri.resolve('.packages').toFilePath();
|
TestUtils.dartDirUri.resolve('.packages').toFilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expand the architectures.
|
// Expand the architectures.
|
||||||
if (configuration['arch'].contains(',')) {
|
if (configuration['arch'].contains(',')) {
|
||||||
return _expandHelper('arch', configuration);
|
return _expandHelper('arch', configuration);
|
||||||
|
|
|
@ -221,20 +221,6 @@ class CompilationCommand extends ProcessCommand {
|
||||||
deepJsonCompare(_bootstrapDependencies, other._bootstrapDependencies);
|
deepJsonCompare(_bootstrapDependencies, other._bootstrapDependencies);
|
||||||
}
|
}
|
||||||
|
|
||||||
class KernelCompilationCommand extends CompilationCommand {
|
|
||||||
KernelCompilationCommand._(
|
|
||||||
String displayName,
|
|
||||||
String outputFile,
|
|
||||||
bool neverSkipCompilation,
|
|
||||||
List<Uri> bootstrapDependencies,
|
|
||||||
String executable,
|
|
||||||
List<String> arguments,
|
|
||||||
Map<String, String> environmentOverrides)
|
|
||||||
: super._(displayName, outputFile, neverSkipCompilation,
|
|
||||||
bootstrapDependencies, executable, arguments,
|
|
||||||
environmentOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This is just a Pair(String, Map) class with hashCode and operator ==
|
/// This is just a Pair(String, Map) class with hashCode and operator ==
|
||||||
class AddFlagsKey {
|
class AddFlagsKey {
|
||||||
final String flags;
|
final String flags;
|
||||||
|
@ -664,25 +650,6 @@ class CommandBuilder {
|
||||||
return _getUniqueCommand(command);
|
return _getUniqueCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
CompilationCommand getKernelCompilationCommand(
|
|
||||||
String displayName,
|
|
||||||
outputFile,
|
|
||||||
neverSkipCompilation,
|
|
||||||
List<Uri> bootstrapDependencies,
|
|
||||||
String executable,
|
|
||||||
List<String> arguments,
|
|
||||||
Map<String, String> environment) {
|
|
||||||
var command = new KernelCompilationCommand._(
|
|
||||||
displayName,
|
|
||||||
outputFile,
|
|
||||||
neverSkipCompilation,
|
|
||||||
bootstrapDependencies,
|
|
||||||
executable,
|
|
||||||
arguments,
|
|
||||||
environment);
|
|
||||||
return _getUniqueCommand(command);
|
|
||||||
}
|
|
||||||
|
|
||||||
AnalysisCommand getAnalysisCommand(
|
AnalysisCommand getAnalysisCommand(
|
||||||
String displayName, executable, arguments, environmentOverrides,
|
String displayName, executable, arguments, environmentOverrides,
|
||||||
{String flavor: 'dart2analyzer'}) {
|
{String flavor: 'dart2analyzer'}) {
|
||||||
|
@ -1642,29 +1609,6 @@ class CompilationCommandOutputImpl extends CommandOutputImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class KernelCompilationCommandOutputImpl extends CompilationCommandOutputImpl {
|
|
||||||
KernelCompilationCommandOutputImpl(
|
|
||||||
Command command, int exitCode, bool timedOut,
|
|
||||||
List<int> stdout, List<int> stderr,
|
|
||||||
Duration time, bool compilationSkipped)
|
|
||||||
: super(command, exitCode, timedOut, stdout, stderr, time,
|
|
||||||
compilationSkipped);
|
|
||||||
|
|
||||||
bool get canRunDependendCommands {
|
|
||||||
// See [BatchRunnerProcess]: 0 means success, 1 means compile-time error.
|
|
||||||
// TODO(asgerf): When the frontend supports it, continue running even if
|
|
||||||
// there were compile-time errors. See kernel_sdk issue #18.
|
|
||||||
return !hasCrashed && !timedOut && exitCode == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the compiler was able to produce a Kernel IR file we want to run the
|
|
||||||
// result on the Dart VM. We therefore mark the [KernelCompilationCommand] as
|
|
||||||
// successful.
|
|
||||||
// => This ensures we test that the DartVM produces correct CompileTime errors
|
|
||||||
// as it is supposed to for our test suites.
|
|
||||||
bool get successful => canRunDependendCommands;
|
|
||||||
}
|
|
||||||
|
|
||||||
class JsCommandlineOutputImpl extends CommandOutputImpl
|
class JsCommandlineOutputImpl extends CommandOutputImpl
|
||||||
with UnittestSuiteMessagesMixin {
|
with UnittestSuiteMessagesMixin {
|
||||||
JsCommandlineOutputImpl(Command command, int exitCode, bool timedOut,
|
JsCommandlineOutputImpl(Command command, int exitCode, bool timedOut,
|
||||||
|
@ -1739,9 +1683,6 @@ CommandOutput createCommandOutput(Command command, int exitCode, bool timedOut,
|
||||||
} else if (command is VmCommand) {
|
} else if (command is VmCommand) {
|
||||||
return new VmCommandOutputImpl(
|
return new VmCommandOutputImpl(
|
||||||
command, exitCode, timedOut, stdout, stderr, time, pid);
|
command, exitCode, timedOut, stdout, stderr, time, pid);
|
||||||
} else if (command is KernelCompilationCommand) {
|
|
||||||
return new KernelCompilationCommandOutputImpl(
|
|
||||||
command, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
|
|
||||||
} else if (command is AdbPrecompilationCommand) {
|
} else if (command is AdbPrecompilationCommand) {
|
||||||
return new VmCommandOutputImpl(
|
return new VmCommandOutputImpl(
|
||||||
command, exitCode, timedOut, stdout, stderr, time, pid);
|
command, exitCode, timedOut, stdout, stderr, time, pid);
|
||||||
|
@ -2608,12 +2549,6 @@ class CommandExecutorImpl implements CommandExecutor {
|
||||||
|
|
||||||
if (command is BrowserTestCommand) {
|
if (command is BrowserTestCommand) {
|
||||||
return _startBrowserControllerTest(command, timeout);
|
return _startBrowserControllerTest(command, timeout);
|
||||||
} else if (command is KernelCompilationCommand) {
|
|
||||||
// For now, we always run dartk in batch mode.
|
|
||||||
var name = command.displayName;
|
|
||||||
assert(name == 'dartk');
|
|
||||||
return _getBatchRunner(name)
|
|
||||||
.runCommand(name, command, timeout, command.arguments);
|
|
||||||
} else if (command is CompilationCommand && dart2jsBatchMode) {
|
} else if (command is CompilationCommand && dart2jsBatchMode) {
|
||||||
return _getBatchRunner("dart2js")
|
return _getBatchRunner("dart2js")
|
||||||
.runCommand("dart2js", command, timeout, command.arguments);
|
.runCommand("dart2js", command, timeout, command.arguments);
|
||||||
|
|
|
@ -717,8 +717,7 @@ class StandardTestSuite extends TestSuite {
|
||||||
'$directory/$name.status',
|
'$directory/$name.status',
|
||||||
'$directory/.status',
|
'$directory/.status',
|
||||||
'$directory/${name}_dart2js.status',
|
'$directory/${name}_dart2js.status',
|
||||||
'$directory/${name}_analyzer2.status',
|
'$directory/${name}_analyzer2.status'
|
||||||
'$directory/${name}_kernel.status'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return new StandardTestSuite(configuration, name, directory, status_paths,
|
return new StandardTestSuite(configuration, name, directory, status_paths,
|
||||||
|
@ -1676,9 +1675,7 @@ class StandardTestSuite extends TestSuite {
|
||||||
* configurations, so it may not use [configuration].
|
* configurations, so it may not use [configuration].
|
||||||
*/
|
*/
|
||||||
Map readOptionsFromFile(Path filePath) {
|
Map readOptionsFromFile(Path filePath) {
|
||||||
if (filePath.filename.endsWith('.dill')) {
|
if (filePath.segments().contains('co19')) {
|
||||||
return optionsFromKernelFile();
|
|
||||||
} else if (filePath.segments().contains('co19')) {
|
|
||||||
return readOptionsFromCo19File(filePath);
|
return readOptionsFromCo19File(filePath);
|
||||||
}
|
}
|
||||||
RegExp testOptionsRegExp = new RegExp(r"// VMOptions=(.*)");
|
RegExp testOptionsRegExp = new RegExp(r"// VMOptions=(.*)");
|
||||||
|
@ -1804,25 +1801,6 @@ class StandardTestSuite extends TestSuite {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Map optionsFromKernelFile() {
|
|
||||||
return const {
|
|
||||||
"vmOptions": const [ const []],
|
|
||||||
"sharedOptions": const [],
|
|
||||||
"dartOptions": null,
|
|
||||||
"packageRoot": null,
|
|
||||||
"packages": null,
|
|
||||||
"hasCompileError": false,
|
|
||||||
"hasRuntimeError": false,
|
|
||||||
"hasStaticWarning": false,
|
|
||||||
"otherScripts": const [],
|
|
||||||
"isMultitest": false,
|
|
||||||
"isMultiHtmlTest": false,
|
|
||||||
"subtestNames": const [],
|
|
||||||
"isolateStubs": '',
|
|
||||||
"containsDomImport": false,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
List<List<String>> getVmOptions(Map optionsFromFile) {
|
List<List<String>> getVmOptions(Map optionsFromFile) {
|
||||||
var COMPILERS = const ['none', 'precompiler', 'dart2app', 'dart2appjit'];
|
var COMPILERS = const ['none', 'precompiler', 'dart2app', 'dart2appjit'];
|
||||||
var RUNTIMES = const [
|
var RUNTIMES = const [
|
||||||
|
|
Loading…
Reference in a new issue