diff --git a/pkg/front_end/lib/src/fasta/builder/load_library_builder.dart b/pkg/front_end/lib/src/fasta/builder/load_library_builder.dart index c4bfb5fb84d..85234f32225 100644 --- a/pkg/front_end/lib/src/fasta/builder/load_library_builder.dart +++ b/pkg/front_end/lib/src/fasta/builder/load_library_builder.dart @@ -10,7 +10,7 @@ import 'package:kernel/ast.dart' ProcedureKind, Name, FunctionNode, - ExpressionStatement, + ReturnStatement, LibraryDependency; import 'builder.dart' show Builder, LibraryBuilder; @@ -39,10 +39,8 @@ class LoadLibraryBuilder extends Builder { if (tearoff != null) return tearoff; LoadLibrary expression = createLoadLibrary(charOffset); String prefix = expression.import.name; - tearoff = new Procedure( - new Name('__loadLibrary_$prefix', parent.target), - ProcedureKind.Method, - new FunctionNode(new ExpressionStatement(expression)), + tearoff = new Procedure(new Name('__loadLibrary_$prefix', parent.target), + ProcedureKind.Method, new FunctionNode(new ReturnStatement(expression)), fileUri: parent.target.fileUri) ..fileOffset = charOffset; return tearoff; diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status index 9c6427c93c0..4e64e795c26 100644 --- a/tests/language/language_dart2js.status +++ b/tests/language/language_dart2js.status @@ -160,7 +160,6 @@ constructor_redirect2_test/01: MissingCompileTimeError constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2). cyclic_constructor_test/01: Crash # Issue 30856 deferred_call_empty_before_load_test: RuntimeError -deferred_closurize_load_library_test: RuntimeError deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary @@ -557,7 +556,6 @@ constructor_redirect2_negative_test: Crash # Stack Overflow constructor_redirect2_test/01: MissingCompileTimeError constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2). cyclic_constructor_test/01: Crash # Stack Overflow -deferred_closurize_load_library_test: RuntimeError deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary @@ -875,7 +873,6 @@ constructor_redirect2_test/01: MissingCompileTimeError constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2). cyclic_constructor_test/01: Crash # Issue 30856 deferred_call_empty_before_load_test: RuntimeError -deferred_closurize_load_library_test: RuntimeError deferred_constraints_constants_test/default_argument2: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper). deferred_constraints_constants_test/none: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper). deferred_constraints_constants_test/reference_after_load: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper). @@ -1201,8 +1198,6 @@ cyclic_type_test/02: RuntimeError cyclic_type_test/03: RuntimeError cyclic_type_test/04: RuntimeError deferred_call_empty_before_load_test: RuntimeError -deferred_closurize_load_library_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null. -deferred_closurize_load_library_test: RuntimeError deferred_constraints_constants_test/default_argument2: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null. deferred_constraints_constants_test/none: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null. deferred_constraints_constants_test/reference_after_load: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null. diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status index 5bd8c477723..de292c53e9a 100644 --- a/tests/language_2/language_2_dart2js.status +++ b/tests/language_2/language_2_dart2js.status @@ -1208,7 +1208,6 @@ covariant_override/runtime_check_test: RuntimeError covariant_subtyping_test: CompileTimeError cyclic_constructor_test/01: Crash # Stack Overflow deferred_call_empty_before_load_test: RuntimeError -deferred_closurize_load_library_test: RuntimeError deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary @@ -1767,7 +1766,6 @@ covariant_subtyping_unsafe_call2_test: RuntimeError covariant_subtyping_unsafe_call3_test: RuntimeError cyclic_constructor_test/01: Crash # Stack Overflow deferred_call_empty_before_load_test: RuntimeError -deferred_closurize_load_library_test: RuntimeError deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary @@ -2264,7 +2262,6 @@ covariant_subtyping_unsafe_call3_test: RuntimeError crash_6725_test/01: MissingCompileTimeError cyclic_constructor_test/01: Crash # Issue 30856 deferred_call_empty_before_load_test: RuntimeError -deferred_closurize_load_library_test: RuntimeError deferred_constraints_constants_test/default_argument2: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper). deferred_constraints_constants_test/none: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper). deferred_constraints_constants_test/reference_after_load: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper). @@ -3022,7 +3019,6 @@ covariant_subtyping_unsafe_call3_test: RuntimeError crash_6725_test/01: MissingCompileTimeError cyclic_constructor_test/01: Crash # Issue 30856 deferred_call_empty_before_load_test: RuntimeError -deferred_closurize_load_library_test: RuntimeError deferred_constraints_constants_test/default_argument2: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null. deferred_constraints_constants_test/none: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null. deferred_constraints_constants_test/reference_after_load: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null. diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status index 69538368d7d..d5ef288d76c 100644 --- a/tests/language_2/language_2_dartdevc.status +++ b/tests/language_2/language_2_dartdevc.status @@ -720,7 +720,6 @@ conditional_import_string_test: RuntimeError # Unsupported operation: String.fro conditional_import_test: RuntimeError # Unsupported operation: bool.fromEnvironment can only be used as a const constructor cyclic_type_test/00: RuntimeError # Expect.equals(expected: , actual: ) fails. cyclic_type_test/01: RuntimeError # Expect.equals(at index 0: Expected >...>, Found: ) fails. -deferred_closurize_load_library_test: RuntimeError # NoSuchMethodError: method not found: 'then' enum_duplicate_test/01: RuntimeError # NoSuchMethodError: method not found: '' enum_duplicate_test/02: RuntimeError # NoSuchMethodError: method not found: '' enum_duplicate_test/none: RuntimeError # NoSuchMethodError: method not found: ''