public CodeGen (string output_file, bool is_dll, bool debugging_info) { this.output_file = output_file; this.is_dll = is_dll; if (debugging_info) symwriter = new SymbolWriter (output_file); type_manager = new TypeManager (this); extern_table = new ExternTable (); typedef_stack = new ArrayList (); typedef_stack_top = 0; global_field_table = new Hashtable (); global_method_table = new Hashtable (); data_table = new Hashtable (); defcont_list = new ArrayList (); sub_system = -1; cor_flags = -1; image_base = -1; stack_reserve = -1; entry_point = false; this_module = null; }
public CodeGen(string output_file, bool is_dll, bool debugging_info) { this.output_file = output_file; this.is_dll = is_dll; if (debugging_info) { symwriter = new SymbolWriter(output_file); } type_manager = new TypeManager(this); extern_table = new ExternTable(); typedef_stack = new ArrayList(); typedef_stack_top = 0; global_field_table = new Hashtable(); global_method_table = new Hashtable(); data_table = new Hashtable(); defcont_list = new ArrayList(); sub_system = -1; cor_flags = -1; image_base = -1; stack_reserve = -1; entry_point = false; this_module = null; }
public PEAPI.ClassRef GetType(string _name, bool is_valuetype) { PEAPI.ClassRef klass = nestedclass_table [_name] as PEAPI.ClassRef; if (klass != null) { return(klass); } string name_space, name; ExternTable.GetNameAndNamespace(_name, out name_space, out name); if (is_valuetype) { klass = (PEAPI.ClassRef)GetExternTypeRef().AddValueClass(name_space, name); } else { klass = (PEAPI.ClassRef)GetExternTypeRef().AddClass(name_space, name); } nestedclass_table [_name] = klass; return(klass); }
public void Resolve(CodeGen code_gen, ExternTable table) { var ar = table.GetAssemblyRef(assemblyReference); if (ar != null) { code_gen.PEFile.AddExternClass(name, ta, ar.AssemblyRef); } }
public void SetThisAssembly(string name, PEAPI.AssemAttr attr) { if (this_assembly != null && this_assembly.Name != name) { Report.Error("Multiple assembly declarations"); } this_assembly = new Assembly(name); this_assembly.SetAssemblyAttr(attr); if (name != "mscorlib") { ExternTable.AddCorlib(); } }
public void Resolve(CodeGen code_gen, ExternTable table) { var ar = table.GetAssemblyRef(assemblyReference); if (ar != null) { string ns = null; string name = fullName; int pos = name.LastIndexOf('.'); if (pos > 0) { ns = name.Substring(0, pos); name = name.Substring(pos + 1); } code_gen.PEFile.AddExternClass(ns, name, ta, ar.AssemblyRef); } }
public void Resolve (CodeGen code_gen, ExternTable table) { var ar = table.GetAssemblyRef (assemblyReference); if (ar != null) { string ns = null; string name = fullName; int pos = name.LastIndexOf ('.'); if (pos > 0) { ns = name.Substring (0, pos); name = name.Substring (pos + 1); } code_gen.PEFile.AddExternClass (ns, name, ta, ar.AssemblyRef); } }
public void BeginAssemblyRef(string name, AssemblyName asmb_name, PEAPI.AssemAttr attr) { current_customattrtarget = current_assemblyref = ExternTable.AddAssembly(name, asmb_name, attr); current_declsectarget = current_assemblyref; }
public void Resolve (CodeGen code_gen, ExternTable table) { var ar = table.GetAssemblyRef (assemblyReference); if (ar != null) code_gen.PEFile.AddExternClass (name, ta, ar.AssemblyRef); }