db9e6cd
### Eclipse Workspace Patch 1.0
db9e6cd
#P org.eclipse.jdt.core
db9e6cd
Index: compiler/org/eclipse/jdt/internal/compiler/impl/IntConstant.java
db9e6cd
===================================================================
db9e6cd
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IntConstant.java,v
db9e6cd
retrieving revision 1.25
db9e6cd
diff -u -r1.25 IntConstant.java
db9e6cd
--- compiler/org/eclipse/jdt/internal/compiler/impl/IntConstant.java	28 Mar 2006 20:33:18 -0000	1.25
db9e6cd
+++ compiler/org/eclipse/jdt/internal/compiler/impl/IntConstant.java	2 Feb 2009 15:15:01 -0000
db9e6cd
@@ -13,7 +13,8 @@
db9e6cd
 public class IntConstant extends Constant {
db9e6cd
 	
db9e6cd
 	int value;
db9e6cd
-	
db9e6cd
+
db9e6cd
+	private static final IntConstant MIN_VALUE = new IntConstant(Integer.MIN_VALUE);
db9e6cd
 	private static final IntConstant MINUS_FOUR = new IntConstant(-4);
db9e6cd
 	private static final IntConstant MINUS_THREE = new IntConstant(-3);
db9e6cd
 	private static final IntConstant MINUS_TWO = new IntConstant(-2);
db9e6cd
@@ -33,6 +34,7 @@
db9e6cd
 	public static Constant fromValue(int value) {
db9e6cd
 
db9e6cd
 		switch (value) {
db9e6cd
+			case Integer.MIN_VALUE : return IntConstant.MIN_VALUE;
db9e6cd
 			case -4 : return IntConstant.MINUS_FOUR;
db9e6cd
 			case -3 : return IntConstant.MINUS_THREE;
db9e6cd
 			case -2 : return IntConstant.MINUS_TWO;
db9e6cd
Index: compiler/org/eclipse/jdt/internal/compiler/impl/LongConstant.java
db9e6cd
===================================================================
db9e6cd
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/LongConstant.java,v
db9e6cd
retrieving revision 1.23
db9e6cd
diff -u -r1.23 LongConstant.java
db9e6cd
--- compiler/org/eclipse/jdt/internal/compiler/impl/LongConstant.java	28 Mar 2006 20:33:18 -0000	1.23
db9e6cd
+++ compiler/org/eclipse/jdt/internal/compiler/impl/LongConstant.java	2 Feb 2009 15:15:01 -0000
db9e6cd
@@ -12,12 +12,15 @@
db9e6cd
 
db9e6cd
 public class LongConstant extends Constant {
db9e6cd
 private static final LongConstant ZERO = new LongConstant(0L);
db9e6cd
+private static final LongConstant MIN_VALUE = new LongConstant(Long.MIN_VALUE); 
db9e6cd
 
db9e6cd
 private long value;
db9e6cd
 
db9e6cd
 public static Constant fromValue(long value) {
db9e6cd
 	if (value == 0L) {
db9e6cd
 		return ZERO;
db9e6cd
+	} else if (value == Long.MIN_VALUE) {
db9e6cd
+		return MIN_VALUE;
db9e6cd
 	}
db9e6cd
 	return new LongConstant(value);
db9e6cd
 }
db9e6cd
Index: compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteral.java
db9e6cd
===================================================================
db9e6cd
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteral.java,v
db9e6cd
retrieving revision 1.25
db9e6cd
diff -u -r1.25 LongLiteral.java
db9e6cd
--- compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteral.java	6 Mar 2007 02:38:48 -0000	1.25
db9e6cd
+++ compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteral.java	2 Feb 2009 15:15:01 -0000
db9e6cd
@@ -17,7 +17,6 @@
db9e6cd
 import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
db9e6cd
 
db9e6cd
 public class LongLiteral extends NumberLiteral {
db9e6cd
-	static final Constant FORMAT_ERROR = DoubleConstant.fromValue(1.0/0.0); // NaN;	
db9e6cd
 		
db9e6cd
 public LongLiteral(char[] token, int s,int e) {
db9e6cd
 	super(token, s,e);
db9e6cd
@@ -52,7 +51,7 @@
db9e6cd
 				
db9e6cd
 		int digitValue ;
db9e6cd
 		if ((digitValue = ScannerHelper.digit(source[j++],radix)) < 0 ) {
db9e6cd
-			constant = FORMAT_ERROR; return ;
db9e6cd
+			return /*constant stays null*/ ;
db9e6cd
 		}
db9e6cd
 		if (digitValue >= 8)
db9e6cd
 			nbDigit = 4;
db9e6cd
@@ -65,7 +64,7 @@
db9e6cd
 		computedValue = digitValue ;
db9e6cd
 		while (j
db9e6cd
 			if ((digitValue = ScannerHelper.digit(source[j++],radix)) < 0) {
db9e6cd
-				constant = FORMAT_ERROR; return ;
db9e6cd
+				return /*constant stays null*/ ;
db9e6cd
 			}
db9e6cd
 			if ((nbDigit += shift) > 64)
db9e6cd
 				return /*constant stays null*/ ;
db9e6cd
@@ -137,19 +136,6 @@
db9e6cd
 			(source[18] == '8') &&
db9e6cd
 			(((this.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT) == 0));
db9e6cd
 }
db9e6cd
-public TypeBinding resolveType(BlockScope scope) {
db9e6cd
-	// the format may be incorrect while the scanner could detect
db9e6cd
-	// such error only on painfull tests...easier and faster here
db9e6cd
-
db9e6cd
-	TypeBinding tb = super.resolveType(scope);
db9e6cd
-	if (constant == FORMAT_ERROR) {
db9e6cd
-		constant = Constant.NotAConstant;
db9e6cd
-		scope.problemReporter().constantOutOfFormat(this);
db9e6cd
-		this.resolvedType = null;
db9e6cd
-		return null;
db9e6cd
-	}
db9e6cd
-	return tb;
db9e6cd
-}
db9e6cd
 public void traverse(ASTVisitor visitor, BlockScope scope) {
db9e6cd
 	visitor.visit(this, scope);
db9e6cd
 	visitor.endVisit(this, scope);
db9e6cd
Index: compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteralMinValue.java
db9e6cd
===================================================================
db9e6cd
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteralMinValue.java,v
db9e6cd
retrieving revision 1.12
db9e6cd
diff -u -r1.12 LongLiteralMinValue.java
db9e6cd
--- compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteralMinValue.java	6 Mar 2007 02:38:48 -0000	1.12
db9e6cd
+++ compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteralMinValue.java	2 Feb 2009 15:15:01 -0000
db9e6cd
@@ -15,11 +15,10 @@
db9e6cd
 public class LongLiteralMinValue extends LongLiteral {
db9e6cd
 
db9e6cd
 	final static char[] CharValue = new char[]{'-', '9','2','2','3','3','7','2','0','3','6','8','5','4','7','7','5','8','0','8','L'};
db9e6cd
-	final static Constant MIN_VALUE = LongConstant.fromValue(Long.MIN_VALUE) ; 
db9e6cd
 
db9e6cd
 public LongLiteralMinValue(){
db9e6cd
 	super(CharValue,0,0);
db9e6cd
-	constant = MIN_VALUE;
db9e6cd
+	constant = LongConstant.fromValue(Long.MIN_VALUE);
db9e6cd
 }
db9e6cd
 public void computeConstant() {
db9e6cd
 
db9e6cd
Index: compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteralMinValue.java
db9e6cd
===================================================================
db9e6cd
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteralMinValue.java,v
db9e6cd
retrieving revision 1.10
db9e6cd
diff -u -r1.10 IntLiteralMinValue.java
db9e6cd
--- compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteralMinValue.java	28 Mar 2006 20:29:57 -0000	1.10
db9e6cd
+++ compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteralMinValue.java	2 Feb 2009 15:15:01 -0000
db9e6cd
@@ -15,11 +15,10 @@
db9e6cd
 public class IntLiteralMinValue extends IntLiteral {
db9e6cd
 
db9e6cd
 	final static char[] CharValue = new char[]{'-','2','1','4','7','4','8','3','6','4','8'};
db9e6cd
-	final static Constant MIN_VALUE = IntConstant.fromValue(Integer.MIN_VALUE) ; 
db9e6cd
 
db9e6cd
 public IntLiteralMinValue() {
db9e6cd
-	super(CharValue,0,0,Integer.MIN_VALUE);
db9e6cd
-	constant = MIN_VALUE;
db9e6cd
+	super(CharValue, 0,0, Integer.MIN_VALUE);
db9e6cd
+	constant = IntConstant.fromValue(Integer.MIN_VALUE);
db9e6cd
 }
db9e6cd
 public void computeConstant(){
db9e6cd
 	
db9e6cd
Index: compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteral.java
db9e6cd
===================================================================
db9e6cd
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteral.java,v
db9e6cd
retrieving revision 1.23
db9e6cd
diff -u -r1.23 IntLiteral.java
db9e6cd
--- compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteral.java	28 Oct 2006 04:11:27 -0000	1.23
db9e6cd
+++ compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteral.java	2 Feb 2009 15:15:01 -0000
db9e6cd
@@ -22,7 +22,6 @@
db9e6cd
 	public static final IntLiteral
db9e6cd
 		One = new IntLiteral(new char[]{'1'},0,0,1);//used for ++ and -- 
db9e6cd
 
db9e6cd
-	static final Constant FORMAT_ERROR = DoubleConstant.fromValue(1.0/0.0); // NaN;
db9e6cd
 public IntLiteral(char[] token, int s, int e) {
db9e6cd
 	super(token, s,e);
db9e6cd
 }
db9e6cd
@@ -71,7 +70,7 @@
db9e6cd
 		while (j
db9e6cd
 		{	int digitValue ;
db9e6cd
 			if ((digitValue = ScannerHelper.digit(source[j++],radix))	< 0 ) 	
db9e6cd
-			{	constant = FORMAT_ERROR; return ;}
db9e6cd
+			{	return /*constant stays null*/ ;}
db9e6cd
 			computedValue = (computedValue<
db9e6cd
 			if (computedValue > MAX) return /*constant stays null*/ ;}}
db9e6cd
 	else
db9e6cd
@@ -79,7 +78,7 @@
db9e6cd
 		for (int i = 0 ; i < length;i++)
db9e6cd
 		{	int digitValue ;
db9e6cd
 			if ((digitValue = ScannerHelper.digit(source[i],10))	< 0 ) 
db9e6cd
-			{	constant = FORMAT_ERROR; return ;}
db9e6cd
+			{	return /*constant stays null*/ ; }
db9e6cd
 			computedValue = 10*computedValue + digitValue;
db9e6cd
 			if (computedValue > MAX) return /*constant stays null*/ ; }}
db9e6cd
 
db9e6cd
@@ -122,19 +121,6 @@
db9e6cd
 			(source[9] == '8') &&
db9e6cd
 			(((this.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT) == 0));
db9e6cd
 }
db9e6cd
-public TypeBinding resolveType(BlockScope scope) {
db9e6cd
-	// the format may be incorrect while the scanner could detect
db9e6cd
-	// such an error only on painfull tests...easier and faster here
db9e6cd
-
db9e6cd
-	TypeBinding tb = super.resolveType(scope);
db9e6cd
-	if (constant == FORMAT_ERROR) {
db9e6cd
-		constant = Constant.NotAConstant;
db9e6cd
-		scope.problemReporter().constantOutOfFormat(this);
db9e6cd
-		this.resolvedType = null;
db9e6cd
-		return null;
db9e6cd
-	}
db9e6cd
-	return tb;
db9e6cd
-}
db9e6cd
 public StringBuffer printExpression(int indent, StringBuffer output){
db9e6cd
 
db9e6cd
 	if (source == null) {