Optimize FrameState for large linear scripts (bug 591836, r=dmandelin).