Index: test/mjsunit/regress/regress-crbug-140083.js |
diff --git a/test/mjsunit/regress/regress-2045.js b/test/mjsunit/regress/regress-crbug-140083.js |
similarity index 84% |
copy from test/mjsunit/regress/regress-2045.js |
copy to test/mjsunit/regress/regress-crbug-140083.js |
index 822ee1fa4641b4a0ba15eee2c2a2e59411db7d4d..e38192cd8a7fdc1d69cfb887b15f610a0650a6ee 100644 |
--- a/test/mjsunit/regress/regress-2045.js |
+++ b/test/mjsunit/regress/regress-crbug-140083.js |
@@ -27,23 +27,18 @@ |
// Flags: --allow-natives-syntax |
-function foo() { |
- assertEquals(2, arguments.length); |
-} |
+// Test that the absence of a setter in a compound/count operation works. |
-function bar() { |
- G.x; |
- return foo.apply(this, arguments); |
-} |
+Object.defineProperty(Object.prototype, "foo", |
+ { get: function() { return 123; } }); |
-function baz() { |
- return bar(1, 2); |
+function bar(o) { |
+ o.foo += 42; |
+ o.foo++; |
} |
-G = {x: 0}; |
-baz(); |
-baz(); |
-%OptimizeFunctionOnNextCall(baz); |
-baz(); |
-delete G.x; |
-baz(); |
+var baz = {}; |
+bar(baz); |
+bar(baz); |
+%OptimizeFunctionOnNextCall(bar) |
+bar(baz); |