Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Virtual machine for scripting


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 blackone   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 May 2003 - 04:32 PM

I''m creating a scripting language to control virtual robots. It will be compiled for a virtual machine, and at the moment I have a prototype, a stack machine: It has one stack, one array for variables (only static allocation), one array for instructions(and literal values) and a program counter. I''m wondering if a register based approach would be more efficient, do any of you have any experience with that? *** For Java games and Java related resources, go to http://www.javaengines.dk ***

Sponsor:

#2 Nypyren   Crossbones+   -  Reputation: 6546

Like
Likes
Like

Posted 11 May 2003 - 04:45 PM

I wrote a C Compiler/VM with a stack, variable array and instruction linked list. Worked great.

I wouldn't try using registers... what's the point if it's a virtual machine? Plus you've gotta write the compiler to decide when to load registers/etc. I just loaded onto the stack with mine.


Right now I'm using the built-in C# compiler with the .NET framework as a "scripting" language (really it's just runtime compilable pluggable source)... it actually compiles just like normal (but without optimizations).

[edited by - Nypyren on May 11, 2003 11:47:11 PM]




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS