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

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

Issue 16830002: Be smarter about when to disable global type inference. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with HEAD Created 7 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 | Annotate | Revision Log
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart ('k') | no next file » | 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 // Test that tree-shaking hasn't been turned off. 5 // Test that tree-shaking hasn't been turned off.
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'memory_source_file_helper.dart'; 8 import 'memory_source_file_helper.dart';
9 9
10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' 10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
(...skipping 26 matching lines...) Expand all
37 Compiler compiler = new Compiler(provider.readStringFromUri, 37 Compiler compiler = new Compiler(provider.readStringFromUri,
38 outputProvider, 38 outputProvider,
39 diagnosticHandler, 39 diagnosticHandler,
40 libraryRoot, 40 libraryRoot,
41 packageRoot, 41 packageRoot,
42 []); 42 []);
43 compiler.run(Uri.parse('memory:main.dart')); 43 compiler.run(Uri.parse('memory:main.dart'));
44 Expect.isFalse(compiler.compilationFailed); 44 Expect.isFalse(compiler.compilationFailed);
45 Expect.isFalse(compiler.enqueuer.resolution.hasEnqueuedEverything); 45 Expect.isFalse(compiler.enqueuer.resolution.hasEnqueuedEverything);
46 Expect.isFalse(compiler.enqueuer.codegen.hasEnqueuedEverything); 46 Expect.isFalse(compiler.enqueuer.codegen.hasEnqueuedEverything);
47 Expect.isFalse(compiler.disableTypeInference);
47 } 48 }
48 49
49 const Map MEMORY_SOURCE_FILES = const { 50 const Map MEMORY_SOURCE_FILES = const {
50 'main.dart': r""" 51 'main.dart': r"""
51 import 'dart:mirrors'; 52 import 'dart:mirrors';
52 53
53 class Foo { 54 class Foo {
54 noSuchMethod(invocation) { 55 noSuchMethod(invocation) {
55 print('Invoked ${MirrorSystem.getName(invocation.memberName)}'); 56 print('Invoked ${MirrorSystem.getName(invocation.memberName)}');
56 return reflect('foobar').delegate(invocation); 57 return reflect('foobar').delegate(invocation);
57 } 58 }
58 } 59 }
59 60
60 void main() { 61 void main() {
61 print(new Foo().substring(3)); 62 print(new Foo().substring(3));
62 } 63 }
63 """, 64 """,
64 }; 65 };
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698