Index: test/mjsunit/compiler/inlined-call-mapcheck.js |
diff --git a/test/mjsunit/regress/regress-333594.js b/test/mjsunit/compiler/inlined-call-mapcheck.js |
similarity index 53% |
copy from test/mjsunit/regress/regress-333594.js |
copy to test/mjsunit/compiler/inlined-call-mapcheck.js |
index 6f6dbaafcd64d8b752226a290df525ca200b69a0..84ec1d20e9e943ad074083fdaeee6452f0f7c07c 100644 |
--- a/test/mjsunit/regress/regress-333594.js |
+++ b/test/mjsunit/compiler/inlined-call-mapcheck.js |
@@ -3,15 +3,15 @@ |
// modification, are permitted provided that the following conditions are |
// met: |
// |
-// * Redistributions of source code must retain the above copyright |
-// notice, this list of conditions and the following disclaimer. |
-// * Redistributions in binary form must reproduce the above |
-// copyright notice, this list of conditions and the following |
-// disclaimer in the documentation and/or other materials provided |
-// with the distribution. |
-// * Neither the name of Google Inc. nor the names of its |
-// contributors may be used to endorse or promote products derived |
-// from this software without specific prior written permission. |
+// * Redistributions of source code must retain the above copyright |
+// notice, this list of conditions and the following disclaimer. |
+// * Redistributions in binary form must reproduce the above |
+// copyright notice, this list of conditions and the following |
+// disclaimer in the documentation and/or other materials provided |
+// with the distribution. |
+// * Neither the name of Google Inc. nor the names of its |
+// contributors may be used to endorse or promote products derived |
+// from this software without specific prior written permission. |
// |
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
@@ -25,18 +25,19 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --allow-natives-syntax |
+// Flags: --allow-natives-syntax --noalways-opt |
-var a = { x: 1.1 }; |
-a.x = 0; |
-var G = a.x; |
-var o = { x: {} }; |
+(function() { |
+ function f(x) { |
+ for (i = 0; i < 1; i++) { |
+ x.call(this); |
+ } |
+ } |
-function func() { |
- return {x: G}; |
-} |
+ function g() {} |
-func(); |
-func(); |
-%OptimizeFunctionOnNextCall(func); |
-assertEquals(0, func().x); |
+ f(g); |
+ f(g); |
+ %OptimizeFunctionOnNextCall(f); |
+ assertThrows(function() { f('whatever') }, TypeError); |
+})(); |