mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
move op_names
This commit is contained in:
parent
0f543a2c96
commit
a08efc0a6a
@ -36,7 +36,7 @@ def remove_copied_include(text):
|
||||
key = key[9:]
|
||||
if key in ["user_config.h", "cJSONw.hpp"]:
|
||||
return m.group(0)
|
||||
if key == "opcodes.h":
|
||||
if "opcodes.h" in key:
|
||||
return OPCODES_TEXT
|
||||
assert key in copied, f"include {key} not found"
|
||||
return ""
|
||||
|
@ -13,12 +13,6 @@ enum Opcode: uint8_t {
|
||||
#undef OPCODE
|
||||
};
|
||||
|
||||
inline const char* OP_NAMES[] = {
|
||||
#define OPCODE(name) #name,
|
||||
#include "opcodes.h"
|
||||
#undef OPCODE
|
||||
};
|
||||
|
||||
struct Bytecode{
|
||||
uint8_t op;
|
||||
uint16_t arg;
|
||||
|
@ -1,5 +1,11 @@
|
||||
#include "pocketpy/vm.h"
|
||||
|
||||
static const char* OP_NAMES[] = {
|
||||
#define OPCODE(name) #name,
|
||||
#include "pocketpy/opcodes.h"
|
||||
#undef OPCODE
|
||||
};
|
||||
|
||||
namespace pkpy{
|
||||
|
||||
struct JsonSerializer{
|
||||
|
Loading…
x
Reference in New Issue
Block a user