Z / libzlang 0.29.0
C99 runtime library and the Zlang 0.29 source-to-source compiler
Loading...
Searching...
No Matches
planner.h
Go to the documentation of this file.
1
4
5#ifndef ZLANG_COMPILER_PLANNER_H
6#define ZLANG_COMPILER_PLANNER_H
7
9
10#include <stdbool.h>
11#include <stddef.h>
12#include <stdint.h>
13
14/* The memory planner maps declarations to storage classes. It performs no
15 allocation: the caller owns the entry array. */
16
17#define ZLANG_DEFAULT_STACK_LIMIT 4096U
18
20
26
33
35 size_t capacity, uint32_t stack_limit);
36
37bool zlang_plan_memory(const zlang_program_t *program, zlang_memory_plan_t *plan);
38
40 const zlang_ast_statement_t *statement);
41
42#endif /* ZLANG_COMPILER_PLANNER_H */
Flat abstract syntax tree used by the compiler.
zlang_storage_t zlang_plan_storage_for(const zlang_memory_plan_t *plan, const zlang_ast_statement_t *statement)
Definition planner.c:224
bool zlang_plan_memory(const zlang_program_t *program, zlang_memory_plan_t *plan)
Definition planner.c:200
void zlang_memory_plan_init(zlang_memory_plan_t *plan, zlang_memory_plan_entry_t *entries, size_t capacity, uint32_t stack_limit)
Definition planner.c:9
zlang_storage_t
Definition planner.h:19
@ zlang_storage_automatic_
Definition planner.h:19
@ zlang_storage_static_
Definition planner.h:19
Definition ast.h:126
Definition planner.h:21
zlang_storage_t storage_
Definition planner.h:24
uint32_t size_
Definition planner.h:23
const zlang_ast_statement_t * statement_
Definition planner.h:22
Definition planner.h:27
size_t capacity_
Definition planner.h:29
zlang_memory_plan_entry_t * entries_
Definition planner.h:28
uint32_t stack_limit_
Definition planner.h:31
size_t count_
Definition planner.h:30
Definition ast.h:189