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

Side by Side Diff: test/mjsunit/elements-transition-hoisting.js

Issue 14146005: Track representations of fields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test for tracking fields Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/track-fields.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 testDoubleConversion4(new Array(5)); 60 testDoubleConversion4(new Array(5));
61 testDoubleConversion4(new Array(5)); 61 testDoubleConversion4(new Array(5));
62 assertTrue(2 != %GetOptimizationStatus(testDoubleConversion4)); 62 assertTrue(2 != %GetOptimizationStatus(testDoubleConversion4));
63 %ClearFunctionTypeFeedback(testDoubleConversion4); 63 %ClearFunctionTypeFeedback(testDoubleConversion4);
64 64
65 // Make sure that non-element related map checks that are not preceded by 65 // Make sure that non-element related map checks that are not preceded by
66 // transitions in a loop still get hoisted in a way that doesn't generate a 66 // transitions in a loop still get hoisted in a way that doesn't generate a
67 // deopt in simple cases. 67 // deopt in simple cases.
68 function testExactMapHoisting(a) { 68 function testExactMapHoisting(a) {
69 var object = new Object(); 69 var object = new Object();
70 a.foo = 0; 70 a.foo = {};
71 a[0] = 0; 71 a[0] = 0;
72 a[1] = 1; 72 a[1] = 1;
73 var count = 3; 73 var count = 3;
74 do { 74 do {
75 a.foo = object; // This map check should be hoistable 75 a.foo = object; // This map check should be hoistable
76 a[1] = object; 76 a[1] = object;
77 result = a.foo == object && a[1] == object; 77 result = a.foo == object && a[1] == object;
78 } while (--count > 0); 78 } while (--count > 0);
79 } 79 }
80 80
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 testStraightLineDupeElinination(new Array(5),0,.5,0,0,0); 229 testStraightLineDupeElinination(new Array(5),0,.5,0,0,0);
230 testStraightLineDupeElinination(new Array(5),0,0,.5,0,0); 230 testStraightLineDupeElinination(new Array(5),0,0,.5,0,0);
231 testStraightLineDupeElinination(new Array(5),0,0,0,.5,0); 231 testStraightLineDupeElinination(new Array(5),0,0,0,.5,0);
232 testStraightLineDupeElinination(new Array(5),0,0,0,0,.5); 232 testStraightLineDupeElinination(new Array(5),0,0,0,0,.5);
233 %OptimizeFunctionOnNextCall(testStraightLineDupeElinination); 233 %OptimizeFunctionOnNextCall(testStraightLineDupeElinination);
234 testStraightLineDupeElinination(new Array(5),0,0,0,0,0); 234 testStraightLineDupeElinination(new Array(5),0,0,0,0,0);
235 testStraightLineDupeElinination(new Array(5),0,0,0,0,0); 235 testStraightLineDupeElinination(new Array(5),0,0,0,0,0);
236 assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElinination)); 236 assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElinination));
237 %ClearFunctionTypeFeedback(testStraightLineDupeElinination); 237 %ClearFunctionTypeFeedback(testStraightLineDupeElinination);
238 } 238 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/track-fields.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698