Purple  0.1
Standard Language Specification
Classes | Macros | Typedefs | Functions
llvm_stack_entry.h File Reference
#include "types/number.h"
Include dependency graph for llvm_stack_entry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LLVMStackEntryNode
 Node of a linked list containing information about required stack allocation for a piece of data. Used in the symbol table linked list. Also used as a general-purpose linked list of virtual registers with loaded values. More...
 

Macros

#define type_register   unsigned long long int
 A too-big data type for register indices in case of stress testing. More...
 
#define type_label   unsigned long long int
 A too-big data type for label indices in case of stress testing. More...
 

Typedefs

typedef struct LLVMStackEntryNode LLVMStackEntryNode
 Node of a linked list containing information about required stack allocation for a piece of data. Used in the symbol table linked list. Also used as a general-purpose linked list of virtual registers with loaded values. More...
 

Functions

void initialize_stack_entry_linked_list (LLVMStackEntryNode **head)
 Initialize a stack entry linked list. More...
 
void prepend_stack_entry_linked_list (LLVMStackEntryNode **head, type_register register_index)
 Add a stack entry to a stack entry linked list. More...
 
type_register pop_stack_entry_linked_list (LLVMStackEntryNode **head)
 Pop and free a stack entry from a Stack Entry Node linked list and get its type. More...
 
void free_llvm_stack_entry_node_list (LLVMStackEntryNode *head)
 Free memory used by LLVMStackEntryNode linked lists. More...
 

Detailed Description

Author
Charles Averill
Date
15-Sep-2022

Macro Definition Documentation

◆ type_label

#define type_label   unsigned long long int

A too-big data type for label indices in case of stress testing.

◆ type_register

#define type_register   unsigned long long int

A too-big data type for register indices in case of stress testing.

Typedef Documentation

◆ LLVMStackEntryNode

Node of a linked list containing information about required stack allocation for a piece of data. Used in the symbol table linked list. Also used as a general-purpose linked list of virtual registers with loaded values.

Function Documentation

◆ free_llvm_stack_entry_node_list()

void free_llvm_stack_entry_node_list ( LLVMStackEntryNode head)

Free memory used by LLVMStackEntryNode linked lists.

Parameters
headHead of list to free

◆ initialize_stack_entry_linked_list()

void initialize_stack_entry_linked_list ( LLVMStackEntryNode **  head)

Initialize a stack entry linked list.

Parameters
headHead of linked list

◆ pop_stack_entry_linked_list()

type_register pop_stack_entry_linked_list ( LLVMStackEntryNode **  head)

Pop and free a stack entry from a Stack Entry Node linked list and get its type.

Parameters
headHead of linked list to pop from
Returns
type_register Register number from first entry in linked list

◆ prepend_stack_entry_linked_list()

void prepend_stack_entry_linked_list ( LLVMStackEntryNode **  head,
type_register  register_index 
)

Add a stack entry to a stack entry linked list.

Parameters
headHead of linked list
register_indexRegister number to push onto list