Changeset 70 for trunk/Compiler
- Timestamp:
- Jul 31, 2012, 4:06:07 PM (12 years ago)
- Location:
- trunk/Compiler
- Files:
-
- 4 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/TranspascalCompiler.lpk
r67 r70 9 9 <PathDelim Value="\"/> 10 10 <SearchPaths> 11 <OtherUnitFiles Value="Analyze;Target;Target\Interpretter;Target\ASM8051;Target\Java;Target\GCC;Target\PHP;Target\Delphi;Target\Dynamic C;Target\XML;Target\NASM "/>11 <OtherUnitFiles Value="Analyze;Target;Target\Interpretter;Target\ASM8051;Target\Java;Target\GCC;Target\PHP;Target\Delphi;Target\Dynamic C;Target\XML;Target\NASM;Modules\Pascal"/> 12 12 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 13 13 </SearchPaths> … … 21 21 <IgnoredMessages idx5023="True" idx5024="True" idx5025="True" idx5026="True" idx5027="True" idx5028="True" idx5029="True" idx5030="True" idx5031="True"/> 22 22 </CompilerMessages> 23 <CustomOptions Value="-dSINGLE_PRODUCER"/>24 23 <CompilerPath Value="$(CompPath)"/> 25 24 </Other> 26 25 </CompilerOptions> 27 26 <Version Minor="1"/> 28 <Files Count="2 0">27 <Files Count="21"> 29 28 <Item1> 30 29 <Filename Value="UCompiler.pas"/> … … 52 51 </Item6> 53 52 <Item7> 54 <Filename Value=" Analyze\UAnalyzerPascal.pas"/>53 <Filename Value="Modules\Pascal\UAnalyzerPascal.pas"/> 55 54 <UnitName Value="UAnalyzerPascal"/> 56 55 </Item7> … … 107 106 <UnitName Value="UTargetNASM"/> 108 107 </Item20> 108 <Item21> 109 <Filename Value="Modules\Pascal\UModulePascal.pas"/> 110 <UnitName Value="UModulePascal"/> 111 </Item21> 109 112 </Files> 110 113 <Type Value="RunAndDesignTime"/> 111 <RequiredPkgs Count=" 3">114 <RequiredPkgs Count="4"> 112 115 <Item1> 113 <PackageName Value="TemplateGenerics"/> 116 <PackageName Value="ModularSystem"/> 117 <MinVersion Minor="1" Valid="True"/> 114 118 </Item1> 115 119 <Item2> 116 <PackageName Value=" LCL"/>120 <PackageName Value="TemplateGenerics"/> 117 121 </Item2> 118 122 <Item3> 123 <PackageName Value="LCL"/> 124 </Item3> 125 <Item4> 119 126 <PackageName Value="FCL"/> 120 127 <MinVersion Major="1" Valid="True"/> 121 </Item 3>128 </Item4> 122 129 </RequiredPkgs> 123 130 <UsageOptions> -
trunk/Compiler/TranspascalCompiler.pas
r67 r70 12 12 UTargetASM8051, UTargetGCC, UProducerGCC, UProducerPascal, UTargetDelphi, 13 13 UTargetPHP, UTargetJava, UTargetXML, UTargetInterpretter, UTargetNASM, 14 LazarusPackageIntf;14 UModulePascal, LazarusPackageIntf; 15 15 16 16 implementation -
trunk/Compiler/UAnalyzer.pas
r68 r70 83 83 end; 84 84 85 // TListAnalyzer = TGObjectList<Integer, TAnalyzer> 85 { TListAnalyzer } 86 86 87 TListAnalyzer = class(TListObject) 88 function SearchBySysName(Name: string): TAnalyzer; 89 procedure LoadToStrings(Strings: TStrings); 87 90 end; 88 91 … … 91 94 92 95 implementation 96 97 { TListAnalyzer } 98 99 function TListAnalyzer.SearchBySysName(Name: string): TAnalyzer; 100 var 101 I: Integer; 102 begin 103 I := 0; 104 while (I < Count) and (TAnalyzer(Items[I]).SysName <> Name) do Inc(I); 105 if I < Count then Result := TAnalyzer(Items[I]) 106 else Result := nil; 107 end; 108 109 procedure TListAnalyzer.LoadToStrings(Strings: TStrings); 110 var 111 I: Integer; 112 begin 113 try 114 Strings.BeginUpdate; 115 Strings.Clear; 116 for I := 0 to Count - 1 do 117 Strings.AddObject(TAnalyzer(Items[I]).Name, Items[I]); 118 finally 119 Strings.EndUpdate; 120 end; 121 end; 93 122 94 123 { TAnalyzer } -
trunk/Compiler/UCompiler.pas
r68 r70 6 6 7 7 uses 8 SysUtils, Variants, Classes, Contnrs, FileUtil, 8 SysUtils, Variants, Classes, Contnrs, FileUtil, UModularSystem, 9 9 Dialogs, USourceCode, UProducer, UAnalyzer, SpecializedList, UTarget; 10 10 … … 49 49 TargetFolder: string; 50 50 Targets: TListTarget; 51 Analyzers: TListAnalyzer; 51 52 MainSource: string; 53 ModuleManager: TModuleManager; 52 54 procedure ErrorMessage(Text: string; Position: TPoint; FileName: string); 53 55 constructor Create; virtual; … … 162 164 constructor TCompiler.Create; 163 165 begin 164 Analyzer := TAnalyzerPascal.Create;165 166 Targets := TListTarget.Create; 166 167 RegisterTargets(Self);168 169 167 AbstractCode := TProgram.Create; 170 168 ErrorMessages := TListObject.Create; 171 169 CompiledFolder := 'Compiled'; 170 ModuleManager := TModuleManager.Create(nil); 172 171 end; 173 172 … … 180 179 destructor TCompiler.Destroy; 181 180 begin 181 ModuleManager.Free; 182 182 Analyzer.Free; 183 183 AbstractCode.Free;
Note:
See TracChangeset
for help on using the changeset viewer.