C# Class Babel.Compiler.CodeGeneratingVisitor

Inheritance: AbstractNodeVisitor
显示文件 Open project: shugo/babel

Protected Properties

Property Type Description
currentClass ClassDefinition
currentException System.Reflection.Emit.LocalBuilder
currentIter IterDefinition
currentLoop LoopStatement
currentRoutine RoutineDefinition
currentType System.Reflection.Emit.TypeBuilder
exceptionLevel int
ilGenerator System.Reflection.Emit.ILGenerator
inSharedContext bool
localVariableStack LocalVariableStack
nestedTypes System.Collections.ArrayList
program Program
report Report
returnLabel System.Reflection.Emit.Label
typeManager TypeManager

Public Methods

Method Description
CodeGeneratingVisitor ( Report report ) : System
VisitAbstractIter ( AbstractIterSignature iter ) : void
VisitAnd ( AndExpression and ) : void
VisitAssign ( AssignStatement assign ) : void
VisitAttr ( AttrDefinition attr ) : void
VisitBoolLiteral ( BoolLiteralExpression boolLiteral ) : void
VisitBreak ( BreakExpression breakExpr ) : void
VisitCall ( CallExpression call ) : void
VisitCase ( CaseStatement caseStmt ) : void
VisitCharLiteral ( CharLiteralExpression charLiteral ) : void
VisitClass ( ClassDefinition cls ) : void
VisitConst ( ConstDefinition constDef ) : void
VisitDeclaration ( DeclarationStatement decl ) : void
VisitException ( ExceptionExpression exception ) : void
VisitExpressionStatement ( ExpressionStatement exprStmt ) : void
VisitIf ( IfStatement ifStmt ) : void
VisitIntLiteral ( IntLiteralExpression intLiteral ) : void
VisitIter ( IterDefinition iter ) : void
VisitIterCall ( IterCallExpression iter ) : void
VisitLocal ( LocalExpression localExpr ) : void
VisitLoop ( LoopStatement loop ) : void
VisitModalExpression ( ModalExpression modalExpr ) : void
VisitNew ( NewExpression newExpr ) : void
VisitOr ( OrExpression or ) : void
VisitProgram ( Program program ) : void
VisitProtect ( ProtectStatement protect ) : void
VisitQuit ( QuitStatement quit ) : void
VisitRaise ( RaiseStatement raise ) : void
VisitReturn ( ReturnStatement ret ) : void
VisitRoutine ( RoutineDefinition routine ) : void
VisitSelf ( SelfExpression self ) : void
VisitSharedAttr ( SharedAttrDefinition attr ) : void
VisitSourceFile ( SourceFile sourceFile ) : void
VisitStatementList ( StatementList statementList ) : void
VisitStrLiteral ( StrLiteralExpression strLiteral ) : void
VisitTypecase ( TypecaseStatement typecase ) : void
VisitVoid ( VoidExpression voidExpr ) : void
VisitVoidTest ( VoidTestExpression voidTest ) : void
VisitYield ( YieldStatement yield ) : void

Protected Methods

Method Description
BoxIfNecessary ( Type sourceType, Type destinationType ) : void
EmitLdind ( Type type ) : void
EmitStind ( Type type ) : void
EmitVoid ( Type type ) : void
GenerateAdapter ( SupertypingAdapter adapter ) : void
UnboxIfNecessary ( Type sourceType, Type destinationType ) : void

Method Details

BoxIfNecessary() protected method

protected BoxIfNecessary ( Type sourceType, Type destinationType ) : void
sourceType System.Type
destinationType System.Type
return void

CodeGeneratingVisitor() public method

public CodeGeneratingVisitor ( Report report ) : System
report Report
return System

EmitLdind() protected method

protected EmitLdind ( Type type ) : void
type System.Type
return void

EmitStind() protected method

protected EmitStind ( Type type ) : void
type System.Type
return void

EmitVoid() protected method

protected EmitVoid ( Type type ) : void
type System.Type
return void

GenerateAdapter() protected method

protected GenerateAdapter ( SupertypingAdapter adapter ) : void
adapter SupertypingAdapter
return void

UnboxIfNecessary() protected method

protected UnboxIfNecessary ( Type sourceType, Type destinationType ) : void
sourceType System.Type
destinationType System.Type
return void

VisitAbstractIter() public method

public VisitAbstractIter ( AbstractIterSignature iter ) : void
iter AbstractIterSignature
return void

VisitAnd() public method

public VisitAnd ( AndExpression and ) : void
and AndExpression
return void

VisitAssign() public method

public VisitAssign ( AssignStatement assign ) : void
assign AssignStatement
return void

VisitAttr() public method

public VisitAttr ( AttrDefinition attr ) : void
attr AttrDefinition
return void

VisitBoolLiteral() public method

public VisitBoolLiteral ( BoolLiteralExpression boolLiteral ) : void
boolLiteral BoolLiteralExpression
return void

VisitBreak() public method

public VisitBreak ( BreakExpression breakExpr ) : void
breakExpr BreakExpression
return void

VisitCall() public method

public VisitCall ( CallExpression call ) : void
call CallExpression
return void

VisitCase() public method

public VisitCase ( CaseStatement caseStmt ) : void
caseStmt CaseStatement
return void

VisitCharLiteral() public method

public VisitCharLiteral ( CharLiteralExpression charLiteral ) : void
charLiteral CharLiteralExpression
return void

VisitClass() public method

public VisitClass ( ClassDefinition cls ) : void
cls ClassDefinition
return void

VisitConst() public method

public VisitConst ( ConstDefinition constDef ) : void
constDef ConstDefinition
return void

VisitDeclaration() public method

public VisitDeclaration ( DeclarationStatement decl ) : void
decl DeclarationStatement
return void

VisitException() public method

public VisitException ( ExceptionExpression exception ) : void
exception ExceptionExpression
return void

VisitExpressionStatement() public method

public VisitExpressionStatement ( ExpressionStatement exprStmt ) : void
exprStmt ExpressionStatement
return void

VisitIf() public method

public VisitIf ( IfStatement ifStmt ) : void
ifStmt IfStatement
return void

VisitIntLiteral() public method

public VisitIntLiteral ( IntLiteralExpression intLiteral ) : void
intLiteral IntLiteralExpression
return void

VisitIter() public method

public VisitIter ( IterDefinition iter ) : void
iter IterDefinition
return void

VisitIterCall() public method

public VisitIterCall ( IterCallExpression iter ) : void
iter IterCallExpression
return void

VisitLocal() public method

public VisitLocal ( LocalExpression localExpr ) : void
localExpr LocalExpression
return void

VisitLoop() public method

public VisitLoop ( LoopStatement loop ) : void
loop LoopStatement
return void

VisitModalExpression() public method

public VisitModalExpression ( ModalExpression modalExpr ) : void
modalExpr ModalExpression
return void

VisitNew() public method

public VisitNew ( NewExpression newExpr ) : void
newExpr NewExpression
return void

VisitOr() public method

public VisitOr ( OrExpression or ) : void
or OrExpression
return void

VisitProgram() public method

public VisitProgram ( Program program ) : void
program Program
return void

VisitProtect() public method

public VisitProtect ( ProtectStatement protect ) : void
protect ProtectStatement
return void

VisitQuit() public method

public VisitQuit ( QuitStatement quit ) : void
quit QuitStatement
return void

VisitRaise() public method

public VisitRaise ( RaiseStatement raise ) : void
raise RaiseStatement
return void

VisitReturn() public method

public VisitReturn ( ReturnStatement ret ) : void
ret ReturnStatement
return void

VisitRoutine() public method

public VisitRoutine ( RoutineDefinition routine ) : void
routine RoutineDefinition
return void

VisitSelf() public method

public VisitSelf ( SelfExpression self ) : void
self SelfExpression
return void

VisitSharedAttr() public method

public VisitSharedAttr ( SharedAttrDefinition attr ) : void
attr SharedAttrDefinition
return void

VisitSourceFile() public method

public VisitSourceFile ( SourceFile sourceFile ) : void
sourceFile SourceFile
return void

VisitStatementList() public method

public VisitStatementList ( StatementList statementList ) : void
statementList StatementList
return void

VisitStrLiteral() public method

public VisitStrLiteral ( StrLiteralExpression strLiteral ) : void
strLiteral StrLiteralExpression
return void

VisitTypecase() public method

public VisitTypecase ( TypecaseStatement typecase ) : void
typecase TypecaseStatement
return void

VisitVoid() public method

public VisitVoid ( VoidExpression voidExpr ) : void
voidExpr VoidExpression
return void

VisitVoidTest() public method

public VisitVoidTest ( VoidTestExpression voidTest ) : void
voidTest VoidTestExpression
return void

VisitYield() public method

public VisitYield ( YieldStatement yield ) : void
yield YieldStatement
return void

Property Details

currentClass protected_oe property

protected ClassDefinition,Babel.Compiler currentClass
return ClassDefinition

currentException protected_oe property

protected LocalBuilder,System.Reflection.Emit currentException
return System.Reflection.Emit.LocalBuilder

currentIter protected_oe property

protected IterDefinition,Babel.Compiler currentIter
return IterDefinition

currentLoop protected_oe property

protected LoopStatement,Babel.Compiler currentLoop
return LoopStatement

currentRoutine protected_oe property

protected RoutineDefinition,Babel.Compiler currentRoutine
return RoutineDefinition

currentType protected_oe property

protected TypeBuilder,System.Reflection.Emit currentType
return System.Reflection.Emit.TypeBuilder

exceptionLevel protected_oe property

protected int exceptionLevel
return int

ilGenerator protected_oe property

protected ILGenerator,System.Reflection.Emit ilGenerator
return System.Reflection.Emit.ILGenerator

inSharedContext protected_oe property

protected bool inSharedContext
return bool

localVariableStack protected_oe property

protected LocalVariableStack,Babel.Compiler localVariableStack
return LocalVariableStack

nestedTypes protected_oe property

protected ArrayList,System.Collections nestedTypes
return System.Collections.ArrayList

program protected_oe property

protected Program program
return Program

report protected_oe property

protected Report,Babel.Compiler report
return Report

returnLabel protected_oe property

protected Label,System.Reflection.Emit returnLabel
return System.Reflection.Emit.Label

typeManager protected_oe property

protected TypeManager,Babel.Compiler typeManager
return TypeManager