Libraries.Language.Compile.Translate.JavaBytecodeOpcodes Documentation

This class represents raw bytecode constants taken from the ASM 5 java bytecode library. What little documentation exists for them can be found here: http://asm.ow2.org/asm50/javadoc/user/org/objectweb/asm/Opcodes.html#V1_8 In the future, this constants should be changed to make more sense in English. In the meantime, they are private and intentionally match ASM. Public actions giving values back should use more realistic English phrases.

Inherits from: Libraries.Language.Object

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

ConvertTypeToBytecodeLoadOpcode(Libraries.Language.Compile.Symbol.Type type)

ConvertTypeToBytecodeStoreOpcode(Libraries.Language.Compile.Symbol.Type type)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetAbstract()

Return

integer

GetBooleanReturn()

This method actually returns an IRETURN opcode, but is placed here for convenience. This is because Java Bytecode does not have an explicit boolean type.

Return

integer:

GetCheckCast()

Return

integer

GetCompareDoubleGreater()

Return

integer

GetCompareDoubleLess()

Return

integer

GetDoubleAdd()

Return

integer

GetDoubleDivide()

Return

integer

GetDoubleLoad()

Return

integer

GetDoubleModulus()

Return

integer

GetDoubleMultiply()

Return

integer

GetDoubleReturn()

Return

integer

GetDoubleStore()

Return

integer

GetDoubleSubtract()

Return

integer

GetDoubleToInteger()

Return

integer

GetDuplicate()

Return

integer

GetDuplicateDouble()

Return

integer

GetDuplicateDoubleUp1()

Return

integer

GetDuplicateDoubleUp2()

Return

integer

GetDuplicateUp1()

Return

integer

GetDuplicateUp2()

Return

integer

GetField()

Return

integer

GetFinal()

Return

integer

GetFloatReturn()

Return

integer

GetGetField()

Return

integer

GetGoto()

Return

integer

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetIfEquals()

Return

integer

GetIfGreaterThan()

Return

integer

GetIfGreaterThanEquals()

Return

integer

GetIfIntegerEquals()

Return

integer

GetIfIntegerGreaterThan()

Return

integer

GetIfIntegerGreaterThanEquals()

Return

integer

GetIfIntegerLessThan()

Return

integer

GetIfIntegerLessThanEquals()

Return

integer

GetIfIntegerNotEquals()

Return

integer

GetIfLessThan()

Return

integer

GetIfLessThanEquals()

Return

integer

GetIfNonNull()

Return

integer

GetIfNotEquals()

Return

integer

GetIfNull()

Return

integer

GetIfObjectEquals()

Return

integer

GetIfObjectNotEquals()

Return

integer

GetIncrementInteger()

Return

integer

GetInstanceOf()

Return

integer

GetIntegerAdd()

Return

integer

GetIntegerDivide()

Return

integer

GetIntegerLoad()

Return

integer

GetIntegerModulus()

Return

integer

GetIntegerMultiply()

Return

integer

GetIntegerOne()

Return

integer

GetIntegerReturn()

Return

integer

GetIntegerStore()

Return

integer

GetIntegerSubtract()

Return

integer

GetIntegerToDouble()

Return

integer

GetIntegerZero()

assume it is an object otherwise

Return

integer:

GetInterface()

Return

integer

GetInvertedIntegerCompareOpcode(integer op)

Parameters

  • integer op

Return

integer

GetInvokeDynamic()

Return

integer

GetInvokeInterface()

Return

integer

GetInvokeSpecial()

Return

integer

GetInvokeStatic()

Return

integer

GetInvokeVirtual()

Return

integer

GetJavaVersion(integer version)

Parameters

  • integer version

Return

integer

GetLoadOpcode(Libraries.Language.Compile.Symbol.Type type)

Generates the appropriate opcode for loading an item onto the stack from a given Quorum type descriptor.

Parameters

Return

integer:

GetLongIntegerReturn()

Return

integer

GetNegateDouble()

Return

integer

GetNegateFloat()

Return

integer

GetNegateInteger()

Return

integer

GetNegateLong()

Return

integer

GetNew()

Return

integer

GetObjectLoad()

Return

integer

GetObjectReturn()

This method actually returns an IRETURN opcode, but is placed here for convenience. This is because Java Bytecode does not have an explicit boolean type.

Return

integer:

GetObjectStore()

Return

integer

GetObjectThrow()

Generates the appropriate opcode for loading an item onto the stack from a given Quorum type descriptor.

Return

integer:

GetPop()

Return

integer

GetPopDouble()

Return

integer

GetPrivate()

Return

integer

GetProtected()

Return

integer

GetPublic()

Return

integer

GetPutField()

Return

integer

GetReturn()

Return

integer

GetReturnOpcode(Libraries.Language.Compile.Symbol.Type type)

GetStatic()

Return

integer

GetStaticField()

Return

integer

GetSuper()

Return

integer

GetSwap()

Return

integer

PutField()

Return

integer

PutStaticField()

Return

integer