mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
ast: reduce memory usage of ast.ScopeObject and ast.Ident instances (#24704)
This commit is contained in:
parent
9e2462a876
commit
b6ccca23a0
5 changed files with 32 additions and 11 deletions
|
@ -385,8 +385,8 @@ fn (t Tree) objects(so map[string]ast.ScopeObject) &Node {
|
|||
}
|
||||
|
||||
fn (t Tree) scope_object(node ast.ScopeObject) &Node {
|
||||
mut obj := create_object()
|
||||
match node {
|
||||
obj := match node {
|
||||
ast.EmptyScopeObject { create_object() }
|
||||
ast.ConstField { t.const_field(node) }
|
||||
ast.GlobalField { t.global_field(node) }
|
||||
ast.Var { t.var(node) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue