C# Класс Jurassic.Compiler.NameExpression

Represents a variable or part of a member reference.
Наследование: Jurassic.Compiler.Expression, IReferenceExpression
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DuplicateReference ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Outputs the values needed to get or set this reference.

Equals ( object obj ) : bool

Determines if the given object is equal to this one.

GenerateCode ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates CIL for the expression.

GenerateDelete ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Deletes the reference and pushes true if the delete succeeded, or false if the delete failed.

GenerateGet ( ILGenerator generator, OptimizationInfo optimizationInfo, bool throwIfUnresolvable ) : void

Pushes the value of the reference onto the stack.

GenerateReference ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Outputs the values needed to get or set this reference.

GenerateSet ( ILGenerator generator, OptimizationInfo optimizationInfo, PrimitiveType valueType, bool throwIfUnresolvable ) : void

Stores the value on the top of the stack in the reference.

GenerateThis ( ILGenerator generator ) : void

Generates code to push the "this" value for a function call.

GetHashCode ( ) : int

Calculates the hash code for this object.

NameExpression ( Scope scope, string name ) : System

Creates a new NameExpression instance.

ToString ( ) : string

Converts the expression to a string.

Описание методов

DuplicateReference() публичный Метод

Outputs the values needed to get or set this reference.
public DuplicateReference ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The generator to output the CIL to.
optimizationInfo OptimizationInfo Information about any optimizations that should be performed.
Результат void

Equals() публичный Метод

Determines if the given object is equal to this one.
public Equals ( object obj ) : bool
obj object The object to compare.
Результат bool

GenerateCode() публичный Метод

Generates CIL for the expression.
public 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.
Результат void

GenerateDelete() публичный Метод

Deletes the reference and pushes true if the delete succeeded, or false if the delete failed.
public GenerateDelete ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The generator to output the CIL to.
optimizationInfo OptimizationInfo Information about any optimizations that should be performed.
Результат void

GenerateGet() публичный Метод

Pushes the value of the reference onto the stack.
public GenerateGet ( ILGenerator generator, OptimizationInfo optimizationInfo, bool throwIfUnresolvable ) : void
generator ILGenerator The generator to output the CIL to.
optimizationInfo OptimizationInfo Information about any optimizations that should be performed.
throwIfUnresolvable bool true to throw a ReferenceError exception if /// the name is unresolvable; false to output null instead.
Результат void

GenerateReference() публичный Метод

Outputs the values needed to get or set this reference.
public GenerateReference ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The generator to output the CIL to.
optimizationInfo OptimizationInfo Information about any optimizations that should be performed.
Результат void

GenerateSet() публичный Метод

Stores the value on the top of the stack in the reference.
public GenerateSet ( ILGenerator generator, OptimizationInfo optimizationInfo, PrimitiveType valueType, bool throwIfUnresolvable ) : void
generator ILGenerator The generator to output the CIL to.
optimizationInfo OptimizationInfo Information about any optimizations that should be performed.
valueType PrimitiveType The primitive type of the value that is on the top of the stack.
throwIfUnresolvable bool true to throw a ReferenceError exception if /// the name is unresolvable; false to create a new property instead.
Результат void

GenerateThis() публичный Метод

Generates code to push the "this" value for a function call.
public GenerateThis ( ILGenerator generator ) : void
generator ILGenerator The generator to output the CIL to.
Результат void

GetHashCode() публичный Метод

Calculates the hash code for this object.
public GetHashCode ( ) : int
Результат int

NameExpression() публичный Метод

Creates a new NameExpression instance.
public NameExpression ( Scope scope, string name ) : System
scope Scope The current scope.
name string The name of the variable or member that is being referenced.
Результат System

ToString() публичный Метод

Converts the expression to a string.
public ToString ( ) : string
Результат string