1. A method that predicts a result produced by a section of code in order to support speculative program execution, the section of code including a plurality of program instructions, the method comprising: executing the section of code within a program using a head thread, wherein executing the section of code produces the result; before the head thread produces the result, generating a predicted result to be used in place of the result; allowing the speculative thread to speculatively execute subsequent code within the program using the predicted result, wherein the subsequent code follows the section of code in an execution stream of the program; and after the head thread finishes executing the section of code, determining if a difference between the predicted result and the result generated by the head thread affected execution of the speculative thread by: determining if the speculative thread accessed the predicted result: and determining if the predicted result differs from the result generated by the head thread; and if the difference affected execution of the speculative thread, executing the subsequent code again using the result generated by the head thread; and if the difference did not affect execution of the speculative thread, performing a join operation to merge state associated with the speculative thread with state associated with the head thread.