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

Unified Diff: test/mjsunit/regress/regress-param-local-type.js

Issue 105943007: Fix off-by-one error in AstTyper. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix comment Created 7 years 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 | « src/typing.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-param-local-type.js
diff --git a/test/mjsunit/compiler/increment-typefeedback.js b/test/mjsunit/regress/regress-param-local-type.js
similarity index 86%
copy from test/mjsunit/compiler/increment-typefeedback.js
copy to test/mjsunit/regress/regress-param-local-type.js
index 798959296c43014f252d65ae5dd11e00563bfd04..ed688a90f33ca5f0449a013f16a10ec990c2df3d 100644
--- a/test/mjsunit/compiler/increment-typefeedback.js
+++ b/test/mjsunit/regress/regress-param-local-type.js
@@ -27,13 +27,18 @@
// Flags: --allow-natives-syntax
-function f(x) {
- x++;
- return x;
+// Test that we do not confuse the first local and the first parameter
+// when gathering type information.
+
+function f(a) { // First parameter is tagged.
+ var s = ''; // First local has string type.
+ var n = 0;
+ var i = 1;
+ n = i + a;
}
-f(0.5);
-f(0.5);
+f(1);
+f(1);
%OptimizeFunctionOnNextCall(f);
-f(0.5);
+f(1);
assertOptimized(f);
« no previous file with comments | « src/typing.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698