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

Unified Diff: runtime/tests/vm/dart/inline_stack_frame_test.dart

Issue 11783035: Fix comment in test case. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tests/vm/dart/inline_stack_frame_test.dart
===================================================================
--- runtime/tests/vm/dart/inline_stack_frame_test.dart (revision 16811)
+++ runtime/tests/vm/dart/inline_stack_frame_test.dart (working copy)
@@ -11,8 +11,8 @@
// unoptimized code produces the correct result and is then run
// in a loop to ensure optimization kicks in and some inlining is done.
// Note: it appears that functions which have a throw are not inlined (func4)
-// func2 and func1 are not getting inlined and I am not able to explain
-// why inlining is not attempted on those.
+// and functions that have try/catch in them are not optimized (func1).
+// func2 is not inlined as func1 has not been optimized.
class Test {
String func1(var k) {
@@ -29,25 +29,25 @@
int func2(var i) {
var result = 0;
for (var k = 0; k <= 10; k++) {
- result += func2a(i + k);
+ result += func3(i + k);
}
return result;
}
- int func2a(var i) {
+ int func3(var i) {
var result = 0;
for (var l = 0; l <= 1; l++) {
- result += func3(i + l);
+ result += func4(i + l);
}
return result;
}
- int func3(var i) {
+ int func4(var i) {
var result = 0;
for (var j = 0; j <= 10; j++) {
- result += func4(i + j);
+ result += func5(i + j);
}
return result;
}
- int func4(var i) {
+ int func5(var i) {
if (i >= 1030) throw "show me inlined functions";
return i;
}
@@ -59,16 +59,16 @@
Expect.isTrue(result.contains("show me inlined functions"));
Expect.isTrue(result.contains("Test.func1"));
Expect.isTrue(result.contains("Test.func2"));
- Expect.isTrue(result.contains("Test.func2a"));
Expect.isTrue(result.contains("Test.func3"));
Expect.isTrue(result.contains("Test.func4"));
+ Expect.isTrue(result.contains("Test.func5"));
for (var i = 0; i <= 200; i++) {
result = x.func1(i);
}
Expect.isTrue(result.contains("show me inlined functions"));
Expect.isTrue(result.contains("Test.func1"));
Expect.isTrue(result.contains("Test.func2"));
- Expect.isTrue(result.contains("Test.func2a"));
Expect.isTrue(result.contains("Test.func3"));
Expect.isTrue(result.contains("Test.func4"));
+ Expect.isTrue(result.contains("Test.func5"));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698