opcode_t serializer_get_opcode (opcode_counter_t oc) { if (bytecode_data.opcodes == NULL) { return serializer_get_op_meta (oc).op; } JERRY_ASSERT (oc < bytecode_data.opcodes_count); return bytecode_data.opcodes[oc]; }
/** * Get byte-code instruction from current scope, or specified byte-code array * * @return byte-code instruction */ vm_instr_t serializer_get_instr (const bytecode_data_header_t *bytecode_data_p, /**< pointer to byte-code data (or NULL, * if instruction should be taken from * instruction list of current scope) */ vm_instr_counter_t oc) /**< position of the intruction */ { if (bytecode_data_p == NULL) { return serializer_get_op_meta (oc).op; } else { JERRY_ASSERT (oc < bytecode_data_p->instrs_count); return bytecode_data_p->instrs_p[oc]; } } /* serializer_get_instr */
/** * Get byte-code instruction from current scope, or specified byte-code array * * @return byte-code instruction */ vm_instr_t serializer_get_instr (const vm_instr_t *instrs_p, /**< pointer to byte-code array (or NULL, * if instruction should be taken from * instruction list of current scope) */ vm_instr_counter_t oc) /**< position of the intruction */ { if (instrs_p == NULL) { return serializer_get_op_meta (oc).op; } else { JERRY_ASSERT (oc < GET_BYTECODE_HEADER (instrs_p)->instructions_number); return instrs_p[oc]; } } /* serializer_get_instr */