C# Класс Rhino.Optimizer.Codegen

This class generates code for a given IR tree.
This class generates code for a given IR tree.
Наследование: Evaluator
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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