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

Unified Diff: test/mjsunit/compiler/recursive-deopt.js

Issue 6821009: Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/compiler/property-stores.js ('k') | test/mjsunit/compiler/regress-3218915.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/recursive-deopt.js
diff --git a/test/mjsunit/compiler/recursive-deopt.js b/test/mjsunit/compiler/recursive-deopt.js
index 366f59ae1be3546ba78cbf4a29104c862b2471d2..c921ade65aedd18ca083689280f1699b9730a551 100644
--- a/test/mjsunit/compiler/recursive-deopt.js
+++ b/test/mjsunit/compiler/recursive-deopt.js
@@ -25,6 +25,7 @@
// (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
function f(n) {
// Force deopt in both leaf case and when returning. To make
@@ -34,15 +35,11 @@ function f(n) {
return f(n - 1) << one;
}
-function RunTests() {
- assertEquals(1 << 1, f(0));
- assertEquals(1 << 2, f(1));
- assertEquals(1 << 5, f(4));
-}
-
var one = 1;
-for (var i = 0; i < 1000000; i++) RunTests();
+for (var i = 0; i < 5; i++) assertEquals(1 << 5, f(4));
+%OptimizeFunctionOnNextCall(f);
+assertEquals(1 << 5, f(4));
var one = { valueOf: function() { return 1; } };
-for (var j = 0; j < 100000; j++) RunTests();
+assertEquals(1 << 5, f(4));
« no previous file with comments | « test/mjsunit/compiler/property-stores.js ('k') | test/mjsunit/compiler/regress-3218915.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698