Index: test/mjsunit/omit-constant-mapcheck.js |
diff --git a/test/mjsunit/omit-constant-mapcheck.js b/test/mjsunit/omit-constant-mapcheck.js |
index 6894275db714875bedd6790036d4ada02812425e..ae6308f215e40ae22b9e9328c5f4e4ec3d0f3843 100644 |
--- a/test/mjsunit/omit-constant-mapcheck.js |
+++ b/test/mjsunit/omit-constant-mapcheck.js |
@@ -53,3 +53,18 @@ assertEquals(2, load2()); |
g2.b = 10; |
g2.a = 5; |
assertEquals(5, load2()); |
+ |
+var g3 = { a:2, b:9, c:1 } |
+ |
+function store(v) { |
+ g3.a = v; |
+ return g3.a; |
+} |
+ |
+assertEquals(5, store(5)); |
+assertEquals(8, store(8)); |
+%OptimizeFunctionOnNextCall(store); |
+assertEquals(10, store(10)); |
+delete g3.c; |
+store(7); |
+assertEquals({a:7, b:9}, g3); |