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

Unified Diff: test/mjsunit/compiler/inlined-call-mapcheck.js

Issue 350913002: Optimize Function.prototype.call (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: Created 6 years, 6 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 | « test/mjsunit/compiler/inlined-call.js ('k') | test/mjsunit/regress/regress-385565.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+})();
« no previous file with comments | « test/mjsunit/compiler/inlined-call.js ('k') | test/mjsunit/regress/regress-385565.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698