[Refactoring] code

Code refactoring:
- Use `operator[]` instead of `tdata()`
- Rename `Type::invariantOf` to `Type::immutableOf`