Revision: 21995
Author:   [email protected]
Date:     Wed Jun 25 08:01:13 2014 UTC
Log:      Fix mjsunit's assertOptimized and assertUnoptimized.

This was broken some time ago by a refactor.

[email protected]

Review URL: https://codereview.chromium.org/349423003
http://code.google.com/p/v8/source/detail?r=21995

Added:
 /branches/bleeding_edge/test/mjsunit/mjsunit-assertoptimized.js
Modified:
 /branches/bleeding_edge/test/mjsunit/mjsunit.js

=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/mjsunit-assertoptimized.js Wed Jun 25 08:01:13 2014 UTC
@@ -0,0 +1,17 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --crankshaft
+
+function f() {};
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
+assertOptimized(f);
+assertThrows(function() { assertUnoptimized(f); });
+%DeoptimizeFunction(f);
+assertUnoptimized(f);
+assertThrows(function() { assertOptimized(f); });
+quit();  // Prevent stress runs.
=======================================
--- /branches/bleeding_edge/test/mjsunit/mjsunit.js Tue Jun 10 15:19:27 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/mjsunit.js Wed Jun 25 08:01:13 2014 UTC
@@ -391,9 +391,8 @@
       } catch (e) {
         throw new Error("natives syntax not allowed");
       }
-    } else {
-      OptimizationStatusImpl(fun, sync_opt);
     }
+    return OptimizationStatusImpl(fun, sync_opt);
   }

   assertUnoptimized = function assertUnoptimized(fun, sync_opt, name_opt) {

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to