1 var hasBasicBlockExecuted = $vm.hasBasicBlockExecuted;
3 load("./driver/driver.js");
5 function forRegular(limit) {
7 for (var i = 0; i < limit; i++) {
30 function whileLoop(limit) {
41 assert(!hasBasicBlockExecuted(forRegular, "var sum"), "should not have executed yet.");
44 assert(hasBasicBlockExecuted(forRegular, "var sum"), "should have executed.");
45 assert(!hasBasicBlockExecuted(forRegular, "sum += i"), "should not have executed yet.");
48 assert(hasBasicBlockExecuted(forRegular, "sum += i"), "should have executed.");
51 assert(!hasBasicBlockExecuted(forIn, "var s"), "should not have executed yet.");
54 assert(hasBasicBlockExecuted(forIn, "var s"), "should have executed.");
55 assert(!hasBasicBlockExecuted(forIn, "s += p"), "should not have executed yet.");
58 assert(hasBasicBlockExecuted(forIn, "s += p"), "should have executed.");
61 assert(!hasBasicBlockExecuted(forOf, "var s"), "should not have executed yet.");
64 assert(hasBasicBlockExecuted(forOf, "var s"), "should have executed.");
65 assert(!hasBasicBlockExecuted(forOf, "s += p"), "should not have executed yet.");
68 assert(hasBasicBlockExecuted(forOf, "s += p"), "should have executed.");
71 assert(!hasBasicBlockExecuted(whileLoop, "var sum"), "should not have executed yet.");
74 assert(hasBasicBlockExecuted(whileLoop, "var sum"), "should have executed.");
75 assert(!hasBasicBlockExecuted(whileLoop, "sum += i"), "should not have executed yet.");
78 assert(hasBasicBlockExecuted(whileLoop, "sum += i"), "should have executed.");