List type and generic base type, char wrapper type
This commit is contained in:
parent
647f739d08
commit
471cf679cd
6 changed files with 124 additions and 5 deletions
|
@ -27,6 +27,11 @@
|
|||
#include "../submodules/utilitiec/src/StringView/StringView.h"
|
||||
#include "../submodules/utilitiec/src/Scratchpad/Scratchpad.h"
|
||||
|
||||
typedef struct FlupType_s {
|
||||
ObjectType* type;
|
||||
struct FlupType_s* next;
|
||||
} FlupType;
|
||||
|
||||
typedef struct CallFrame_s {
|
||||
size_t instruction_pointer;
|
||||
/* ip = condition start : start
|
||||
|
@ -34,9 +39,11 @@ typedef struct CallFrame_s {
|
|||
*
|
||||
*/
|
||||
FlupFunction* self_function;
|
||||
|
||||
FlupFunctionAlternative* alternative;
|
||||
FlupFunction* functions; // functions defined in this callframe
|
||||
FlupVariable* variables; // variables defined in this callframe
|
||||
FlupType* types; // types defined in this callframe
|
||||
DynamicArray stack; // Value
|
||||
Scratchpad memory_pad;
|
||||
} CallFrame;
|
||||
|
@ -45,6 +52,7 @@ int CallFrame_Create(CallFrame* self, FlupFunction* self_function);
|
|||
void CallFrame_Destroy(CallFrame* self);
|
||||
|
||||
int CallFrame_DefineVariable(CallFrame* self, StringView name, Value value);
|
||||
int CallFrame_DefineObjectType(CallFrame* self, ObjectType* type);
|
||||
int CallFrame_StackPop(CallFrame* self, Value* dest);
|
||||
int CallFrame_StackPush(CallFrame* self, Value* value);
|
||||
FlupVariable* CallFrame_FindVariable(CallFrame* self, StringView name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue