772 B
772 B
- downgrade stage
- resolve stage
- dynamic attr resolution
- import resolution
- static path resolution
- eval stage
- dynamic path resolution
- graph update
- stack storage
依赖类型:
- 强依赖 (x!)
- builtins.toString x => x!
- x + y => x! y!
- { x = 1; ${sym} = 2; } => sym!
- 弱依赖 a.k.a. thunk (x?)
- builtins.seq x y => x! y?
- 递归依赖 (x!!)
- builtins.deepSeq x y => x!! y?
e.g.
- let a? = { inherit a?; }; in a! => a!
- a! => { a = }
- f: let x? = f! x?; in x! => f! x!
- let ret? = (self: { x? = 1; y? = self.x! + 1; }) ret?; in ret.y! => ret! x! y!
工作流程:
- string -> AST
- AST -> HIR (alloc ExprId)
- HIR -> LIR (resolve var, build graph)
- LIR -> Value