C# 클래스 Rhino.Optimizer.Codegen

This class generates code for a given IR tree.
This class generates code for a given IR tree.
상속: Evaluator
파일 보기 프로젝트 열기: hazzik/Rhino.Net 1 사용 예제들

공개 메소드들

메소드 설명
CaptureStackInfo ( RhinoException ex ) : void
Compile ( CompilerEnvirons compilerEnv, ScriptNode tree, string encodedSource, bool returnFunction ) : object
CompileToClassFile ( CompilerEnvirons compilerEnv, string mainClassName, ScriptNode scriptOrFn, string encodedSource, bool returnFunction ) : byte[]
CreateFunctionObject ( Context cx, Scriptable scope, object bytecode, object staticSecurityDomain ) : System.Function
CreateScriptObject ( object bytecode, object staticSecurityDomain ) : System.Script
GetPatchedStack ( RhinoException ex, string nativeStackTrace ) : string
GetScriptStack ( RhinoException ex ) : IList
GetSourcePositionFromStack ( Context cx, int linep ) : string
SetEvalScriptFlag ( System.Script script ) : void
SetMainMethodClass ( string className ) : void

비공개 메소드들

메소드 설명
AddDoubleWrap ( ClassFileWriter cfw ) : void
BadTree ( ) : Exception
CleanName ( ScriptNode n ) : string

Gets a Java-compatible "informative" name for the the ScriptOrFnNode

CollectScriptNodes_r ( ScriptNode n, ObjArray x ) : void
DefineClass ( object bytecode, object staticSecurityDomain ) : Type
EmitConstantDudeInitializers ( ClassFileWriter cfw ) : void
EmitDirectConstructor ( ClassFileWriter cfw, OptFunctionNode ofn ) : void
EmitRegExpInit ( ClassFileWriter cfw ) : void
GenerateCallMethod ( ClassFileWriter cfw ) : void
GenerateCode ( string encodedSource ) : byte[]
GenerateExecute ( ClassFileWriter cfw ) : void
GenerateFunctionConstructor ( ClassFileWriter cfw ) : void
GenerateFunctionInit ( ClassFileWriter cfw, OptFunctionNode ofn ) : void
GenerateMain ( ClassFileWriter cfw ) : void
GenerateNativeFunctionOverrides ( ClassFileWriter cfw, string encodedSource ) : void
GenerateResumeGenerator ( ClassFileWriter cfw ) : void
GenerateScriptCtor ( ClassFileWriter cfw ) : void
GetBodyMethodName ( ScriptNode n ) : string
GetBodyMethodSignature ( ScriptNode n ) : string
GetCompiledRegexpName ( ScriptNode n, int regexpIndex ) : string
GetDirectCtorName ( ScriptNode n ) : string
GetFunctionInitMethodName ( OptFunctionNode ofn ) : string
GetIndex ( ScriptNode n ) : int
GetStaticConstantWrapperType ( double num ) : string
InitOptFunctions_r ( ScriptNode scriptOrFn ) : void
InitScriptNodesData ( ScriptNode scriptOrFn ) : void
IsGenerator ( ScriptNode node ) : bool
PushNumberAsObject ( ClassFileWriter cfw, double num ) : void
PushUndefined ( ClassFileWriter cfw ) : void
ReportClassFileFormatException ( ScriptNode scriptOrFn, string message ) : Exception
Transform ( ScriptNode tree ) : void

메소드 상세

CaptureStackInfo() 공개 메소드

public CaptureStackInfo ( RhinoException ex ) : void
ex Rhino.RhinoException
리턴 void

Compile() 공개 메소드

public Compile ( CompilerEnvirons compilerEnv, ScriptNode tree, string encodedSource, bool returnFunction ) : object
compilerEnv Rhino.CompilerEnvirons
tree Rhino.Ast.ScriptNode
encodedSource string
returnFunction bool
리턴 object

CompileToClassFile() 공개 메소드

public CompileToClassFile ( CompilerEnvirons compilerEnv, string mainClassName, ScriptNode scriptOrFn, string encodedSource, bool returnFunction ) : byte[]
compilerEnv Rhino.CompilerEnvirons
mainClassName string
scriptOrFn Rhino.Ast.ScriptNode
encodedSource string
returnFunction bool
리턴 byte[]

CreateFunctionObject() 공개 메소드

public CreateFunctionObject ( Context cx, Scriptable scope, object bytecode, object staticSecurityDomain ) : System.Function
cx Rhino.Context
scope Scriptable
bytecode object
staticSecurityDomain object
리턴 System.Function

CreateScriptObject() 공개 메소드

public CreateScriptObject ( object bytecode, object staticSecurityDomain ) : System.Script
bytecode object
staticSecurityDomain object
리턴 System.Script

GetPatchedStack() 공개 메소드

public GetPatchedStack ( RhinoException ex, string nativeStackTrace ) : string
ex Rhino.RhinoException
nativeStackTrace string
리턴 string

GetScriptStack() 공개 메소드

public GetScriptStack ( RhinoException ex ) : IList
ex Rhino.RhinoException
리턴 IList

GetSourcePositionFromStack() 공개 메소드

public GetSourcePositionFromStack ( Context cx, int linep ) : string
cx Rhino.Context
linep int
리턴 string

SetEvalScriptFlag() 공개 메소드

public SetEvalScriptFlag ( System.Script script ) : void
script System.Script
리턴 void

SetMainMethodClass() 공개 메소드

public SetMainMethodClass ( string className ) : void
className string
리턴 void