[request for review] 4877954: RFE: Special syntax for core interfaces

Jonathan Gibbons Jonathan.Gibbons at Sun.COM
Mon Nov 19 14:38:16 PST 2007


Dymytro,

I have read both versions of your request for a review.

The most obvious error seems to be in ConstFold, where you are comparing 
the string value of the constants, which seems unlikely to yield the 
correct result.

In Lower.visitBinary, it seems wrong to drop this code in at the head of 
the method. If nothing else, I would think you should translate the lhs 
and rhs first.
Then in line 2785, the asymmetry of taking the primitiveType from then 
lhs seems incorrect, unless you can demonstrate that the lhs and rhs 
will have the same type.

In the tests, you use a relative small set of expressions on either side 
of the comparables -- for example, I didn't see any expressions either 
side (other that variables and function calls).

Separately, Christian Plesner Hansen is proposing a standardized way of 
enabling language extensions based on a new -L switch. That seems like a 
good idea, and it would be nice to standardize on that, rather than 
using the -XD space which is more for the hidden options we don't really 
want users to know about :-)

-- Jon


Dmytro Sheyko wrote:
> Hi,
>
> I've made some changes to patch:
>
> 1. big*Type in Symtab were removed and Lower.visitBinary() was 
> rewritten using Types.unboxedType() (as Remi Forax suggested)
>
> 2. 'genuine comparable method' is choosen rather than its bridge 
> (Lower.visitBinary).
>
> 3. bug fixed: following code was mistakenly rejected by compiler:
>
>   static <B, A extends Comparable<? super B>> boolean lt1(A a, B b) {
>      return a < b;
>   }
>
> I have attached new svn diff and jtreg tests I used. 




More information about the compiler-dev mailing list