Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353658

Summary: Support bitwise operators
Product: z_Archived Reporter: Matt Heitz <mheitz>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: carrollk, jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
testcase none

Description Matt Heitz CLA 2011-08-02 16:24:56 EDT
Support & | xor along with the assigning forms, &= |= xor=
Comment 1 Matt Heitz CLA 2011-08-27 13:45:10 EDT
As of 8/27, this is mostly done.  The only part left is that we generate bad code for the assigning forms when the LHS is nullable.  We'll generate something like "int3n &= int2" which will result in a NullPointerException if either operand is null.
Comment 2 Kathy Carroll CLA 2011-08-30 14:17:48 EDT
Shouldn't eglx.lang.ESmallInt.egl also have the bitwise operators in it.  I assume this is why I'm get these validation errors:

Multiple markers at this line
	- IWN.JavaGen.9998.e 53/1163 Exception occurred: java.lang.RuntimeException: 
	 org.eclipse.edt.mof.egl.NoSuchFunctionError
	- IWN.JavaGen.9999.e 53/1163 Stack Trace: java.lang.RuntimeException: org.eclipse.edt.mof.egl.NoSuchFunctionError

For
    actual SmallInt;
    int2 SmallInt;
    int1 SmallInt;
    actual = int1 & int2;

I'm not sure if this is a generation, language, or compiler problem
Comment 3 Matt Heitz CLA 2011-08-30 14:25:56 EDT
No, we only support bitwise operators with ints in EDT.  That's a compiler bug.
Comment 4 Jeff Douglas CLA 2011-09-02 12:56:39 EDT
I've committed the code for the generator side to throw an exception (based on the new nullable spec), however before this is complete the nullable spec has to be implemented (next iteration) and the runtime has to be changed to match the EGL definition file.
Comment 5 Matt Heitz CLA 2011-09-26 22:10:27 EDT
Created attachment 204042 [details]
testcase
Comment 6 Matt Heitz CLA 2011-09-26 22:10:59 EDT
This is finished.  My testcase is attached.
Comment 7 Matt Heitz CLA 2011-09-27 10:16:54 EDT
Closing all JavaGen enhancements that are in the Resolved state.