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

Unified Diff: test/mjsunit/regress/regress-436893.js

Issue 760063002: Abort optimization in corner case. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 | « src/runtime/runtime-test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-436893.js
diff --git a/test/mjsunit/regress/regress-346343.js b/test/mjsunit/regress/regress-436893.js
similarity index 88%
copy from test/mjsunit/regress/regress-346343.js
copy to test/mjsunit/regress/regress-436893.js
index e4c10663138db599a682880df98f3310e0754b63..38e7b5fb86cbe67144956f45f69650b71d399466 100644
--- a/test/mjsunit/regress/regress-346343.js
+++ b/test/mjsunit/regress/regress-436893.js
@@ -1,4 +1,4 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
+// Copyright 2010 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -27,16 +27,11 @@
// Flags: --allow-natives-syntax
-function f(o) {
- for (var i = 1; i < 2; ++i) {
- var y = o.y;
- }
+var x = 11;
+function foo() {
+ return 42;
}
-f({y:1.1});
-f({y:1.1});
-
-function g(x) { f({z:x}); }
-g(1);
-g(2);
+// Test passing null or undefined as receiver.
+function g() { return foo.apply(null, x()++); }
%OptimizeFunctionOnNextCall(g);
-g(1);
+assertThrows(g);
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698