虚拟机,没有虚拟机 - 栈和跟踪 [英] Virtual machine and none virtual machine - stack and trace

查看:179
本文介绍了虚拟机,没有虚拟机 - 栈和跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过许多有关这里的问题,这说明什么栈和堆是如这一个:哪里是什么栈和堆 ,这是非常有益的。

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.

据我所知,高级语言编译成中间语言,如字节code Java和MSIL对.NET程序。 MSIL和字节code,然后编译成机器code。

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.

我的理解是,中间语言使用的堆和栈,然后程序被编译成机器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.

然而,在这个问题我已经联系的一些回答者如的布赖恩·R·邦迪提供C和C ++的例子。我知道,C ++没有一个虚拟机,并​​直接编译成机器code。我的问题是:做节目没有一个虚拟机有一个栈和堆语言?在这些编程语言的情况下,他们使用了栈和堆为中介再presentation而直接编译成机器code?

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?

推荐答案

我已经发现有物理机所在的处理器有是一个基于堆栈如指令集的例子RTX2000系列,UCSD Pascal的P-机和Burroughs的B5000-和B6000系列机器(从这个问题采取:<一href="http://stackoverflow.com/questions/5101908/stack-based-machine-depends-on-a-register-based-machine">Stack-based机器依赖基于寄存器的机器上?)。看来,所使用的处理器的实际指令集可基于被叠加。

I have discovered that there are examples of physical machines where the processors have an instruction set that is stack based e.g. RTX2000-series, UCSD Pascal p-Machine and Burroughs' B5000- and B6000-series machines (taken from this question: Stack-based machine depends on a register-based machine?). It appears that the actual instruction set used by the processor can be stack based.

这篇关于虚拟机,没有虚拟机 - 栈和跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆