Yes. As long as the compiler is invisible and fast enough to notice any difference. But then, will we ever have such compiler across all browsers?
Do you mean something like VBscript in old Internet Explorer versions? Do you understand why it died off?
Was VBscript source code visible from the browser? What I'm recommending is basically something to replace Javascript in exactly the same way (except it's a sane* language).