Performance Option For CEDET
Edward Steere <[email protected]> Sat, 26 Mar 2016 16:49:52 +0200
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_35E91092-95D1-47A9-AFBB-8FDD005FF65B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi All, This is patch 3/4. I found that the performance of semantic for navigating between project = files using ia fast jump left a lot to be desired in large java projects. The = major=20 culprit appears to be file-truename. Both for the amount of memory it allocates (and therefore automatic GC time it triggers) and for the = time it takes to check for symlinks in the file system etc. This patch adds a global switch (`ede-ignore-symlinks=E2=80=99) across = CEDET which will use `expand-filename=E2=80=99 when the switch is non-nil. An = alternative to this might be to add it to the base project object as a switch so that = one can control the behaviour on a per-project basis. I=E2=80=99d be happy to implement = the later or a combination depending on what is decided. Kind regards, Edward Steere --Apple-Mail=_35E91092-95D1-47A9-AFBB-8FDD005FF65B Content-Disposition: attachment; filename=0003-Global-switch-for-file-truename.patch Content-Type: application/octet-stream; name="0003-Global-switch-for-file-truename.patch" Content-Transfer-Encoding: quoted-printable =46rom=20cb3c0b62e88f275a489cbcc4f33190c3f22b27ec=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Edward=20Steere=20<[email protected]>=0A= Date:=20Sat,=2026=20Mar=202016=2015:11:10=20+0200=0ASubject:=20[PATCH=20= 3/4]=20Global=20switch=20for=20file-truename.=0A=0AI've=20found=20via=20= profiling=20semantic=20features=20that=20file-truename=20is=0A= responsible=20for=20a=20lot=20of=20the=20slow=20down=20issues=20I've=20= had=20working=20on=20larger=0Aprojects.=20I've=20added=20this=20switch=20= so=20that=20you=20can=20configure=20whether=0Asemantic=20should=20use=20= file-truename=20--=20if=20you=20trust=20that=20your=0Aproject/system=20= includes=20don't=20have=20symlinks=20then=20it's=20a=20big=20performance=0A= boost=20for=20free.=0A---=0A=20lisp/cedet/cedet-files.el=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20|=20=204=20+++-=0A=20lisp/cedet/cedet-java.el=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=208=20+++-----=0A=20= lisp/cedet/ede.el=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20|=2014=20++++++++++++++=0A=20lisp/cedet/ede/ant.el=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=205=20+++--=0A=20= lisp/cedet/ede/compdb.el=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= |=20=208=20++++----=0A=20lisp/cedet/ede/files.el=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20|=2012=20++++++------=0A=20= lisp/cedet/semantic/adebug.el=20=20=20=20=20=20=20=20=20=20=20|=20=203=20= ++-=0A=20lisp/cedet/semantic/db-file.el=20=20=20=20=20=20=20=20=20=20|=20= =202=20+-=0A=20lisp/cedet/semantic/db-javap.el=20=20=20=20=20=20=20=20=20= |=20=202=20+-=0A=20lisp/cedet/semantic/db.el=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20|=2023=20++++++++++++-----------=0A=20= lisp/cedet/semantic/decorate/include.el=20|=20=203=20++-=0A=20= tests/cedet/ede/compdb-utest.el=20=20=20=20=20=20=20=20=20|=2013=20= +++++++------=0A=2012=20files=20changed,=2058=20insertions(+),=2039=20= deletions(-)=0A=0Adiff=20--git=20a/lisp/cedet/cedet-files.el=20= b/lisp/cedet/cedet-files.el=0Aindex=20236040b..25154fc=20100644=0A---=20= a/lisp/cedet/cedet-files.el=0A+++=20b/lisp/cedet/cedet-files.el=0A@@=20= -27,6=20+27,8=20@@=0A=20=0A=20;;;=20Code:=0A=20=0A+(require=20'ede)=0A+=0A= =20(defun=20cedet-directory-name-to-file-name=20(referencedir=20= &optional=20testmode)=0A=20=20=20"Convert=20the=20REFERENCEDIR=20(a=20= full=20path=20name)=20into=20a=20filename.=0A=20Convert=20directory=20= separation=20characters=20into=20!=20characters.=0A@@=20-35,7=20+37,7=20= @@=20to=20the=20file's=20truename,=20and=20dodging=20platform=20tricks."=0A= =20=20=20(let=20((file=20referencedir))=0A=20=20=20=20=20;;=20Expand=20= to=20full=20file=20name=0A=20=20=20=20=20(when=20(not=20testmode)=0A-=20=20= =20=20=20=20(setq=20file=20(file-truename=20file)))=0A+=20=20=20=20=20=20= (setq=20file=20(ede-file-truename=20file)))=0A=20=20=20=20=20;;=20If=20= FILE=20is=20a=20directory,=20then=20force=20it=20to=20end=20in=20/.=0A=20= =20=20=20=20(when=20(file-directory-p=20file)=0A=20=20=20=20=20=20=20= (setq=20file=20(file-name-as-directory=20file)))=0Adiff=20--git=20= a/lisp/cedet/cedet-java.el=20b/lisp/cedet/cedet-java.el=0Aindex=20= 36a4f38..3bc0806=20100644=0A---=20a/lisp/cedet/cedet-java.el=0A+++=20= b/lisp/cedet/cedet-java.el=0A@@=20-197,11=20+197,9=20@@=20Examples:=0A=20= =20=20:group=20'java=0A=20=20=20:type=20'string)=0A=20=0A-(defvar=20= cedet-java-core-jar-name=20(if=20(eq=20system-type=20'darwin)=0A-=09=09=09= =09=20=20=20=20=20"Contents/Classes/classes.jar"=0A-=09=09=09=09=20=20=20= (concat=20(file-name-as-directory=0A-=09=09=09=09=09=20=20=20=20(concat=20= (file-name-as-directory=20"jre")=20"lib"))=0A-=09=09=09=09=09=20=20=20= "rt.jar"))=0A+(defvar=20cedet-java-core-jar-name=20(concat=20= (file-name-as-directory=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(concat=20(file-name-as-directory=20"jre")=20"lib"))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20"rt.jar")=0A=20=20=20"Name=20of=20Java=20= core=20jar=20file.=0A=20File=20name=20is=20rt.jar=20on=20Linux=20&=20= Windows,=20and=20classes.jar=20on=20Mac=20OS=20X")=0A=20=0Adiff=20--git=20= a/lisp/cedet/ede.el=20b/lisp/cedet/ede.el=0Aindex=205733f76..08eb561=20= 100644=0A---=20a/lisp/cedet/ede.el=0A+++=20b/lisp/cedet/ede.el=0A@@=20= -169,6=20+169,11=20@@=20value=20is=20the=20autoload=20object=20being=20= used.")=0A=20=20=20"Non=20nil=20means=20scan=20down=20a=20tree,=20= otherwise=20rescans=20are=20top=20level=20only.=0A=20Do=20not=20set=20= this=20to=20non-nil=20globally.=20=20It=20is=20used=20internally.")=0A=20= =0A+(defvar=20ede-ignore-symlinks=20nil=0A+=20=20"Non=20nil=20will=20= tell=20ede=20that=20no=20files=20arestored=20in=20directories=20with=20= symlinks.=0A+Use=20this=20option=20to=20speed=20up=20EDE=20when=20you're=20= sure=20that=20the=20project=0A+will=20never=20exist=20in=20directories=20= with=20symbolic=20links.")=0A+=0A=20=0C=0A=20;;;=20Prompting=0A=20;;=0A= @@=20-1157,6=20+1162,15=20@@=20Optional=20ROOTRETURN=20will=20return=20= the=20root=20project=20for=20DIR."=0A=20=09;;=20Return=20the=20project.=0A= =20=09o))))=0A=20=0A+(defun=20ede-file-truename=20(filename)=0A+=20=20= "Produce=20the=20true=20name=20of=20FILENAME=20in=20this=20project.=0A= +If=20`ede-ignore-symlinks'=20is=20non-nil=20then=20don't=20scan=20for=20= symlinks=0A+when=20determining=20the=20true=20file=20name,=20just=20= expand=20it=20based=20on=0A+`default-directory'."=0A+=20=20(if=20= ede-ignore-symlinks=0A+=20=20=20=20=20=20(expand-file-name=20filename)=0A= +=20=20=20=20(file-truename=20filename)))=0A+=0A=20;;;=20PROJECT=20= ASSOCIATIONS=0A=20;;=0A=20;;=20Moving=20between=20relative=20projects.=20= =20Associating=20between=20buffers=20and=0Adiff=20--git=20= a/lisp/cedet/ede/ant.el=20b/lisp/cedet/ede/ant.el=0Aindex=20= bec04b1..32b832e=20100644=0A---=20a/lisp/cedet/ede/ant.el=0A+++=20= b/lisp/cedet/ede/ant.el=0A@@=20-21,6=20+21,7=20@@=0A=20;;=0A=20=0A=20= (require=20'ede/jvm-base)=0A+(require=20'ede)=0A=20=0A=20(defgroup=20= ede-ant=20nil=0A=20=20=20"Emacs=20Development=20Environment.=20Ant=20= options"=0A@@=20-59,8=20+60,8=20@@=20ROOTPROJ=20is=20nil,=20since=20= there=20is=20only=20one=20project."=0A=20=20=20;;=20Doesn't=20already=20= exist,=20so=20lets=20make=20one.=0A=20=20=20(ede-ant-project=20"Ant"=0A=20= =09=09=20=20=20:name=20"Ant=20dir"=20=20=20=20;=20make=20fancy=20name=20= from=20dir=20here.=0A-=09=09=20=20=20:directory=20(file-truename=20dir)=0A= -=09=09=20=20=20:file=20(file-truename=20(expand-file-name=20= ede-ant-project-file-name=20dir))=0A+=09=09=20=20=20:directory=20= (ede-file-truename=20dir)=0A+=09=09=20=20=20:file=20(ede-file-truename=20= (expand-file-name=20ede-ant-project-file-name=20dir))=0A=20=09=09=20=20=20= ))=0A=20=0A=20;;;###autoload=0Adiff=20--git=20a/lisp/cedet/ede/compdb.el=20= b/lisp/cedet/ede/compdb.el=0Aindex=20a614060..29b1cd5=20100644=0A---=20= a/lisp/cedet/ede/compdb.el=0A+++=20b/lisp/cedet/ede/compdb.el=0A@@=20= -226,7=20+226,7=20@@=0A=20=20=20=20=20=20=20(when=20(looking-at=20= ede-compdb-compiler-search-path-dir-rx)=0A=20=20=20=20=20=20=20=20=20;;=20= For=20now=20ignore=20framework=20directories=0A=20=20=20=20=20=20=20=20=20= (unless=20(match-string=202)=0A-=20=20=20=20=20=20=20=20=20=20(setq=20= result=20(cons=20(file-truename=20(match-string=201))=20result))))=0A+=20= =20=20=20=20=20=20=20=20=20(setq=20result=20(cons=20(ede-file-truename=20= (match-string=201))=20result))))=0A=20=20=20=20=20=20=20(forward-line))=0A= =20=0A=20=20=20=20=20(reverse=20result)))=0A@@=20-493,14=20+493,14=20@@=20= the=20current=20buffer.=20In=20general,=20we=20do=20a=20lookup=20on=20= the=20current=0A=20buffer=20file=20in=20the=20compdb=20hashtable.=20If=20= not=20present,=20we=20look=0A=20through=20the=20list=20of=20other=20= files=20provided=20by=20`ff-all-other-files'=0A=20an=20d=20pick=20one=20= that=20is=20present=20in=20the=20compdb=20hashtable."=0A-=20=20(let=20= ((fname=20(file-truename=20(buffer-file-name))))=0A+=20=20(let=20((fname=20= (ede-file-truename=20(buffer-file-name))))=0A=20=20=20=20=20(or=0A=20=20=20= =20=20=20;;=20If=20the=20file=20is=20in=20the=20compilation=20database,=20= use=20that=0A=20=20=20=20=20=20(gethash=20fname=20(oref=20this=20= compdb))=0A=20=20=20=20=20=20;;=20If=20one=20the=20'other'=20files=20are=20= in=20the=20compilation=20database,=20use=20the=20first=20match=0A=20=20=20= =20=20=20(let=20((others=20(other-file-list=20this=20fname))=20found)=0A=20= =20=20=20=20=20=20=20(while=20(and=20others=20(not=20found))=0A-=20=20=20= =20=20=20=20=20=20(setq=20found=20(gethash=20(file-truename=20(car=20= others))=20(oref=20this=20compdb)))=0A+=20=20=20=20=20=20=20=20=20(setq=20= found=20(gethash=20(ede-file-truename=20(car=20others))=20(oref=20this=20= compdb)))=0A=20=20=20=20=20=20=20=20=20=20(setq=20others=20(cdr=20= others)))=0A=20=20=20=20=20=20=20=20found)=0A=20=20=20=20=20=20;;=20= Otherwise=20search=20the=20compilation=20database=20for=20the=20'best'=20= match.=20In=20this=0A@@=20-541,7=20+541,7=20@@=20an=20d=20pick=20one=20= that=20is=20present=20in=20the=20compdb=20hashtable."=0A=20=20=20=20=20=20= =20(dolist=20(E=20json-compdb)=0A=20=20=20=20=20=20=20=20=20(let*=20= ((directory=20(file-name-as-directory=20(cdr=20(assoc=20'directory=20= E))))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(filename=20= (expand-file-name=20(cdr=20(assoc=20'file=20E))=20directory))=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(filetruename=20(file-truename=20= filename))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(filetruename=20= (ede-file-truename=20filename))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(command-line=20(cdr=20(assoc=20'command=20E)))=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(compilation=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(compdb-entry=20filename=0Adiff=20--git=20= a/lisp/cedet/ede/files.el=20b/lisp/cedet/ede/files.el=0Aindex=20= 58d29ef..57a092d=20100644=0A---=20a/lisp/cedet/ede/files.el=0A+++=20= b/lisp/cedet/ede/files.el=0A@@=20-217,8=20+217,8=20@@=20If=20optional=20= EXACT=20is=20non-nil,=20only=20return=20exact=20matches=20for=20DIR."=0A=20= =09=20;;=20Note=20that=20we=20must=20resort=20to=20truename=20in=20order=20= to=20resolve=20issues=20such=20as=0A=20=09=20;;=20cross-symlink=20= projects.=0A=20=09=20((and=20(not=20exact)=0A-=09=20=20=20=20=20=20=20= (let=20((ftn=20(file-truename=20ft))=0A-=09=09=20=20=20=20=20(ptd=20= (file-truename=20pd)))=0A+=09=20=20=20=20=20=20=20(let=20((ftn=20= (ede-file-truename=20ft))=0A+=09=09=20=20=20=20=20(ptd=20= (ede-file-truename=20pd)))=0A=20=09=09=20(string-match=20(concat=20"^"=20= (regexp-quote=20ptd))=20ftn)))=0A=20=09=20=20(if=20(not=20shortans)=0A=20= =09=20=20=20=20=20=20(setq=20shortans=20(car=20all))=0A@@=20-238,13=20= +238,13=20@@=20If=20optional=20EXACT=20is=20non-nil,=20only=20return=20= exact=20matches=20for=20DIR."=0A=20=20=20"Find=20a=20subproject=20of=20= PROJ=20that=20corresponds=20to=20DIR."=0A=20=20=20(if=20= ede--disable-inode=0A=20=20=20=20=20=20=20(let=20((ans=20nil)=0A-=09=20=20= =20=20(fulldir=20(file-truename=20dir)))=0A+=09=20=20=20=20(fulldir=20= (ede-file-truename=20dir)))=0A=20=09;;=20Try=20to=20find=20the=20right=20= project=20w/out=20inodes.=0A=20=09(ede-map-subprojects=0A=20=09=20proj=0A= =20=09=20(lambda=20(SP)=0A=20=09=20=20=20(when=20(not=20ans)=0A-=09=20=20= =20=20=20(if=20(string=3D=20fulldir=20(file-truename=20(oref=20SP=20= :directory)))=0A+=09=20=20=20=20=20(if=20(string=3D=20fulldir=20= (ede-file-truename=20(oref=20SP=20:directory)))=0A=20=09=09=20(setq=20= ans=20SP)=0A=20=09=20=20=20=20=20=20=20= (ede-find-subproject-for-directory=20SP=20dir)))))=0A=20=09ans)=0A@@=20= -398,8=20+398,8=20@@=20Argument=20THIS=20is=20the=20project=20to=20= convert=20PATH=20to."=0A=20=09(fp=20(expand-file-name=20path)))=0A=20=20=20= =20=20(if=20(string-match=20(regexp-quote=20pp)=20fp)=0A=20=09(substring=20= fp=20(match-end=200))=0A-=20=20=20=20=20=20(let=20((pptf=20= (file-truename=20pp))=0A-=09=20=20=20=20(fptf=20(file-truename=20fp)))=0A= +=20=20=20=20=20=20(let=20((pptf=20(ede-file-truename=20pp))=0A+=09=20=20= =20=20(fptf=20(ede-file-truename=20fp)))=0A=20=09(if=20(string-match=20= (regexp-quote=20pptf)=20fptf)=0A=20=09=20=20=20=20(substring=20fptf=20= (match-end=200))=0A=20=09=20=20(error=20"Cannot=20convert=20relativize=20= path=20%s"=20fp))))))=0Adiff=20--git=20a/lisp/cedet/semantic/adebug.el=20= b/lisp/cedet/semantic/adebug.el=0Aindex=209e55da7..45885de=20100644=0A= ---=20a/lisp/cedet/semantic/adebug.el=0A+++=20= b/lisp/cedet/semantic/adebug.el=0A@@=20-35,6=20+35,7=20@@=0A=20(require=20= 'eieio)=0A=20(require=20'data-debug)=0A=20(require=20'semantic)=0A= +(require=20'ede)=0A=20(require=20'semantic/format)=0A=20= (eval-when-compile=0A=20=20=20(require=20'semantic/db-find))=0A@@=20= -312,7=20+313,7=20@@=20Display=20the=20results=20as=20a=20debug=20list."=0A= =20(defun=20semanticdb-debug-file-tag-check=20(startfile)=0A=20=20=20= "Report=20debug=20info=20for=20checking=20STARTFILE=20for=20up-to-date=20= tags."=0A=20=20=20(interactive=20"FFile=20to=20Check=20(default=20=3D=20= current-buffer):=20")=0A-=20=20(let*=20((file=20(file-truename=20= startfile))=0A+=20=20(let*=20((file=20(edefile-truename=20startfile))=0A=20= =09=20(default-directory=20(file-name-directory=20file))=0A=20=09=20(db=20= (or=0A=20=09=20=20=20=20=20=20;;=20This=20line=20will=20pick=20up=20= system=20databases.=0Adiff=20--git=20a/lisp/cedet/semantic/db-file.el=20= b/lisp/cedet/semantic/db-file.el=0Aindex=202ef4fba..3072d8a=20100644=0A= ---=20a/lisp/cedet/semantic/db-file.el=0A+++=20= b/lisp/cedet/semantic/db-file.el=0A@@=20-130,7=20+130,7=20@@=20If=20a=20= database=20for=20DIRECTORY=20has=20already=20been=20loaded,=20return=20= it.=0A=20If=20a=20database=20for=20DIRECTORY=20exists,=20then=20load=20= that=20database,=20and=20return=20it.=0A=20If=20DIRECTORY=20doesn't=20= exist,=20create=20a=20new=20one."=0A=20=20=20;;=20Make=20sure=20this=20= is=20fully=20expanded=20so=20we=20don't=20get=20duplicates.=0A-=20=20= (setq=20directory=20(file-truename=20directory))=0A+=20=20(setq=20= directory=20(ede-file-truename=20directory))=0A=20=20=20(let*=20((fn=20= (semanticdb-cache-filename=20dbc=20directory))=0A=20=09=20(db=20(or=20= (semanticdb-file-loaded-p=20fn)=0A=20=09=09=20(if=20(file-exists-p=20fn)=0A= diff=20--git=20a/lisp/cedet/semantic/db-javap.el=20= b/lisp/cedet/semantic/db-javap.el=0Aindex=205404777..2f2a095=20100644=0A= ---=20a/lisp/cedet/semantic/db-javap.el=0A+++=20= b/lisp/cedet/semantic/db-javap.el=0A@@=20-638,7=20+638,7=20@@=20If=20a=20= database=20for=20JARFILE=20has=20already=20been=20loaded,=20return=20it.=0A= =20If=20no=20database=20for=20JARFILE=20exists,=20then=20extract=20the=20= database=20basic=20contents=0A=20from=20JARFILE,=20and=20create=20a=20= database=20for=20it."=0A=20=20=20;;=20Make=20sure=20this=20is=20fully=20= expanded=20so=20we=20don't=20get=20duplicates.=0A-=20=20(setq=20jarfile=20= (file-truename=20jarfile))=0A+=20=20(setq=20jarfile=20(ede-file-truename=20= jarfile))=0A=20=20=20(let*=20((db=20(eieio-instance-tracker-find=20= jarfile=20'reference-directory=0A=20=09=09=09=09=09=20=20= 'semanticdb-database-list))=0A=20=09=20)=0Adiff=20--git=20= a/lisp/cedet/semantic/db.el=20b/lisp/cedet/semantic/db.el=0Aindex=20= 8529377..dd021e2=20100644=0A---=20a/lisp/cedet/semantic/db.el=0A+++=20= b/lisp/cedet/semantic/db.el=0A@@=20-32,6=20+32,7=20@@=0A=20=0A=20= (require=20'eieio-base)=0A=20(require=20'semantic)=0A+(require=20'ede)=0A= =20=0A=20(eval-when-compile=0A=20=20=20(require=20'semantic/find))=0A@@=20= -397,7=20+398,7=20@@=20If=20DIRECTORY=20doesn't=20exist,=20create=20a=20= new=20one."=0A=20=09=09:tables=20nil))=0A=20=20=20=20=20=20=20;;=20Set=20= this=20up=20here.=20=20=20We=20can't=20put=20it=20in=20the=20constructor=20= because=20it=0A=20=20=20=20=20=20=20;;=20would=20be=20saved,=20and=20we=20= want=20DB=20files=20to=20be=20portable.=0A-=20=20=20=20=20=20(oset=20db=20= reference-directory=20(file-truename=20directory)))=0A+=20=20=20=20=20=20= (oset=20db=20reference-directory=20(ede-file-truename=20directory)))=0A=20= =20=20=20=20db))=0A=20=0A=20(defmethod=20= semanticdb-flush-database-tables=20((db=20semanticdb-project-database))=0A= @@=20-423,7=20+424,7=20@@=20If=20the=20table=20for=20FILE=20does=20not=20= exist,=20create=20one."=0A=20=0A=20(defmethod=20semanticdb-file-table=20= ((obj=20semanticdb-project-database)=20filename)=0A=20=20=20"=46rom=20= OBJ,=20return=20FILENAME's=20associated=20table=20object."=0A-=20=20= (object-assoc=20(file-relative-name=20(file-truename=20filename)=0A+=20=20= (object-assoc=20(file-relative-name=20(ede-file-truename=20filename)=0A=20= =20=20=09=09=09=09=20=20=20=20(oref=20obj=20reference-directory))=0A=20=09= =09'file=20(oref=20obj=20tables)))=0A=20=0A@@=20-431,7=20+432,7=20@@=20= If=20the=20table=20for=20FILE=20does=20not=20exist,=20create=20one."=0A=20= (defun=20semanticdb-get-database=20(filename)=0A=20=20=20"Get=20a=20= database=20for=20FILENAME.=0A=20If=20one=20isn't=20found,=20create=20= one."=0A-=20=20(semanticdb-create-database=20= semanticdb-new-database-class=20(file-truename=20filename)))=0A+=20=20= (semanticdb-create-database=20semanticdb-new-database-class=20= (ede-file-truename=20filename)))=0A=20=0A=20(defun=20= semanticdb-directory-loaded-p=20(path)=0A=20=20=20"Return=20the=20= project=20belonging=20to=20PATH=20if=20it=20was=20already=20loaded."=0A= @@=20-443,7=20+444,7=20@@=20If=20FILENAME=20exists=20in=20the=20database=20= already,=20return=20that.=0A=20If=20there=20is=20no=20database=20for=20= the=20table=20to=20live=20in,=20create=20one."=0A=20=20=20(let=20((cdb=20= nil)=0A=20=09(tbl=20nil)=0A-=09(dd=20(file-name-directory=20= (file-truename=20filename)))=0A+=09(dd=20(file-name-directory=20= (ede-file-truename=20filename)))=0A=20=09)=0A=20=20=20=20=20;;=20Allow=20= a=20database=20override=20function=0A=20=20=20=20=20(setq=20cdb=20= (semanticdb-create-database=20semanticdb-new-database-class=0A@@=20= -848,17=20+849,17=20@@=20Always=20append=20= `semanticdb-project-system-databases'=20if=0A=20=20=20(let=20((root=20= nil)=09=09=09;=20found=20root=20directory=0A=20=09(dbs=20nil)=09=09=09;=20= collected=20databases=0A=20=09(roots=20semanticdb-project-roots)=20;all=20= user=20roots=0A-=09(dir=20(file-truename=20(or=20dir=20= default-directory)))=0A+=09(dir=20(ede-file-truename=20(or=20dir=20= default-directory)))=0A=20=09)=0A=20=20=20=20=20;;=20Find=20the=20root=20= based=20on=20project=20functions.=0A=20=20=20=20=20(setq=20root=20= (run-hook-with-args-until-success=0A=20=09=09= 'semanticdb-project-root-functions=0A=20=09=09dir))=0A=20=20=20=20=20(if=20= root=0A-=09(setq=20root=20(file-truename=20root))=0A+=09(setq=20root=20= (ede-file-truename=20root))=0A=20=20=20=20=20=20=20;;=20Else,=20Find=20= roots=20based=20on=20strings=0A=20=20=20=20=20=20=20(while=20roots=0A-=09= (let=20((r=20(file-truename=20(car=20roots))))=0A+=09(let=20((r=20= (ede-file-truename=20(car=20roots))))=0A=20=09=20=20(if=20(string-match=20= (concat=20"^"=20(regexp-quote=20r))=20dir)=0A=20=09=20=20=20=20=20=20= (setq=20root=20r)))=0A=20=09(setq=20roots=20(cdr=20roots))))=0A@@=20= -921,7=20+922,7=20@@=20DONTLOAD=20does=20not=20affect=20the=20creation=20= of=20new=20database=20objects."=0A=20=20=20=20=20=20=20;;=20way=20by=20= getting=20the=20database,=20and=20finding=20a=20table=20in=20that=20= database.=0A=20=20=20=20=20=20=20;;=20Once=20we=20have=20a=20table,=20= add=20it=20to=20the=20hash.=0A=20=20=20=20=20=20=20(when=20(eq=20tab=20= 'no-hit)=0A-=09(setq=20fullfile=20(file-truename=20file))=0A+=09(setq=20= fullfile=20(ede-file-truename=20file))=0A=20=09(let=20((db=20(or=20;;=20= This=20line=20will=20pick=20up=20system=20databases.=0A=20=09=09=20=20=20= (semanticdb-directory-loaded-p=20default-directory)=0A=20=09=09=20=20=20= ;;=20this=20line=20will=20make=20a=20new=20one=20if=20needed.=0A@@=20= -931,7=20+932,7=20@@=20DONTLOAD=20does=20not=20affect=20the=20creation=20= of=20new=20database=20objects."=0A=20=09=20=20=20=20= (semanticdb-file-table-object-put-hash=20file=20tab)=0A=20=09=20=20=20=20= (when=20(not=20(string=3D=20fullfile=20file))=0A=20=09=20=20=20=20=20=20= (semanticdb-file-table-object-put-hash=20fullfile=20tab)=0A-=09=20=20=20=20= ))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20))=0A=20=09=20=20))=0A=20= =0A=20=20=20=20=20=20=20(cond=0A@@=20-970,7=20+971,7=20@@=20DONTLOAD=20= does=20not=20affect=20the=20creation=20of=20new=20database=20objects."=0A= =20=09(when=20(and=20(not=20tab)=20(not=20fullfile))=0A=20=09=20=20;;=20= This=20case=20is=20if=20a=20'nil=20is=20erroneously=20put=20into=20the=20= hash=20table.=20=20This=0A=20=09=20=20;;=20would=20need=20fixing=0A-=09=20= =20(setq=20fullfile=20(file-truename=20file))=0A+=09=20=20(setq=20= fullfile=20(ede-file-truename=20file))=0A=20=09=20=20)=0A=20=0A=20=09;;=20= If=20we=20have=20a=20table,=20but=20no=20fullfile,=20that's=20ok.=20=20= Let's=20get=20the=20filename=0A@@=20-992,7=20+993,7=20@@=20DONTLOAD=20= does=20not=20affect=20the=20creation=20of=20new=20database=20objects."=0A= =20=09;;=20One=20person=20found=20this.=20=20Is=20it=20a=20file=20that=20= failed=20to=20parse=0A=20=09;;=20in=20the=20past?=0A=20=09(when=20(not=20= fullfile)=0A-=09=20=20(setq=20fullfile=20(file-truename=20file)))=0A+=09=20= =20(setq=20fullfile=20(ede-file-truename=20file)))=0A=20=0A=20=09;;=20We=20= were=20asked=20not=20to=20load=20the=20file=20in=20and=20parse=20it.=0A=20= =09;;=20Instead=20just=20create=20a=20database=20table=20with=20no=20= tags=0Adiff=20--git=20a/lisp/cedet/semantic/decorate/include.el=20= b/lisp/cedet/semantic/decorate/include.el=0Aindex=204c58111..23c67fd=20= 100644=0A---=20a/lisp/cedet/semantic/decorate/include.el=0A+++=20= b/lisp/cedet/semantic/decorate/include.el=0A@@=20-31,6=20+31,7=20@@=0A=20= (require=20'semantic/db)=0A=20(require=20'semantic/db-ref)=0A=20(require=20= 'semantic/db-find)=0A+(require=20'ede)=0A=20=0A=20(eval-when-compile=0A=20= =20=20(require=20'semantic/find))=0A@@=20-708,7=20+709,7=20@@=20Argument=20= EVENT=20describes=20the=20event=20that=20caused=20this=20function=20to=20= be=20called."=0A=20=09=09=20=20=20=20=20=20=20(called-interactively-p=20= 'interactive))=0A=20=0A=20=20=20=20=20=20=20(princ=20"Include=20Summary=20= for=20File:=20")=0A-=20=20=20=20=20=20(princ=20(file-truename=20= (buffer-file-name)))=0A+=20=20=20=20=20=20(princ=20(ede-file-truename=20= (buffer-file-name)))=0A=20=20=20=20=20=20=20(princ=20"\n")=0A=20=0A=20=20= =20=20=20=20=20(when=20(oref=20table=20db-refs)=0Adiff=20--git=20= a/tests/cedet/ede/compdb-utest.el=20b/tests/cedet/ede/compdb-utest.el=0A= index=2030a01c0..e20ca1a=20100644=0A---=20= a/tests/cedet/ede/compdb-utest.el=0A+++=20= b/tests/cedet/ede/compdb-utest.el=0A@@=20-33,9=20+33,10=20@@=0A=20= (require=20'rx)=0A=20(require=20'inversion)=0A=20(require=20'ede/compdb)=0A= +(require=20'ede)=0A=20=0A=20;;=20Need=20to=20have=20EDE=20and=20= semantic=20automatically=20enabled=20for=20new=20buffers=0A= -;(semantic-mode=20t)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ;(semantic-mode=20t)=0A=20(global-ede-mode=20t)=0A=20=0A=20;;=20We=20= test=20with=20.ipp=20files=20-=20map=20to=20c++=20mode=20so=20they=20can=20= be=20parsed=20correctly=0A@@=20-264,7=20+265,7=20@@=20End=20of=20search=20= list.=0A=20=0A=20=20=20=20=20=20=20;;=20Basic=20sanity=20checks=20on=20= the=20project=20itself=0A=20=20=20=20=20=20=20(should=20(eq=20proj=20= (ede-directory-get-open-project=20testdir)))=0A-=20=20=20=20=20=20= (should=20(gethash=20(file-truename=20maincpp)=20(oref=20proj=20= compdb)))=0A+=20=20=20=20=20=20(should=20(gethash=20(ede-file-truename=20= maincpp)=20(oref=20proj=20compdb)))=0A=20=0A=20=20=20=20=20=20=20;;=20= Now=20we'll=20open=20source=20files=20and=20check=20that=20they=20are=20= parsed=20correctly=0A=20=20=20=20=20=20=20(unwind-protect=0A@@=20-280,7=20= +281,7=20@@=20End=20of=20search=20list.=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20;;=20Include=20path=20should=20include=20certain=20= dirs:=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(let=20((P=20= (ede-system-include-path=20ede-object)))=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(should=20(member=20(file-name-as-directory=20= (expand-file-name=20"world"=20testdir))=20P))=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(should=20(or=20(member=20builddir=20P)=20= (member=20(file-truename=20builddir)=20P)))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(should=20(or=20(member=20builddir=20P)=20= (member=20(ede-file-truename=20builddir)=20P)))=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20)=0A=20=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20;;=20Should=20have=20been=20parsed=0A@@=20-315,7=20= +316,7=20@@=20End=20of=20search=20list.=0A=20=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20;;=20Compilation=20should=20be=20pointed=20= to=20world.cpp=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (should=20(eq=20(oref=20ede-object=20compilation)=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (gethash=20(file-truename=20worldcpp)=20(oref=20proj=20compdb))))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(gethash=20(ede-file-truename=20worldcpp)=20(oref=20proj=20= compdb))))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= )))=0A=20=0A=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20Try=20a=20header=20= with=20no=20matching=20source=20file=0A@@=20-328,7=20+329,7=20@@=20End=20= of=20search=20list.=0A=20=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20Compilation=20should=20be=20pointed=20to=20main.cpp=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(should=20(eq=20(oref=20= ede-object=20compilation)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(gethash=20(file-truename=20= maincpp)=20(oref=20proj=20compdb))))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(gethash=20= (ede-file-truename=20maincpp)=20(oref=20proj=20compdb))))=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20))=0A=20=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20;;=20Try=20a=20generated=20source=20file=0A@@=20-361,7=20= +362,7=20@@=20End=20of=20search=20list.=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20(with-current-buffer=20(get-file-buffer=20maincpp)=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20;;=20Check=20that=20compilation=20entry=20= has=20been=20updated=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (should=20(eq=20(oref=20ede-object=20compilation)=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(gethash=20= (file-truename=20buffer-file-name)=20(oref=20proj=20compdb)))))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (gethash=20(ede-file-truename=20buffer-file-name)=20(oref=20proj=20= compdb)))))=0A=20=0A=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20Close=20= all=20buffers=20and=20check=20we=20can=20still=20rescan=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20(while=20testbufs=0A--=20=0A2.5.4=20(Apple=20= Git-61)=0A=0A= --Apple-Mail=_35E91092-95D1-47A9-AFBB-8FDD005FF65B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 --Apple-Mail=_35E91092-95D1-47A9-AFBB-8FDD005FF65B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Cedet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-devel --Apple-Mail=_35E91092-95D1-47A9-AFBB-8FDD005FF65B--