Improve detection of compile-time errors.

R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2739213004 .
This commit is contained in:
Peter von der Ahé 2017-03-10 14:14:49 +01:00
parent b29b6ef2b9
commit d1bdc9596d
16 changed files with 95 additions and 128 deletions

View file

@ -14,7 +14,7 @@ import '../compiler_context.dart' show CompilerContext;
import '../ticker.dart' show Ticker;
import '../outline.dart' show CompileTask;
import '../fasta.dart' show CompileTask;
import '../errors.dart' show InputError;

View file

@ -51,9 +51,12 @@ abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder {
exporters.add(new Export(exporter, this, combinators, charOffset));
}
void addCompileTimeError(int charOffset, Object message, [Uri fileUri]) {
void addCompileTimeError(int charOffset, Object message,
{Uri fileUri, bool silent: false}) {
fileUri ??= this.fileUri;
printUnexpected(fileUri, charOffset, message);
if (!silent) {
printUnexpected(fileUri, charOffset, message);
}
compileTimeErrors.add(new InputError(fileUri, charOffset, message));
}

View file

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library fasta.outline;
library fasta;
import 'dart:async' show Future;
@ -188,12 +188,12 @@ Future<CompilationResult> parseScript(
program = await kernelTarget.writeOutline(null);
program = await kernelTarget.writeProgram(null);
if (kernelTarget.errors.isNotEmpty) {
return new CompilationResult.error(kernelTarget.errors
return new CompilationResult.errors(kernelTarget.errors
.map((err) => err.toString())
.toList(growable: false));
}
} on InputError catch (e) {
return new CompilationResult.error(<String>[e.format()]);
return new CompilationResult.error(e.format());
}
// Perform target-specific transformations.

View file

@ -25,7 +25,7 @@ import '../parser/dart_vm_native.dart' show skipNativeClause;
import '../scanner/token.dart'
show BeginGroupToken, Token, isBinaryOperator, isMinusOperator;
import '../errors.dart' show internalError, printUnexpected;
import '../errors.dart' show formatUnexpected, internalError;
import '../source/scope_listener.dart'
show JumpTargetKind, NullValue, ScopeListener;
@ -112,8 +112,6 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
bool isFirstIdentifier = false;
bool hasParserError = false;
bool inInitializer = false;
bool inCatchClause = false;
@ -143,6 +141,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
isDartLibrary = library.uri.scheme == "dart",
super(scope);
bool get hasParserError => recoverableErrors.isNotEmpty;
bool get inConstructor {
return functionNestingLevel == 0 && member is KernelConstructorBuilder;
}
@ -2204,12 +2204,11 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
@override
void handleRecoverableError(Token token, ErrorKind kind, Map arguments) {
bool silent = hasParserError;
super.handleRecoverableError(token, kind, arguments);
if (!hasParserError) {
printUnexpected(uri, recoverableErrors.last.beginOffset,
'${recoverableErrors.last.kind}');
}
hasParserError = true;
addCompileTimeError(recoverableErrors.last.beginOffset,
'${recoverableErrors.last.kind} $arguments',
silent: silent);
}
@override
@ -2231,7 +2230,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
@override
Expression buildCompileTimeError(error, [int charOffset = -1]) {
String message = printUnexpected(uri, charOffset, error);
addCompileTimeError(charOffset, error);
String message = formatUnexpected(uri, charOffset, error);
Builder constructor = library.loader.getCompileTimeError();
return new Throw(buildStaticInvocation(constructor.target,
new Arguments(<Expression>[new StringLiteral(message)]),
@ -2270,8 +2270,9 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
logEvent("SymbolVoid");
}
dynamic addCompileTimeError(int charOffset, String message) {
return library.addCompileTimeError(charOffset, message, uri);
dynamic addCompileTimeError(int charOffset, String message,
{bool silent: false}) {
return library.addCompileTimeError(charOffset, message, fileUri: uri);
}
@override

View file

@ -20,7 +20,8 @@ class KernelFunctionTypeBuilder extends FunctionTypeBuilder
Supertype buildSupertype(LibraryBuilder library) {
library.addCompileTimeError(
charOffset, "Can't use a function type as supertype.", fileUri);
charOffset, "Can't use a function type as supertype.",
fileUri: fileUri);
return null;
}
}

View file

@ -47,7 +47,7 @@ class KernelNamedTypeBuilder
String message = builder.isTypeVariable
? "The type variable '$name' can't be used as supertype."
: "The type '$name' can't be used as supertype.";
library.addCompileTimeError(charOffset, message, fileUri);
library.addCompileTimeError(charOffset, message, fileUri: fileUri);
return null;
}

View file

@ -16,7 +16,7 @@ import 'compiler_context.dart' show CompilerContext;
import 'compiler_command_line.dart' show CompilerCommandLine;
import 'outline.dart' show CompileTask;
import 'fasta.dart' show CompileTask;
import 'errors.dart' show InputError;

View file

@ -22,7 +22,7 @@ import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
import 'package:kernel/core_types.dart' show CoreTypes;
import '../errors.dart' show inputError, printUnexpected;
import '../errors.dart' show inputError;
import '../messages.dart' show warning;
@ -75,7 +75,8 @@ class SourceLoader<L> extends Loader<L> {
while (token is ErrorToken) {
if (!suppressLexicalErrors) {
ErrorToken error = token;
printUnexpected(uri, token.charOffset, error.assertionMessage);
library.addCompileTimeError(token.charOffset, error.assertionMessage,
fileUri: uri);
}
token = token.next;
}

View file

@ -12,7 +12,7 @@ import 'dart:io' show File, Platform;
import 'dart:typed_data' show Uint8List;
import 'outline.dart' as fasta;
import 'fasta.dart' as fasta;
/// Compilation status codes.
///
@ -35,7 +35,11 @@ abstract class CompilationResult {
factory CompilationResult.ok(Uint8List bytes) = _CompilationOk;
factory CompilationResult.error(List<String> errors) = _CompilationError;
factory CompilationResult.errors(List<String> errors) = _CompilationError;
factory CompilationResult.error(String error) {
return new _CompilationError(<String>[error]);
}
factory CompilationResult.crash(Object exception, StackTrace stack) =
_CompilationCrash;

View file

@ -67,7 +67,7 @@ rasta/super_operator: Fail
rasta/switch_execution_case_t02: Fail
rasta/switch_fall_through: Fail
rasta/try_label: Fail
rasta/type_literals: VerificationError
rasta/type_literals: Fail
rasta/type_with_parse_error: Fail
rasta/typedef: VerificationError
rasta/unresolved: Fail

View file

@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/fasta/outline.dart' show compileEntryPoint;
import 'package:front_end/src/fasta/fasta.dart' show compileEntryPoint;
main(List<String> arguments) => compileEntryPoint(arguments);

View file

@ -2,6 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/fasta/outline.dart' show outlineEntryPoint;
import 'package:front_end/src/fasta/fasta.dart' show outlineEntryPoint;
main(List<String> arguments) => outlineEntryPoint(arguments);

View file

@ -51,6 +51,7 @@ Language/Classes/Getters/syntax_t02: MissingCompileTimeError
Language/Classes/Getters/syntax_t03: MissingCompileTimeError
Language/Classes/Getters/syntax_t04: MissingCompileTimeError
Language/Classes/Getters/syntax_t05: MissingCompileTimeError
Language/Classes/Getters/syntax_t06: MissingCompileTimeError
Language/Classes/Getters/syntax_t07: MissingCompileTimeError
Language/Classes/Instance_Methods/Operators/arity_0_or_1_t02: MissingCompileTimeError
Language/Classes/Instance_Methods/Operators/arity_0_t02: MissingCompileTimeError
@ -134,25 +135,24 @@ Language/Enums/restrictions_t05: MissingCompileTimeError
Language/Enums/restrictions_t06: MissingCompileTimeError
Language/Enums/restrictions_t07: MissingCompileTimeError
Language/Enums/restrictions_t08: MissingCompileTimeError
Language/Expressions/Assignment/expression_assignment_failed_t03: RuntimeError
Language/Expressions/Assignment/expression_assignment_t07: RuntimeError
Language/Expressions/Assignment/no_such_method_t01: RuntimeError
Language/Expressions/Assignment/no_such_method_t02: RuntimeError
Language/Expressions/Assignment/no_such_method_t03: RuntimeError
Language/Expressions/Assignment/no_such_method_t04: RuntimeError
Language/Expressions/Assignment/no_such_method_t05: RuntimeError
Language/Expressions/Assignment/no_such_method_t06: RuntimeError
Language/Expressions/Assignment/no_such_method_t07: RuntimeError
Language/Expressions/Assignment/no_such_method_t08: RuntimeError
Language/Expressions/Assignment/no_such_method_t09: RuntimeError
Language/Expressions/Assignment/expression_assignment_failed_t03: CompileTimeError
Language/Expressions/Assignment/expression_assignment_t07: CompileTimeError
Language/Expressions/Assignment/no_such_method_t01: CompileTimeError
Language/Expressions/Assignment/no_such_method_t02: CompileTimeError
Language/Expressions/Assignment/no_such_method_t03: CompileTimeError
Language/Expressions/Assignment/no_such_method_t04: CompileTimeError
Language/Expressions/Assignment/no_such_method_t05: CompileTimeError
Language/Expressions/Assignment/no_such_method_t06: CompileTimeError
Language/Expressions/Assignment/no_such_method_t07: CompileTimeError
Language/Expressions/Assignment/no_such_method_t08: CompileTimeError
Language/Expressions/Assignment/no_such_method_t09: CompileTimeError
Language/Expressions/Assignment/static_type_t05: RuntimeError
Language/Expressions/Assignment/static_type_t06: RuntimeError
Language/Expressions/Assignment/static_type_t06: CompileTimeError
Language/Expressions/Assignment/static_warning_t03/none: RuntimeError
Language/Expressions/Assignment/super_assignment_failed_t01: RuntimeError
Language/Expressions/Assignment/super_assignment_failed_t02: RuntimeError
Language/Expressions/Assignment/super_assignment_value_t02: RuntimeError
Language/Expressions/Await_Expressions/syntax_t06: Crash
Language/Expressions/Conditional/syntax_t04: MissingCompileTimeError
Language/Expressions/Constants/bitwise_operators_t02: Crash
Language/Expressions/Constants/bitwise_operators_t03: Crash
Language/Expressions/Constants/bitwise_operators_t04: Crash
@ -161,6 +161,8 @@ Language/Expressions/Constants/bitwise_operators_t06: Crash
Language/Expressions/Constants/constant_constructor_t03: MissingCompileTimeError
Language/Expressions/Constants/constant_list_t02: MissingCompileTimeError
Language/Expressions/Constants/constant_map_t02: MissingCompileTimeError
Language/Expressions/Constants/depending_on_itself_t01: MissingCompileTimeError
Language/Expressions/Constants/depending_on_itself_t02: MissingCompileTimeError
Language/Expressions/Constants/depending_on_itself_t03: Crash
Language/Expressions/Constants/equals_expression_t02: MissingCompileTimeError
Language/Expressions/Constants/equals_expression_t03: MissingCompileTimeError
@ -170,7 +172,6 @@ Language/Expressions/Constants/exception_t03: Crash
Language/Expressions/Constants/exception_t04: MissingCompileTimeError
Language/Expressions/Constants/identical_t02: Crash
Language/Expressions/Constants/identical_t03: MissingCompileTimeError
Language/Expressions/Constants/identifier_denotes_a_constant_t03: Crash
Language/Expressions/Constants/identifier_denotes_a_constant_t06: MissingCompileTimeError
Language/Expressions/Constants/identifier_denotes_a_constant_t07: MissingCompileTimeError
Language/Expressions/Constants/literal_string_t02: MissingCompileTimeError
@ -205,6 +206,7 @@ Language/Expressions/Constants/static_constant_t04: MissingCompileTimeError
Language/Expressions/Constants/static_constant_t06: MissingCompileTimeError
Language/Expressions/Constants/static_constant_t07: MissingCompileTimeError
Language/Expressions/Constants/static_method_t02: Crash
Language/Expressions/Constants/static_method_t03: MissingCompileTimeError
Language/Expressions/Constants/string_length_t02: MissingCompileTimeError
Language/Expressions/Constants/string_length_t03: MissingCompileTimeError
Language/Expressions/Constants/ternary_operator_t02: MissingCompileTimeError
@ -236,8 +238,6 @@ Language/Expressions/Identifier_Reference/built_in_not_dynamic_t14: Pass # OK, I
Language/Expressions/Identifier_Reference/built_in_not_dynamic_t15: MissingCompileTimeError
Language/Expressions/Identifier_Reference/evaluation_static_t02: Crash
Language/Expressions/Identifier_Reference/syntax_built_in_t01: CompileTimeError
Language/Expressions/Identifier_Reference/syntax_t07: MissingCompileTimeError
Language/Expressions/Identifier_Reference/syntax_t08: MissingCompileTimeError
Language/Expressions/Identifier_Reference/undeclared_identifier_t04: RuntimeError
Language/Expressions/Instance_Creation/Const/accessibility_t01: MissingCompileTimeError
Language/Expressions/Instance_Creation/Const/accessibility_t02: MissingCompileTimeError
@ -285,11 +285,6 @@ Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t03
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t04: RuntimeError
Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02: MissingCompileTimeError
Language/Expressions/Method_Invocation/Super_Invocation/invocation_t03: MissingCompileTimeError
Language/Expressions/Numbers/syntax_t21: MissingCompileTimeError
Language/Expressions/Numbers/syntax_t25: MissingCompileTimeError
Language/Expressions/Numbers/syntax_t26: MissingCompileTimeError
Language/Expressions/Numbers/syntax_t27: MissingCompileTimeError
Language/Expressions/Numbers/syntax_t29: MissingCompileTimeError
Language/Expressions/Postfix_Expressions/syntax_t06: MissingCompileTimeError
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
@ -368,13 +363,12 @@ Language/Libraries_and_Scripts/Imports/same_name_t12/01: MissingRuntimeError
Language/Libraries_and_Scripts/Imports/same_name_t15/01: MissingRuntimeError
Language/Libraries_and_Scripts/Imports/same_name_t19: RuntimeError
Language/Libraries_and_Scripts/Imports/static_type_t01: Skip # No support for deferred libraries.
Language/Libraries_and_Scripts/Imports/syntax_t32: MissingCompileTimeError
Language/Libraries_and_Scripts/Imports/syntax_t41: MissingCompileTimeError
Language/Libraries_and_Scripts/Parts/compilation_t02: Timeout
Language/Libraries_and_Scripts/Parts/compilation_t07: MissingCompileTimeError
Language/Libraries_and_Scripts/Parts/compilation_t09: DartkCrash
Language/Libraries_and_Scripts/Parts/compilation_t11: MissingCompileTimeError
Language/Libraries_and_Scripts/Parts/static_warning_t01: RuntimeError
Language/Libraries_and_Scripts/Parts/static_warning_t01: CompileTimeError
Language/Libraries_and_Scripts/Parts/syntax_t01: MissingCompileTimeError
Language/Libraries_and_Scripts/Parts/syntax_t06: Pass # OK
Language/Libraries_and_Scripts/Scripts/syntax_t05: MissingCompileTimeError
@ -394,7 +388,6 @@ 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_t29: MissingCompileTimeError
Language/Libraries_and_Scripts/private_access_t03: RuntimeError
Language/Metadata/before_export_t01: RuntimeError # Issue 28434: Kernel IR misses these annotations.
Language/Metadata/before_import_t01: RuntimeError # Issue 28434: Kernel IR misses these annotations.
@ -411,6 +404,14 @@ Language/Metadata/before_param_t09: RuntimeError # Issue 28434: Kernel IR misse
Language/Metadata/before_typedef_t01: RuntimeError # Issue 28434: Kernel IR misses these annotations.
Language/Metadata/before_variable_t01: RuntimeError # Issue 28434: Kernel IR misses these annotations.
Language/Metadata/before_variable_t02: RuntimeError # Issue 28434: Kernel IR misses these annotations.
Language/Metadata/compilation_t01: MissingCompileTimeError
Language/Metadata/compilation_t02: MissingCompileTimeError
Language/Metadata/compilation_t03: MissingCompileTimeError
Language/Metadata/compilation_t04: MissingCompileTimeError
Language/Metadata/compilation_t08: MissingCompileTimeError
Language/Metadata/compilation_t09: MissingCompileTimeError
Language/Metadata/compilation_t10: MissingCompileTimeError
Language/Metadata/compilation_t11: MissingCompileTimeError
Language/Mixins/Mixin_Application/deferred_t01: MissingCompileTimeError
Language/Mixins/Mixin_Application/syntax_t15: MissingCompileTimeError
Language/Mixins/Mixin_Application/wrong_mixin_type_t01: MissingCompileTimeError
@ -449,32 +450,9 @@ Language/Overview/Scoping/conflicting_names_t38: Crash
Language/Overview/Scoping/conflicting_names_t39: MissingCompileTimeError
Language/Overview/Scoping/conflicting_names_t40: MissingCompileTimeError
Language/Overview/Scoping/conflicting_names_t41: MissingCompileTimeError
Language/Overview/Scoping/conflicting_names_t43: MissingCompileTimeError
Language/Overview/Scoping/conflicting_names_t44: Crash
Language/Overview/Scoping/hiding_declaration_t16: Crash
Language/Reference/Lexical_Rules/Comments/documentation_t02: Crash
Language/Reference/Lexical_Rules/Comments/documentation_t03: Crash
Language/Reference/Lexical_Rules/Comments/documentation_t04: Crash
Language/Reference/Lexical_Rules/Comments/documentation_t05: Crash
Language/Reference/Lexical_Rules/Comments/documentation_t06: Crash
Language/Reference/Lexical_Rules/Comments/documentation_t10: Crash
Language/Reference/Lexical_Rules/Comments/documentation_t11: Crash
Language/Reference/Lexical_Rules/Comments/multi_line_t03: Crash
Language/Reference/Lexical_Rules/Comments/multi_line_t04: Crash
Language/Reference/Lexical_Rules/Comments/multi_line_t05: Crash
Language/Reference/Lexical_Rules/Comments/multi_line_t06: Crash
Language/Reference/Lexical_Rules/Reserved_Words/whitespace_t02: MissingCompileTimeError
Language/Reference/Lexical_Rules/Reserved_Words/whitespace_t03: MissingCompileTimeError
Language/Reference/Lexical_Rules/Reserved_Words/whitespace_t04: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t01: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t02: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t03: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t04: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t05: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t06: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t07: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t08: MissingCompileTimeError
Language/Reference/Lexical_Rules/whitespace_t09: MissingCompileTimeError
Language/Statements/Assert/syntax_t04: MissingCompileTimeError
Language/Statements/Break/label_t11: DartkCrash
Language/Statements/Break/label_t12: DartkCrash
Language/Statements/Continue/async_loops_t10: DartkCrash
@ -489,11 +467,9 @@ Language/Statements/Continue/label_t14: DartkCrash
Language/Statements/Continue/label_t17: DartkCrash
Language/Statements/Do/execution_t04: Crash
Language/Statements/For/Asynchronous_For_in/syntax_t02: MissingCompileTimeError
Language/Statements/For/syntax_t07: RuntimeError
Language/Statements/For/syntax_t09: MissingCompileTimeError
Language/Statements/For/syntax_t07: CompileTimeError
Language/Statements/For/syntax_t12: MissingCompileTimeError
Language/Statements/For/syntax_t13: MissingCompileTimeError
Language/Statements/For/syntax_t16: MissingCompileTimeError
Language/Statements/For/syntax_t19: MissingCompileTimeError
Language/Statements/For/syntax_t20: MissingCompileTimeError
Language/Statements/If/execution_t03: Crash
@ -614,10 +590,6 @@ Language/Statements/Yield_and_Yield_Each/Yield_Each/location_t06: Crash
# dartk: JIT failures
[ $compiler == dartk ]
Language/Classes/Getters/syntax_t06: MissingCompileTimeError
Language/Expressions/Constants/depending_on_itself_t01: MissingCompileTimeError
Language/Expressions/Constants/depending_on_itself_t02: MissingCompileTimeError
Language/Expressions/Constants/static_method_t03: MissingCompileTimeError
Language/Expressions/Instance_Creation/Const/canonicalized_t05: RuntimeError
Language/Expressions/Object_Identity/string_t01: RuntimeError
Language/Expressions/Strings/adjacent_strings_t02: RuntimeError
@ -641,17 +613,8 @@ Language/Metadata/before_function_t05: RuntimeError
Language/Metadata/before_function_t06: RuntimeError
Language/Metadata/before_function_t07: RuntimeError
Language/Metadata/before_type_param_t01: CompileTimeError
Language/Metadata/compilation_t01: MissingCompileTimeError
Language/Metadata/compilation_t02: MissingCompileTimeError
Language/Metadata/compilation_t03: MissingCompileTimeError
Language/Metadata/compilation_t04: MissingCompileTimeError
Language/Metadata/compilation_t08: MissingCompileTimeError
Language/Metadata/compilation_t09: MissingCompileTimeError
Language/Metadata/compilation_t10: MissingCompileTimeError
Language/Metadata/compilation_t11: MissingCompileTimeError
Language/Mixins/Mixin_Application/syntax_t16: DartkCrash
Language/Overview/Privacy/private_and_public_t04: CompileTimeError
Language/Overview/Scoping/conflicting_names_t43: MissingCompileTimeError
Language/Statements/Labels/scope_t01: CompileTimeError
Language/Statements/Labels/scope_t07: CompileTimeError
Language/Statements/Local_Variable_Declaration/syntax_t05: CompileTimeError

View file

@ -22,7 +22,6 @@ assignable_expression_test/32: MissingCompileTimeError
assignable_expression_test/33: MissingCompileTimeError
assignable_expression_test/42: MissingCompileTimeError
assignable_expression_test/43: MissingCompileTimeError
assignable_expression_test/50: MissingCompileTimeError
async_await_syntax_test/a01b: MissingCompileTimeError
async_await_syntax_test/a01c: MissingCompileTimeError
async_await_syntax_test/a05f: MissingCompileTimeError
@ -77,9 +76,9 @@ built_in_identifier_illegal_test/18: MissingCompileTimeError
built_in_identifier_illegal_test/19: MissingCompileTimeError
built_in_identifier_illegal_test/20: MissingCompileTimeError
built_in_identifier_test/01: CompileTimeError
call_nonexistent_static_test/01: RuntimeError
call_nonexistent_static_test/04: RuntimeError
call_nonexistent_static_test/06: RuntimeError
call_nonexistent_static_test/01: CompileTimeError
call_nonexistent_static_test/04: CompileTimeError
call_nonexistent_static_test/06: CompileTimeError
cha_deopt1_test: RuntimeError # Deferred Loading Issue 28335
cha_deopt2_test: RuntimeError # Deferred Loading Issue 28335
cha_deopt3_test: RuntimeError # Deferred Loading Issue 28335
@ -89,10 +88,7 @@ class_cycle_test/00: MissingCompileTimeError
class_cycle_test/01: MissingCompileTimeError
compile_time_constant10_test/01: Crash
compile_time_constant10_test/02: Crash
compile_time_constant13_test/02: Crash
compile_time_constant13_test/03: MissingCompileTimeError
compile_time_constant13_test/04: Crash
compile_time_constant13_test/05: Crash
compile_time_constant_arguments_test/01: MissingCompileTimeError
compile_time_constant_arguments_test/02: MissingCompileTimeError
compile_time_constant_arguments_test/03: MissingCompileTimeError
@ -162,6 +158,8 @@ const_syntax_test/04: MissingCompileTimeError
const_syntax_test/05: MissingCompileTimeError
const_syntax_test/06: MissingCompileTimeError
const_syntax_test/07: MissingCompileTimeError
const_syntax_test/08: MissingCompileTimeError
const_syntax_test/09: MissingCompileTimeError
const_syntax_test/10: Crash
const_syntax_test/11: MissingCompileTimeError
const_syntax_test/12: MissingCompileTimeError
@ -229,6 +227,7 @@ covariant_test/54: RuntimeError
covariant_test/56: RuntimeError
covariant_test/59: MissingCompileTimeError
covariant_test/none: RuntimeError
crash_6725_test/01: CompileTimeError
cyclic_class_member_test/01: MissingCompileTimeError
cyclic_constructor_test/01: MissingCompileTimeError
cyclic_type_test/00: RuntimeError
@ -253,7 +252,16 @@ cyclic_typedef_test/11: MissingCompileTimeError
deferred_call_empty_before_load_test: RuntimeError # Deferred Loading Issue 28335
deferred_closurize_load_library_test: RuntimeError
deferred_constant_list_test: RuntimeError
deferred_constraints_constants_test/constructor1: MissingCompileTimeError
deferred_constraints_constants_test/constructor2: MissingCompileTimeError
deferred_constraints_constants_test/default_argument1: MissingCompileTimeError
deferred_constraints_constants_test/default_argument2: MissingCompileTimeError
deferred_constraints_constants_test/metadata1: MissingCompileTimeError
deferred_constraints_constants_test/metadata2: MissingCompileTimeError
deferred_constraints_constants_test/metadata3: MissingCompileTimeError
deferred_constraints_constants_test/none: RuntimeError
deferred_constraints_constants_test/reference1: MissingCompileTimeError
deferred_constraints_constants_test/reference2: MissingCompileTimeError
deferred_constraints_constants_test/reference_after_load: RuntimeError
deferred_constraints_type_annotation_test/as_operation: RuntimeError
deferred_constraints_type_annotation_test/catch_check: RuntimeError
@ -344,7 +352,7 @@ final_syntax_test/01: MissingCompileTimeError
final_syntax_test/02: MissingCompileTimeError
final_syntax_test/03: MissingCompileTimeError
final_syntax_test/04: MissingCompileTimeError
first_class_types_literals_test/08: RuntimeError
first_class_types_literals_test/08: CompileTimeError
for2_test: RuntimeError
for_variable_capture_test: RuntimeError
function_subtype0_test: RuntimeError
@ -391,6 +399,7 @@ generic_metadata_test/03: MissingCompileTimeError
generic_method_types_test: Pass, RuntimeError
getter_closure_execution_order_test: RuntimeError
getter_parameters_test/01: MissingCompileTimeError
getter_parameters_test/02: MissingCompileTimeError
getter_parameters_test/03: MissingCompileTimeError
getter_parameters_test/04: MissingCompileTimeError
getter_setter_in_lib_test: RuntimeError
@ -503,8 +512,6 @@ named_parameters_default_eq_test/02: MissingCompileTimeError
no_main_test/01: Crash
not_enough_positional_arguments_test/02: MissingRuntimeError # Dartk Issue 28301
not_enough_positional_arguments_test/05: MissingRuntimeError # Dartk Issue 28301
number_identifier_test/02: MissingCompileTimeError
number_identifier_test/04: MissingCompileTimeError
on_catch_malformed_type_test: RuntimeError
parameter_initializer6_negative_test: Fail
part2_test: RuntimeError
@ -516,7 +523,15 @@ redirecting_factory_default_values_test/01: MissingCompileTimeError
redirecting_factory_default_values_test/02: MissingCompileTimeError
redirecting_factory_infinite_steps_test/02: Crash
redirecting_factory_long_test: RuntimeError
regress_13494_test: RuntimeError
ref_before_declaration_test/00: MissingCompileTimeError
ref_before_declaration_test/01: MissingCompileTimeError
ref_before_declaration_test/02: MissingCompileTimeError
ref_before_declaration_test/03: MissingCompileTimeError
ref_before_declaration_test/04: MissingCompileTimeError
ref_before_declaration_test/05: MissingCompileTimeError
ref_before_declaration_test/06: MissingCompileTimeError
ref_before_declaration_test/07: MissingCompileTimeError
regress_13494_test: CompileTimeError
regress_20394_test/01: MissingCompileTimeError
regress_22438_test: RuntimeError
regress_22443_test: RuntimeError # Deferred Loading Issue 28335
@ -525,7 +540,6 @@ regress_27617_test/1: MissingCompileTimeError
regress_28217_test/01: MissingCompileTimeError
regress_28217_test/none: MissingCompileTimeError
regress_28278_test: RuntimeError # Mirrors Issue
reify_typevar_static_test/00: MissingCompileTimeError
runtime_type_function_test: RuntimeError
scope_variable_test/01: MissingCompileTimeError
script1_negative_test: Fail
@ -536,6 +550,8 @@ setter_override_test/01: RuntimeError
setter_override_test/02: RuntimeError
setter_override_test/none: RuntimeError
source_self_negative_test: DartkCrash
static_field3_test/03: CompileTimeError
static_field3_test/04: CompileTimeError
static_final_field2_test/02: MissingCompileTimeError
static_parameter_test/01: MissingCompileTimeError
static_parameter_test/02: MissingCompileTimeError
@ -598,12 +614,11 @@ sync_generator2_test/52: MissingCompileTimeError
syntax_test/02: MissingCompileTimeError
syntax_test/03: MissingCompileTimeError
syntax_test/27: MissingCompileTimeError
syntax_test/64: MissingCompileTimeError
syntax_test/65: MissingCompileTimeError
this_conditional_operator_test/01: MissingCompileTimeError
try_catch_on_syntax_test/10: MissingRuntimeError # Dartk Issue 28410
try_catch_on_syntax_test/11: MissingRuntimeError # Dartk Issue 28410
try_catch_syntax_test/01: MissingCompileTimeError
try_catch_syntax_test/05: MissingCompileTimeError
try_catch_syntax_test/07: MissingCompileTimeError
try_catch_syntax_test/09: MissingCompileTimeError
try_catch_syntax_test/10: MissingCompileTimeError
@ -648,42 +663,21 @@ language/regress_22728_test: Fail # Dartk Issue 28498
const_evaluation_test/01: RuntimeError
const_locals_test: RuntimeError
const_string_test: RuntimeError # Dartk Issue 28306
const_syntax_test/08: MissingCompileTimeError
const_syntax_test/09: MissingCompileTimeError
constructor_named_arguments_test/01: Crash # Dartk Issue 28301
ct_const2_test: Pass, Crash # Flaky
deferred_constraints_constants_test/constructor1: MissingCompileTimeError
deferred_constraints_constants_test/constructor2: MissingCompileTimeError
deferred_constraints_constants_test/default_argument1: MissingCompileTimeError
deferred_constraints_constants_test/default_argument2: MissingCompileTimeError
deferred_constraints_constants_test/metadata1: MissingCompileTimeError
deferred_constraints_constants_test/metadata2: MissingCompileTimeError
deferred_constraints_constants_test/metadata3: MissingCompileTimeError
deferred_constraints_constants_test/reference1: MissingCompileTimeError
deferred_constraints_constants_test/reference2: MissingCompileTimeError
disassemble_test: Pass, Crash # Multitest via multiple VMOptions! Hits assert "kind() != RawScript::kKernelTag". Issue 28790
final_syntax_test/09: Crash
getter_declaration_negative_test: Fail
getter_parameters_test/02: MissingCompileTimeError
hello_dart_test: Crash
instance_creation_in_function_annotation_test: RuntimeError
label_test: CompileTimeError
library_env_test/has_no_mirror_support: RuntimeError
redirecting_factory_reflection_test: Crash
redirecting_factory_reflection_test: RuntimeError
ref_before_declaration_test/00: MissingCompileTimeError
ref_before_declaration_test/01: MissingCompileTimeError
ref_before_declaration_test/02: MissingCompileTimeError
ref_before_declaration_test/03: MissingCompileTimeError
ref_before_declaration_test/04: MissingCompileTimeError
ref_before_declaration_test/05: MissingCompileTimeError
ref_before_declaration_test/06: MissingCompileTimeError
ref_before_declaration_test/07: MissingCompileTimeError
setter_declaration2_negative_test: Fail
setter_declaration_negative_test: Fail
super_call4_test: RuntimeError
super_getter_setter_test: RuntimeError
try_catch_syntax_test/05: MissingCompileTimeError
vm/lazy_deopt_vm_test: Pass, Slow, Timeout
vm/optimized_stacktrace_test: Skip # Issue 28788

View file

@ -15,7 +15,7 @@ import 'package:analyzer/src/generated/sdk.dart';
import 'package:path/path.dart' as path;
import 'package:front_end/src/fasta/compile_platform.dart' as compile_platform;
import 'package:front_end/src/fasta/outline.dart' show CompileTask;
import 'package:front_end/src/fasta/fasta.dart' show CompileTask;
import 'package:front_end/src/fasta/compiler_command_line.dart'
show CompilerCommandLine;

View file

@ -44,7 +44,7 @@ Future<CompilationResult> _processLoadRequestImpl(String inputFilePathOrUri) {
if (!scriptUri.isScheme('file')) {
// TODO(vegorov): Reuse loader code to support other schemes.
return new Future<CompilationResult>.value(new CompilationResult.error(
["Expected 'file' scheme for a script uri: got ${scriptUri.scheme}"]));
"Expected 'file' scheme for a script uri: got ${scriptUri.scheme}"));
}
return parseScript(scriptUri, verbose: verbose);