//(ssyy) Получение шаблонного класса private template_class ReadTemplateExtClass() { int pos = br.ReadInt32(); string s = pcu_file.incl_modules[pos]; PCUReader pr = (PCUReader)units[s];//вдруг этот модуль уже читается if (pr == null)//это по моему чёс, так как все модули уже добавлены { pr = new PCUReader(this);//если нет, то создаем ридер CompilationUnit cu = pr.GetCompilationUnit(dir + s + comp.CompilerOptions.CompiledUnitExtension, this.readDebugInfo); template_class tc = pr.GetTemplateClass(br.ReadInt32()); units[s] = pr;//добавляем в таблицу ридеров return tc; } else { template_class tc = pr.GetTemplateClass(br.ReadInt32()); return tc; } }
private common_property_node ReadCommonExtProperty() { br.ReadByte(); int offset = br.ReadInt32(); int tmp = (int)br.BaseStream.Position; br.BaseStream.Seek(ext_pos + offset, SeekOrigin.Begin); br.ReadByte();//DS Changed int pos = br.ReadInt32(); string s = pcu_file.incl_modules[pos]; PCUReader pr = (PCUReader)units[s]; br.BaseStream.Seek(tmp, SeekOrigin.Begin); if (pr == null) { pr = new PCUReader(this); CompilationUnit cu = pr.GetCompilationUnit(dir + s + comp.CompilerOptions.CompiledUnitExtension, this.readDebugInfo); common_property_node prop = pr.GetPropertyNode(br.ReadInt32()); return prop; } else { common_property_node prop = pr.GetPropertyNode(br.ReadInt32()); return prop; } }
//получение импортируемой функции private common_namespace_function_node ReadCommonExtNamespaceFunc() { br.ReadByte(); int pos = br.ReadInt32(); string s = pcu_file.incl_modules[pos]; PCUReader pr = (PCUReader)units[s]; if (pr == null) { pr = new PCUReader(this); CompilationUnit cu = pr.GetCompilationUnit(dir + s + comp.CompilerOptions.CompiledUnitExtension, this.readDebugInfo); int offset = br.ReadInt32(); common_namespace_function_node cffn = pr.GetNamespaceFunction(offset); return cffn; } else { common_namespace_function_node cffn = pr.GetNamespaceFunction(br.ReadInt32()); return cffn; } }
private namespace_constant_definition ReadExtNamespaceConstant() { br.ReadByte(); int pos = br.ReadInt32(); string s = pcu_file.incl_modules[pos]; PCUReader pr = (PCUReader)units[s]; if (pr == null) { pr = new PCUReader(this); CompilationUnit cu = pr.GetCompilationUnit(dir + s + comp.CompilerOptions.CompiledUnitExtension, this.readDebugInfo); namespace_constant_definition nv = pr.GetConstantDefinition(br.ReadInt32()); return nv; } else { namespace_constant_definition nv = pr.GetConstantDefinition(br.ReadInt32()); return nv; } }
public CompilationUnit ReadPCU(string FileName) { PCUReader pr = new PCUReader(this,pr_ChangeState); return pr.GetCompilationUnit(FileName,CompilerOptions.Debug); }