| Index: test/mjsunit/mjsunit.js
|
| diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
|
| index 88d4d3677c4edc84fc2e9128737083cb246a64bb..8a625c6aa3d54299964da813bced8301e3776d01 100644
|
| --- a/test/mjsunit/mjsunit.js
|
| +++ b/test/mjsunit/mjsunit.js
|
| @@ -120,6 +120,16 @@ var assertContains;
|
| // Assert that a string matches a given regex.
|
| var assertMatches;
|
|
|
| +// These bits must be in sync with bits defined in Runtime_GetOptimizationStatus
|
| +var V8OptimizationStatus = {
|
| + kIsFunction: 1 << 0,
|
| + kNeverOptimize: 1 << 1,
|
| + kAlwaysOptimize: 1 << 2,
|
| + kMaybeDeopted: 1 << 3,
|
| + kOptimized: 1 << 4,
|
| + kTurboFanned: 1 << 5,
|
| + kInterpreted: 1 << 6
|
| +};
|
|
|
| (function () { // Scope for utility functions.
|
|
|
| @@ -462,12 +472,16 @@ var assertMatches;
|
|
|
| assertUnoptimized = function assertUnoptimized(fun, sync_opt, name_opt) {
|
| if (sync_opt === undefined) sync_opt = "";
|
| - assertTrue(OptimizationStatus(fun, sync_opt) !== 1, name_opt);
|
| + var opt_status = OptimizationStatus(fun, sync_opt);
|
| + assertTrue((opt_status & V8OptimizationStatus.kIsFunction) !== 0, name_opt);
|
| + assertFalse((opt_status & V8OptimizationStatus.kOptimized) !== 0, name_opt);
|
| }
|
|
|
| assertOptimized = function assertOptimized(fun, sync_opt, name_opt) {
|
| if (sync_opt === undefined) sync_opt = "";
|
| - assertTrue(OptimizationStatus(fun, sync_opt) !== 2, name_opt);
|
| + var opt_status = OptimizationStatus(fun, sync_opt);
|
| + assertTrue((opt_status & V8OptimizationStatus.kIsFunction) !== 0, name_opt);
|
| + assertTrue((opt_status & V8OptimizationStatus.kOptimized) !== 0, name_opt);
|
| }
|
|
|
| })();
|
|
|