This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [gcjx] Patch: FYI: explicit type parameters
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Sun, 23 Oct 2005 08:37:17 +0530
- Subject: Re: [gcjx] Patch: FYI: explicit type parameters
- Openpgp: url=http://ranjitmathew.hostingzero.com/aa_6C114B8F.txt
- References: <m34q7a7bxr.fsf@localhost.localdomain>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tom Tromey wrote:
> I'm checking this in on the gcjx branch.
>
> This adds support for explicit type parameters to method invocations.
> In particular it updates the parser, the model, semantic analysis, and
> the visitors.
[...]
> +++ gcjx/dump.cc 21 Oct 2005 22:18:10 -0000
[...]
> @@ -3089,6 +3099,16 @@
> }
>
> void
> + visit_generic_invocation (model_method_invocation *mi,
> + model_method *meth,
> + const ref_expression &qual,
> + const std::list<ref_expression> &args,
> + const std::list<ref_forwarding_type> &)
> + {
> + visit_method_invocation (mi, meth, qual, args);
> + }
I have fleshed out this part for the pretty-printer as
shown in the attached patch and committed it.
Thanks,
Ranjit.
- --
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDWv5lYb1hx2wRS48RAuYGAJ9MZVW0WWwFd5MOp4BSYjCy/fNxDgCgqk6q
+ycu6F6NgFOJC9Xn6g1qCAk=
=GU12
-----END PGP SIGNATURE-----
Index: ChangeLog
from Ranjit Mathew <rmathew@gcc.gnu.org>
* dump.cc (pretty_printer::visit_generic_invocation): Flesh out
the "method_invocation" variant. Differentiate the "new_primary"
variant from the "new" variant.
Index: dump.cc
===================================================================
--- dump.cc 2005-10-23 08:21:19.000000000 +0530
+++ dump.cc 2005-10-23 08:27:40.000000000 +0530
@@ -3103,9 +3103,18 @@ public:
model_method *meth,
const ref_expression &qual,
const std::list<ref_expression> &args,
- const std::list<ref_forwarding_type> &)
+ const std::list<ref_forwarding_type> ¶ms)
{
- visit_method_invocation (mi, meth, qual, args);
+ begin_element (mi, "generic_invocation<method>");
+ if (meth != NULL)
+ out << " " << meth->get_name ();
+ else
+ out << " NULL";
+ if (qual)
+ descend (qual.get ());
+ descend (args);
+ descend (params);
+ end_element ();
}
void
@@ -3187,7 +3196,7 @@ public:
const std::list<ref_forwarding_type> &type_params,
const std::list<ref_forwarding_type> ¶ms)
{
- begin_element (np, "generic_invocation<new>");
+ begin_element (np, "generic_invocation<new_primary>");
out << " " << simple_name;
descend (type_params);
if (klass)