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

Unified Diff: tests/compiler/dart2js/call_site_type_inferer_static_test.dart

Issue 10964013: Add an internal flag to the dart2js compiler to enable/diable inlining (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/call_site_type_inferer_static_test.dart
diff --git a/tests/compiler/dart2js/call_site_type_inferer_static_test.dart b/tests/compiler/dart2js/call_site_type_inferer_static_test.dart
index d877ac9324d39325677416537dbf592fac02d3a9..43e947764511d527aa939396dee2e088fb88f0f6 100644
--- a/tests/compiler/dart2js/call_site_type_inferer_static_test.dart
+++ b/tests/compiler/dart2js/call_site_type_inferer_static_test.dart
@@ -12,9 +12,11 @@
void compileAndFind(String code,
String functionName,
+ bool disableInlining,
check(compiler, element)) {
Uri uri = new Uri.fromComponents(scheme: 'source');
var compiler = compilerFor(code, uri);
+ compiler.disableInlining = disableInlining;
compiler.runCompiler(uri);
var fun = findElement(compiler, functionName);
return check(compiler.backend, fun);
@@ -72,10 +74,13 @@ const String TEST_TEN = r"""
main() { f(1); g(f); }
""";
-void runTest(String test, [List<HType> expectedTypes = null]) {
+void doTest(String test,
+ bool enableInlining,
+ List<HType> expectedTypes) {
compileAndFind(
test,
'f',
+ enableInlining,
(backend, x) {
HTypeList types = backend.optimisticParameterTypes(x, null);
if (expectedTypes != null) {
@@ -87,6 +92,11 @@ void runTest(String test, [List<HType> expectedTypes = null]) {
});
}
+void runTest(String test, [List<HType> expectedTypes]) {
+ doTest(test, false, expectedTypes);
+ doTest(test, true, expectedTypes);
+}
+
void test() {
runTest(TEST_ONE, [HType.STRING]);
runTest(TEST_TWO, [HType.INTEGER]);
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/compiler/dart2js/call_site_type_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698