Except as provided in Section 799, prosecution for an offense punishable by imprisonment in the state prison for eight years or more or by imprisonment pursuant to subdivision (h) of Section 1170 for eight years or more shall be commenced within six years after commission of the offense.