From: Sergio Durigan Junior <sergiodj@redhat.com>
To: gdb-patches@sourceware.org
Subject: [RFC 0/8] Beginning to remove globals from parser-defs.h
Date: Sun, 15 Jan 2012 18:51:00 -0000 [thread overview]
Message-ID: <m3k44s7qej.fsf@gmail.com> (raw)
Hello,
I have been working on this during my weekends, and I would like to know
what you guys think about this set of patches.
While I was working on another patch, I started to dive into the current
expression parsing mechanism, and it really bothered me all those
globals. So, as a pet project, I decided to start removing them.
Initially I tried to remove them all, and create a big structure which
would hold the parsing state and be passed to parser-specific functions.
Unfortunately, this task proved to be non-sense because of its size and
increasing complexity, so I decided to tackle the problem using another
way: baby steps, as Tom would say.
These 8 patches basically contain adaptations on every .y file, as well
as on the *-lang.h ones, and on parser-defs.h/parse.c files. The idea
now is to make three fields non-global: `expout', `expout_size' and
`expout_ptr'. There are still some (lots of?) other global variables
there, which I didn't touch yet. Maybe some day I will have
time/patience for that...
I decided to split the patches because the whole diff file contains more
than 7 thousand lines. However, I did not bother to make those patches
compile independently! So if you want to test, you'll have to apply
them all (order should not matter).
I hope you like the result. It is still far from ideal, but I believe
it is a good step towards this "non-globalization" thing.
Comments, as usual, are welcome. The patch has been regtested on an
x86_64 and i686 Fedora 15, without regressions.
Thank you,
Sergio.
P.S.: I still haven't written the ChangeLog's, I wanted to know your
opinion about it first.
next reply other threads:[~2012-01-15 18:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-15 18:51 Sergio Durigan Junior [this message]
2012-01-15 18:56 ` [RFC 1/8] Language independent bits Sergio Durigan Junior
2012-01-15 21:08 ` Jan Kratochvil
2012-01-15 21:17 ` Sergio Durigan Junior
2012-01-15 22:03 ` Jan Kratochvil
2012-01-16 12:32 ` Sergio Durigan Junior
2012-01-16 20:40 ` Tom Tromey
2012-01-16 19:39 ` Sergio Durigan Junior
2012-01-16 19:40 ` Jan Kratochvil
2012-01-16 20:27 ` Tom Tromey
2012-01-17 16:44 ` Doug Evans
2012-01-17 16:54 ` Jan Kratochvil
2012-01-15 19:01 ` [RFC 2/8] C language Sergio Durigan Junior
2012-01-16 19:29 ` Tom Tromey
2012-01-16 19:55 ` Sergio Durigan Junior
2012-01-18 11:38 ` Sergio Durigan Junior
2012-01-18 16:50 ` Tom Tromey
2012-01-15 19:04 ` [RFC 3/8] Ada language Sergio Durigan Junior
2012-01-15 19:05 ` [RFC 4/8] Fortran language Sergio Durigan Junior
2012-01-15 19:06 ` [RFC 5/8] Java language Sergio Durigan Junior
2012-01-15 19:07 ` [RFC 6/8] Modula-2 language Sergio Durigan Junior
2012-01-17 10:21 ` Gaius Mulley
2012-01-15 19:10 ` [RFC 7/8] Objective-C language Sergio Durigan Junior
2012-01-15 20:34 ` [RFC 8/8] Pascal language Sergio Durigan Junior
2012-01-16 19:29 ` Tom Tromey
2012-01-16 19:29 ` [RFC 0/8] Beginning to remove globals from parser-defs.h Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3k44s7qej.fsf@gmail.com \
--to=sergiodj@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox