| 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);
|
| }
|
| }
|
|
|
|
|