Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: tests/compiler/dart2js/kernel/impact_test.dart

Issue 2989453002: Add support for compiling Dart via the FE in dart2js. (Closed)
Patch Set: update status Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.kernel.impact_test; 5 library dart2js.kernel.impact_test;
6 6
7 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
8 import 'package:compiler/src/commandline_options.dart'; 8 import 'package:compiler/src/commandline_options.dart';
9 import 'package:compiler/src/common.dart'; 9 import 'package:compiler/src/common.dart';
10 import 'package:compiler/src/common/names.dart'; 10 import 'package:compiler/src/common/names.dart';
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 bool fullTest = args.contains('--full'); 732 bool fullTest = args.contains('--full');
733 asyncTest(() async { 733 asyncTest(() async {
734 enableDebugMode(); 734 enableDebugMode();
735 Uri entryPoint = 735 Uri entryPoint =
736 Uri.parse('memory:sdk/tests/compiler/dart2js_native/main.dart'); 736 Uri.parse('memory:sdk/tests/compiler/dart2js_native/main.dart');
737 Compiler compiler = compilerFor( 737 Compiler compiler = compilerFor(
738 entryPoint: entryPoint, 738 entryPoint: entryPoint,
739 memorySourceFiles: SOURCE, 739 memorySourceFiles: SOURCE,
740 options: [ 740 options: [
741 fullTest ? Flags.analyzeAll : Flags.analyzeOnly, 741 fullTest ? Flags.analyzeAll : Flags.analyzeOnly,
742 Flags.useKernel, 742 Flags.useKernelInSsa,
743 Flags.enableAssertMessage 743 Flags.enableAssertMessage
744 ]); 744 ]);
745 compiler.resolution.retainCachesForTesting = true; 745 compiler.resolution.retainCachesForTesting = true;
746 Expect.isTrue(await compiler.run(entryPoint)); 746 Expect.isTrue(await compiler.run(entryPoint));
747 JavaScriptBackend backend = compiler.backend; 747 JavaScriptBackend backend = compiler.backend;
748 KernelToElementMapForImpact kernelElementMap = 748 KernelToElementMapForImpact kernelElementMap =
749 new KernelToElementMapForImpactImpl( 749 new KernelToElementMapForImpactImpl(
750 compiler.reporter, compiler.environment); 750 compiler.reporter, compiler.environment);
751 kernelElementMap.addProgram(backend.kernelTask.program); 751 kernelElementMap.addProgram(backend.kernelTask.program);
752 752
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 builder.registerFeature(Feature.THROW_EXPRESSION); 903 builder.registerFeature(Feature.THROW_EXPRESSION);
904 break; 904 break;
905 default: 905 default:
906 builder.registerFeature(feature); 906 builder.registerFeature(feature);
907 break; 907 break;
908 } 908 }
909 } 909 }
910 impact.nativeData.forEach(builder.registerNativeData); 910 impact.nativeData.forEach(builder.registerNativeData);
911 return builder; 911 return builder;
912 } 912 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698