Created
October 12, 2011 09:37
-
-
Save vjeux/1280750 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Input */ | |
function f1(i) { | |
console.log('f1'); | |
if (i) { | |
console.log(1); | |
} else if (i > 2) | |
console.log(2); | |
else if (true) { | |
console.log(3) | |
} | |
} | |
function f2() { | |
console.log('f2'); | |
} | |
f1(0); | |
f1(1); | |
console.log('loaded'); | |
/* Instrumented */ | |
164function f1(i) { | |
visited[5] = true; | |
console.log("f1"); | |
if (i) { | |
visited[4] = true; | |
console.log(1); | |
} else { | |
visited[3] = true; | |
if (i > 2) { | |
visited[2] = true; | |
console.log(2); | |
} else { | |
visited[1] = true; | |
if (true) { | |
visited[0] = true; | |
console.log(3); | |
} | |
} | |
} | |
} | |
function f2() { | |
visited[6] = true; | |
console.log("f2"); | |
} | |
f1(0); | |
f1(1); | |
console.log("loaded"); | |
/* Output */ | |
function f1(i) { | |
console.log("f1"); | |
if (i) { | |
console.log(1); | |
} else { | |
i > 2; | |
if (true) { | |
console.log(3); | |
} | |
} | |
} | |
f1(0); | |
f1(1); | |
console.log("loaded"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment