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

Unified Diff: test/mjsunit/assert-opt-and-deopt.js

Issue 10417010: Run Crankshaft on a separate thread. (Closed) Base URL: https://chromiumcodereview.appspot.com/10387157
Patch Set: Set optimize_in_parallel to false by default. Created 8 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/cctest/test-mark-compact.cc ('k') | test/mjsunit/count-based-osr.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/assert-opt-and-deopt.js
diff --git a/test/mjsunit/assert-opt-and-deopt.js b/test/mjsunit/assert-opt-and-deopt.js
index 51cb99adc3354f47aa106e87a90e68a55d559663..28ce3e33fd8c982884ca52caf2300595c4e4eae4 100644
--- a/test/mjsunit/assert-opt-and-deopt.js
+++ b/test/mjsunit/assert-opt-and-deopt.js
@@ -46,7 +46,8 @@ OptTracker.OptimizationState = {
YES: 1,
NO: 2,
ALWAYS: 3,
- NEVER: 4
+ NEVER: 4,
+ CONCURRENT: 5
};
/**
@@ -60,7 +61,8 @@ OptTracker.prototype.CheckpointOptCount = function(func) {
};
OptTracker.prototype.AssertOptCount = function(func, optcount) {
- if (this.DisableAsserts_(func)) {
+ if (this.DisableAsserts_(func) ||
+ %GetOptimizationStatus(func) == OptTracker.OptimizationState.CONCURRENT) {
return;
}
assertEquals(optcount, this.GetOptCount_(func));
@@ -70,11 +72,18 @@ OptTracker.prototype.AssertDeoptCount = function(func, deopt_count) {
if (this.DisableAsserts_(func)) {
return;
}
+
+ // We can't assert much about a functions opt and deopt behavior if
+ // it is being optimized on a separate thread.
+ if (%GetOptimizationStatus(func) ==
+ OptTracker.OptimizationState.CONCURRENT)
+ return;
assertEquals(deopt_count, this.GetDeoptCount_(func));
};
OptTracker.prototype.AssertDeoptHappened = function(func, expect_deopt) {
- if (this.DisableAsserts_(func)) {
+ if (this.DisableAsserts_(func) ||
+ %GetOptimizationStatus(func) == OptTracker.OptimizationState.CONCURRENT) {
return;
}
if (expect_deopt) {
@@ -90,9 +99,11 @@ OptTracker.prototype.AssertIsOptimized = function(func, expect_optimized) {
}
var raw_optimized = %GetOptimizationStatus(func);
if (expect_optimized) {
- assertEquals(OptTracker.OptimizationState.YES, raw_optimized);
+ assertTrue(OptTracker.OptimizationState.YES == raw_optimized ||
+ OptTracker.OptimizationState.CONCURRENT == raw_optimized);
} else {
- assertEquals(OptTracker.OptimizationState.NO, raw_optimized);
+ assertTrue(OptTracker.OptimizationState.NO == raw_optimized ||
+ OptTracker.OptimizationState.CONCURRENT == raw_optimized);
}
}
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/mjsunit/count-based-osr.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698