You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bytecode.h 281B

1234567891011121314151617181920212223
  1. #ifndef L2_BYTECODE_H
  2. #define L2_BYTECODE_H
  3. #include <stdint.h>
  4. typedef uint32_t l2_word;
  5. enum l2_opcode {
  6. L2_OP_PUSH,
  7. L2_OP_ADD,
  8. L2_OP_JUMP,
  9. L2_OP_CALL,
  10. L2_OP_ALLOC_STRING,
  11. L2_OP_ALLOC_ARRAY,
  12. L2_OP_HALT,
  13. };
  14. struct l2_op {
  15. enum l2_opcode code;
  16. l2_word val;
  17. };
  18. #endif