18. The system of claim 15 , wherein an underlying computing substrate corresponding to an execution space is selected from the group consisting of: a CPU, a GPU, an FPGA, an x86 processor and an x64 processor.
15. A system for processing a function with multiple execution spaces, said system comprising: a memory storing information related to a heterogeneous programming environment, wherein said programming environment comprises a compiler to compile said function with multiple execution spaces; a processor coupled to said memory, the processor operable to implement a method of compiling comprising: creating an internal compiler representation for said function, wherein said creating comprises: cloning substantially all lexical tokens corresponding to a body of said function; and inserting said lexical tokens into a plurality of conditional if-statements, wherein a conditional if-statement is generated for each corresponding execution space, and wherein each conditional if-statement determines which execution space said function is executing in; and during compilation, performing overload resolution at a call site of an overloaded function by checking for compatibility with a first execution space specified by one of said plurality of conditional if-statements, wherein said overloaded function is called within said body of said function.