C# Class Jurassic.Compiler.MethodGenerator

Represents the unit of compilation.
Afficher le fichier Open project: paulbartrum/jurassic

Méthodes publiques

Méthode Description
GenerateCode ( ) : void

Generates IL for the script.

Optimize ( ) : void

Optimizes the abstract syntax tree.

Parse ( ) : void

Parses the source text into an abstract syntax tree.

Méthodes protégées

Méthode Description
GenerateCode ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates IL for the script.

GetDelegate ( ) : Type

Retrieves a delegate for the generated method.

GetMethodName ( ) : string

Gets a name for the generated method.

GetParameterTypes ( ) : System.Type[]

Gets an array of types - one for each parameter accepted by the method generated by this context.

GetStackName ( ) : string

Gets a name for the function, as it appears in the stack trace.

MethodGenerator ( ScriptEngine engine, Scope scope, ScriptSource source, Jurassic.Compiler.CompilerOptions options ) : System

Creates a new MethodGenerator instance.

Method Details

GenerateCode() public méthode

Generates IL for the script.
public GenerateCode ( ) : void
Résultat void

GenerateCode() protected abstract méthode

Generates IL for the script.
protected abstract GenerateCode ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The generator to output the CIL to.
optimizationInfo OptimizationInfo Information about any optimizations that should be performed.
Résultat void

GetDelegate() protected méthode

Retrieves a delegate for the generated method.
protected GetDelegate ( ) : Type
Résultat System.Type

GetMethodName() protected abstract méthode

Gets a name for the generated method.
protected abstract GetMethodName ( ) : string
Résultat string

GetParameterTypes() protected méthode

Gets an array of types - one for each parameter accepted by the method generated by this context.
protected GetParameterTypes ( ) : System.Type[]
Résultat System.Type[]

GetStackName() protected méthode

Gets a name for the function, as it appears in the stack trace.
protected GetStackName ( ) : string
Résultat string

MethodGenerator() protected méthode

Creates a new MethodGenerator instance.
protected MethodGenerator ( ScriptEngine engine, Scope scope, ScriptSource source, Jurassic.Compiler.CompilerOptions options ) : System
engine ScriptEngine The script engine.
scope Scope The initial scope.
source ScriptSource The source of javascript code.
options Jurassic.Compiler.CompilerOptions Options that influence the compiler.
Résultat System

Optimize() public méthode

Optimizes the abstract syntax tree.
public Optimize ( ) : void
Résultat void

Parse() public abstract méthode

Parses the source text into an abstract syntax tree.
public abstract Parse ( ) : void
Résultat void