ExecutionContext

public class ExecutionContext

Class ExecutionContext. Provides executioncontext functionality for the Hytale server.

java.lang.Object > ExecutionContext

Field Summary

scope

protected Scope scope

Field scope.

operandStack

protected Operand[] operandStack

Field operandStack.

stackTop

protected int stackTop

Field stackTop.

lastPushedType

protected ValueType lastPushedType

Field lastPushedType.

combatConfig

protected String combatConfig

Field combatConfig.

oldScope

final Scope oldScope

Field oldScope.

op

final Operand op

Field op.

supplier

final Supplier supplier

Field supplier.

supplier2

final DoubleSupplier supplier2

Field supplier2.

supplier3

final BooleanSupplier supplier3

Field supplier3.

supplier4

final Supplier supplier4

Field supplier4.

supplier5

final Supplier supplier5

Field supplier5.

supplier6

final Supplier supplier6

Field supplier6.

function

final Scope.Function function

Field function.

array

final double[] array

Field array.

type

public ValueType type

Field type.

string

public String string

Field string.

number

public double number

Field number.

bool

public boolean bool

Field bool.

numberArray

public double[] numberArray

Field numberArray.

stringArray

public String[] stringArray

Field stringArray.

boolArray

public boolean[] boolArray

Field boolArray.

Method Detail

ExecutionContext

public public ExecutionContext (final Scope scope)

Method ExecutionContext.

Parameters:
final Scope scope

execute

public ValueType execute (@Nonnull final List instructions, final Scope scope)

Method execute.

Parameters:
@Nonnull final List instructions
final Scope scope

getType

public ValueType getType ()

Method getType.

top

public Operand top ()

Method top.

setScope

public Scope setScope (final Scope scope)

Method setScope.

Parameters:
final Scope scope

getScope

public Scope getScope ()

Method getScope.

getCombatConfig

public String getCombatConfig ()

Method getCombatConfig.

setCombatConfig

public void setCombatConfig (final String combatConfig)

Method setCombatConfig.

Parameters:
final String combatConfig

getInteractionVars

public String> getInteractionVars ()

Method getInteractionVars.

setInteractionVars

public void setInteractionVars (final Map interactionVars)

Method setInteractionVars.

Parameters:
final Map interactionVars

push

protected Operand push ()

Method push.

pushEmptyArray

public void pushEmptyArray ()

Method pushEmptyArray.

popPush

protected Operand popPush (final int popCount)

Method popPush.

Parameters:
final int popCount

popPushEmptyArray

public void popPushEmptyArray (final int popCount)

Method popPushEmptyArray.

Parameters:
final int popCount

pop

protected Operand pop ()

Method pop.

popNumber

public double popNumber ()

Method popNumber.

popInt

public int popInt ()

Method popInt.

popString

public String popString ()

Method popString.

popBoolean

public boolean popBoolean ()

Method popBoolean.

popNumberArray

public double[] popNumberArray ()

Method popNumberArray.

popStringArray

public String[] popStringArray ()

Method popStringArray.

popBooleanArray

public boolean[] popBooleanArray ()

Method popBooleanArray.

popAsString

public String popAsString ()

Method popAsString.

switch

public return switch (op.type)

Method switch.

Parameters:
op.type op.type

get

protected Operand get (final int index)

Method get.

Parameters:
final int index

getNumber

public double getNumber (final int index)

Method getNumber.

Parameters:
final int index

getInt

public int getInt (final int index)

Method getInt.

Parameters:
final int index

getString

public String getString (final int index)

Method getString.

Parameters:
final int index

getBoolean

public boolean getBoolean (final int index)

Method getBoolean.

Parameters:
final int index

getNumberArray

public double[] getNumberArray (final int index)

Method getNumberArray.

Parameters:
final int index

getStringArray

public String[] getStringArray (final int index)

Method getStringArray.

Parameters:
final int index

getBooleanArray

public boolean[] getBooleanArray (final int index)

Method getBooleanArray.

Parameters:
final int index

genPUSH

static Instruction genPUSH (final String value)

Method genPUSH.

Parameters:
final String value

genPUSHEmptyArray

static Instruction genPUSHEmptyArray ()

Method genPUSHEmptyArray.

genREAD

static Instruction genREAD (final String ident, @Nonnull final ValueType type, @Nullable final Scope scope)

Method genREAD.

Parameters:
final String ident
@Nonnull final ValueType type
@Nullable final Scope scope

genCALL

static Instruction genCALL (final String ident, final int numArgs, @Nullable final Scope scope)

Method genCALL.

Parameters:
final String ident
final int numArgs
@Nullable final Scope scope

genNumberPACK

static Instruction genNumberPACK (final int size)

Method genNumberPACK.

Parameters:
final int size

genStringPACK

static Instruction genStringPACK (final int size)

Method genStringPACK.

Parameters:
final int size

genBooleanPACK

static Instruction genBooleanPACK (final int size)

Method genBooleanPACK.

Parameters:
final int size

genPACK

static Instruction genPACK (@Nonnull final ValueType arrayType, final int size)

Method genPACK.

Parameters:
@Nonnull final ValueType arrayType
final int size

toString

public String toString ()

Method toString.

set

public ValueType set (final String value)

Method set.

Parameters:
final String value

setEmptyArray

public ValueType setEmptyArray ()

Method setEmptyArray.

reInit

private void reInit (final ValueType type)

Method reInit.

Parameters:
final ValueType type