org.jruby.ast.executable
Class YARVMachine

java.lang.Object
  extended by org.jruby.ast.executable.YARVMachine

public class YARVMachine
extends java.lang.Object


Nested Class Summary
static class YARVMachine.Instruction
           
static class YARVMachine.InstructionSequence
           
 
Field Summary
static YARVMachine INSTANCE
           
 
Constructor Summary
YARVMachine()
           
 
Method Summary
 IRubyObject exec(ThreadContext context, IRubyObject self, YARVMachine.Instruction[] bytecodes)
           
 IRubyObject exec(ThreadContext context, StaticScope scope, YARVMachine.Instruction[] bytecodes)
          Top-level exec into YARV machine.
static int instruction(java.lang.String name)
           
 void set(IRubyObject value)
          Set/Replace top stack value with value
 void unimplemented(int bytecode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final YARVMachine INSTANCE
Constructor Detail

YARVMachine

public YARVMachine()
Method Detail

instruction

public static int instruction(java.lang.String name)

set

public void set(IRubyObject value)
Set/Replace top stack value with value

Parameters:
value - to replace current stack value

unimplemented

public void unimplemented(int bytecode)

exec

public IRubyObject exec(ThreadContext context,
                        StaticScope scope,
                        YARVMachine.Instruction[] bytecodes)
Top-level exec into YARV machine.

Parameters:
context - thread that is executing this machine (Note: We need to make n machines with each belonging to an individual context)
scope - of exec (evals will sometimes pass in something interesting)
bytecodes - to be executed
Returns:
last value pop'd of machine stack

exec

public IRubyObject exec(ThreadContext context,
                        IRubyObject self,
                        YARVMachine.Instruction[] bytecodes)


Copyright © 2002-2007 JRuby Team. All Rights Reserved.