Package-level declarations
Types
A generator for Shasambly. It has a list of all it's ShasamblyOpcodes and will convert all of them into a single byte array using #generate
An abstract opcode for getting globals with a dynamic address This is not a final opcode. It is just the shared code between all get-global-dynamic-opcodes
An abstract opcode for getting globals with a static address This is not a final opcode. It is just the shared code between all get global opcodes
Just a tool to help you generate stuff This opcode can be replaced later by a working one and for the time just works as a dummy opcode This is NOT an opcode that can be generated, it just redirects the generation to a given opcode and will throw an error if it did not receive an opcode to generate until generation (when the generation function is called) Only use if it is needed, it is much better to provide the opcodes directly than to use a placeholder opcode
This represents one shasambly opcode in the generation. It will be converted to it's bytes by the ShasamblyGenerator using the #generate function
Generator for opcode Opcodes.B_ABS Put the absolute value of the top byte on top of the stack
Generator for opcode Opcodes.B_ADD Adds the top two bytes from the stack and puts the result on top of the stack
Generator for opcode Opcodes.B_BIGGER Checks if the second but top byte is bigger than the top byte and puts the result on top of the stack
Generator for opcode Opcodes.B_BIGGER_EQ Checks if the second but top byte is bigger or equal to the top byte and puts the result on top of the stack
Generator for opcode Opcodes.B_DIV Divides the top two bytes from the stack (it divides the top one by the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.B_EQ Checks if the top two bytes are equal and puts the result on top of the stack
Generator for opcode Opcodes.B_GET_GLOBAL Put the byte at the given address into the stack
Generator for opcode Opcodes.B_GET_GLOBAL_DYNAMIC Put the byte at the given position on top of the stack. The position is given by the top integer on the stack.
Generator for opcode Opcodes.B_GET_LOCAL Gets a byte from the local variables at a given local address and puts it on top of the stack
Generator for opcode Opcodes.B_MOD Divides the top two bytes from the stack (it divides the top one by the bottom one) and puts the modulo result on top of the stack
Generator for opcode Opcodes.B_MUL Multiplies the top two bytes from the stack and puts the result on top of the stack
Generator for opcode Opcodes.B_NEG Negate the top byte of the stack
Generator for opcode Opcodes.BOOL_NOT Takes the boolean value on top of the stack and puts the opposite onto it
Generator for opcode Opcodes.B_PUSH Pushes a byte on top of the stack
Generator for opcode Opcodes.B_SMALLER Checks if the second but top byte is smaller than the top byte and puts the result on top of the stack
Generator for opcode Opcodes.B_SMALLER_EQ Checks if the second but top byte is smaller or equal to the top byte and puts the result on top of the stack
Generator for opcode Opcodes.B_STORE_GLOBAL Put the top byte on the stack into the given address
Generator for opcode Opcodes.B_STORE_GLOBAL_DYNAMIC Put the top byte under the top integer (so the byte at position 5) on the stack into the given address. The address is given by the top integer on the stack.
Generator for opcode Opcodes.B_STORE_LOCAL Takes the top byte from the stack and puts it into the given local address
Generator for opcode Opcodes.B_SUB Subtracts the top two bytes from the stack (it subtracts the top one from the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.D_ABS Put the absolute value of the top double on top of the stack
Generator for opcode Opcodes.D_ADD Adds the top two doubles from the stack and puts the result on top of the stack
Generator for opcode Opcodes.D_BIGGER Checks if the second but top double is bigger than the top double and puts the result on top of the stack
Generator for opcode Opcodes.D_BIGGER_EQ Checks if the second but top double is bigger or equal to the top double and puts the result on top of the stack
Generator for opcode Opcodes.D_DIV Divides the top two doubles from the stack (it divides the top one by the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.DECR_STACK
Generator for opcode Opcodes.D_EQ Checks if the top two doubles are equal and puts the result on top of the stack
This is a typealias to ShasamblyOpcodeLGetLocal Doubles and longs both have 8 Bytes, so it is not necessary to have an own bytecode for getting a double, you can just use the long one
Generator for opcode Opcodes.D_MOD Divides the top two doubles from the stack (it divides the top one by the bottom one) and puts the modulo result on top of the stack
Generator for opcode Opcodes.D_MUL Multiplies the top two doubles from the stack and puts the result on top of the stack
Generator for opcode Opcodes.D_NEG Negate the top double of the stack
This is a typealias to ShasamblyOpcodeLPush Longs and doubles both have 8 Bytes, so it is not necessary to have an own bytecode for pushing a double, you can just use the long one
Generator for opcode Opcodes.D_SMALLER Checks if the second but top double is smaller than the top double and puts the result on top of the stack
Generator for opcode Opcodes.D_SMALLER_EQ Checks if the second but top double is smaller or equal to the top double and puts the result on top of the stack
This is a typealias to ShasamblyOpcodeLStoreLocal Longs and doubles both have 8 Bytes, so it is not necessary to have an own bytecode for storing a double, you can just use the long one
Generator for opcode Opcodes.D_SUB Subtracts the top two doubles from the stack (it subtracts the top one from the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.F_ABS Put the absolute value of the top float on top of the stack
Generator for opcode Opcodes.F_ADD Adds the top two floats from the stack and puts the result on top of the stack
Generator for opcode Opcodes.F_BIGGER Checks if the second but top float is bigger than the top float and puts the result on top of the stack
Generator for opcode Opcodes.F_BIGGER_EQ Checks if the second but top float is bigger or equal to the top float and puts the result on top of the stack
Generator for opcode Opcodes.F_DIV Divides the top two floats from the stack (it divides the top one by the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.F_EQ Checks if the top two floats are equal and puts the result on top of the stack
This is a typealias to ShasamblyOpcodeIGetLocal Integers and floats both have 4 Bytes, so it is not necessary to have an own bytecode for getting a float, you can just use the integer one
Generator for opcode Opcodes.F_MOD Divides the top two floats from the stack (it divides the top one by the bottom one) and puts the modulo result on top of the stack
Generator for opcode Opcodes.F_MUL Multiplies the top two floats from the stack and puts the result on top of the stack
Generator for opcode Opcodes.F_NEG Negate the top float of the stack
This is a typealias to ShasamblyOpcodeIPush Integers and floats both have 8 Bytes, so it is not necessary to have an own bytecode for pushing a float, you can just use the integer one
Generator for opcode Opcodes.F_SMALLER Checks if the second but top float is smaller than the top float and puts the result on top of the stack
Generator for opcode Opcodes.F_SMALLER_EQ Checks if the second but top float is smaller or equal to the top float and puts the result on top of the stack
This is a typealias to ShasamblyOpcodeIStoreLocal Integers and floats both have 4 Bytes, so it is not necessary to have an own bytecode for storing a float, you can just use the integer one
Generator for opcode Opcodes.F_SUB Subtracts the top two floats from the stack (it subtracts the top one from the bottom one) and puts the result on top of the stack
An abstract opcode for getting locals This is not a final opcode. It is just the shared code between all get local opcodes
Generator for opcode Opcodes.GLOB_ADDR Converts a local address into a global address. Leaves the global address on top of the stack
Generator for opcode Opcodes.I_ABS Put the absolute value of the top integer on top of the stack
Generator for opcode Opcodes.I_ADD Adds the top two integers from the stack and puts the result on top of the stack
Generator for opcode Opcodes.I_BIGGER Checks if the second but top integer is bigger than the top integer and puts the result on top of the stack
Generator for opcode Opcodes.I_BIGGER_EQ Checks if the second but top integer is bigger or equal to the top integer and puts the result on top of the stack
Generator for opcode Opcodes.I_DIV Divides the top two integers from the stack (it divides the top one by the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.I_EQ Checks if the top two integers are equal and puts the result on top of the stack
Generator for opcode Opcodes.I_GET_GLOBAL Put the integer at the given address into the stack
Generator for opcode Opcodes.I_GET_GLOBAL_DYNAMIC Put the integer at the given position on top of the stack. The position is given by the top integer on the stack.
Generator for opcode Opcodes.I_GET_LOCAL Gets a short from the local variables at a given local address and puts it on top of the stack
Generator for opcode Opcodes.I_MOD Divides the top two integers from the stack (it divides the top one by the bottom one) and puts the modulo result on top of the stack
Generator for opcode Opcodes.I_MUL Multiplies the top two integers from the stack and puts the result on top of the stack
Generator for opcode Opcodes.INCR_STACK
Generator for opcode Opcodes.I_NEG Negate the top integer of the stack
Generator for opcode Opcodes.INVOKE_NATIVE Invokes a shasambly native function The ids are provided by com.shakelang.shake.shasambly.interpreter.natives.Natives
Generator for opcode Opcodes.I_PUSH Pushes an integer on top of the stack
Generator for opcode Opcodes.I_SMALLER Checks if the second but top is smaller than the top integer and puts the result on top of the stack
Generator for opcode Opcodes.I_SMALLER_EQ Checks if the second but top integer is smaller or equal to the top integer and puts the result on top of the stack
Generator for opcode Opcodes.I_STORE_GLOBAL Put the top integer on the stack into the given address
Generator for opcode Opcodes.I_STORE_GLOBAL_DYNAMIC Put the top integer under the top integer (so the integer at position 5) on the stack into the given address. The address is given by the top integer on the stack.
Generator for opcode Opcodes.I_STORE_LOCAL Takes the top integer from the stack and puts it into the given local address
Generator for opcode Opcodes.I_SUB Subtracts the top two integers from the stack (it subtracts the top one from the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.JUMP_DYNAMIC. Jumps dynamically to a byte index (not opcode-index!!!) The jump target is taken from the top element on the stack
Generator for opcode Opcodes.JUMP_IF. Jumps to a byte index (not opcode-index!!!) if the byte (or boolean) on top of the stack is true (so it must not be 0x00)
Generator for opcode Opcodes.JUMP_IF. Jumps to an opcode index if the byte (or boolean) on top of the stack is true (so it must not be 0x00)
Generator for opcode Opcodes.JUMP_IF. Jumps to a relative opcode index if the byte (or boolean) on top of the stack is true (so it must not be 0x00)
Generator for opcode Opcodes.JUMP_STATIC
Generator for opcode Opcodes.JUMP_STATIC, but the argument is the index of an opcode and is recalculated in the #generate function
Generator for opcode Opcodes.JUMP_STATIC, but the argument is the index relative index of an opcode and is recalculated in the #generate function
Generator for opcode Opcodes.L_ABS Put the absolute value of the top long on top of the stack
Generator for opcode Opcodes.L_ADD Adds the top two longs from the stack and puts the result on top of the stack
Generator for opcode Opcodes.L_BIGGER Checks if the second but top long is bigger than the top long and puts the result on top of the stack
Generator for opcode Opcodes.L_BIGGER_EQ Checks if the second but top long is bigger or equal to the top long and puts the result on top of the stack
Generator for opcode Opcodes.L_DIV Divides the top two longs from the stack (it divides the top one by the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.L_EQ Checks if the top two longs are equal and puts the result on top of the stack
Generator for opcode Opcodes.L_GET_GLOBAL Put the long at the given address into the stack
Generator for opcode Opcodes.L_GET_GLOBAL_DYNAMIC Put the long at the given position on top of the stack. The position is given by the top integer on the stack.
Generator for opcode Opcodes.L_GET_LOCAL Gets a long from the local variables at a given local address and puts it on top of the stack
Generator for opcode Opcodes.L_MOD Divides the top two longs from the stack (it divides the top one by the bottom one) and puts the modulo result on top of the stack
Generator for opcode Opcodes.L_MUL Multiplies the top two longs from the stack and puts the result on top of the stack
Generator for opcode Opcodes.L_NEG Negate the top long of the stack
Generator for opcode Opcodes.L_PUSH Pushes a long on top of the stack
Generator for opcode Opcodes.L_SMALLER Checks if the second but top long is smaller than the top long and puts the result on top of the stack
Generator for opcode Opcodes.L_SMALLER_EQ Checks if the second but top long is smaller or equal to the top long and puts the result on top of the stack
Generator for opcode Opcodes.L_STORE_GLOBAL Put the top long on the stack into the given address
Generator for opcode Opcodes.L_STORE_GLOBAL_DYNAMIC Put the top long under the top integer (so the long at position 5) on the stack into the given address. The address is given by the top integer on the stack.
Generator for opcode Opcodes.L_STORE_LOCAL Takes the top long from the stack and puts it into the given local address
Generator for opcode Opcodes.L_SUB Subtracts the top two longs from the stack (it subtracts the top one from the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.S_ABS Put the absolute value of the top short on top of the stack
Generator for opcode Opcodes.S_ADD Adds the top two shorts from the stack and puts the result on top of the stack
Generator for opcode Opcodes.S_BIGGER Checks if the second but top short is bigger than the top short and puts the result on top of the stack
Generator for opcode Opcodes.S_BIGGER_EQ Checks if the second but top short is bigger or equal to the top short and puts the result on top of the stack
Generator for opcode Opcodes.S_DIV Divides the top two shorts from the stack (it divides the top one by the bottom one) and puts the result on top of the stack
Generator for opcode Opcodes.S_EQ Checks if the top two shorts are equal and puts the result on top of the stack
Generator for opcode Opcodes.S_GET_GLOBAL Put the short at the given address into the stack
Generator for opcode Opcodes.S_GET_GLOBAL_DYNAMIC Put the short at the given position on top of the stack. The position is given by the top integer on the stack.
Generator for opcode Opcodes.S_GET_LOCAL Gets a short from the local variables at a given local address and puts it on top of the stack
Generator for opcode Opcodes.S_MOD Divides the top two shorts from the stack (it divides the top one by the bottom one) and puts the modulo result on top of the stack
Generator for opcode Opcodes.S_MUL Multiplies the top two shorts from the stack and puts the result on top of the stack
Generator for opcode Opcodes.S_NEG Negate the top short of the stack
Generator for opcode Opcodes.S_PUSH Pushes a short on top of the stack
Generator for opcode Opcodes.S_SMALLER Checks if the second but top short is smaller than the top short and puts the result on top of the stack
Generator for opcode Opcodes.S_SMALLER_EQ Checks if the second but top short is smaller or equal to the top short and puts the result on top of the stack
Generator for opcode Opcodes.S_STORE_GLOBAL Put the top short on the stack into the given address
Generator for opcode Opcodes.S_STORE_GLOBAL_DYNAMIC Put the top short under the top integer (so the short at position 5) on the stack into the given address. The address is given by the top integer on the stack.
Generator for opcode Opcodes.S_STORE_LOCAL Takes the top short from the stack and puts it into the given local address
Generator for opcode Opcodes.S_SUB Subtracts the top two shorts from the stack (it subtracts the top one from the bottom one) and puts the result on top of the stack
An abstract opcode for storing locals This is not a final opcode. It is just the shared code between all store-local-opcodes
An abstract opcode for operations This is not a final opcode. It is just the shared code between all operation opcodes
Generator for primitive cast Opcodes.PRIMITIVE_CAST Casts the top value on the stack from and to the given primitive type.
An abstract opcode for setting globals with a dynamic address This is not a final opcode. It is just the shared code between all store-global-dynamic opcodes
An abstract opcode for setting globals with a static address This is not a final opcode. It is just the shared code between all store-global opcodes