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

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

Issue 11146013: Fix JS minifier to lift var declarations within functions. Still disabled. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/code_motion_test.dart
diff --git a/tests/compiler/dart2js/code_motion_test.dart b/tests/compiler/dart2js/code_motion_test.dart
index 0c71c9943b76a1fdb8f8438bdeb019802dd29a46..f093b7a977ce5d29d433454d27250f0aeedf7517 100644
--- a/tests/compiler/dart2js/code_motion_test.dart
+++ b/tests/compiler/dart2js/code_motion_test.dart
@@ -5,13 +5,13 @@
#import("compiler_helper.dart");
const String TEST_ONE = r"""
-foo(int param0, int param1, bool param2) {
+foo(int a, int b, bool param2) {
for (int i = 0; i < 1; i++) {
- var x = param0 + 5; // '+' is now GVNed.
+ var x = a + 5; // '+' is now GVNed.
if (param2) {
- print(param0 + param1);
+ print(a + b);
} else {
- print(param0 + param1);
+ print(a + b);
}
}
}
@@ -19,7 +19,7 @@ foo(int param0, int param1, bool param2) {
main() {
String generated = compile(TEST_ONE, 'foo');
- RegExp regexp = const RegExp('param0 \\+ param1');
+ RegExp regexp = const RegExp('a \\+ b');
Iterator matches = regexp.allMatches(generated).iterator();
Expect.isTrue(matches.hasNext());
matches.next();

Powered by Google App Engine
This is Rietveld 408576698