org.jruby.compiler.ir
Class IRModule

java.lang.Object
  extended by org.jruby.compiler.ir.IRScopeImpl
      extended by org.jruby.compiler.ir.IRModule
All Implemented Interfaces:
IRScope
Direct Known Subclasses:
IRClass

public class IRModule
extends IRScopeImpl


Constructor Summary
IRModule(IRScope lexicalParent, Operand container, java.lang.String name, StaticScope scope)
           
 
Method Summary
 void addClass(IRClass c)
           
 void addMethod(IRMethod method)
           
 void addModule(IRModule m)
           
static void bootStrap()
           
 java.util.List<IRClass> getClasses()
           
 IRMethod getClassMethod(java.lang.String name)
           
 java.util.Map getConstants()
           
 Operand getConstantValue(java.lang.String constRef)
           
static IRClass getCoreClass(java.lang.String n)
           
 IRMethod getInstanceMethod(java.lang.String name)
           
 LocalVariable getLocalVariable(java.lang.String name)
          Get Local Variable from this scope
 java.util.List<IRMethod> getMethods()
           
 java.util.List<IRModule> getModules()
           
 IRModule getNearestModule()
          Returns the nearest module/class from this scope which may be itself.
 IRMethod getRootMethod()
           
 java.lang.String getScopeName()
           
 CodeVersion getVersion()
           
static boolean isAClassRootMethod(IRMethod m)
           
 boolean isCoreClass(java.lang.String className)
           
 void runCompilerPassOnNestedScopes(CompilerPass p)
           
 void setConstantValue(java.lang.String constRef, Operand val)
           
 void updateVersion()
           
 
Methods inherited from class org.jruby.compiler.ir.IRScopeImpl
addInstr, getContainer, getContainerModule, getInstrs, getLexicalParent, getName, getNewInlineVariable, getNewLabel, getNewLabel, getNewTemporaryClosureVariable, getNewTemporaryVariable, getNextClosureId, getPrefixCountSize, getRenamedVariableSize, getStaticScope, getTemporaryVariableSize, prepareForInterpretation, recordMethodAlias, runCompilerPass, setContainer, setName, toString, toStringInstrs, toStringVariables, unaliasMethodName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IRModule

public IRModule(IRScope lexicalParent,
                Operand container,
                java.lang.String name,
                StaticScope scope)
Method Detail

bootStrap

public static void bootStrap()

getCoreClass

public static IRClass getCoreClass(java.lang.String n)

isAClassRootMethod

public static boolean isAClassRootMethod(IRMethod m)

getModules

public java.util.List<IRModule> getModules()

getClasses

public java.util.List<IRClass> getClasses()

getMethods

public java.util.List<IRMethod> getMethods()

getConstants

public java.util.Map getConstants()

getConstantValue

public Operand getConstantValue(java.lang.String constRef)

setConstantValue

public void setConstantValue(java.lang.String constRef,
                             Operand val)

addModule

public void addModule(IRModule m)

addClass

public void addClass(IRClass c)

addMethod

public void addMethod(IRMethod method)

runCompilerPassOnNestedScopes

public void runCompilerPassOnNestedScopes(CompilerPass p)
Overrides:
runCompilerPassOnNestedScopes in class IRScopeImpl

getNearestModule

public IRModule getNearestModule()
Description copied from interface: IRScope
Returns the nearest module/class from this scope which may be itself.

Specified by:
getNearestModule in interface IRScope
Overrides:
getNearestModule in class IRScopeImpl

updateVersion

public void updateVersion()

getScopeName

public java.lang.String getScopeName()
Specified by:
getScopeName in class IRScopeImpl

getVersion

public CodeVersion getVersion()

getRootMethod

public IRMethod getRootMethod()

getInstanceMethod

public IRMethod getInstanceMethod(java.lang.String name)

getClassMethod

public IRMethod getClassMethod(java.lang.String name)

isCoreClass

public boolean isCoreClass(java.lang.String className)

getLocalVariable

public LocalVariable getLocalVariable(java.lang.String name)
Description copied from interface: IRScope
Get Local Variable from this scope



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