| Index: test/mjsunit/compiler/inlined-call-mapcheck.js
|
| diff --git a/test/mjsunit/regress/regress-346343.js b/test/mjsunit/compiler/inlined-call-mapcheck.js
|
| similarity index 54%
|
| copy from test/mjsunit/regress/regress-346343.js
|
| copy to test/mjsunit/compiler/inlined-call-mapcheck.js
|
| index e4c10663138db599a682880df98f3310e0754b63..487e0ee06af327c18377ad50313e773108086fd1 100644
|
| --- a/test/mjsunit/regress/regress-346343.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
|
|
|
| -function f(o) {
|
| - for (var i = 1; i < 2; ++i) {
|
| - var y = o.y;
|
| +(function() {
|
| + function f(x) {
|
| + for (i = 0; i < 1; i++) {
|
| + x.call(this);
|
| + }
|
| }
|
| -}
|
| -f({y:1.1});
|
| -f({y:1.1});
|
|
|
| -function g(x) { f({z:x}); }
|
| -g(1);
|
| -g(2);
|
| -%OptimizeFunctionOnNextCall(g);
|
| -g(1);
|
| + function g() {}
|
| +
|
| + f(g);
|
| + f(g);
|
| + %OptimizeFunctionOnNextCall(f);
|
| + assertThrows(function() { f('whatever') }, TypeError);
|
| +})();
|
|
|