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

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

Issue 2688413003: Extract BackendUsage, MirrorsData, and CheckedModeHelpers from Backend. (Closed)
Patch Set: Cleanup Created 3 years, 10 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 of the graph segmentation algorithm used by deferred loading 5 // Test of the graph segmentation algorithm used by deferred loading
6 // to determine which elements can be deferred and which libraries 6 // to determine which elements can be deferred and which libraries
7 // much be included in the initial download (loaded eagerly). 7 // much be included in the initial download (loaded eagerly).
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Just check that the compile runs. 50 // Just check that the compile runs.
51 // This is a regression test. 51 // This is a regression test.
52 Expect.isTrue(true); 52 Expect.isTrue(true);
53 }); 53 });
54 await runTest('memory:main3.dart', (compiler) { 54 await runTest('memory:main3.dart', (compiler) {
55 var main = compiler.mainFunction; 55 var main = compiler.mainFunction;
56 Expect.isNotNull(main, "Could not find 'main'"); 56 Expect.isNotNull(main, "Could not find 'main'");
57 compiler.deferredLoadTask.onResolutionComplete(main); 57 compiler.deferredLoadTask.onResolutionComplete(main);
58 var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement; 58 var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
59 59
60 Expect.isFalse(compiler.backend.hasInsufficientMirrorsUsed); 60 Expect.isFalse(compiler.backend.mirrorsData.hasInsufficientMirrorsUsed);
61 var mainLib = lookupLibrary(compiler, "memory:main3.dart"); 61 var mainLib = lookupLibrary(compiler, "memory:main3.dart");
62 var lib3 = lookupLibrary(compiler, "memory:lib3.dart"); 62 var lib3 = lookupLibrary(compiler, "memory:lib3.dart");
63 var C = mainLib.find("C"); 63 var C = mainLib.find("C");
64 var foo = lib3.find("foo"); 64 var foo = lib3.find("foo");
65 65
66 Expect.notEquals(outputUnitForElement(main), outputUnitForElement(foo)); 66 Expect.notEquals(outputUnitForElement(main), outputUnitForElement(foo));
67 Expect.equals(outputUnitForElement(main), outputUnitForElement(C)); 67 Expect.equals(outputUnitForElement(main), outputUnitForElement(C));
68 }); 68 });
69 await runTest('memory:main4.dart', (compiler) { 69 await runTest('memory:main4.dart', (compiler) {
70 var main = compiler.mainFunction; 70 var main = compiler.mainFunction;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 library lib5; 192 library lib5;
193 193
194 foo() {} 194 foo() {}
195 """, 195 """,
196 "lib6.dart": """ 196 "lib6.dart": """
197 library lib6; 197 library lib6;
198 198
199 foo() {} 199 foo() {}
200 """, 200 """,
201 }; 201 };
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | tests/compiler/dart2js/mirror_private_name_inheritance_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698