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

Side by Side Diff: tests/compiler/dart2js/array_tracing_mirror_test.dart

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « pkg/compiler/tool/perf.dart ('k') | tests/compiler/dart2js/assert_message_throw_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Make sure that limiting mirrors through @MirrorsUsed does not 5 // Make sure that limiting mirrors through @MirrorsUsed does not
6 // affect optimizations done on arrays. 6 // affect optimizations done on arrays.
7 7
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 import "package:async_helper/async_helper.dart"; 9 import "package:async_helper/async_helper.dart";
10 import 'memory_compiler.dart'; 10 import 'memory_compiler.dart';
(...skipping 16 matching lines...) Expand all
27 field.invoke(#clear, []); 27 field.invoke(#clear, []);
28 return array.length; 28 return array.length;
29 } 29 }
30 ''', 30 ''',
31 }; 31 };
32 32
33 main() { 33 main() {
34 asyncTest(() async { 34 asyncTest(() async {
35 var result = await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES); 35 var result = await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
36 var compiler = result.compiler; 36 var compiler = result.compiler;
37 var element = compiler.mainFunction; 37 var element = compiler.frontendStrategy.elementEnvironment.mainFunction;
38 var code = compiler.backend.getGeneratedCode(element); 38 var code = compiler.backend.getGeneratedCode(element);
39 Expect.isTrue(code.contains('return 2'), "Unexpected code:\n$code"); 39 Expect.isTrue(code.contains('return 2'), "Unexpected code:\n$code");
40 }); 40 });
41 } 41 }
OLDNEW
« no previous file with comments | « pkg/compiler/tool/perf.dart ('k') | tests/compiler/dart2js/assert_message_throw_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698