sammine-lang
Loading...
Searching...
No Matches
LinearTypeChecker.h File Reference

Linear type checker — tracks heap-allocated pointers and enforces they are consumed (freed or moved) exactly once before scope exit. More...

#include "ast/Ast.h"
#include "ast/ASTProperties.h"
#include "util/Utilities.h"
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for LinearTypeChecker.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sammine_lang::AST::VarInfo
class  sammine_lang::AST::LinearTypeChecker

Typedefs

using sammine_lang::AST::LinearVarMap = std::unordered_map<std::string, VarInfo>

Enumerations

enum class  VarState { Unconsumed , Consumed }

Detailed Description

Linear type checker — tracks heap-allocated pointers and enforces they are consumed (freed or moved) exactly once before scope exit.

Uses direct recursive dispatch via dyn_cast (no visitor pattern). Runs as a separate pass after BiTypeChecker.