C# 클래스 Jurassic.Compiler.EmitConversion

Outputs IL that converts between types.
파일 보기 프로젝트 열기: paulbartrum/jurassic 1 사용 예제들

공개 메소드들

메소드 설명
Convert ( ILGenerator generator, PrimitiveType fromType, PrimitiveType toType ) : void

Pops the value on the stack, converts it to the given type, then pushes the result onto the stack.

Convert ( ILGenerator generator, PrimitiveType fromType, PrimitiveType toType, OptimizationInfo optimizationInfo ) : void

Pops the value on the stack, converts it to the given type, then pushes the result onto the stack.

Convert ( ILGenerator generator, PrimitiveType fromType, PrimitiveType toType, string path, string function, int line ) : void

Pops the value on the stack, converts it to the given type, then pushes the result onto the stack.

ToAny ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to an object, then pushes the result onto the stack.

ToBool ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to a boolean, then pushes the boolean result onto the stack.

ToConcatenatedString ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to a concatenated string, then pushes the result onto the stack.

ToInt32 ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to an integer, then pushes the integer result onto the stack. Large numbers wrap (i.e. 4294967296 -> 0).

ToInteger ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to an integer, then pushes the integer result onto the stack.

ToNumber ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to a double, then pushes the double result onto the stack.

ToObject ( ILGenerator generator, PrimitiveType fromType, OptimizationInfo optimizationInfo ) : void

Pops the value on the stack, converts it to a javascript object, then pushes the result onto the stack.

ToObject ( ILGenerator generator, PrimitiveType fromType, string path, string function, int line ) : void

Pops the value on the stack, converts it to a javascript object, then pushes the result onto the stack.

ToPrimitive ( ILGenerator generator, PrimitiveType fromType, PrimitiveTypeHint preferredType ) : void

Pops the value on the stack, converts it to a primitive value, then pushes the result onto the stack.

ToPropertyKey ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to a property key (either a symbol or a string), then pushes the result onto the stack.

ToString ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to a string, then pushes the result onto the stack.

ToUInt32 ( ILGenerator generator, PrimitiveType fromType ) : void

Pops the value on the stack, converts it to an unsigned integer, then pushes the integer result onto the stack. Large numbers wrap (i.e. 4294967296 -> 0).

메소드 상세

Convert() 공개 정적인 메소드

Pops the value on the stack, converts it to the given type, then pushes the result onto the stack.
public static Convert ( ILGenerator generator, PrimitiveType fromType, PrimitiveType toType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
toType PrimitiveType The type to convert to.
리턴 void

Convert() 공개 정적인 메소드

Pops the value on the stack, converts it to the given type, then pushes the result onto the stack.
public static Convert ( ILGenerator generator, PrimitiveType fromType, PrimitiveType toType, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
toType PrimitiveType The type to convert to.
optimizationInfo OptimizationInfo Information about the line number, function and path.
리턴 void

Convert() 공개 정적인 메소드

Pops the value on the stack, converts it to the given type, then pushes the result onto the stack.
public static Convert ( ILGenerator generator, PrimitiveType fromType, PrimitiveType toType, string path, string function, int line ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
toType PrimitiveType The type to convert to.
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.
리턴 void

ToAny() 공개 정적인 메소드

Pops the value on the stack, converts it to an object, then pushes the result onto the stack.
public static ToAny ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void

ToBool() 공개 정적인 메소드

Pops the value on the stack, converts it to a boolean, then pushes the boolean result onto the stack.
public static ToBool ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void

ToConcatenatedString() 공개 정적인 메소드

Pops the value on the stack, converts it to a concatenated string, then pushes the result onto the stack.
public static ToConcatenatedString ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void

ToInt32() 공개 정적인 메소드

Pops the value on the stack, converts it to an integer, then pushes the integer result onto the stack. Large numbers wrap (i.e. 4294967296 -> 0).
public static ToInt32 ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void

ToInteger() 공개 정적인 메소드

Pops the value on the stack, converts it to an integer, then pushes the integer result onto the stack.
public static ToInteger ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void

ToNumber() 공개 정적인 메소드

Pops the value on the stack, converts it to a double, then pushes the double result onto the stack.
public static ToNumber ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void

ToObject() 공개 정적인 메소드

Pops the value on the stack, converts it to a javascript object, then pushes the result onto the stack.
public static ToObject ( ILGenerator generator, PrimitiveType fromType, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
optimizationInfo OptimizationInfo Information about the line number, function and path.
리턴 void

ToObject() 공개 정적인 메소드

Pops the value on the stack, converts it to a javascript object, then pushes the result onto the stack.
public static ToObject ( ILGenerator generator, PrimitiveType fromType, string path, string function, int line ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
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.
리턴 void

ToPrimitive() 공개 정적인 메소드

Pops the value on the stack, converts it to a primitive value, then pushes the result onto the stack.
public static ToPrimitive ( ILGenerator generator, PrimitiveType fromType, PrimitiveTypeHint preferredType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
preferredType PrimitiveTypeHint Specifies whether toString() or valueOf() should be /// preferred when converting to a primitive.
리턴 void

ToPropertyKey() 공개 정적인 메소드

Pops the value on the stack, converts it to a property key (either a symbol or a string), then pushes the result onto the stack.
public static ToPropertyKey ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void

ToString() 공개 정적인 메소드

Pops the value on the stack, converts it to a string, then pushes the result onto the stack.
public static ToString ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void

ToUInt32() 공개 정적인 메소드

Pops the value on the stack, converts it to an unsigned integer, then pushes the integer result onto the stack. Large numbers wrap (i.e. 4294967296 -> 0).
public static ToUInt32 ( ILGenerator generator, PrimitiveType fromType ) : void
generator ILGenerator The IL generator.
fromType PrimitiveType The type to convert from.
리턴 void