mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
xmake initial build, uint -> uint32_t (stdlib test 03 fails with xmake, possible due to newer c and c++ versions)
This commit is contained in:
parent
c348af161c
commit
6c19722d9e
11 changed files with 64 additions and 46 deletions
|
|
@ -11,7 +11,7 @@ Bytefile *run_with_imports(Bytefile *root, int argc, char **argv,
|
|||
|
||||
// ---
|
||||
|
||||
enum BUILTIN : uint {
|
||||
enum BUILTIN : uint32_t {
|
||||
BUILTIN_Luppercase, // 0
|
||||
BUILTIN_Llowercase, // 1
|
||||
BUILTIN_Lassert, // 2
|
||||
|
|
|
|||
|
|
@ -239,4 +239,4 @@ struct SMInstr {
|
|||
|
||||
std::vector<SMInstr> parse_sm(std::istream &in);
|
||||
|
||||
std::optional<SMInstr> parse_sm(std::string &line);
|
||||
std::optional<SMInstr> parse_sm(const std::string &line);
|
||||
|
|
|
|||
|
|
@ -9,19 +9,19 @@
|
|||
|
||||
/* The unpacked representation of bytecode file */
|
||||
typedef struct {
|
||||
uint main_offset; /* offset of the function 'main' */
|
||||
char *string_ptr; /* A pointer to the beginning of the string table */
|
||||
int *imports_ptr; /* A pointer to the beginning of imports table */
|
||||
int *public_ptr; /* A pointer to the beginning of publics table */
|
||||
char *code_ptr; /* A pointer to the bytecode itself */
|
||||
void **global_ptr; /* A pointer to the global area */
|
||||
char *substs_ptr; /* A pointer to the substs area */
|
||||
int code_size; /* The size (in bytes) of code */
|
||||
uint stringtab_size; /* The size (in bytes) of the string table */
|
||||
uint global_area_size; /* The size (in words) of global area */
|
||||
uint substs_area_size; /* number of required address substitutions */
|
||||
uint imports_number; /* The number of imports */
|
||||
uint public_symbols_number; /* The number of public symbols */
|
||||
uint32_t main_offset; /* offset of the function 'main' */
|
||||
char *string_ptr; /* A pointer to the beginning of the string table */
|
||||
int32_t *imports_ptr; /* A pointer to the beginning of imports table */
|
||||
int32_t *public_ptr; /* A pointer to the beginning of publics table */
|
||||
char *code_ptr; /* A pointer to the bytecode itself */
|
||||
void **global_ptr; /* A pointer to the global area */
|
||||
char *substs_ptr; /* A pointer to the substs area */
|
||||
int32_t code_size; /* The size (in bytes) of code */
|
||||
uint32_t stringtab_size; /* The size (in bytes) of the string table */
|
||||
uint32_t global_area_size; /* The size (in words) of global area */
|
||||
uint32_t substs_area_size; /* number of required address substitutions */
|
||||
uint32_t imports_number; /* The number of imports */
|
||||
uint32_t public_symbols_number; /* The number of public symbols */
|
||||
char buffer[0];
|
||||
} Bytefile;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue