mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 00:10:51 +02:00
* move tspecializationstate from pgenutil.pas into a new unit named pgentype.pas which contains types related to generics with as few dependencies as possible.
git-svn-id: trunk@31507 -
This commit is contained in:
parent
267adf4e46
commit
e8fca1c9c0
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -524,6 +524,7 @@ compiler/pdecsub.pas svneol=native#text/plain
|
|||||||
compiler/pdecvar.pas svneol=native#text/plain
|
compiler/pdecvar.pas svneol=native#text/plain
|
||||||
compiler/pexports.pas svneol=native#text/plain
|
compiler/pexports.pas svneol=native#text/plain
|
||||||
compiler/pexpr.pas svneol=native#text/plain
|
compiler/pexpr.pas svneol=native#text/plain
|
||||||
|
compiler/pgentype.pas svneol=native#text/pascal
|
||||||
compiler/pgenutil.pas svneol=native#text/pascal
|
compiler/pgenutil.pas svneol=native#text/pascal
|
||||||
compiler/pinline.pas svneol=native#text/plain
|
compiler/pinline.pas svneol=native#text/plain
|
||||||
compiler/pmodules.pas svneol=native#text/plain
|
compiler/pmodules.pas svneol=native#text/plain
|
||||||
|
43
compiler/pgentype.pas
Normal file
43
compiler/pgentype.pas
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
Copyright (c) 2015 by Sven Barth
|
||||||
|
|
||||||
|
Contains different types that are used in the context of parsing generics.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
}
|
||||||
|
unit pgentype;
|
||||||
|
|
||||||
|
{$i fpcdefs.inc}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
cclasses,
|
||||||
|
symbase;
|
||||||
|
|
||||||
|
type
|
||||||
|
tspecializationstate = record
|
||||||
|
oldsymtablestack : tsymtablestack;
|
||||||
|
oldextendeddefs : tfphashobjectlist;
|
||||||
|
oldgenericdummysyms: tfphashobjectlist;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -31,6 +31,8 @@ uses
|
|||||||
cclasses,
|
cclasses,
|
||||||
{ global }
|
{ global }
|
||||||
globtype,
|
globtype,
|
||||||
|
{ parser }
|
||||||
|
pgentype,
|
||||||
{ symtable }
|
{ symtable }
|
||||||
symtype,symdef,symbase;
|
symtype,symdef,symbase;
|
||||||
|
|
||||||
@ -45,13 +47,6 @@ uses
|
|||||||
function resolve_generic_dummysym(const name:tidstring):tsym;
|
function resolve_generic_dummysym(const name:tidstring):tsym;
|
||||||
function could_be_generic(const name:tidstring):boolean;inline;
|
function could_be_generic(const name:tidstring):boolean;inline;
|
||||||
|
|
||||||
type
|
|
||||||
tspecializationstate = record
|
|
||||||
oldsymtablestack : tsymtablestack;
|
|
||||||
oldextendeddefs : TFPHashObjectList;
|
|
||||||
oldgenericdummysyms: tfphashobjectlist;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure specialization_init(genericdef:tdef;var state:tspecializationstate);
|
procedure specialization_init(genericdef:tdef;var state:tspecializationstate);
|
||||||
procedure specialization_done(var state:tspecializationstate);
|
procedure specialization_done(var state:tspecializationstate);
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ implementation
|
|||||||
{$endif}
|
{$endif}
|
||||||
{ parser }
|
{ parser }
|
||||||
scanner,gendef,
|
scanner,gendef,
|
||||||
pbase,pstatmnt,pdecl,pdecsub,pexports,pgenutil,pparautl,
|
pbase,pstatmnt,pdecl,pdecsub,pexports,pgenutil,pparautl,pgentype,
|
||||||
{ codegen }
|
{ codegen }
|
||||||
tgobj,cgbase,cgobj,cgutils,hlcgobj,hlcgcpu,dbgbase,
|
tgobj,cgbase,cgobj,cgutils,hlcgobj,hlcgcpu,dbgbase,
|
||||||
{$ifdef llvm}
|
{$ifdef llvm}
|
||||||
|
Loading…
Reference in New Issue
Block a user