I explored that a long time ago when Lightweight Collections were proposed, but it won't work that simply. (Sadly, most of the original discussions on this with the Atlanta team were in Google Wave and forever lost) The reason why it won't work is that there is no way to tell the difference between Integer and Double, Float, Byte, Short, et al.
Only one boxed type can "own" Number.prototype, so instanceof and equals() checks will fail. Also, toString() and compareTo() might return values that break existing apps.
It is impossible to write a runtime test on a primitive JS number that can distinguish between a Double and a Float, and it is impossible to store a castable type map on a given instance of number.
The only way to make this work would be to ensure that *all such* JS numbers are boxed.
This won't work:
var x = 42.3;
x.isFloat = true;
This also won't work
var x = Number(42.3);
x.isFloat = true;
because typeof(x) == "number"
This will work
var x = Object(42.3)
x.isFloat = true;
x + 2 => prints 44.3
x.isFloat => prints true
But this is nothing more than making a JSO that holds the number with extra runtime fields.
Leaving all this aside, I don't understand why you're trying to do this in the first place. Java is a language which insists on a difference between the semantics of primitive value types and class based reference types. This will most definitely break DevMode. For interop purposes, just declaring the right return type is better IMHO. If you were to write a game using WebGL that had all the interfaces using boxed types, it would be horrendous performance wise.
Eliminating autoboxing via a hack like this might be plausible, but I think it should be separate from the interop stuff. It's an optimization that has impacts far and wide.
-Ray