vm-implementation

How does Parrot compare to other virtual machines?

时间秒杀一切 提交于 2019-12-02 18:01:33
Parrot is the virtual machine originally designed for Perl 6. What technical capabilities does the Parrot VM offer that competing virtual machines such as the Java Virtual Machine (JVM) / Hotspot VM and Common Language Runtime (CLR) lack? Schwern The following answer was written in 2009. See also this 2015 update by raiph . To expand on @Reed and point out some highlights, Parrot's opcodes are at a far higher level than most virtual machines. For example, while most machines store integers and floats, the basic registers are integers, numbers, strings and Parrot Magic Cookies (PMCs). Just

How does a register based virtual machine work?

感情迁移 提交于 2019-12-02 17:44:21
How does a register based virtual machine work? I am looking for introduction to how a register based virtual machine works. Can someone please help? Thank you. One example of a register-based VM with available source code is Lua . There are a number of resources that might help... The Implementation of Lua 5.0 From the authors of Lua itself. LuLu The Lua VM implemented in Lua, companion to a blog in Japanese. A No Frills Intro to Lua 5.1 VM Instructions From a frequent contributor to the Lua community. 来源: https://stackoverflow.com/questions/688803/how-does-a-register-based-virtual-machine

registers vs stacks

天大地大妈咪最大 提交于 2019-12-02 14:00:50
What exactly are the advantages and disadvantages to using a register-based virtual machine versus using a stack-based virtual machine? To me, it would seem as though a register based machine would be more straight-forward to program and more efficient. So why is it that the JVM, the CLR, and the Python VM are all stack-based? This has already been answered, to a certain level, in the Parrot VM's FAQ and associated documents: A Parrot Overview The relevant text from that doc is this: the Parrot VM will have a register architecture, rather than a stack architecture. It will also have extremely

What's the benefit of Parrot VM for end-users?

吃可爱长大的小学妹 提交于 2019-12-02 01:18:55
问题 What's the benefit of the Parrot Virtual Machine for end-users (software developers)? For example, if I could program against Perl or Python directly why would I bother programming for them under Parrot? 回答1: Basically, the typical benefits of a VM (portability, runtime optimizations, etc.). From the main page: Once a program has been compiled to run on a virtual machine, it will run on any platform that the VM has been implemented on. Parrot is just different from typical VM in that it's

What's the benefit of Parrot VM for end-users?

一笑奈何 提交于 2019-12-01 20:46:25
What's the benefit of the Parrot Virtual Machine for end-users (software developers)? For example, if I could program against Perl or Python directly why would I bother programming for them under Parrot? GameZelda Basically, the typical benefits of a VM (portability, runtime optimizations, etc.). From the main page: Once a program has been compiled to run on a virtual machine, it will run on any platform that the VM has been implemented on. Parrot is just different from typical VM in that it's designed to support any existing language, not just an specific language. So, when Parrot improves,

PHP Request Lifecycle

时光毁灭记忆、已成空白 提交于 2019-12-01 17:10:22
Okay, so I'm relatively naive in my knowledge of the PHP VM and I've been wondering about something lately. In particular, what the request lifecycle looks like in PHP for a web application. I found an article here that gives a good explanation, but I feel that there has to be more to the story. From what the article explains, the script is parsed and executed each time a request is made to the server! This just seems crazy to me! I'm trying to learn PHP by writing a little micro-framework that takes advantage of many PHP 5.3/5.4 features. As such, I got to thinking about what static means and

Is there Dart VM available?

这一生的挚爱 提交于 2019-11-30 13:48:41
问题 Just read news that Google had announced an early preview of the new web programming language Dart. The documentation on the dartlang.org states: You will be able to run Dart code in several ways: Translate Dart code to JavaScript that can run in any modern browser: Chrome, Safari 5+, and Firefox 4+ (more browser support coming shortly). Execute Dart code directly in a VM on the server side Use Dartboard to write, modify, and execute small Dart programs within any browser window And I'm

Clearing up the `hidden classes` concept of V8

孤人 提交于 2019-11-30 13:00:30
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 6 years ago . I've read some articles about V8's hidden classes. However, I still have a few questions in my head: If, let's say, there are two objects: var a = { } a.x = 5 a.y = 6 var b = { } b.y = 7 b.x = 8 Do they end up with the same hidden class or separate just because one went 0 + x + y and the other 0 + y + x ? As I understood, they get different classes but just

Is there Dart VM available?

这一生的挚爱 提交于 2019-11-30 08:22:48
Just read news that Google had announced an early preview of the new web programming language Dart. The documentation on the dartlang.org states: You will be able to run Dart code in several ways: Translate Dart code to JavaScript that can run in any modern browser: Chrome, Safari 5+, and Firefox 4+ (more browser support coming shortly). Execute Dart code directly in a VM on the server side Use Dartboard to write, modify, and execute small Dart programs within any browser window And I'm curious is there already VM available to run Dart code? Can't find it anyway, maybe it is available through

Why is it hard to beat AOT compiler with a JIT compiler (in terms of app. performance)?

陌路散爱 提交于 2019-11-29 21:03:30
I was thinking that JIT compilers will eventually beat AOT compilers in terms of the performance of the compiled code, due to the inherent advantage of JIT (can use information available only at runtime). One argument is that AOT compilers can spend more time compiling code, but a server VM could spend a lot of time, too. I do understand that JIT does seem to beat AOT compilers in some cases, but they still seem to lag behind in most cases. So my question is, what are the specific, tough problems that is preventing JIT compilers to beat AOT compilers? EDIT: Some common arguments: AOT compilers