mirror of
https://github.com/vlang/v.git
synced 2025-09-15 15:32:27 +03:00
compiler: more memory logic + replace "cur_fn &Fn" with "cur_fn Fn"
This commit is contained in:
parent
f3a74e7d80
commit
9dd86f6fb8
8 changed files with 114 additions and 78 deletions
|
@ -77,6 +77,7 @@ mut:
|
|||
is_used bool
|
||||
is_changed bool
|
||||
scope_level int
|
||||
is_c bool // todo remove once `typ` is `Type`, not string
|
||||
}
|
||||
|
||||
struct Type {
|
||||
|
@ -442,6 +443,7 @@ fn (table mut Table) add_method(type_name string, f Fn) {
|
|||
print_backtrace()
|
||||
cerror('add_method: empty type')
|
||||
}
|
||||
// TODO table.typesmap[type_name].methods << f
|
||||
mut t := table.typesmap[type_name]
|
||||
t.methods << f
|
||||
table.typesmap[type_name] = t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue