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

Unified Diff: test/mjsunit/compiler/escape-analysis-deopt-3.js

Issue 1485183002: [turbofan] Deopt support for escape analysis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ea-local
Patch Set: Rebase Created 4 years, 11 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/escape-analysis-deopt-2.js ('k') | test/mjsunit/compiler/escape-analysis-deopt-4.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/escape-analysis-deopt-3.js
diff --git a/test/mjsunit/regress/regress-299979.js b/test/mjsunit/compiler/escape-analysis-deopt-3.js
similarity index 75%
copy from test/mjsunit/regress/regress-299979.js
copy to test/mjsunit/compiler/escape-analysis-deopt-3.js
index 0afbcb35717f4c60f62d8cd8442ab164ec93246b..9999e53178dbe72d41d20c8dbbad98f6a719ead1 100644
--- a/test/mjsunit/regress/regress-299979.js
+++ b/test/mjsunit/compiler/escape-analysis-deopt-3.js
@@ -25,10 +25,27 @@
// (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 --turbo-escape
-(function(){
+// Test deoptimization with captured objects in local variables.
+(function testDeoptLocal() {
"use strict";
- var list = Object.freeze([1, 2, 3]);
- assertThrows(function() { list.unshift(4); }, TypeError);
- assertThrows(function() { list.shift(); }, TypeError);
+ function constructor1(a) {
+ return arguments;
+ }
+ function func() {
+ var o1 = constructor1(1,2,3);
+ var o2 = constructor1(4,o1);
+ o1[0] = o1;
+ %DeoptimizeNow();
+ assertEquals(o1, o1[0]);
+ assertEquals(2, o1[1]);
+ assertEquals(3, o1[2]);
+ assertEquals(4, o2[0]);
+ assertEquals(o1, o2[1]);
+ }
+ func();
+ func();
+ %OptimizeFunctionOnNextCall(func);
+ func();
})();
« no previous file with comments | « test/mjsunit/compiler/escape-analysis-deopt-2.js ('k') | test/mjsunit/compiler/escape-analysis-deopt-4.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698