C# Class Jurassic.Compiler.EmitHelpers

Outputs IL for misc tasks.
Mostrar archivo Open project: paulbartrum/jurassic Class Usage Examples

Public Methods

Method Description
EmitDefaultValue ( ILGenerator generator, PrimitiveType type ) : void

Emits a dummy value of the given type.

EmitDefaultValue ( ILGenerator generator, Type type ) : void

Emits a default value of the given type.

EmitNull ( ILGenerator generator ) : void

Emits null.

EmitThrow ( ILGenerator generator, Jurassic.Library.ErrorType type, string message ) : void

Emits a JavaScriptException.

EmitThrow ( ILGenerator generator, Jurassic.Library.ErrorType type, string message, OptimizationInfo optimizationInfo ) : void

Emits a JavaScriptException.

EmitThrow ( ILGenerator generator, Jurassic.Library.ErrorType type, string message, string path, string function, int line ) : void

Emits a JavaScriptException.

EmitUndefined ( ILGenerator generator ) : void

Emits undefined.

EmitValue ( ILGenerator generator, object value ) : void

Emits the given value. Only possible for certain types.

LoadArgumentsArray ( ILGenerator generator ) : void

Pushes a reference to the array of argument values for the current function onto the stack.

LoadFunction ( ILGenerator generator ) : void

Pushes a reference to the current function onto the stack.

LoadScope ( ILGenerator generator ) : void

Pushes a reference to the current scope onto the stack.

LoadScriptEngine ( ILGenerator generator ) : void

Pushes a reference to the script engine onto the stack.

LoadThis ( ILGenerator generator ) : void

Pushes the value of the this keyword onto the stack.

StoreScope ( ILGenerator generator ) : void

Stores the reference on top of the stack as the new scope.

StoreThis ( ILGenerator generator ) : void

Stores the reference on top of the stack as the new value of the this keyword.

Method Details

EmitDefaultValue() public static method

Emits a dummy value of the given type.
public static EmitDefaultValue ( ILGenerator generator, PrimitiveType type ) : void
generator ILGenerator The IL generator.
type PrimitiveType The type of value to generate.
return void

EmitDefaultValue() public static method

Emits a default value of the given type.
public static EmitDefaultValue ( ILGenerator generator, Type type ) : void
generator ILGenerator The IL generator.
type System.Type The type of value to generate.
return void

EmitNull() public static method

Emits null.
public static EmitNull ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void

EmitThrow() public static method

Emits a JavaScriptException.
public static EmitThrow ( ILGenerator generator, Jurassic.Library.ErrorType type, string message ) : void
generator ILGenerator The IL generator.
type Jurassic.Library.ErrorType The type of error to generate, e.g. Error, RangeError, etc.
message string The error message.
return void

EmitThrow() public static method

Emits a JavaScriptException.
public static EmitThrow ( ILGenerator generator, Jurassic.Library.ErrorType type, string message, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The IL generator.
type Jurassic.Library.ErrorType The type of error to generate, e.g. Error, RangeError, etc.
message string The error message.
optimizationInfo OptimizationInfo Information about the line number, function and path.
return void

EmitThrow() public static method

Emits a JavaScriptException.
public static EmitThrow ( ILGenerator generator, Jurassic.Library.ErrorType type, string message, string path, string function, int line ) : void
generator ILGenerator The IL generator.
type Jurassic.Library.ErrorType The type of error to generate, e.g. Error, RangeError, etc.
message string The error message.
path string The path of the javascript source file that is currently executing.
function string The name of the currently executing function.
line int The line number of the statement that is currently executing.
return void

EmitUndefined() public static method

Emits undefined.
public static EmitUndefined ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void

EmitValue() public static method

Emits the given value. Only possible for certain types.
public static EmitValue ( ILGenerator generator, object value ) : void
generator ILGenerator The IL generator.
value object The value to emit.
return void

LoadArgumentsArray() public static method

Pushes a reference to the array of argument values for the current function onto the stack.
public static LoadArgumentsArray ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void

LoadFunction() public static method

Pushes a reference to the current function onto the stack.
public static LoadFunction ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void

LoadScope() public static method

Pushes a reference to the current scope onto the stack.
public static LoadScope ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void

LoadScriptEngine() public static method

Pushes a reference to the script engine onto the stack.
public static LoadScriptEngine ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void

LoadThis() public static method

Pushes the value of the this keyword onto the stack.
public static LoadThis ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void

StoreScope() public static method

Stores the reference on top of the stack as the new scope.
public static StoreScope ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void

StoreThis() public static method

Stores the reference on top of the stack as the new value of the this keyword.
public static StoreThis ( ILGenerator generator ) : void
generator ILGenerator The IL generator.
return void