Commit 7e865541 by Iain Buclaw Committed by Iain Buclaw

d-demangle.c (dlang_symbol_kinds): New enum.

libiberty/ChangeLog:

2015-05-16  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-demangle.c (dlang_symbol_kinds): New enum.
	(dlang_parse_symbol): Update signature.  Handle an ambiguity between
	pascal functions and template value arguments.  Only check for a type
	if parsing a function, or at the top level.  Return failure if the
	entire symbol was not successfully demangled.
	(dlang_identifier): Update signature.  Handle an ambiguity between two
	adjacent digits in a mangled symbol string.
	(dlang_type): Update call to dlang_parse_symbol.
	(dlang_template_args): Likewise.
	(dlang_parse_template): Likewise.
	(dlang_demangle): Likewise.
	* testsuite/d-demangle-expected: Fix bad tests found, and add problematic
	examples to the unittests.

From-SVN: r223247
parent ed4cdb85
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_symbol_kinds): New enum.
(dlang_parse_symbol): Update signature. Handle an ambiguity between
pascal functions and template value arguments. Only check for a type
if parsing a function, or at the top level. Return failure if the
entire symbol was not successfully demangled.
(dlang_identifier): Update signature. Handle an ambiguity between two
adjacent digits in a mangled symbol string.
(dlang_type): Update call to dlang_parse_symbol.
(dlang_template_args): Likewise.
(dlang_parse_template): Likewise.
(dlang_demangle): Likewise.
* testsuite/d-demangle-expected: Fix bad tests found, and add problematic
examples to the unittests.
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_template_args): Skip over specialized template * d-demangle.c (dlang_template_args): Skip over specialized template
parameters in mangled symbol. parameters in mangled symbol.
* testsuite/d-demangle-expected: Add coverage and unittest for specialized * testsuite/d-demangle-expected: Add coverage and unittest for specialized
......
...@@ -614,12 +614,12 @@ _D8demangle17__T4testS6symbolZv ...@@ -614,12 +614,12 @@ _D8demangle17__T4testS6symbolZv
demangle.test!(symbol) demangle.test!(symbol)
# #
--format=dlang --format=dlang
_D8demangle21__T4testS6symbol3fooZv _D8demangle23__T4testS116symbol3fooZv
demangle.test!(symbol.foo) demangle.test!(symbol.foo)
# #
--format=dlang --format=dlang
_D8demangle25__T4testS6symbol3foo3barZv _D8demangle32__T4testS20_D6symbol3foo3barFZvZv
demangle.test!(symbol.foo.bar) demangle.test!(symbol.foo.bar())
# #
--format=dlang --format=dlang
_D8demangle19__T4testTaS6symbolZv _D8demangle19__T4testTaS6symbolZv
...@@ -932,19 +932,19 @@ _D6plugin8generateFiiZAOa ...@@ -932,19 +932,19 @@ _D6plugin8generateFiiZAOa
plugin.generate(int, int) plugin.generate(int, int)
# #
--format=dlang --format=dlang
_D8demangle3fnAFZv3fnBMFZv _D8demangle3fnAFZ3fnBMFZv
demangle.fnA().fnB() demangle.fnA().fnB()
# #
--format=dlang --format=dlang
_D8demangle4mainFZv1S3fnCFZv _D8demangle4mainFZ1S3fnCMFZv
demangle.main().S.fnC() demangle.main().S.fnC()
# #
--format=dlang --format=dlang
_D8demangle4mainFZv1S3fnDMFZv _D8demangle4mainFZ1S3fnDMFZv
demangle.main().S.fnD() demangle.main().S.fnD()
# #
--format=dlang --format=dlang
_D8demangle4mainFZv5localMFZi _D8demangle4mainFZ5localMFZi
demangle.main().local() demangle.main().local()
# #
--format=dlang --format=dlang
...@@ -988,7 +988,7 @@ _D6object14TypeInfo_Array8argTypesMFNbNfJC8TypeInfoJC8TypeInfoZi ...@@ -988,7 +988,7 @@ _D6object14TypeInfo_Array8argTypesMFNbNfJC8TypeInfoJC8TypeInfoZi
object.TypeInfo_Array.argTypes(out TypeInfo, out TypeInfo) object.TypeInfo_Array.argTypes(out TypeInfo, out TypeInfo)
# #
--format=dlang --format=dlang
_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZi7tryExecMFMDFZvZv _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv
rt.dmain2._d_run_main(int, char**, extern(C) int(char[][]) function*).tryExec(scope void() delegate) rt.dmain2._d_run_main(int, char**, extern(C) int(char[][]) function*).tryExec(scope void() delegate)
# #
--format=dlang --format=dlang
...@@ -1044,17 +1044,37 @@ _D2gc11gctemplates56__T8mkBitmapTS3std5range13__T4iotaTiTiZ4iotaFiiZ6ResultZ8mkB ...@@ -1044,17 +1044,37 @@ _D2gc11gctemplates56__T8mkBitmapTS3std5range13__T4iotaTiTiZ4iotaFiiZ6ResultZ8mkB
gc.gctemplates.mkBitmap!(std.range.iota!(int, int).iota(int, int).Result).mkBitmap(ulong*, ulong) gc.gctemplates.mkBitmap!(std.range.iota!(int, int).iota(int, int).Result).mkBitmap(ulong*, ulong)
# #
--format=dlang --format=dlang
_D8serenity9persister6Sqlite70__T15SqlitePersisterTS8serenity9persister6Sqlite11__unittest6FZv4TestZ15SqlitePersister12__T7opIndexZ7opIndexMFmZS8serenity9persister6Sqlite11__unittest6FZv4Test _D8serenity9persister6Sqlite69__T15SqlitePersisterTS8serenity9persister6Sqlite11__unittest6FZ4TestZ15SqlitePersister12__T7opIndexZ7opIndexMFmZS8serenity9persister6Sqlite11__unittest6FZ4Test
serenity.persister.Sqlite.SqlitePersister!(serenity.persister.Sqlite.__unittest6().Test).SqlitePersister.opIndex!().opIndex(ulong) serenity.persister.Sqlite.SqlitePersister!(serenity.persister.Sqlite.__unittest6().Test).SqlitePersister.opIndex!().opIndex(ulong)
# #
--format=dlang --format=dlang
_D4test4mainFZv5localMFZi
test.main().local()
#
--format=dlang
_D3std6socket12InternetHost221__T13getHostNoSyncVAyaa96_0a09202020206175746f2078203d2068746f6e6c28706172616d293b0a09202020206175746f206865203d20676574686f73746279616464722826782c20342c206361737428696e74294164647265737346616d696c792e494e4554293b0a09TkZ13getHostNoSyncMFkZb _D3std6socket12InternetHost221__T13getHostNoSyncVAyaa96_0a09202020206175746f2078203d2068746f6e6c28706172616d293b0a09202020206175746f206865203d20676574686f73746279616464722826782c20342c206361737428696e74294164647265737346616d696c792e494e4554293b0a09TkZ13getHostNoSyncMFkZb
std.socket.InternetHost.getHostNoSync!("\n\t auto x = htonl(param);\n\t auto he = gethostbyaddr(&x, 4, cast(int)AddressFamily.INET);\n\t", uint).getHostNoSync(uint) std.socket.InternetHost.getHostNoSync!("\n\t auto x = htonl(param);\n\t auto he = gethostbyaddr(&x, 4, cast(int)AddressFamily.INET);\n\t", uint).getHostNoSync(uint)
# #
--format=dlang --format=dlang
_D2gc6config13__T5parseHTfZ5parseFNbNiAxaKAxaKfZb _D2gc6config13__T5parseHTfZ5parseFNbNiAxaKAxaKfZb
gc.config.parse!(float).parse(const(char)[], ref const(char)[], ref float) gc.config.parse!(float).parse(const(char)[], ref const(char)[], ref float)
#
--format=dlang
_D3std11parallelism273__T4TaskS213std11parallelism3runTDFS3std9algorithm87__T9MapResultS27_D4test4mainFZ7getTermMFiZeTS3std5range13__T4iotaTiTiZ4iotaFiiZ6ResultZ9MapResultmmZeTS3std9algorithm87__T9MapResultS27_D4test4mainFZ7getTermMFiZeTS3std5range13__T4iotaTiTiZ4iotaFiiZ6ResultZ9MapResultTmTmZ4Task4implFPvZv
std.parallelism.Task!(std.parallelism.run, real(std.algorithm.MapResult!(test.main().getTerm(int), std.range.iota!(int, int).iota(int, int).Result).MapResult, ulong, ulong) delegate, std.algorithm.MapResult!(test.main().getTerm(int), std.range.iota!(int, int).iota(int, int).Result).MapResult, ulong, ulong).Task.impl(void*)
#
--format=dlang
_D2rt5minfo16__unittestL518_6FZ12UTModuleInfo6__ctorMFNckZS2rt5minfo16__unittestL518_6FZ12UTModuleInfo
rt.minfo.__unittestL518_6().UTModuleInfo.this(uint)
#
--format=dlang
_D3std6traits37__T7fqnTypeTC6ObjectVbi0Vbi0Vbi0Vbi0Z13addQualifiersFAyabbbbZAya
std.traits.fqnType!(Object, false, false, false, false).addQualifiers(immutable(char)[], bool, bool, bool, bool)
#
--format=dlang
_D3std9algorithm117__T9MapResultS153std5range4onlyTS3std9algorithm53__T12FilterResultS28_D3std3uni7isUpperFNaNbNfwZbTAyaZ12FilterResultZ9MapResult5frontMFNaNdNfZS3std5range22__T10OnlyResultTwVmi1Z10OnlyResult
std.algorithm.MapResult!(std.range.only, std.algorithm.FilterResult!(std.uni.isUpper(dchar), immutable(char)[]).FilterResult).MapResult.front()
#
--format=dlang
_D3std6traits17__T6fqnSymS43stdZ11adjustIdentFAyaZAya
std.traits.fqnSym!(std).adjustIdent(immutable(char)[])
#
--format=dlang
_D2rt8lifetime36__T14_d_newarrayOpTS13_d_newarrayiTZ14_d_newarrayOpTFNaNbxC8TypeInfomPmZAv
rt.lifetime._d_newarrayOpT!(_d_newarrayiT)._d_newarrayOpT(const(TypeInfo), ulong, ulong*)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment