| var hasBasicBlockExecuted = $vm.hasBasicBlockExecuted; |
| load("./driver/driver.js"); |
| function tierUpToBaseline(func, arg) |
| for (var i = 0; i < 50; i++) |
| function tierUpToDFG(func, arg) |
| for (var i = 0; i < 50; i++) |
| function baselineTest(arg) { |
| tierUpToBaseline(baselineTest, 10); |
| tierUpToDFG(dfgTest, 10); |
| assert(!hasBasicBlockExecuted(baselineTest, "return 20"), "should not have executed yet."); |
| assert(hasBasicBlockExecuted(baselineTest, "return 30"), "should have executed."); |
| assert(hasBasicBlockExecuted(baselineTest, "return 20"), "should have executed."); |
| assert(!hasBasicBlockExecuted(dfgTest, "return 20"), "should not have executed yet."); |
| assert(hasBasicBlockExecuted(dfgTest, "return 30"), "should have executed."); |
| assert(hasBasicBlockExecuted(dfgTest, "return 20"), "should have executed."); |