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

Unified Diff: test/mjsunit/codegen-coverage.js

Issue 1325004: Avoid calling ToRegister(register) when result is in register already, and re... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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
« no previous file with comments | « src/ia32/virtual-frame-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/codegen-coverage.js
===================================================================
--- test/mjsunit/codegen-coverage.js (revision 4259)
+++ test/mjsunit/codegen-coverage.js (working copy)
@@ -33,6 +33,13 @@
return x;
}
+function lookup(w, a) {
+ // This function tests a code path in the generation of a keyed load IC
+ // where the key and the value are both in the same register.
+ a = a;
+ w[a] = a;
+}
+
function cover_codegen_paths() {
var x = 1;
@@ -131,6 +138,12 @@
assertEquals(1073741824, 1 - di);
x = 3;
+ var w = { };
+ lookup(w, x);
+ lookup(w, x);
+ lookup(w, x);
+
+ x = 3; // Terminate while loop.
}
}
« no previous file with comments | « src/ia32/virtual-frame-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698