Z / libzlang 0.29.0
C99 runtime library and the Zlang 0.29 source-to-source compiler
Loading...
Searching...
No Matches
planner.h File Reference

Compile-time memory placement API. More...

#include "zlang/compiler/ast.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  zlang_memory_plan_entry_t
struct  zlang_memory_plan_t

Macros

#define ZLANG_DEFAULT_STACK_LIMIT   4096U

Typedefs

typedef enum zlang_storage_t zlang_storage_t
typedef struct zlang_memory_plan_entry_t zlang_memory_plan_entry_t
typedef struct zlang_memory_plan_t zlang_memory_plan_t

Enumerations

enum  zlang_storage_t { zlang_storage_automatic_ , zlang_storage_static_ }

Functions

void zlang_memory_plan_init (zlang_memory_plan_t *plan, zlang_memory_plan_entry_t *entries, size_t capacity, uint32_t stack_limit)
bool zlang_plan_memory (const zlang_program_t *program, zlang_memory_plan_t *plan)
zlang_storage_t zlang_plan_storage_for (const zlang_memory_plan_t *plan, const zlang_ast_statement_t *statement)

Detailed Description

Compile-time memory placement API.

Macro Definition Documentation

◆ ZLANG_DEFAULT_STACK_LIMIT

#define ZLANG_DEFAULT_STACK_LIMIT   4096U

Typedef Documentation

◆ zlang_memory_plan_entry_t

typedef struct zlang_memory_plan_entry_t zlang_memory_plan_entry_t

◆ zlang_memory_plan_t

typedef struct zlang_memory_plan_t zlang_memory_plan_t

◆ zlang_storage_t

Enumeration Type Documentation

◆ zlang_storage_t

Enumerator
zlang_storage_automatic_ 
zlang_storage_static_ 

Function Documentation

◆ zlang_memory_plan_init()

void zlang_memory_plan_init ( zlang_memory_plan_t * plan,
zlang_memory_plan_entry_t * entries,
size_t capacity,
uint32_t stack_limit )

◆ zlang_plan_memory()

bool zlang_plan_memory ( const zlang_program_t * program,
zlang_memory_plan_t * plan )

◆ zlang_plan_storage_for()

zlang_storage_t zlang_plan_storage_for ( const zlang_memory_plan_t * plan,
const zlang_ast_statement_t * statement )