From 2e9193cfa5898287d6880a1ce153a6876df84887 Mon Sep 17 00:00:00 2001 From: Tommy Olofsson <tommy.olofsson.90@gmail.com> Date: Mon, 21 Apr 2014 14:18:00 +0200 Subject: [PATCH] Cleaned up the copy-aspect slightly. --- compiler/C_CodeGen.jrag | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/compiler/C_CodeGen.jrag b/compiler/C_CodeGen.jrag index 50bc2e3..7ccb944 100644 --- a/compiler/C_CodeGen.jrag +++ b/compiler/C_CodeGen.jrag @@ -722,13 +722,6 @@ aspect C_copy { env_src.println("{"); env_src.indent(); getType().C_emitCopy(env_src, env_dst); - // if (C_isDynamic()) { - // env_src.println("{"); - // env_src.indent(); - // getType().C_emitCopyDeallocation(env_src); - // env_src.unindent(); - // env_src.println("}"); - // } env_src.unindent(); env_src.println("}"); } @@ -869,13 +862,6 @@ aspect C_copy { env.println("{"); env.indent(); getType().C_emitCopyDeallocation(env); - // if (C_isDynamic()) { - // env.println("{"); - // env.indent(); - // getType().C_emitCopyDeallocation(env); - // env.unindent(); - // env.println("}"); - // } env.unindent(); env.println("}"); } @@ -937,12 +923,11 @@ aspect C_copy { public void VariableArrayType.C_emitCopyDeallocation(C_env env) { super.C_emitCopyDeallocation(env); - env.println("labcomm_memory_free(mem, 1, " + + env.println("labcomm_memory_free(mem, 1, " + env.qualid + env.memberAccessor() + "a);"); } public void Field.C_emitCopyDeallocation(C_env env) { - //getType().C_emitCopyDeallocation(env.nestStruct("." + getName())); getType().C_emitCopyDeallocation(env.nestStruct(env.memberAccessor() + getName())); } -- GitLab