has anyone looked into the theory of and type systems for JIT-like optimizations, where a logical type (e.g. arbitrary size integers) is represented by efficient physical types (e.g. fixed size integers, perhaps for various sizes) and there are run time guards to handle overflows and such, that will switch to a less efficient implementation. does anyone have any references for this sort of thing?