turnip: use the common code for generating extensions and dispatch tables