Mercurial > projects > dang
changeset 175:c8e26556c24d
Codegen functions in structs
author | Anders Halager <halager@gmail.com> |
---|---|
date | Thu, 24 Jul 2008 21:12:12 +0200 |
parents | 20ff3c31f600 |
children | dc9bf56b7ace |
files | gen/CodeGen.d sema/TypeCheck.d |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/CodeGen.d Thu Jul 24 21:06:42 2008 +0200 +++ b/gen/CodeGen.d Thu Jul 24 21:12:12 2008 +0200 @@ -222,6 +222,17 @@ table[varDecl.identifier.get] = g; break; + case DeclType.StructDecl: + auto sdecl = cast(StructDecl)decl; + foreach (d; sdecl.decls) + { + auto func = cast(FuncDecl)d; + if (func is null) + continue; + genRootDecl(func); + } + break; + case DeclType.ClassDecl: auto cdecl = cast(ClassDecl)decl; SmallArray!(Constant) functions; @@ -368,7 +379,6 @@ DFunction ftype = type.asFunction(); Type llvm_ftype = llvm(ftype); Value f = null; - Stdout(callExp.callSym).newline; if (callExp.callSym is null) { // Do a virtual function call