Type check and method cache related ops.
Fix copy/paste fail.
Implement and test setcodename/getcodename.