C# Class Jurassic.Compiler.BinaryExpression

Represents a binary operator expression.
Inheritance: Jurassic.Compiler.OperatorExpression
Exibir arquivo Open project: paulbartrum/jurassic Class Usage Examples

Public Methods

Method Description
BinaryExpression ( Jurassic.Compiler.Operator @operator ) : System

Creates a new instance of BinaryExpression.

BinaryExpression ( Jurassic.Compiler.Operator @operator, Jurassic.Compiler.Expression left, Jurassic.Compiler.Expression right ) : System

Creates a new instance of BinaryJSExpression.

Evaluate ( ) : object

Evaluates the expression, if possible.

GenerateCode ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates CIL for the expression.

Private Methods

Method Description
GenerateAdd ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates CIL for the addition operation.

GenerateIn ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates CIL for the in operator.

GenerateInstanceOf ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates CIL for the instanceof operator.

GenerateLogical ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates CIL for the logical operators.

GenerateRelational ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates CIL for the relational operators.

Method Details

BinaryExpression() public method

Creates a new instance of BinaryExpression.
public BinaryExpression ( Jurassic.Compiler.Operator @operator ) : System
@operator Jurassic.Compiler.Operator
return System

BinaryExpression() public method

Creates a new instance of BinaryJSExpression.
public BinaryExpression ( Jurassic.Compiler.Operator @operator, Jurassic.Compiler.Expression left, Jurassic.Compiler.Expression right ) : System
@operator Jurassic.Compiler.Operator
left Jurassic.Compiler.Expression The operand on the left side of the operator.
right Jurassic.Compiler.Expression The operand on the right side of the operator.
return System

Evaluate() public method

Evaluates the expression, if possible.
public Evaluate ( ) : object
return object

GenerateCode() public method

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.
return void