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

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

Issue 10827181: Collect call site information and use that for estimating parameter types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments from ahe@ 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: tests/compiler/dart2js/compiler_helper.dart
diff --git a/tests/compiler/dart2js/compiler_helper.dart b/tests/compiler/dart2js/compiler_helper.dart
index bf2fa672b65e62ac7e8c6274a9dcfa774f4ea3da..8a86f5c4c15a2a8baffabf7339b64691a81d5120 100644
--- a/tests/compiler/dart2js/compiler_helper.dart
+++ b/tests/compiler/dart2js/compiler_helper.dart
@@ -24,9 +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();
+ 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.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code);
compiler.runCompiler(uri);
return compiler.assembledCode;

Powered by Google App Engine
This is Rietveld 408576698