Class Ruva::VM::BootClass::BootMethod
In: lib/ruva/vm.rb
Parent: Object

A very simple mock Ruva::VM::Method used to bootstrap the VM and pass control to the main method.

Methods

code   max_locals   max_stack   native?   new  

Attributes

desc  [RW] 
exception_handlers  [RW] 
name  [RW] 

Public Class methods

[Source]

    # File lib/ruva/vm.rb, line 17
17:         def initialize
18:           @name, @desc, @exception_handlers = '<bootstrap>', '(V)V', {}                    
19:         end

Public Instance methods

[Source]

    # File lib/ruva/vm.rb, line 28
28:         def code
29:           # TODO maybe handle uncaught exceptions here instead...
30:           # 
31:           #   it could:
32:           #   
33:           #     [INVOKESTATIC, 0, 1,
34:           #      RETURN,
35:           #      INVOKEVIRTUAL, (java/lang/Exception.printStackTrace()V),
36:           #      RETURN]
37:           #      
38:           # Then have a catch from 0 to 3, handler at 4.
39:           #  
40:           [0xb8, 0, 1]
41:         end

[Source]

    # File lib/ruva/vm.rb, line 26
26:         def max_locals; 0; end

[Source]

    # File lib/ruva/vm.rb, line 25
25:         def max_stack;  1; end

[Source]

    # File lib/ruva/vm.rb, line 21
21:         def native?
22:           false
23:         end

[Validate]