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

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

Issue 13090002: Free names of inputs of an instruction that is generate at use site. An input of an instruction tha… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
« tests/co19/co19-dart2js.status ('K') | « tests/co19/co19-dart2js.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/ssa_phi_codegen_test.dart
===================================================================
--- tests/compiler/dart2js/ssa_phi_codegen_test.dart (revision 20466)
+++ tests/compiler/dart2js/ssa_phi_codegen_test.dart (working copy)
@@ -55,6 +55,17 @@
}
""";
+const String TEST_FIVE = r"""
+void main() {
+ var hash = 0;
+ for (var i = 0; i == 0; i = i + 1) {
+ hash = hash + 10;
ngeoffray 2013/03/26 11:29:02 The codegen recognizes that "hash + 10" can be gen
+ hash = hash + 42;
ngeoffray 2013/03/26 11:29:02 We would generate: hash0 = hash + 10 + 42 Now we
+ }
+ print(t);
+}
+""";
+
main() {
compileAndMatchFuzzy(TEST_ONE, 'foo', "var x = x === true \\? 2 : 3;");
compileAndMatchFuzzy(TEST_ONE, 'foo', "print\\(x\\);");
@@ -69,6 +80,7 @@
// only generates one instruction.
compileAndMatchFuzzy(TEST_THREE, 'foo', 'x = 42');
- var generated = compile(TEST_FOUR, entry: 'foo');
compileAndDoNotMatchFuzzy(TEST_FOUR, 'foo', '(x) = \1;');
+
+ compileAndDoNotMatch(TEST_FIVE, 'main', new RegExp('hash0'));
}
« tests/co19/co19-dart2js.status ('K') | « tests/co19/co19-dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698