Difference between revisions of "Byte Code"
Line 183: | Line 183: | ||
===Stack transition=== | ===Stack transition=== | ||
− | ... -> | + | ... -> value |
===Arguments=== | ===Arguments=== | ||
− | * | + | * value: 8 bits INTEGER_8 |
==BC_INT16== | ==BC_INT16== | ||
Line 193: | Line 193: | ||
===Stack transition=== | ===Stack transition=== | ||
− | ... -> | + | ... -> value |
===Arguments=== | ===Arguments=== | ||
− | * | + | * value: 16 bits INTEGER_16 |
==BC_INT32== | ==BC_INT32== | ||
Line 203: | Line 203: | ||
===Stack transition=== | ===Stack transition=== | ||
− | ... -> | + | ... -> value |
===Arguments=== | ===Arguments=== | ||
− | * | + | * value: 32 bits INTEGER_32 |
==BC_INT64== | ==BC_INT64== | ||
Line 213: | Line 213: | ||
===Stack transition=== | ===Stack transition=== | ||
− | ... -> | + | ... -> value |
===Arguments=== | ===Arguments=== | ||
− | * | + | * value: 64 bits INTEGER_64 |
==BC_CAST_CHAR8== | ==BC_CAST_CHAR8== | ||
Line 230: | Line 230: | ||
===Stack transition=== | ===Stack transition=== | ||
− | ... -> | + | ... -> value |
===Arguments=== | ===Arguments=== | ||
− | * | + | * value: 8 bits NATURAL_8 |
==BC_UINT16== | ==BC_UINT16== | ||
Line 240: | Line 240: | ||
===Stack transition=== | ===Stack transition=== | ||
− | ... -> | + | ... -> value |
===Arguments=== | ===Arguments=== | ||
− | * | + | * value: 16 bits NATURAL_16 |
==BC_UINT32== | ==BC_UINT32== | ||
Line 250: | Line 250: | ||
===Stack transition=== | ===Stack transition=== | ||
− | ... -> | + | ... -> value |
===Arguments=== | ===Arguments=== | ||
− | * | + | * value: 32 bits NATURAL_32 |
==BC_UINT64== | ==BC_UINT64== | ||
Line 260: | Line 260: | ||
===Stack transition=== | ===Stack transition=== | ||
− | ... -> | + | ... -> value |
===Arguments=== | ===Arguments=== | ||
− | * | + | * value: 64 bits NATURAL_64 |
==BC_TUPLE== | ==BC_TUPLE== | ||
==BC_PTUPLE== | ==BC_PTUPLE== |
Revision as of 08:02, 7 July 2006
Contents
- 1 Introduction
- 2 Byte codes
- 2.1 BC_START
- 2.2 BC_PRECOND
- 2.3 BC_POSTCOND
- 2.4 BC_DEFERRED
- 2.5 BC_REVERSE
- 2.6 BC_CHECK
- 2.7 BC_ASSERT
- 2.8 BC_NULL
- 2.9 BC_PRE
- 2.10 BC_PST
- 2.11 BC_CHK
- 2.12 BC_LINV
- 2.13 BC_LVAR
- 2.14 BC_INV
- 2.15 BC_END_ASSERT
- 2.16 BC_TAG
- 2.17 BC_NOTAG
- 2.18 BC_JMP_F
- 2.19 BC_JMP
- 2.20 BC_LOOP
- 2.21 BC_END_VARIANT
- 2.22 BC_INIT_VARIANT
- 2.23 BC_DEBUG
- 2.24 BC_RASSIGN
- 2.25 BC_LASSIGN
- 2.26 BC_ASSIGN
- 2.27 BC_CREATE
- 2.28 BC_CTYPE
- 2.29 BC_CARG
- 2.30 BC_CLIKE
- 2.31 BC_CCUR
- 2.32 BC_INSPECT
- 2.33 BC_RANGE
- 2.34 BC_INSPECT_EXCEP
- 2.35 BC_LREVERSE
- 2.36 BC_RREVERSE
- 2.37 BC_FEATURE
- 2.38 BC_METAMORPHOSE
- 2.39 BC_CURRENT
- 2.40 BC_ROTATE
- 2.41 BC_FEATURE_INV
- 2.42 BC_ATTRIBUTE
- 2.43 BC_ATTRIBUTE_INV
- 2.44 BC_EXTERN
- 2.45 BC_EXTERN_INV
- 2.46 BC_RESULT
- 2.47 BC_LOCAL
- 2.48 BC_ARG
- 2.49 BC_UPLUS
- 2.50 BC_UMINUS
- 2.51 BC_NOT
- 2.52 BC_LT
- 2.53 BC_GT
- 2.54 BC_MINUS
- 2.55 BC_XOR
- 2.56 BC_GE
- 2.57 BC_EQ
- 2.58 BC_NE
- 2.59 BC_STAR
- 2.60 BC_POWER
- 2.61 BC_LE
- 2.62 BC_DIV
- 2.63 BC_NHOOK
- 2.64 BC_AND
- 2.65 BC_SLASH
- 2.66 BC_MOD
- 2.67 BC_PLUS
- 2.68 BC_OR
- 2.69 BC_ADDR
- 2.70 BC_STRING
- 2.71 BC_AND_THEN
- 2.72 BC_OR_ELSE
- 2.73 BC_SPCREATE
- 2.74 BC_TUPLE_ACCESS
- 2.75 BC_JMP_T
- 2.76 BC_TUPLE_ASSIGN
- 2.77 BC_RESCUE
- 2.78 BC_END_RESCUE
- 2.79 BC_RETRY
- 2.80 BC_EXP_ASSIGN
- 2.81 BC_CLONE
- 2.82 BC_EXP_EXCEP
- 2.83 BC_VOID
- 2.84 BC_NONE_ASSIGN
- 2.85 BC_LEXP_ASSIGN
- 2.86 BC_REXP_ASSIGN
- 2.87 BC_CLONE_ARG
- 2.88 BC_NO_CLONE_ARG
- 2.89 BC_FALSE_COMPAR
- 2.90 BC_TRUE_COMPAR
- 2.91 BC_STANDARD_EQUAL
- 2.92 BC_BIT_STD_EQUAL
- 2.93 BC_HOOK
- 2.94 BC_BIT
- 2.95 BC_ARRAY
- 2.96 BC_RETRIEVE_OLD
- 2.97 BC_FLOAT
- 2.98 BC_OLD
- 2.99 BC_ADD_STRIP
- 2.100 BC_END_STRIP
- 2.101 BC_LBIT_ASSIGN
- 2.102 BC_RAISE_PREC
- 2.103 BC_GOTO_BODY
- 2.104 BC_NOT_REC
- 2.105 BC_END_PRE
- 2.106 BC_CAST_NATURAL
- 2.107 BC_CAST_INTEGER
- 2.108 BC_CAST_REAL_32
- 2.109 BC_CAST_REAL_64
- 2.110 BC_INV_NULL
- 2.111 BC_CREAT_INV
- 2.112 BC_END_EVAL_OLD
- 2.113 BC_START_EVAL_OLD
- 2.114 BC_OBJECT_ADDR
- 2.115 BC_PFEATURE
- 2.116 BC_PFEATURE_INV
- 2.117 BC_PEXTERN
- 2.118 BC_PEXTERN_INV
- 2.119 BC_PARRAY
- 2.120 BC_PATTRIBUTE
- 2.121 BC_PATTRIBUTE_INV
- 2.122 BC_PEXP_ASSIGN
- 2.123 BC_PASSIGN
- 2.124 BC_PREVERSE
- 2.125 BC_PCLIKE
- 2.126 BC_OBJECT_EXPR_ADDR
- 2.127 BC_RESERVE
- 2.128 BC_POP
- 2.129 BC_REF_TO_PTR
- 2.130 BC_RCREATE
- 2.131 BC_GEN_PARAM_CREATE
- 2.132 BC_CAST_CHAR32
- 2.133 BC_NULL_POINTER
- 2.134 BC_BASIC_OPERATIONS
- 2.135 BC_MAX
- 2.136 BC_MIN
- 2.137 BC_GENERATOR
- 2.138 BC_OFFSET
- 2.139 BC_ZERO
- 2.140 BC_ONE
- 2.141 BC_THREE_WAY_COMPARISON
- 2.142 BC_INT_BIT_OP
- 2.143 BC_INT_BIT_AND
- 2.144 BC_INT_BIT_OR
- 2.145 BC_INT_BIT_XOR
- 2.146 BC_INT_BIT_NOT
- 2.147 BC_INT_BIT_SHIFT_LEFT
- 2.148 BC_INT_BIT_SHIFT_RIGHT
- 2.149 BC_INT_BIT_TEST
- 2.150 BC_INT_SET_BIT
- 2.151 BC_INT_SET_BIT_WITH_MASK
- 2.152 BC_CHAR
- 2.153 BC_BOOL
- 2.154 BC_DOUBLE
- 2.155 BC_WCHAR
- 2.156 BC_INT8
- 2.157 BC_INT16
- 2.158 BC_INT32
- 2.159 BC_INT64
- 2.160 BC_CAST_CHAR8
- 2.161 BC_ONCE_STRING
- 2.162 BC_ALLOCATE_ONCE_STRINGS
- 2.163 BC_CCLONE
- 2.164 BC_UINT8
- 2.165 BC_UINT16
- 2.166 BC_UINT32
- 2.167 BC_UINT64
- 2.168 BC_TUPLE
- 2.169 BC_PTUPLE
Introduction
Below is a description of all opcodes we current support in the Eiffel interpreter. We only display their name as defined in C/run-time/rt_interp.h. One has to use this file to avoid possible change in values of opcode which happens time to time since it is a closed format.
Byte codes
BC_START
Description
Entry point of a routine.
arguments
- routine_id: 32 bits
- body_id: 32 bits
- result type: 32 bits
- number of arguments: 16 bits
- number of locals: 16 bits
- type of each local
- flag for argument cloning: 8 bits (If it is set (aka different of BC_NO_CLONE_ARG), read the type of arguments which need cloning).
- routine name: null terminated CHARACTER_8 string
- dynamic type where feature is written in: 16 bits
- flag for rescue clause presence: 8 bits (If present, offset to the rescue clause: 32 bits).
BC_PRECOND
BC_POSTCOND
BC_DEFERRED
BC_REVERSE
BC_CHECK
BC_ASSERT
BC_NULL
BC_PRE
BC_PST
BC_CHK
BC_LINV
BC_LVAR
BC_INV
BC_END_ASSERT
BC_TAG
BC_NOTAG
BC_JMP_F
BC_JMP
BC_LOOP
BC_END_VARIANT
BC_INIT_VARIANT
BC_DEBUG
BC_RASSIGN
BC_LASSIGN
BC_ASSIGN
BC_CREATE
BC_CTYPE
BC_CARG
BC_CLIKE
BC_CCUR
BC_INSPECT
BC_RANGE
BC_INSPECT_EXCEP
BC_LREVERSE
BC_RREVERSE
BC_FEATURE
BC_METAMORPHOSE
BC_CURRENT
BC_ROTATE
BC_FEATURE_INV
BC_ATTRIBUTE
BC_ATTRIBUTE_INV
BC_EXTERN
BC_EXTERN_INV
BC_RESULT
BC_LOCAL
BC_ARG
BC_UPLUS
BC_UMINUS
BC_NOT
BC_LT
BC_GT
BC_MINUS
BC_XOR
BC_GE
BC_EQ
BC_NE
BC_STAR
BC_POWER
BC_LE
BC_DIV
BC_NHOOK
BC_AND
BC_SLASH
BC_MOD
BC_PLUS
BC_OR
BC_ADDR
BC_STRING
BC_AND_THEN
BC_OR_ELSE
BC_SPCREATE
BC_TUPLE_ACCESS
BC_JMP_T
BC_TUPLE_ASSIGN
BC_RESCUE
BC_END_RESCUE
BC_RETRY
BC_EXP_ASSIGN
BC_CLONE
BC_EXP_EXCEP
BC_VOID
BC_NONE_ASSIGN
BC_LEXP_ASSIGN
BC_REXP_ASSIGN
BC_CLONE_ARG
BC_NO_CLONE_ARG
BC_FALSE_COMPAR
BC_TRUE_COMPAR
BC_STANDARD_EQUAL
BC_BIT_STD_EQUAL
BC_HOOK
BC_BIT
BC_ARRAY
BC_RETRIEVE_OLD
BC_FLOAT
BC_OLD
BC_ADD_STRIP
BC_END_STRIP
BC_LBIT_ASSIGN
BC_RAISE_PREC
BC_GOTO_BODY
BC_NOT_REC
BC_END_PRE
BC_CAST_NATURAL
BC_CAST_INTEGER
BC_CAST_REAL_32
BC_CAST_REAL_64
BC_INV_NULL
BC_CREAT_INV
BC_END_EVAL_OLD
BC_START_EVAL_OLD
BC_OBJECT_ADDR
BC_PFEATURE
BC_PFEATURE_INV
BC_PEXTERN
BC_PEXTERN_INV
BC_PARRAY
BC_PATTRIBUTE
BC_PATTRIBUTE_INV
BC_PEXP_ASSIGN
BC_PASSIGN
BC_PREVERSE
BC_PCLIKE
BC_OBJECT_EXPR_ADDR
BC_RESERVE
BC_POP
BC_REF_TO_PTR
BC_RCREATE
BC_GEN_PARAM_CREATE
BC_CAST_CHAR32
BC_NULL_POINTER
BC_BASIC_OPERATIONS
BC_MAX
BC_MIN
BC_GENERATOR
BC_OFFSET
BC_ZERO
BC_ONE
BC_THREE_WAY_COMPARISON
BC_INT_BIT_OP
BC_INT_BIT_AND
BC_INT_BIT_OR
BC_INT_BIT_XOR
BC_INT_BIT_NOT
BC_INT_BIT_SHIFT_LEFT
BC_INT_BIT_SHIFT_RIGHT
BC_INT_BIT_TEST
BC_INT_SET_BIT
BC_INT_SET_BIT_WITH_MASK
BC_CHAR
BC_BOOL
BC_DOUBLE
BC_WCHAR
BC_INT8
Description
Load a INTEGER_8 on the stack.
Stack transition
... -> value
Arguments
- value: 8 bits INTEGER_8
BC_INT16
Description
Load a INTEGER_16 on the stack.
Stack transition
... -> value
Arguments
- value: 16 bits INTEGER_16
BC_INT32
Description
Load a INTEGER_32 on the stack.
Stack transition
... -> value
Arguments
- value: 32 bits INTEGER_32
BC_INT64
Description
Load a INTEGER_64 on the stack.
Stack transition
... -> value
Arguments
- value: 64 bits INTEGER_64
BC_CAST_CHAR8
BC_ONCE_STRING
BC_ALLOCATE_ONCE_STRINGS
BC_CCLONE
BC_UINT8
Description
Load a NATURAL_8 on the stack.
Stack transition
... -> value
Arguments
- value: 8 bits NATURAL_8
BC_UINT16
Description
Load a NATURAL_16 on the stack.
Stack transition
... -> value
Arguments
- value: 16 bits NATURAL_16
BC_UINT32
Description
Load a NATURAL_32 on the stack.
Stack transition
... -> value
Arguments
- value: 32 bits NATURAL_32
BC_UINT64
Description
Load a NATURAL_64 on the stack.
Stack transition
... -> value
Arguments
- value: 64 bits NATURAL_64