Module: YTLJit::VM

Defined in:
lib/ytljit/vm.rb,
lib/ytljit/vm_trans.rb,
lib/ytljit/vm_codegen.rb,
lib/ytljit/vm_inspect.rb,
lib/ytljit/vm_typeinf.rb,
lib/ytljit/vm_sendnode.rb,
lib/ytljit/vm_type_gen.rb,
lib/ytljit/vm_cruby_obj.rb,
lib/ytljit/vm_inline_method.rb

Overview

Stack layout (on stack frame)

Hi | |Argn | |

    |  |   :                   |   |
    |  |Arg2(self)             |   |
    |  |Arg1(block pointer)    |   |
    |  |Arg0(parent frame)     |  -+
    |  |Return Address         |
    +- |old bp                 | <-+
       |old bp on stack        |  -+
 EBP-> |Local Vars1            |   
       |                       |   
       |                       |   
       |Local Varsn            |   
       |Pointer to Env         |   
SP ->  |                       |
       |                       |

LO

Stack layout (on heap frame)

                                    |

Hi | |Arg0(parent frame) | -+

    |  |Arg1(block pointer)    |  
    |  |Arg2(self)             |
    |  |   :                   |
    |  |Arg n                  |
    |  |Return Address         |
    +- |old bp                 |  <---+
       |Pointer to Env         |  -+  |
SP ->  |                       |   |  |

LO | | | |

                                    |  |
                                    |  |
     +- |                       |   |  |
     |  |free func              |   |  |
     |  |mark func              |   |  |
     |  |T_DATA                 | <-+  |                                      
     |                                 |
     |                                 |
     |  |Arg n                  |      |
     |  |   :                   |      |
     |  |Arg3(exception status) |      |
     |  |Arg2(block pointer)    |      |
     |  |Arg1(parent frame)     |      |
     |  |Arg0(self)             |      |   
     |  |Not used(reserved)     |      |
     |  |Not used(reserved)     |      |
     |  |old bp on stack        | -----+
  EBP-> |Local Vars1            |   
     |  |                       |   
     |  |                       |   
     +->|Local Varsn            |   

enter procedure
  push EBP
  SP -> EBP
  allocate frame (stack or heap)    
  Copy arguments if allocate frame on heap
  store EBP on the top of frame
  Address of top of frame -> EBP

leave procedure
  Dereference of EBP -> ESP
  pop EBP
  ret

Defined Under Namespace

Modules: ArithmeticOperationUtil, CommonCodeGen, CompareOperationUtil, Node, SendNodeCodeGen, TypeCodeGen, UnboxedArrayUtil, UnboxedObjectUtil, YARVTranslatorCRubyObjectMixin, YARVTranslatorSimpleMixin, YARVTranslatorTypeInferenceMixin Classes: CollectInfoContext, CompileContext, TypeInferenceContext, YARVContext, YARVTranslatorBase, YARVTranslatorCRubyObject, YARVTranslatorSimple, YARVTranslatorTypeInference