[SP] add a function table code piece for cpp.