public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyle Galloway <kgallowa@redhat.com>
To: tromey@redhat.com
Cc: Java Patch List <java-patches@gcc.gnu.org>
Subject: Re: [RFA] JMTI Exception Events
Date: Thu, 15 Feb 2007 19:37:00 -0000	[thread overview]
Message-ID: <45D4B65C.4060400@redhat.com> (raw)
In-Reply-To: <m3tzxn1gus.fsf@localhost.localdomain>

Tom Tromey wrote:
>>>>>> "Kyle" == Kyle Galloway <kgallowa@redhat.com> writes:
>>>>>>             
>
> Kyle> +        if (!(_ex_map.get (thr).equals (ex)))
>
>   
>>> Without an equals() method in this class, I doubt this does what you
>>> intend.  As it is this equals() will always return false, because the
>>> default equals() tests object identity, and a new object is never
>>> identical to any existing one.
>>>       
>
> Kyle> In this case, however, I believe I want to only equal the exact same
> Kyle> exception.
>
> Ah, thanks.  I misread this, sorry about that.
>
> If you really intend to check identity, use '==' and not 'equals()'.
> Otherwise things can be weird if a subclass happens to override equals.
>   
Ok, no problem.
> Kyle> What I have done now is add a method called post_exception_event,
> Kyle> which checks to see if this is a repeated throw, and if not constucts
> Kyle> an ExceptionEvent and alls send event to send the JVMTI event
> Kyle> notification.
>
> Please use javaStyleNaming.  I'm more a gnu-style person myself, but
> we're stuck with that.  (One of my little pet peeves is that the stack
> trace stuff uses uppercase for the start of method names... weird and
> somehow irritating.)
>   
So you want, postExceptionEvent instead of post_exception_event.  What 
about the two native calls should they be sendEvent and checkCatch.  
Also do you want the variable names changed to throwMeth, catchLoc etc?  
And while I'm at it, should it be funtion() or function () in java files 
outside of classpath, I think I've seen both?.  I'm sorry to keep asking 
about/screwing this up but I find it can be a little confusing to know 
which conventions to use sometimes.
> Kyle> +  public static void post_exception_event (Thread thr, long throw_meth,
> Kyle> +		                                  long throw_loc, Throwable ex,
> Kyle> +		                                  long catch_meth, long catch_loc)
>
> I can't tell due to the patch stuff but the formatting of this looks
> weird in my mail buffer; so please make sure it looks right before
> committing.
>   
Other than these is this ok to go in?

- Kyle

  reply	other threads:[~2007-02-15 19:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14 21:48 Kyle Galloway
2007-02-15  0:03 ` Tom Tromey
2007-02-15 18:35   ` Kyle Galloway
2007-02-15 19:29     ` Tom Tromey
2007-02-15 19:37       ` Kyle Galloway [this message]
2007-02-15 20:22         ` Tom Tromey
2007-02-16  0:11           ` Kyle Galloway
2007-02-16 17:51 ` Andrew Haley

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=45D4B65C.4060400@redhat.com \
    --to=kgallowa@redhat.com \
    --cc=java-patches@gcc.gnu.org \
    --cc=tromey@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).