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

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

Issue 157503002: A64: Synchronize with r18444. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « test/mjsunit/regress/regress-crbug-329709.js ('k') | test/mjsunit/string-slices.js » ('j') | 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/regress/regress-store-uncacheable.js b/test/mjsunit/regress/regress-param-local-type.js
similarity index 77%
copy from test/mjsunit/regress/regress-store-uncacheable.js
copy to test/mjsunit/regress/regress-param-local-type.js
index e9c9fc25b49c95293a5c0acea0bea8d073a79e0e..bf260900898923a5fe2471aed82eb9ce5f896bf2 100644
--- a/test/mjsunit/regress/regress-store-uncacheable.js
+++ b/test/mjsunit/regress/regress-param-local-type.js
@@ -27,14 +27,32 @@
// Flags: --allow-natives-syntax
-function f() {
- var o = {};
- o["<abc>"] = 123;
+// 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();
-f();
-f();
+f(1);
+f(1);
%OptimizeFunctionOnNextCall(f);
-f();
+f(1);
assertOptimized(f);
+
+
+function g() { // 0th parameter (receiver) is tagged.
+ var s = ''; // First local has string type.
+ var n = 0;
+ var i = 1;
+ n = i + this;
+}
+
+g.call(1);
+g.call(1);
+%OptimizeFunctionOnNextCall(g);
+g.call(1);
+assertOptimized(g);
« no previous file with comments | « test/mjsunit/regress/regress-crbug-329709.js ('k') | test/mjsunit/string-slices.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698