I have read plenty of questions on here, which explain what the stack and heap are e.g. this one: What and where are the stack and heap?, which was very helpful.
I understand that high level languages are compiled into an intermediary language e.g. byte code for Java and MSIL for .NET programs. MSIL and byte code is then compiled into machine code.
My understanding was that intermediary languages use the stack and heap and then the program is compiled into machine code, which is platform dependent e.g. register based for windows.
However, in the question I have linked to some of the answerers e.g. Brian R. Bondy provide C and C++ examples. I know that C++ does not have a virtual machine and is compiled directly into machine code. My question is: do programming languages that do not have a virtual machine have a stack and a heap? In the case of these programming languages do they use the stack and heap as an intermediary representation whilst compiling directly to machine code?
Update I realise there are stack based and register based virtual machines. The question I am asking is: are all physical machines register based?