x64 machine code generation (ELF)

This commit is contained in:
Alexander Medvednikov 2019-11-19 09:53:52 +03:00
parent ab91733a28
commit 9712213f50
13 changed files with 564 additions and 15 deletions

View file

@ -299,8 +299,8 @@ fn (p mut Parser) struct_init(typ string) string {
continue
}
field_typ := field.typ
if !p.builtin_mod && field_typ.ends_with('*') && field_typ.contains('Cfg') {
p.error('pointer field `${typ}.${field.name}` must be initialized')
if !p.builtin_mod && field_typ.ends_with('*') && p.mod != 'os' { //&&
p.warn('pointer field `${typ}.${field.name}` must be initialized')
}
// init map fields
if field_typ.starts_with('map_') {