Packageshell
Classpublic final class RunMode
InheritanceRunMode Inheritance Object

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

The RunMode class defines string constants for the names of Execution Engine run modes.

To define the binary uses the metadata [HexData].

You will need to use the -md option when compiling with ASC.

View the examples



Public Methods
 MethodDefined By
 Inherited
_init():*
[static]
_init
 Inherited
AS3
 Inherited
init():*
[static]
init
 Inherited
AS3
 Inherited
AS3
Protected Methods
 MethodDefined By
 Inherited
[static]
protected
 Inherited
_setPropertyIsEnumerable(o:*, V:String, enumerable:Boolean):void
[static]
protected
Public Constants
 ConstantDefined By
  INTERP : String = "interp"
[static] The interpreter mode (never use JIT).
RunMode
  JIT : String = "jit"
[static] The Just In Time mode (always use JIT, never interp unless the JIT fails).
RunMode
  JITORDIE : String = "jitordie"
[static] The JIT or die mode (always use JIT, abort if JIT fails).
RunMode
 Inheritedlength : int = 1
[static]
length
  MIXED : String = "mixed"
[static] The mixed mode (interpreter + JIT) default.
RunMode
  UNKNOWN : String = "unknown"
[static] The unknown mode.
RunMode
Constant Detail
INTERPConstant
public static const INTERP:String = "interp"

The interpreter mode (never use JIT).

JITConstant 
public static const JIT:String = "jit"

The Just In Time mode (always use JIT, never interp unless the JIT fails).

JITORDIEConstant 
public static const JITORDIE:String = "jitordie"

The JIT or die mode (always use JIT, abort if JIT fails).

MIXEDConstant 
public static const MIXED:String = "mixed"

The mixed mode (interpreter + JIT) default.

This mode is governed by the "On-Stack Replacement" (OSR) threshold.

UNKNOWNConstant 
public static const UNKNOWN:String = "unknown"

The unknown mode.

Examples
Usage
     import shell.BinaryData;
     import flash.utils.ByteArray;
     
     // define a class that extend BinaryData
     // and use the metadata to define the binary in hexadecimal
     [HexData("aabbccdd")]
     public class BlobOfData extends BinaryData
     {
     }
     
     
     // then later, instanciate the class
     var binary:BlobOfData = new BlobOfData();
     
     // to get the original data, you can copy it
     var original1:ByteArray = new ByteArray();
         original1.writeBytes( binary, 0, binary.length );
     
     // or you can downcast it
     var original2:ByteArray = binary as ByteArray;
     
Compilation
     java -jar asc.jar -AS3 -md -import redtamarin.abc test.as