[armedbear-devel] [PATCH] Support for SYNCHRONIZED blocks (and company)

Erik Huelsmann ehuels at gmail.com
Sat Jul 11 12:11:30 UTC 2009


On Thu, Jul 9, 2009 at 11:56 AM, Erik Huelsmann<ehuels at gmail.com> wrote:
> On Thu, Jul 9, 2009 at 11:51 AM, Alessio Stalla<alessiostalla at gmail.com> wrote:
>> On Thu, Jul 9, 2009 at 10:53 AM, Erik Huelsmann<ehuels at gmail.com> wrote:
>>> On Thu, Jul 9, 2009 at 7:40 AM, Mark Evenson<evenson at panix.com> wrote:
>>>> Erik Huelsmann wrote:
>>>>>
>>>>> The patch...
>>>>>
>>>>> On Wed, Jul 8, 2009 at 11:49 PM, Erik Huelsmann<ehuels at gmail.com> wrote:
>>>>>>
>>>>>> Based on discussion earlier this week, I'd like the following patch to
>>>>>> get committed to our trunk.
>>>>>>
>>>>>> It introduces a new block statement
>>>>>>
>>>>>>  SYNCHRONIZED-ON <object>
>>>>>>   body
>>>>
>>>> And, just to be clear, this patch meets Anton Vodonosov's caution that
>>>> "synchronized" has semantics associated with memory synchronization because
>>>> it implements SYNCHRONIZED-ON directly in the bytecode compiler just as Java
>>>> (the language) does, right?  So the whole "happens-before" semantics
>>>> mentioned in the JLS should be met?
>>>
>>> Exactly: I built the compiler conforming to the JVM spec section on
>>> "compiling for the JVM" which discusses the Java 'synchronized'
>>> statement compilation. So, yes.
>>
>> Great work!
>>
>>> The only question I asked myself when I woke up this morning is:
>>>
>>> Should the symbols in this patch not be added to the JAVA package, as
>>> they are designed to "provide access to the Java functionality"?
>>
>> Hmm, you have a point. Perhaps they should be homed and external in
>> JAVA, but imported in THREADS and re-exported from there.

I'll start by adding them to JAVA. Then, we can see how this can be
imported and exported from THREADS too, taking the autoloader
mechanism into account.

Bye,

Erik.




More information about the armedbear-devel mailing list