mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:07:49 +00:00
Move kernel baseline tests to front_end.
R=paulberry@google.com Review-Url: https://codereview.chromium.org/2825063002 .
This commit is contained in:
parent
84ef5ed2da
commit
2d9956a93d
|
@ -7,8 +7,7 @@ analyzer:
|
|||
language:
|
||||
enableSuperMixins: true
|
||||
exclude:
|
||||
# TODO(devoncarew): Without this exclude I see ~400 analysis errors.
|
||||
- test/fasta/**
|
||||
- testcases/**
|
||||
errors:
|
||||
# Omits warnings due to missing `@virtual`
|
||||
# TODO(sigmund): enable once #28601 is fixed
|
||||
|
|
|
@ -47,9 +47,11 @@ Future<Uri> compile(List<String> arguments) async {
|
|||
class AnalyzerCompileTask extends CompileTask {
|
||||
AnalyzerCompileTask(CompilerContext c, Ticker ticker) : super(c, ticker);
|
||||
|
||||
@override
|
||||
AnalyzerTarget createKernelTarget(
|
||||
DillTarget dillTarget, TranslateUri uriTranslator) {
|
||||
return new AnalyzerTarget(dillTarget, uriTranslator, c.uriToSource);
|
||||
DillTarget dillTarget, TranslateUri uriTranslator, bool strongMode) {
|
||||
return new AnalyzerTarget(
|
||||
dillTarget, uriTranslator, strongMode, c.uriToSource);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,9 +15,10 @@ import '../dill/dill_target.dart' show DillTarget;
|
|||
import 'analyzer_loader.dart' show AnalyzerLoader;
|
||||
|
||||
class AnalyzerTarget extends KernelTarget {
|
||||
AnalyzerTarget(DillTarget dillTarget, TranslateUri uriTranslator,
|
||||
AnalyzerTarget(
|
||||
DillTarget dillTarget, TranslateUri uriTranslator, bool strongMode,
|
||||
[Map<String, Source> uriToSource])
|
||||
: super(dillTarget, uriTranslator, uriToSource);
|
||||
: super(dillTarget, uriTranslator, strongMode, uriToSource);
|
||||
|
||||
@override
|
||||
AnalyzerLoader<Library> createLoader() => new AnalyzerLoader<Library>(this);
|
||||
|
|
|
@ -51,6 +51,9 @@ Future compilePlatform(List<String> arguments) async {
|
|||
|
||||
Future compilePlatformInternal(
|
||||
CompilerContext c, Ticker ticker, Uri patchedSdk, Uri output) async {
|
||||
if (c.options.strongMode) {
|
||||
print("Note: strong mode support is preliminary and may not work.");
|
||||
}
|
||||
ticker.isVerbose = c.options.verbose;
|
||||
Uri deps = Uri.base.resolveUri(new Uri.file("${output.toFilePath()}.d"));
|
||||
ticker.logMs("Parsed arguments");
|
||||
|
@ -63,8 +66,8 @@ Future compilePlatformInternal(
|
|||
ticker.logMs("Read packages file");
|
||||
|
||||
DillTarget dillTarget = new DillTarget(ticker, uriTranslator);
|
||||
KernelTarget kernelTarget =
|
||||
new KernelTarget(dillTarget, uriTranslator, c.uriToSource);
|
||||
KernelTarget kernelTarget = new KernelTarget(
|
||||
dillTarget, uriTranslator, c.options.strongMode, c.uriToSource);
|
||||
|
||||
kernelTarget.read(Uri.parse("dart:core"));
|
||||
await dillTarget.writeOutline(null);
|
||||
|
|
|
@ -83,6 +83,8 @@ class CompilerCommandLine extends CommandLine {
|
|||
|
||||
bool get nitsAreFatal => fatal.contains("nits");
|
||||
|
||||
bool get strongMode => options.containsKey("--strong-mode");
|
||||
|
||||
static dynamic withGlobalOptions(String programName, List<String> arguments,
|
||||
dynamic f(CompilerContext context)) {
|
||||
return CompilerContext.withGlobalOptions(
|
||||
|
|
|
@ -110,8 +110,9 @@ class CompileTask {
|
|||
CompileTask(this.c, this.ticker);
|
||||
|
||||
KernelTarget createKernelTarget(
|
||||
DillTarget dillTarget, TranslateUri uriTranslator) {
|
||||
return new KernelTarget(dillTarget, uriTranslator, c.uriToSource);
|
||||
DillTarget dillTarget, TranslateUri uriTranslator, bool strongMode) {
|
||||
return new KernelTarget(
|
||||
dillTarget, uriTranslator, strongMode, c.uriToSource);
|
||||
}
|
||||
|
||||
Future<KernelTarget> buildOutline([Uri output]) async {
|
||||
|
@ -119,7 +120,11 @@ class CompileTask {
|
|||
await TranslateUri.parse(c.options.sdk, c.options.packages);
|
||||
ticker.logMs("Read packages file");
|
||||
DillTarget dillTarget = new DillTarget(ticker, uriTranslator);
|
||||
KernelTarget kernelTarget = createKernelTarget(dillTarget, uriTranslator);
|
||||
KernelTarget kernelTarget =
|
||||
createKernelTarget(dillTarget, uriTranslator, c.options.strongMode);
|
||||
if (c.options.strongMode) {
|
||||
print("Note: strong mode support is preliminary and may not work.");
|
||||
}
|
||||
Uri platform = c.options.platform;
|
||||
if (platform != null) {
|
||||
dillTarget.read(platform);
|
||||
|
@ -151,7 +156,8 @@ class CompileTask {
|
|||
}
|
||||
|
||||
Future<CompilationResult> parseScript(
|
||||
Uri fileName, Uri packages, Uri patchedSdk, bool verbose) async {
|
||||
Uri fileName, Uri packages, Uri patchedSdk,
|
||||
{bool verbose: false, bool strongMode: false}) async {
|
||||
try {
|
||||
if (!await new File.fromUri(fileName).exists()) {
|
||||
return new CompilationResult.error(
|
||||
|
@ -171,7 +177,7 @@ Future<CompilationResult> parseScript(
|
|||
final DillTarget dillTarget = new DillTarget(ticker, uriTranslator);
|
||||
dillTarget.read(patchedSdk.resolve('platform.dill'));
|
||||
final KernelTarget kernelTarget =
|
||||
new KernelTarget(dillTarget, uriTranslator);
|
||||
new KernelTarget(dillTarget, uriTranslator, strongMode);
|
||||
kernelTarget.read(fileName);
|
||||
await dillTarget.writeOutline(null);
|
||||
program = await kernelTarget.writeOutline(null);
|
||||
|
@ -229,7 +235,7 @@ Future writeDepsFile(Uri script, Uri depsFile, Uri output,
|
|||
DillTarget dillTarget = new DillTarget(ticker, uriTranslator)
|
||||
..read(platform);
|
||||
KernelTarget kernelTarget =
|
||||
new KernelTarget(dillTarget, uriTranslator, c.uriToSource);
|
||||
new KernelTarget(dillTarget, uriTranslator, false, c.uriToSource);
|
||||
|
||||
kernelTarget.read(script);
|
||||
await dillTarget.writeOutline(null);
|
||||
|
|
|
@ -92,6 +92,8 @@ import 'kernel_builder.dart'
|
|||
import 'verifier.dart' show verifyProgram;
|
||||
|
||||
class KernelTarget extends TargetImplementation {
|
||||
final bool strongMode;
|
||||
|
||||
final DillTarget dillTarget;
|
||||
|
||||
/// Shared with [CompilerContext].
|
||||
|
@ -105,7 +107,8 @@ class KernelTarget extends TargetImplementation {
|
|||
final TypeBuilder dynamicType =
|
||||
new KernelNamedTypeBuilder("dynamic", null, -1, null);
|
||||
|
||||
KernelTarget(DillTarget dillTarget, TranslateUri uriTranslator,
|
||||
KernelTarget(
|
||||
DillTarget dillTarget, TranslateUri uriTranslator, this.strongMode,
|
||||
[Map<String, Source> uriToSource])
|
||||
: dillTarget = dillTarget,
|
||||
uriToSource = uriToSource ?? CompilerContext.current.uriToSource,
|
||||
|
|
|
@ -43,6 +43,8 @@ import 'package:package_config/discovery.dart' show loadPackagesFile;
|
|||
|
||||
import '../environment_variable.dart' show EnvironmentVariable;
|
||||
|
||||
const String STRONG_MODE = " strong mode ";
|
||||
|
||||
typedef Future<TestContext> TestContextConstructor(
|
||||
Chain suite,
|
||||
Map<String, String> environment,
|
||||
|
@ -126,7 +128,7 @@ abstract class TestContext extends ChainContext {
|
|||
Uri sdk = await computePatchedSdk();
|
||||
Uri vm = computeDartVm(sdk);
|
||||
Uri packages = Uri.base.resolve(".packages");
|
||||
bool strongMode = false;
|
||||
bool strongMode = environment.containsKey(STRONG_MODE);
|
||||
bool updateExpectations = environment["updateExpectations"] == "true";
|
||||
return constructor(
|
||||
suite,
|
||||
|
|
|
@ -34,7 +34,7 @@ import '../kernel/kernel_target.dart' show KernelTarget;
|
|||
|
||||
import '../dill/dill_target.dart' show DillTarget;
|
||||
|
||||
export 'kernel_chain.dart' show TestContext;
|
||||
export 'kernel_chain.dart' show STRONG_MODE, TestContext;
|
||||
|
||||
export 'package:testing/testing.dart' show Chain, runMe;
|
||||
|
||||
|
@ -51,12 +51,12 @@ const String EXPECTATIONS = '''
|
|||
]
|
||||
''';
|
||||
|
||||
String shortenAstKindName(AstKind astKind) {
|
||||
String shortenAstKindName(AstKind astKind, bool strongMode) {
|
||||
switch (astKind) {
|
||||
case AstKind.Analyzer:
|
||||
return "dartk";
|
||||
return strongMode ? "dartk-strong" : "dartk";
|
||||
case AstKind.Kernel:
|
||||
return "direct";
|
||||
return strongMode ? "strong" : "direct";
|
||||
}
|
||||
throw "Unknown AST kind: $astKind";
|
||||
}
|
||||
|
@ -87,12 +87,12 @@ class FastaContext extends TestContext {
|
|||
bool fullCompile,
|
||||
AstKind astKind)
|
||||
: steps = <Step>[
|
||||
new Outline(fullCompile, astKind),
|
||||
new Outline(fullCompile, astKind, strongMode),
|
||||
const Print(),
|
||||
new Verify(fullCompile),
|
||||
new MatchExpectation(
|
||||
fullCompile
|
||||
? ".${shortenAstKindName(astKind)}.expect"
|
||||
? ".${shortenAstKindName(astKind, strongMode)}.expect"
|
||||
: ".outline.expect",
|
||||
updateExpectations: updateExpectations)
|
||||
],
|
||||
|
@ -159,7 +159,9 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
|
|||
|
||||
final AstKind astKind;
|
||||
|
||||
const Outline(this.fullCompile, this.astKind);
|
||||
final bool strongMode;
|
||||
|
||||
const Outline(this.fullCompile, this.astKind, this.strongMode);
|
||||
|
||||
String get name {
|
||||
return fullCompile ? "${astKind} compile" : "outline";
|
||||
|
@ -176,8 +178,8 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
|
|||
..input = Uri.parse("org.dartlang:platform") // Make up a name.
|
||||
..setProgram(platform);
|
||||
KernelTarget sourceTarget = astKind == AstKind.Analyzer
|
||||
? new AnalyzerTarget(dillTarget, context.uriTranslator)
|
||||
: new KernelTarget(dillTarget, context.uriTranslator);
|
||||
? new AnalyzerTarget(dillTarget, context.uriTranslator, strongMode)
|
||||
: new KernelTarget(dillTarget, context.uriTranslator, strongMode);
|
||||
|
||||
Program p;
|
||||
try {
|
||||
|
|
|
@ -52,7 +52,8 @@ abstract class CompilationResult {
|
|||
List toResponse() => [status.index, payload];
|
||||
}
|
||||
|
||||
Future<CompilationResult> parseScript(Uri script, {bool verbose: false}) async {
|
||||
Future<CompilationResult> parseScript(Uri script,
|
||||
{bool verbose: false, bool strongMode: false}) async {
|
||||
final Uri packagesUri = (Platform.packageConfig != null)
|
||||
? Uri.parse(Platform.packageConfig)
|
||||
: await _findPackagesFile(script);
|
||||
|
@ -73,7 +74,8 @@ Future<CompilationResult> parseScript(Uri script, {bool verbose: false}) async {
|
|||
}
|
||||
|
||||
try {
|
||||
return await fasta.parseScript(script, packagesUri, patchedSdk, verbose);
|
||||
return await fasta.parseScript(script, packagesUri, patchedSdk,
|
||||
verbose: verbose, strongMode: strongMode);
|
||||
} catch (err, stack) {
|
||||
return new CompilationResult.crash(err, stack);
|
||||
}
|
||||
|
|
|
@ -6,12 +6,24 @@
|
|||
# testing generating Kernel ASTs directly, that is, code in
|
||||
# pkg/fasta/lib/src/kernel/.
|
||||
|
||||
DeltaBlue: Fail # Missing types on constructor parameters.
|
||||
async_function: Fail # Async transformer should be optional.
|
||||
await: Fail
|
||||
call: Fail # Test can't run.
|
||||
covariant_generic: Fail # Missing types on constructor parameters.
|
||||
cycles: Fail # Compile-time error handling destroys program.
|
||||
external: Fail # External method marked abstract.
|
||||
fallthrough: Fail # Missing FallThroughError.
|
||||
function_type_recovery: Fail
|
||||
invocations: Fail
|
||||
micro: Fail # External method marked abstract.
|
||||
named_parameters: Fail # Missing types and unnecessary default values.
|
||||
optional: Fail # Unnecessary default values.
|
||||
redirecting_factory: Fail # Missing types on constructor parameters.
|
||||
statements: Fail # Make async tranformer optional for golden file testing.
|
||||
type_variable_as_super: Fail
|
||||
uninitialized_fields: Fail # Missing types and unnecessary default values.
|
||||
void-methods: Fail # Bad return from setters.
|
||||
|
||||
rasta/abstract_constructor: Fail
|
||||
rasta/bad_constructor_redirection: Fail
|
||||
|
|
|
@ -7,12 +7,23 @@
|
|||
# pkg/fasta/lib/src/analyzer/. Currently, this is behind direct-to-kernel, so
|
||||
# there are many crashes.
|
||||
|
||||
DeltaBlue: Crash
|
||||
accessors: Crash
|
||||
argument: Crash
|
||||
arithmetic: Crash
|
||||
async_function: Crash
|
||||
await: Fail
|
||||
bad_store: Crash
|
||||
call: Crash
|
||||
classes: Crash
|
||||
closure: Crash
|
||||
covariant_generic: Crash
|
||||
cycles: Fail
|
||||
default_values: Crash
|
||||
escape: Crash
|
||||
expressions: Crash
|
||||
external: Crash
|
||||
fallthrough: Crash
|
||||
fibonacci: Crash
|
||||
for_in_scope: Crash
|
||||
function_in_field: Crash
|
||||
|
@ -21,14 +32,27 @@ functions: Crash
|
|||
implicit_this: Crash
|
||||
invocations: Fail
|
||||
map: Fail
|
||||
micro: Crash
|
||||
mixin: Crash
|
||||
named_parameters: Crash
|
||||
null_aware: Crash
|
||||
operators: Crash
|
||||
optional: Crash
|
||||
override: Crash
|
||||
prefer_baseclass: Crash
|
||||
redirecting_constructor: Fail
|
||||
redirecting_factory: Crash
|
||||
statements: Fail
|
||||
static_setter: Crash
|
||||
store_load: Crash
|
||||
stringliteral: Crash
|
||||
super_rasta_copy: Crash
|
||||
top_level_accessors: Crash
|
||||
type_variable_as_super: Fail
|
||||
typedef: Crash
|
||||
uninitialized_fields: Crash
|
||||
unused_methods: Crash
|
||||
void-methods: Crash
|
||||
|
||||
rasta/abstract_constructor: Fail
|
||||
rasta/bad_constructor_redirection: Crash
|
||||
|
|
144
pkg/front_end/test/fasta/strong.status
Normal file
144
pkg/front_end/test/fasta/strong.status
Normal file
|
@ -0,0 +1,144 @@
|
|||
# Copyright (c) 2017, 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.
|
||||
|
||||
# Status file for the strong_test.dart test suite. This is testing generating
|
||||
# Kernel ASTs directly, that is, code in pkg/fasta/lib/src/kernel/ with
|
||||
# strong-mode enabled.
|
||||
|
||||
DeltaBlue: Fail
|
||||
accessors: Fail
|
||||
arithmetic: Fail
|
||||
async_function: Fail
|
||||
await: Fail
|
||||
bad_store: Fail
|
||||
call: Fail
|
||||
cascade: Fail
|
||||
casts: Fail
|
||||
classes: Fail
|
||||
closure: Fail
|
||||
covariant_generic: Fail
|
||||
cycles: Fail
|
||||
default_values: Fail
|
||||
escape: Fail
|
||||
expressions: Fail
|
||||
external: Fail
|
||||
fallthrough: Fail
|
||||
fibonacci: Fail
|
||||
for_in_scope: Fail
|
||||
function_in_field: Fail
|
||||
function_type_recovery: Fail
|
||||
functions: Fail
|
||||
hello: Fail
|
||||
implicit_this: Fail
|
||||
invocations: Fail
|
||||
literals: Fail
|
||||
map: Fail
|
||||
micro: Fail
|
||||
mixin: Fail
|
||||
named_parameters: Fail
|
||||
null_aware: Fail
|
||||
operators: Fail
|
||||
optional: Fail
|
||||
override: Fail
|
||||
platform: Fail
|
||||
prefer_baseclass: Fail
|
||||
redirecting_constructor: Fail
|
||||
redirecting_factory: Fail
|
||||
statements: Fail
|
||||
store_load: Fail
|
||||
stringliteral: Fail
|
||||
super_rasta_copy: Fail
|
||||
top_level_accessors: Fail
|
||||
type_variable_as_super: Fail
|
||||
typedef: Fail
|
||||
uninitialized_fields: Fail
|
||||
unused_methods: Fail
|
||||
void-methods: Fail
|
||||
|
||||
rasta/abstract_constructor: Fail
|
||||
rasta/bad_constructor_redirection: Fail
|
||||
rasta/bad_continue: Fail
|
||||
rasta/bad_default_constructor: Fail
|
||||
rasta/bad_explicit_super_constructor: Fail
|
||||
rasta/bad_implicit_super_constructor: Fail
|
||||
rasta/bad_interpolation: Fail
|
||||
rasta/bad_redirection: Fail
|
||||
rasta/bad_setter_initializer: Fail
|
||||
rasta/bad_unicode: Fail
|
||||
rasta/breaking_bad: Fail
|
||||
rasta/cascades: Fail
|
||||
rasta/class_hierarchy: Fail
|
||||
rasta/class_member: Fail
|
||||
rasta/constant_get_and_invoke: Fail
|
||||
rasta/deferred_lib: Fail
|
||||
rasta/deferred_load: Fail
|
||||
rasta/duplicated_mixin: Fail
|
||||
rasta/enum: Fail
|
||||
rasta/export: Fail
|
||||
rasta/external_factory_redirection: Fail
|
||||
rasta/foo: Fail
|
||||
rasta/for_loop: Fail
|
||||
rasta/generic_factory: Fail
|
||||
rasta/hello: Fail
|
||||
rasta/import_export: Fail
|
||||
rasta/issue_000001: Fail
|
||||
rasta/issue_000002: Fail
|
||||
rasta/issue_000004: Fail
|
||||
rasta/issue_000006: Fail
|
||||
rasta/issue_000007: Fail
|
||||
rasta/issue_000008: Fail
|
||||
rasta/issue_000011: Fail
|
||||
rasta/issue_000012: Fail
|
||||
rasta/issue_000025: Fail
|
||||
rasta/issue_000026: Fail
|
||||
rasta/issue_000031: Fail
|
||||
rasta/issue_000032: Fail
|
||||
rasta/issue_000033: Fail
|
||||
rasta/issue_000034: Fail
|
||||
rasta/issue_000035: Fail
|
||||
rasta/issue_000035a: Fail
|
||||
rasta/issue_000036: Fail
|
||||
rasta/issue_000039: Fail
|
||||
rasta/issue_000041: Fail
|
||||
rasta/issue_000042: Fail
|
||||
rasta/issue_000043: Fail
|
||||
rasta/issue_000044: Fail
|
||||
rasta/issue_000045: Fail
|
||||
rasta/issue_000046: Fail
|
||||
rasta/issue_000047: Fail
|
||||
rasta/issue_000048: Fail
|
||||
rasta/issue_000052: Fail
|
||||
rasta/issue_000053: Fail
|
||||
rasta/issue_000067: Fail
|
||||
rasta/issue_000068: Fail
|
||||
rasta/issue_000069: VerificationError
|
||||
rasta/issue_000070: Fail
|
||||
rasta/issue_000080: Fail
|
||||
rasta/issue_000081: Fail
|
||||
rasta/malformed_const_constructor: Fail
|
||||
rasta/malformed_function: Fail
|
||||
rasta/malformed_function_type: Fail
|
||||
rasta/mandatory_parameter_initializer: Fail
|
||||
rasta/mixin_library: Fail
|
||||
rasta/native_is_illegal: Fail
|
||||
rasta/parser_error: Fail
|
||||
rasta/previsit_deferred: Fail
|
||||
rasta/static: Fail
|
||||
rasta/super: Fail
|
||||
rasta/super_initializer: Fail
|
||||
rasta/super_mixin: Fail
|
||||
rasta/super_operator: Fail
|
||||
rasta/supports_reflection: Fail
|
||||
rasta/switch_execution_case_t02: Fail
|
||||
rasta/switch_fall_through: Fail
|
||||
rasta/this_invoke: Fail
|
||||
rasta/try_label: Fail
|
||||
rasta/type_literals: VerificationError
|
||||
rasta/type_with_parse_error: Fail
|
||||
rasta/typedef: VerificationError
|
||||
rasta/unresolved: Fail
|
||||
rasta/unresolved_constructor: Fail
|
||||
rasta/unresolved_for_in: Fail
|
||||
rasta/unresolved_recovery: Fail
|
||||
rasta/unsupported_platform_library: Fail
|
19
pkg/front_end/test/fasta/strong_test.dart
Normal file
19
pkg/front_end/test/fasta/strong_test.dart
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) 2017, 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.
|
||||
|
||||
library fasta.test.compile_test;
|
||||
|
||||
import 'dart:async' show Future;
|
||||
|
||||
import 'package:front_end/src/fasta/testing/suite.dart';
|
||||
|
||||
Future<FastaContext> createContext(
|
||||
Chain suite, Map<String, String> environment) {
|
||||
environment[ENABLE_FULL_COMPILE] = "";
|
||||
environment[AST_KIND_INDEX] = "${AstKind.Kernel.index}";
|
||||
environment[STRONG_MODE] = "";
|
||||
return FastaContext.create(suite, environment);
|
||||
}
|
||||
|
||||
main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
|
|
@ -43,7 +43,7 @@
|
|||
"name": "outline",
|
||||
"kind": "Chain",
|
||||
"source": "outline_test.dart",
|
||||
"path": "./",
|
||||
"path": "../../testcases/",
|
||||
"status": "outline.status",
|
||||
"pattern": [
|
||||
"\\.dart$"
|
||||
|
@ -51,7 +51,7 @@
|
|||
"exclude": [
|
||||
"/test/.*_test\\.dart$",
|
||||
"/test/.*_suite\\.dart$",
|
||||
"/test/fasta/top_level_accessors_part\\.dart$"
|
||||
"/testcases/top_level_accessors_part\\.dart$"
|
||||
]
|
||||
},
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
|||
"name": "compile",
|
||||
"kind": "Chain",
|
||||
"source": "compile_test.dart",
|
||||
"path": "./",
|
||||
"path": "../../testcases/",
|
||||
"status": "compile.status",
|
||||
"pattern": [
|
||||
"\\.dart$"
|
||||
|
@ -67,7 +67,7 @@
|
|||
"exclude": [
|
||||
"/test/.*_test\\.dart$",
|
||||
"/test/.*_suite\\.dart$",
|
||||
"/test/fasta/top_level_accessors_part\\.dart$"
|
||||
"/testcases/top_level_accessors_part\\.dart$"
|
||||
]
|
||||
},
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
|||
"name": "kompile",
|
||||
"kind": "Chain",
|
||||
"source": "kompile_test.dart",
|
||||
"path": "./",
|
||||
"path": "../../testcases/",
|
||||
"status": "kompile.status",
|
||||
"pattern": [
|
||||
"\\.dart$"
|
||||
|
@ -83,7 +83,23 @@
|
|||
"exclude": [
|
||||
"/test/.*_test\\.dart$",
|
||||
"/test/.*_suite\\.dart$",
|
||||
"/test/fasta/top_level_accessors_part\\.dart$"
|
||||
"/testcases/top_level_accessors_part\\.dart$"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "strong",
|
||||
"kind": "Chain",
|
||||
"source": "strong_test.dart",
|
||||
"path": "../../testcases/",
|
||||
"status": "strong.status",
|
||||
"pattern": [
|
||||
"\\.dart$"
|
||||
],
|
||||
"exclude": [
|
||||
"/test/.*_test\\.dart$",
|
||||
"/test/.*_suite\\.dart$",
|
||||
"/testcases/top_level_accessors_part\\.dart$"
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
library top_level_accessors;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static set /* from pkg/front_end/test/fasta/top_level_accessors_part.dart */ exitCode(core::int code) → void {
|
||||
core::print(code);
|
||||
}
|
||||
static get /* from pkg/front_end/test/fasta/top_level_accessors_part.dart */ exitCode() → core::int
|
||||
return 0;
|
||||
static method /* from pkg/front_end/test/fasta/top_level_accessors_part.dart */ main() → dynamic {
|
||||
self::exitCode = 42;
|
||||
core::print(self::exitCode);
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
library top_level_accessors;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static set /* from pkg/front_end/test/fasta/top_level_accessors_part.dart */ exitCode(core::int code) → void
|
||||
;
|
||||
static get /* from pkg/front_end/test/fasta/top_level_accessors_part.dart */ exitCode() → core::int
|
||||
;
|
||||
static method /* from pkg/front_end/test/fasta/top_level_accessors_part.dart */ main() → dynamic
|
||||
;
|
202
pkg/front_end/testcases/DeltaBlue.dart.outline.expect
Normal file
202
pkg/front_end/testcases/DeltaBlue.dart.outline.expect
Normal file
|
@ -0,0 +1,202 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class DeltaBlue extends core::Object {
|
||||
constructor •() → void
|
||||
;
|
||||
method run() → void
|
||||
;
|
||||
}
|
||||
class Strength extends core::Object {
|
||||
final field core::int value;
|
||||
final field core::String name;
|
||||
const constructor •(dynamic value, dynamic name) → void
|
||||
;
|
||||
method nextWeaker() → self::Strength
|
||||
;
|
||||
static method stronger(self::Strength s1, self::Strength s2) → core::bool
|
||||
;
|
||||
static method weaker(self::Strength s1, self::Strength s2) → core::bool
|
||||
;
|
||||
static method weakest(self::Strength s1, self::Strength s2) → self::Strength
|
||||
;
|
||||
static method strongest(self::Strength s1, self::Strength s2) → self::Strength
|
||||
;
|
||||
}
|
||||
abstract class Constraint extends core::Object {
|
||||
final field self::Strength strength;
|
||||
const constructor •(dynamic strength) → void
|
||||
;
|
||||
abstract method isSatisfied() → core::bool;
|
||||
abstract method markUnsatisfied() → void;
|
||||
abstract method addToGraph() → void;
|
||||
abstract method removeFromGraph() → void;
|
||||
abstract method chooseMethod(core::int mark) → void;
|
||||
abstract method markInputs(core::int mark) → void;
|
||||
abstract method inputsKnown(core::int mark) → core::bool;
|
||||
abstract method output() → self::Variable;
|
||||
abstract method execute() → void;
|
||||
abstract method recalculate() → void;
|
||||
method addConstraint() → void
|
||||
;
|
||||
method satisfy(dynamic mark) → self::Constraint
|
||||
;
|
||||
method destroyConstraint() → void
|
||||
;
|
||||
method isInput() → core::bool
|
||||
;
|
||||
}
|
||||
abstract class UnaryConstraint extends self::Constraint {
|
||||
final field self::Variable myOutput;
|
||||
field core::bool satisfied;
|
||||
constructor •(dynamic myOutput, self::Strength strength) → void
|
||||
;
|
||||
method addToGraph() → void
|
||||
;
|
||||
method chooseMethod(core::int mark) → void
|
||||
;
|
||||
method isSatisfied() → core::bool
|
||||
;
|
||||
method markInputs(core::int mark) → void
|
||||
;
|
||||
method output() → self::Variable
|
||||
;
|
||||
method recalculate() → void
|
||||
;
|
||||
method markUnsatisfied() → void
|
||||
;
|
||||
method inputsKnown(core::int mark) → core::bool
|
||||
;
|
||||
method removeFromGraph() → void
|
||||
;
|
||||
}
|
||||
class StayConstraint extends self::UnaryConstraint {
|
||||
constructor •(self::Variable v, self::Strength str) → void
|
||||
;
|
||||
method execute() → void
|
||||
;
|
||||
}
|
||||
class EditConstraint extends self::UnaryConstraint {
|
||||
constructor •(self::Variable v, self::Strength str) → void
|
||||
;
|
||||
method isInput() → core::bool
|
||||
;
|
||||
method execute() → void
|
||||
;
|
||||
}
|
||||
abstract class BinaryConstraint extends self::Constraint {
|
||||
field self::Variable v1;
|
||||
field self::Variable v2;
|
||||
field core::int direction;
|
||||
constructor •(dynamic v1, dynamic v2, self::Strength strength) → void
|
||||
;
|
||||
method chooseMethod(core::int mark) → void
|
||||
;
|
||||
method addToGraph() → void
|
||||
;
|
||||
method isSatisfied() → core::bool
|
||||
;
|
||||
method markInputs(core::int mark) → void
|
||||
;
|
||||
method input() → self::Variable
|
||||
;
|
||||
method output() → self::Variable
|
||||
;
|
||||
method recalculate() → void
|
||||
;
|
||||
method markUnsatisfied() → void
|
||||
;
|
||||
method inputsKnown(core::int mark) → core::bool
|
||||
;
|
||||
method removeFromGraph() → void
|
||||
;
|
||||
}
|
||||
class ScaleConstraint extends self::BinaryConstraint {
|
||||
final field self::Variable scale;
|
||||
final field self::Variable offset;
|
||||
constructor •(self::Variable src, dynamic scale, dynamic offset, self::Variable dest, self::Strength strength) → void
|
||||
;
|
||||
method addToGraph() → void
|
||||
;
|
||||
method removeFromGraph() → void
|
||||
;
|
||||
method markInputs(core::int mark) → void
|
||||
;
|
||||
method execute() → void
|
||||
;
|
||||
method recalculate() → void
|
||||
;
|
||||
}
|
||||
class EqualityConstraint extends self::BinaryConstraint {
|
||||
constructor •(self::Variable v1, self::Variable v2, self::Strength strength) → void
|
||||
;
|
||||
method execute() → void
|
||||
;
|
||||
}
|
||||
class Variable extends core::Object {
|
||||
field core::List<self::Constraint> constraints;
|
||||
field self::Constraint determinedBy;
|
||||
field core::int mark;
|
||||
field self::Strength walkStrength;
|
||||
field core::bool stay;
|
||||
field core::int value;
|
||||
final field core::String name;
|
||||
constructor •(dynamic name, dynamic value) → void
|
||||
;
|
||||
method addConstraint(self::Constraint c) → void
|
||||
;
|
||||
method removeConstraint(self::Constraint c) → void
|
||||
;
|
||||
}
|
||||
class Planner extends core::Object {
|
||||
field core::int currentMark;
|
||||
constructor •() → void
|
||||
;
|
||||
method incrementalAdd(self::Constraint c) → void
|
||||
;
|
||||
method incrementalRemove(self::Constraint c) → void
|
||||
;
|
||||
method newMark() → core::int
|
||||
;
|
||||
method makePlan(core::List<self::Constraint> sources) → self::Plan
|
||||
;
|
||||
method extractPlanFromConstraints(core::List<self::Constraint> constraints) → self::Plan
|
||||
;
|
||||
method addPropagate(self::Constraint c, core::int mark) → core::bool
|
||||
;
|
||||
method removePropagateFrom(self::Variable out) → core::List<self::Constraint>
|
||||
;
|
||||
method addConstraintsConsumingTo(self::Variable v, core::List<self::Constraint> coll) → void
|
||||
;
|
||||
}
|
||||
class Plan extends core::Object {
|
||||
field core::List<self::Constraint> list;
|
||||
constructor •() → void
|
||||
;
|
||||
method addConstraint(self::Constraint c) → void
|
||||
;
|
||||
method size() → core::int
|
||||
;
|
||||
method execute() → void
|
||||
;
|
||||
}
|
||||
static const field dynamic REQUIRED;
|
||||
static const field dynamic STRONG_PREFERRED;
|
||||
static const field dynamic PREFERRED;
|
||||
static const field dynamic STRONG_DEFAULT;
|
||||
static const field dynamic NORMAL;
|
||||
static const field dynamic WEAK_DEFAULT;
|
||||
static const field dynamic WEAKEST;
|
||||
static const field core::int NONE;
|
||||
static const field core::int FORWARD;
|
||||
static const field core::int BACKWARD;
|
||||
static field self::Planner planner;
|
||||
static method main() → dynamic
|
||||
;
|
||||
static method chainTest(core::int n) → void
|
||||
;
|
||||
static method projectionTest(core::int n) → void
|
||||
;
|
||||
static method change(self::Variable v, core::int newValue) → void
|
||||
;
|
32
pkg/front_end/testcases/argument.dart.outline.expect
Normal file
32
pkg/front_end/testcases/argument.dart.outline.expect
Normal file
|
@ -0,0 +1,32 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
abstract class Base extends core::Object {
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
class Foo extends self::Base {
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
class Bar extends self::Base {
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
class Baz extends self::Base {
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
static method foo(dynamic x) → void
|
||||
;
|
||||
static method bar(dynamic x) → void
|
||||
;
|
||||
static method foo_escaped(dynamic x) → void
|
||||
;
|
||||
static method bar_escaped(dynamic x) → void
|
||||
;
|
||||
static method escape(dynamic fn) → void
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
10
pkg/front_end/testcases/arithmetic.dart.outline.expect
Normal file
10
pkg/front_end/testcases/arithmetic.dart.outline.expect
Normal file
|
@ -0,0 +1,10 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method foo(core::int x, core::int y) → core::int
|
||||
;
|
||||
static method loop(core::List<dynamic> xs) → void
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
20
pkg/front_end/testcases/async_function.dart.outline.expect
Normal file
20
pkg/front_end/testcases/async_function.dart.outline.expect
Normal file
|
@ -0,0 +1,20 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:async" as asy;
|
||||
import "dart:core" as core;
|
||||
|
||||
static field core::List<core::String> stringList;
|
||||
static method asyncString() → asy::Future<core::String> async
|
||||
;
|
||||
static method asyncString2() → asy::Future<core::String> async
|
||||
;
|
||||
static method syncStarString() → core::Iterable<core::String> sync*
|
||||
;
|
||||
static method syncStarString2() → core::Iterable<core::String> sync*
|
||||
;
|
||||
static method asyncStarString() → asy::Stream<core::String> async*
|
||||
;
|
||||
static method asyncStarString2() → asy::Stream<core::String> async*
|
||||
;
|
||||
static method main() → dynamic async
|
||||
;
|
15
pkg/front_end/testcases/bad_store.dart.outline.expect
Normal file
15
pkg/front_end/testcases/bad_store.dart.outline.expect
Normal file
|
@ -0,0 +1,15 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Foo extends core::Object {
|
||||
field dynamic field;
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
static method identity(dynamic x) → dynamic
|
||||
;
|
||||
static method use(dynamic x) → void
|
||||
;
|
||||
static method main(core::List<core::String> args) → dynamic
|
||||
;
|
18
pkg/front_end/testcases/call.dart.outline.expect
Normal file
18
pkg/front_end/testcases/call.dart.outline.expect
Normal file
|
@ -0,0 +1,18 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Callable extends core::Object {
|
||||
constructor •() → void
|
||||
;
|
||||
method call(dynamic x) → dynamic
|
||||
;
|
||||
}
|
||||
class CallableGetter extends core::Object {
|
||||
constructor •() → void
|
||||
;
|
||||
get call() → dynamic
|
||||
;
|
||||
}
|
||||
static method main() → dynamic
|
||||
;
|
17
pkg/front_end/testcases/closure.dart.outline.expect
Normal file
17
pkg/front_end/testcases/closure.dart.outline.expect
Normal file
|
@ -0,0 +1,17 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Foo extends core::Object {
|
||||
field dynamic _field;
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
class Bar extends core::Object {
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
static method useCallback(dynamic callback) → dynamic
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
|
@ -0,0 +1,20 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Foo<T extends core::Object> extends core::Object {
|
||||
final field self::Foo::T finalField;
|
||||
final field (self::Foo::T) → void callbackField;
|
||||
field self::Foo::T mutableField;
|
||||
field (self::Foo::T) → void mutableCallbackField;
|
||||
constructor •(dynamic finalField, dynamic callbackField) → void
|
||||
;
|
||||
method method(self::Foo::T x) → void
|
||||
;
|
||||
set setter(self::Foo::T x) → dynamic
|
||||
;
|
||||
method withCallback((self::Foo::T) → void callback) → void
|
||||
;
|
||||
}
|
||||
static method main() → dynamic
|
||||
;
|
33
pkg/front_end/testcases/escape.dart.outline.expect
Normal file
33
pkg/front_end/testcases/escape.dart.outline.expect
Normal file
|
@ -0,0 +1,33 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class A extends core::Object {
|
||||
field dynamic field;
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
class B extends core::Object {
|
||||
field dynamic field;
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
class C extends core::Object {
|
||||
constructor •() → void
|
||||
;
|
||||
operator ==(dynamic x) → dynamic
|
||||
;
|
||||
}
|
||||
class X extends core::Object implements self::A, self::B {
|
||||
field dynamic field;
|
||||
constructor •() → void
|
||||
;
|
||||
}
|
||||
static method useAsA(self::A object) → void
|
||||
;
|
||||
static method useAsB(self::B object) → void
|
||||
;
|
||||
static method escape(dynamic x) → void
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
8
pkg/front_end/testcases/external.dart.outline.expect
Normal file
8
pkg/front_end/testcases/external.dart.outline.expect
Normal file
|
@ -0,0 +1,8 @@
|
|||
library;
|
||||
import self as self;
|
||||
|
||||
static field dynamic subscription;
|
||||
static method onData(dynamic x) → void
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
6
pkg/front_end/testcases/fallthrough.dart.outline.expect
Normal file
6
pkg/front_end/testcases/fallthrough.dart.outline.expect
Normal file
|
@ -0,0 +1,6 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method main(core::List<core::String> args) → void
|
||||
;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue