Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Conversation

kennytm
Copy link
Contributor

@kennytm kennytm commented May 8, 2011

Issue 4243 (part of): Float literals were demangled wrongly.
Issue 5955: Demangling of NaN and Infinity.
Issue 5956: Implemented struct literal parsing.
Issue 5967: Mangling of ArgClose for variadic function is swapped.
Unlisted bugs:

  • Imaginary numbers were not shown with the 'i' suffix.
  • Complex literals were demangled wrongly.
  • Implemented array literal parsing.
  • Implemented associated array literal parsing.
  • Function with delegate return type is now correctly demangled.
    Improvements:
  • Integer and float literal suffixes are now shown.
  • Some nested functions that are not affected by Issue 4268 can be demangled.

@complexmath
Copy link
Contributor

Nice work! This may be too late for 2.053, but will definitely be in 2.054.

complexmath added a commit that referenced this pull request May 16, 2011
@complexmath complexmath merged commit d92dabe into dlang:master May 16, 2011
@complexmath
Copy link
Contributor

It turns out this merge broke the linux/64 build so I've reverted it for now. I'll apply some of the changes manually and see if I can track down the problem.

@complexmath
Copy link
Contributor

I've checked in fixes for the following issues. The rest to come later:

Issue 4323 - std.demangle incorrectly handles template floating point numbers
demangle array literal
Handle struct values (see issue 5956)

@complexmath
Copy link
Contributor

I've checked in fixes for these issues:

Issue 5955 - core.demangle fail to parse NaN and Infinity
core.demangle: Properly handle associative arrays
core.demangle: (Unlisted bug) - Parse the inout(T) type (a.k.a. Wild in the ABI).

@complexmath
Copy link
Contributor

Just a quick note that I'll get the other changes in. I've just been swamped with non-D work recently.

@complexmath
Copy link
Contributor

Okay, at this point the only remaining issue in the above list that should apply to core.druntime is:

core.demangle: Format integer literal base on its type

There were two that I didn't explicitly fix that seems to be working based on other changes I made:

core.demangle: Attempt to parse nested struct inside function
core.demangle - Function with delegate return type is now correctly pars...

Please let me know if you encounter any problems.

I'm still debating how to handle the remaining issue about formatting integer literals. It will probably be close to what you've done however, as my goal for demangling is to make the result look as much like the original line of code as possible.

@complexmath
Copy link
Contributor

Integer formatting should now be fixed. I believe they still won't format correctly if inside an array or AA literal, but that's as much a function of the mangling convention as it is the demangler. I'll consider all the requested tasks complete for this pull request.

redstar added a commit to redstar/druntime that referenced this pull request Sep 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants