removed support for compiled units in .ppw files, this is obsolete after fpc 1.0 (issue )

git-svn-id: trunk@28053 -
This commit is contained in:
vincents 2010-11-03 09:48:49 +00:00
parent 429eeda612
commit 56646eb28c
11 changed files with 30 additions and 65 deletions

View File

@ -286,7 +286,6 @@ type
function GetCompleteSrcPathForDirectory(const Directory: string;
UseCache: boolean = true): string;
function GetPPUSrcPathForDirectory(const Directory: string): string;
function GetPPWSrcPathForDirectory(const Directory: string): string;
function GetDCUSrcPathForDirectory(const Directory: string): string;
function GetCompiledSrcPathForDirectory(const Directory: string;
UseCache: boolean = true): string;
@ -1337,12 +1336,6 @@ begin
Result:=DefineTree.GetPPUSrcPathForDirectory(Directory);
end;
function TCodeToolManager.GetPPWSrcPathForDirectory(const Directory: string
): string;
begin
Result:=DefineTree.GetPPWSrcPathForDirectory(Directory);
end;
function TCodeToolManager.GetDCUSrcPathForDirectory(const Directory: string
): string;
begin
@ -1400,14 +1393,8 @@ end;
function TCodeToolManager.GetCompiledSrcExtForDirectory(const Directory: string
): string;
var
Evaluator: TExpressionEvaluator;
begin
Result:='.ppu';
Evaluator:=DefineTree.GetDefinesForDirectory(Directory,true);
if Evaluator=nil then exit;
if Evaluator.IsDefined('WIN32') and Evaluator.IsDefined('VER1_0') then
Result:='.ppw';
end;
function TCodeToolManager.FindUnitInUnitLinks(const Directory, AUnitName: string
@ -4781,8 +4768,6 @@ function TCodeToolManager.DoOnGetSrcPathForCompiledUnit(Sender: TObject;
begin
if CompareFileExt(AFilename,'.ppu',false)=0 then
Result:=GetPPUSrcPathForDirectory(ExtractFilePath(AFilename))
else if CompareFileExt(AFilename,'.ppw',false)=0 then
Result:=GetPPWSrcPathForDirectory(ExtractFilePath(AFilename))
else if CompareFileExt(AFilename,'.dcu',false)=0 then
Result:=GetDCUSrcPathForDirectory(ExtractFilePath(AFilename));
if Result='' then

View File

@ -72,7 +72,6 @@ const
IncludePathMacroName = ExternalMacroStart+'IncPath';
SrcPathMacroName = ExternalMacroStart+'SrcPath';
PPUSrcPathMacroName = ExternalMacroStart+'PPUSrcPath';
PPWSrcPathMacroName = ExternalMacroStart+'PPWSrcPath';
DCUSrcPathMacroName = ExternalMacroStart+'DCUSrcPath';
CompiledSrcPathMacroName = ExternalMacroStart+'CompiledSrcPath';
UnitLinksMacroName = ExternalMacroStart+'UnitLinks';
@ -86,7 +85,6 @@ const
IncludePathMacro = '$('+IncludePathMacroName+')';
SrcPathMacro = '$('+SrcPathMacroName+')';
PPUSrcPathMacro = '$('+PPUSrcPathMacroName+')';
PPWSrcPathMacro = '$('+PPWSrcPathMacroName+')';
DCUSrcPathMacro = '$('+DCUSrcPathMacroName+')';
CompiledSrcPathMacro = '$('+CompiledSrcPathMacroName+')';
UnitLinksMacro = '$('+UnitLinksMacroName+')';
@ -435,7 +433,6 @@ type
function GetIncludePathForDirectory(const Directory: string): string;
function GetLastRootTemplate: TDefineTemplate;
function GetPPUSrcPathForDirectory(const Directory: string): string;
function GetPPWSrcPathForDirectory(const Directory: string): string;
function GetSrcPathForDirectory(const Directory: string): string;
function GetUnitPathForDirectory(const Directory: string): string;
function IsEqual(SrcDefineTree: TDefineTree): boolean;
@ -3915,18 +3912,6 @@ begin
end;
end;
function TDefineTree.GetPPWSrcPathForDirectory(const Directory: string
): string;
var Evaluator: TExpressionEvaluator;
begin
Evaluator:=GetDefinesForDirectory(Directory,true);
if Evaluator<>nil then begin
Result:=Evaluator.Variables[PPWSrcPathMacroName];
end else begin
Result:='';
end;
end;
function TDefineTree.GetDCUSrcPathForDirectory(const Directory: string
): string;
var Evaluator: TExpressionEvaluator;

View File

@ -1006,7 +1006,7 @@ begin
{$ENDIF}
if ParamCompatibility=tcExact then begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
ProcName:=FoundContext.Tool.GetProcNameIdentifier(FoundContext.Node);
if fGatheredCompatibleMethods.Find(ProcName)=nil then begin

View File

@ -34,7 +34,7 @@
- Get and Set property access parameter lists
- make @Proc context sensitive (started, but not complete)
- operator overloading
- ppu, ppw, dcu files
- ppu, dcu files
- many things, search for 'ToDo'
}
unit FindDeclarationTool;
@ -2212,7 +2212,7 @@ begin
ctnProcedure,ctnProcedureHead:
begin
// ToDo: ppu, ppw, dcu files
// ToDo: ppu, dcu files
Result:=Result+NewTool.ExtractProcHead(NewNode,
[phpAddClassName,phpWithStart,phpWithVarModifiers,phpWithParameterNames,
@ -2225,7 +2225,7 @@ begin
begin
IdentNode:=NewNode;
// ToDo: ppu, ppw, dcu files
// ToDo: ppu, dcu files
NewTool.MoveCursorToNodeStart(IdentNode);
NewTool.ReadNextAtom;
@ -2246,7 +2246,7 @@ begin
begin
IdentNode:=NewNode;
// ToDo: ppu, ppw, dcu files
// ToDo: ppu, dcu files
NewTool.MoveCursorToNodeStart(IdentNode);
Result:=Result+'property ';
@ -3693,7 +3693,7 @@ begin
if (Result.Node=nil) and (fdfExceptionOnNotFound in Params.Flags) then begin
if (Result.Tool<>nil) and (Params.Identifier<>nil) then begin
// ToDo ppu, ppw, dcu
// ToDo ppu, dcu
if (not Params.IdentifierTool.IsPCharInSrc(Params.Identifier)) then
RaiseInternalError;
@ -4845,7 +4845,7 @@ begin
Params.SetResult(ClassContext);
// parse class and return class node
// ToDo: do no JIT parsing for PPU, PPW, DCU files
// ToDo: do no JIT parsing for PPU, DCU files
ClassContext.Tool.BuildSubTreeForClass(ClassContext.Node);
end;
@ -4872,7 +4872,7 @@ begin
+' invalid classnode');
Result:=false;
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
// search the ancestor name
BuildSubTreeForClass(ClassNode);
@ -5708,7 +5708,7 @@ begin
);
{$ENDIF}
// ToDo: build codetree for ppu, ppw, dcu files
// ToDo: build codetree for ppu, dcu files
// build tree for pascal source
if not BuildInterfaceIdentifierCache(true) then exit(false);
@ -7106,7 +7106,7 @@ begin
begin
// range type -> convert to special expression type
// ToDo: ppu, ppw, dcu files
// ToDo: ppu, dcu files
MoveCursorToNodeStart(Node);
@ -7123,7 +7123,7 @@ begin
begin
// const -> convert to special expression type
// ToDo: ppu, ppw, dcu files
// ToDo: ppu, dcu files
MoveCursorToNodeStart(Node);
@ -7145,7 +7145,7 @@ begin
ctnIdentifier:
begin
// ToDo: ppu, ppw, dcu files
// ToDo: ppu, dcu files
MoveCursorToNodeStart(Node);
ReadNextAtom;
@ -7155,7 +7155,7 @@ begin
ctnProperty,ctnGlobalProperty:
begin
// ToDo: ppu, ppw, dcu files
// ToDo: ppu, dcu files
ExtractPropType(Node,false,true);
if CurPos.Flag<>cafEdgedBracketOpen then
@ -7165,7 +7165,7 @@ begin
ctnConstant:
begin
// ToDo: ppu, ppw, dcu files
// ToDo: ppu, dcu files
MoveCursorToNodeStart(Node);
Params.Save(OldInput);
@ -8080,7 +8080,7 @@ begin
// ToDo: check if enums of expression fits into enums of target
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=tcCompatible;
end else
@ -9910,7 +9910,7 @@ begin
end;
end;
// ToDo: PPU, PPW, DCU
// ToDo: PPU, DCU
case FindContext.Node.Desc of

View File

@ -998,7 +998,7 @@ function TPascalReaderTool.ProcNodeHasSpecifier(ProcNode: TCodeTreeNode;
ProcSpec: TProcedureSpecifier): boolean;
begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=MoveCursorToProcSpecifier(ProcNode,ProcSpec);
end;
@ -1007,7 +1007,7 @@ function TPascalReaderTool.GetProcNameIdentifier(ProcNode: TCodeTreeNode
): PChar;
begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=nil;
if ProcNode=nil then exit;
@ -1158,7 +1158,7 @@ end;
function TPascalReaderTool.GetPropertyNameIdentifier(PropNode: TCodeTreeNode
): PChar;
begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=nil;
if PropNode=nil then exit;
@ -1170,7 +1170,7 @@ function TPascalReaderTool.GetPropertyTypeIdentifier(PropNode: TCodeTreeNode
): PChar;
begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=nil;
if PropNode=nil then exit;
@ -1686,7 +1686,7 @@ begin
if (ProcNode<>nil) and (ProcNode.Desc=ctnProcedure)
and (ProcNode.FirstChild<>nil) then begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
MoveCursorToNodeStart(ProcNode.FirstChild); // ctnProcedureHead
ReadNextAtom;
@ -2058,7 +2058,7 @@ function TPascalReaderTool.PropertyNodeHasParamList(PropNode: TCodeTreeNode
): boolean;
begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=false;
if not MoveCursorToPropName(PropNode) then exit;
@ -2070,7 +2070,7 @@ function TPascalReaderTool.PropNodeIsTypeLess(PropNode: TCodeTreeNode
): boolean;
begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=false;
if not MoveCursorToPropName(PropNode) then exit;
@ -2086,7 +2086,7 @@ function TPascalReaderTool.PropertyHasSpecifier(PropNode: TCodeTreeNode;
const s: string; ExceptionOnNotFound: boolean): boolean;
begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=false;
if not MoveCursorToPropName(PropNode) then exit;
@ -2138,7 +2138,7 @@ function TPascalReaderTool.ProcNodeHasParamList(ProcNode: TCodeTreeNode
): boolean;
begin
// ToDo: ppu, ppw, dcu
// ToDo: ppu, dcu
Result:=false;
if ProcNode.Desc=ctnProcedure then

View File

@ -200,7 +200,7 @@ begin
// set defaults
AddStandardComboItem(DirCombobox,'$(ProjPath)');
AddStandardComboItem(RemoveCombobox,'*.(bak|ppu|ppw|ppl|o|or|a|so|dll)');
AddStandardComboItem(RemoveCombobox,'*.(bak|ppu|ppl|o|or|a|so|dll)');
AddStandardComboItem(RemoveCombobox,'*.bak|*~');
AddStandardComboItem(KeepCombobox,
'*.(pas|pp|lpr|lfm|lrs|lpi|lpk|inc|sh|xml)');

View File

@ -93,10 +93,7 @@ end;
function GetDefaultCompiledUnitExt(FPCVersion, FPCRelease: integer): string;
begin
if (FPCVersion=1) and (FPCRelease=0) then
Result:='.ppw'
else
Result:='.ppu';
Result:='.ppu';
end;
function OSLocksExecutables: boolean;

View File

@ -13067,7 +13067,7 @@ end;
Flags: TFindSourceFlags): string;
AFilename can be an absolute or relative filename, of a source file or a
compiled unit (.ppu, .ppw).
compiled unit (.ppu).
Find the source filename (pascal source or include file) and returns
the absolute path.

View File

@ -374,7 +374,7 @@ type
const
DefPublProjIncFilter = '*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)';
DefPublProjExcFilter = '*.(bak|ppu|ppw|o|so);*~;backup';
DefPublProjExcFilter = '*.(bak|ppu|o|so);*~;backup';
implementation

View File

@ -117,7 +117,7 @@ const
PublishModulOptsVersion = 2;
DefPublModIncFilter = '*.(pas|pp|inc|lpr|lfm|lrs|lpi|lpk|xml|sh)';
DefPublModExcFilter = '*.(bak|ppu|ppw|ppl|a|o|so);*~;backup';
DefPublModExcFilter = '*.(bak|ppu|ppl|a|o|so);*~;backup';
DefPublishDirectory = '$(TestDir)/publishedproject/';
implementation

View File

@ -3748,8 +3748,6 @@ begin
if CurUnitName='' then continue;
Result:=CheckFile(CurUnitName+'.ppu');
if Result<>mrOk then exit;
Result:=CheckFile(CurUnitName+'.ppw');
if Result<>mrOk then exit;
Result:=CheckFile(CurUnitName+'.ppl');
if Result<>mrOk then exit;
end;