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

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

Issue 7060010: Merge bleeding edge into the GC branch up to 7948. The asserts (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 7 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/limit-locals.js ('k') | test/mjsunit/regress/regress-1210.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-1118.js
===================================================================
--- test/mjsunit/regress/regress-1118.js (revision 7948)
+++ test/mjsunit/regress/regress-1118.js (working copy)
@@ -25,6 +25,8 @@
// (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
+
// An exception thrown in a function optimized by on-stack replacement (OSR)
// should be able to construct a receiver from all optimized stack frames.
@@ -39,10 +41,24 @@
// inlined.
function g() { try { return o.f(); } finally { }}
+// Optimization status (see runtime.cc):
+// 1 - yes, 2 - no, 3 - always, 4 - never.
+
// This function should be optimized via OSR.
function h() {
- while(false) ;
- for (var j = 0; j < 5000000; j++) g();
+ var optstatus = %GetOptimizationStatus(h);
+ if (optstatus == 4) {
+ // Optimizations are globally disabled; just run once.
+ g();
+ } else {
+ // Run for a bit as long as h is unoptimized.
+ while (%GetOptimizationStatus(h) == 2) {
+ for (var j = 0; j < 100; j++) g();
+ }
+ assertTrue(%GetOptimizationStatus(h) == 1 ||
+ %GetOptimizationStatus(h) == 3);
+ g();
+ }
}
h();
« no previous file with comments | « test/mjsunit/limit-locals.js ('k') | test/mjsunit/regress/regress-1210.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698