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

Unified Diff: test/mjsunit/keyed-named-access.js

Issue 595453002: Pass the ast_id to HandleKeyed to make sure it's the right one (e.g., CountOperation, not just the … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/keyed-named-access.js
diff --git a/test/mjsunit/keyed-named-access.js b/test/mjsunit/keyed-named-access.js
index f9541e8e0aa9c2cd9a96faab478270964104f2a4..11f8fb50d879c123a1868ca317d3987f5d0e905d 100644
--- a/test/mjsunit/keyed-named-access.js
+++ b/test/mjsunit/keyed-named-access.js
@@ -34,3 +34,39 @@ f(o3);
f(o3);
%OptimizeFunctionOnNextCall(f);
assertEquals(1200, f(o3));
+
+(function CountOperationDeoptimizationGetter() {
+ var global = {};
+ global.__defineGetter__("A", function () { return "x"; });
+
+ function h() {
+ return "A";
+ }
+
+ function g(a, b, c) {
+ try {
+ return a + b.toString() + c;
+ } catch (e) { }
+ }
+
+ function test(o) {
+ return g(1, o[h()]--, 10);
+ }
+
+ test(global);
+ test(global);
+ %OptimizeFunctionOnNextCall(test);
+ print(test(global));
+})();
+
+
+(function CountOperationDeoptimizationPoint() {
+ function test() {
+ this[0, ""]--;
+ }
+
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698