feat: implement objects and classes
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <vm/fzl_vm_env.h>
|
||||
#include <vm/fzl_vm_object.h>
|
||||
|
||||
// VM descriptor
|
||||
typedef struct
|
||||
@@ -29,6 +30,9 @@ typedef struct
|
||||
// Environment stack
|
||||
fzl_vm_env_t *estack[256];
|
||||
size_t etop;
|
||||
|
||||
fzl_vm_object_t *objects[256];
|
||||
size_t objects_count;
|
||||
} fzl_vm_t;
|
||||
|
||||
// Allocate FZL VM
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef FZL_VM_OBJECT_H
|
||||
#define FZL_VM_OBJECT_H
|
||||
|
||||
#include <common/fzl_value.h>
|
||||
#include <stddef.h>
|
||||
|
||||
// Object descriptor
|
||||
typedef struct
|
||||
{
|
||||
fzl_value_t *values;
|
||||
size_t values_count;
|
||||
} fzl_vm_object_t;
|
||||
|
||||
#endif // FZL_VM_OBJECT_H
|
||||
Reference in New Issue
Block a user