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

Unified Diff: tests/compiler/dart2js/call_site_type_inferer_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: 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_test.dart
diff --git a/tests/compiler/dart2js/call_site_type_inferer_test.dart b/tests/compiler/dart2js/call_site_type_inferer_test.dart
index cd9cc6b7a79b000fbe7e57e0fcf27f01c37c5c92..b707ac6b6c111b455fd10463b62c72ebcf1ae550 100644
--- a/tests/compiler/dart2js/call_site_type_inferer_test.dart
+++ b/tests/compiler/dart2js/call_site_type_inferer_test.dart
@@ -14,9 +14,11 @@
void compileAndFind(String code,
String className,
String memberName,
+ bool enableInlining,
check(compiler, element)) {
Uri uri = new Uri.fromComponents(scheme: 'source');
var compiler = compilerFor(code, uri);
+ compiler.enableInlining = enableInlining;
compiler.runCompiler(uri);
var cls = findElement(compiler, className);
var member = cls.lookupLocalMember(buildSourceString(memberName));
@@ -189,13 +191,15 @@ const String TEST_17 = @"""
}
""";
-void runTest(String test,
- [List<HType> expectedTypes,
- OptionalParameterTypes defaultTypes]) {
+void doTest(String test,
+ bool enableInlining,
+ List<HType> expectedTypes,
+ OptionalParameterTypes defaultTypes) {
compileAndFind(
test,
'A',
'x',
+ enableInlining,
(backend, x) {
HTypeList types = backend.optimisticParameterTypes(x, defaultTypes);
if (expectedTypes != null) {
@@ -207,6 +211,13 @@ void runTest(String test,
});
}
+void runTest(String test,
+ [List<HType> expectedTypes,
+ OptionalParameterTypes defaultTypes]) {
+ doTest(test, true, expectedTypes, defaultTypes);
+ doTest(test, false, expectedTypes, defaultTypes);
+}
+
void test() {
OptionalParameterTypes defaultTypes;

Powered by Google App Engine
This is Rietveld 408576698