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

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

Issue 10855020: Infer guaranteed types for static calls that are only called once. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reviving CL after reverting Created 8 years, 4 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: dart/tests/compiler/dart2js/compiler_helper.dart
diff --git a/dart/tests/compiler/dart2js/compiler_helper.dart b/dart/tests/compiler/dart2js/compiler_helper.dart
index bf2fa672b65e62ac7e8c6274a9dcfa774f4ea3da..d4da4854e06232c071f809fc57f3656ed76b683d 100644
--- a/dart/tests/compiler/dart2js/compiler_helper.dart
+++ b/dart/tests/compiler/dart2js/compiler_helper.dart
@@ -24,10 +24,15 @@ String compile(String code, [String entry = 'main']) {
return generated;
}
-String compileAll(String code) {
+MockCompiler compilerFor(String code, Uri uri) {
MockCompiler compiler = new MockCompiler();
- Uri uri = new Uri.fromComponents(scheme: 'source');
compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code);
+ return compiler;
+}
+
+String compileAll(String code) {
+ Uri uri = new Uri.fromComponents(scheme: 'source');
+ MockCompiler compiler = compilerFor(code, uri);
compiler.runCompiler(uri);
return compiler.assembledCode;
}

Powered by Google App Engine
This is Rietveld 408576698