module volt.ir.lifter

Code Map

module volt.ir.lifter;


//! Base lifting class, only implements copying not lifting.
class Lifter
{
public:
	this() { }
	fn lift(old: ir.Function) ir.Function;
	fn lift(old: ir.Variable) ir.Variable;
	fn lift(old: ir.Class) ir.Class;
	fn lift(old: ir.Union) ir.Union;
	fn lift(old: ir.Struct) ir.Struct;
	fn lift(old: ir._Interface) ir._Interface;
	fn lift(old: ir.Alias) ir.Alias;
	fn lift(old: ir.FunctionParam) ir.FunctionParam;
	fn lift(old: ir.TopLevelBlock) ir.TopLevelBlock;
	fn lift(old: ir.Enum) ir.Enum;
	fn liftedOrPanic(n: ir.Node, msg: string) ir.Node;
	fn copyExp(n: ir.Exp) ir.Exp { }
	fn copyType(n: ir.Type) ir.Type { }
	fn copyStatement(parent: ir.Scope, n: ir.Node) ir.Node { }
	fn copy(old: ir.QualifiedName) ir.QualifiedName { }
	fn copyQualifiedName(old: ir.QualifiedName) ir.QualifiedName { }
	fn copy(old: ir.Identifier) ir.Identifier { }
	fn copy(old: ir.FunctionParam) ir.FunctionParam { }
	fn copy(old: ir.IsExp) ir.IsExp { }
	fn copy(old: ir.VaArgExp) ir.VaArgExp { }
	fn copy(old: ir.StructLiteral) ir.StructLiteral { }
	fn copy(old: ir.StringImport) ir.StringImport { }
	fn copy(old: ir.AssocArray) ir.AssocArray { }
	fn copy(old: ir.AAPair) ir.AAPair { }
	fn copy(old: ir.Ternary) ir.Ternary { }
	fn copy(old: ir.AccessExp) ir.AccessExp { }
	fn copy(old: ir.Constant) ir.Constant { }
	fn copy(old: ir.BinOp) ir.BinOp { }
	fn copy(old: ir.IdentifierExp) ir.IdentifierExp { }
	fn copy(old: ir.TypeExp) ir.TypeExp { }
	fn copy(old: ir.ArrayLiteral) ir.ArrayLiteral { }
	fn copy(old: ir.TokenExp) ir.TokenExp { }
	fn copy(old: ir.ExpReference) ir.ExpReference { }
	fn copy(old: ir.Postfix) ir.Postfix { }
	fn copy(old: ir.PropertyExp) ir.PropertyExp { }
	fn copy(old: ir.Unary) ir.Unary { }
	fn copy(old: ir.Typeid) ir.Typeid { }
	fn copy(old: ir.BuiltinExp) ir.BuiltinExp { }
	fn copy(old: ir.RunExp) ir.RunExp { }
	fn copy(parent: ir.Scope, old: ir.ReturnStatement) ir.ReturnStatement { }
	fn copy(parent: ir.Scope, old: ir.BlockStatement) ir.BlockStatement { }
	fn copy(old: ir.BreakStatement) ir.BreakStatement { }
	fn copy(old: ir.ContinueStatement) ir.ContinueStatement { }
	fn copy(old: ir.ExpStatement) ir.ExpStatement { }
	fn copy(old: ir.AssertStatement) ir.AssertStatement { }
	fn copy(old: ir.GotoStatement) ir.GotoStatement { }
	fn copy(old: ir.ThrowStatement) ir.ThrowStatement { }
	fn copy(old: ir.StorageType) ir.StorageType { }
	fn copy(parent: ir.Scope, old: ir.TryStatement) ir.TryStatement { }
	fn copy(parent: ir.Scope, old: ir.WithStatement) ir.WithStatement { }
	fn copy(parent: ir.Scope, old: ir.IfStatement) ir.IfStatement { }
	fn copy(parent: ir.Scope, old: ir.WhileStatement) ir.WhileStatement { }
	fn copy(parent: ir.Scope, old: ir.DoStatement) ir.DoStatement { }
	fn copy(parent: ir.Scope, old: ir.SwitchStatement) ir.SwitchStatement { }
	fn copy(parent: ir.Scope, old: ir.ForeachStatement) ir.ForeachStatement { }
	fn copy(parent: ir.Scope, old: ir.ForStatement) ir.ForStatement { }
	fn copyAliasStaticIf(old: ir.AliasStaticIf) ir.AliasStaticIf { }
	fn copy(old: ir.FunctionType) ir.FunctionType { }
	fn copy(old: ir.PrimitiveType) ir.PrimitiveType { }
	fn copy(old: ir.TypeReference) ir.TypeReference { }
	fn copy(old: ir.AutoType) ir.AutoType { }
	fn copy(old: ir.StaticArrayType) ir.StaticArrayType { }
	fn copy(old: ir.AmbiguousArrayType) ir.AmbiguousArrayType { }
	fn copy(old: ir.ArrayType) ir.ArrayType { }
	fn copy(old: ir.DelegateType) ir.DelegateType { }
	fn copy(ct: ir.CallableType, old: ir.CallableType) ir.CallableType { }
	fn copy(old: ir.PointerType) ir.PointerType { }
	fn copy(old: ir.TypeOf) ir.TypeOf { }
	fn copy(old: ir.NullType) ir.NullType { }
	//! Copies a Scope but not its stores.
	fn copyScope(parent: ir.Scope, owner: ir.Node, old: ir.Scope) ir.Scope { }
	fn copyStores(n: ir.Scope, old: ir.Scope) { }
	fn copyStore(parent: ir.Scope, old: ir.Store) ir.Store { }
}
class Lifter

Base lifting class, only implements copying not lifting.

The Lifter facilitates moving pieces of the IR to another module. This is presently used in creating an environment for CTFE functions.

fn copyScope(parent: ir.Scope, owner: ir.Node, old: ir.Scope) ir.Scope

Copies a Scope but not its stores.