This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/JVMTI] New JVMTI Environment Initialization/Allocation


Tom Tromey wrote:

Keith> I've also snuck in another little patch which adds another common test
Keith> macro, this time for JVMTI_ERROR_ILLEGAL_ARGUMENT.

I noticed that this macro has no trailing ';' but NULL_CHECK does have
one.  The semicolon should probably be removed from NULL_CHECK.

I'll fix that with a follow-up patch which incorporates Andrew's suggested changes.


Keith> +    if (_jvmtiEnvironments == NULL)
Keith> +      _jvmtiEnvironments = element;
Keith> +    else
Keith> +      {
Keith> +	struct jvmti_env_list *e;
Keith> +	for (e = _jvmtiEnvironments; e->next != NULL; e = e->next) ;
Keith> +	e->next = element;
Keith> +      }
Keith> +  }

Do we care about the order of the list?

Yes, we do actually. The JVMTI specification says that event notifications are posted to environments in the order the environments were created. This is about the easiest way for this to happen. I've added a comment to explain this.


FWIW, for an empty loop I tend to put the ';' on a line by itself, to
emphasize it.

Will do.


Committed, thanks.

Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]