Workaround for stc bug ({} arrays are sometimes mis-compiled)
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 19 Aug 2015 21:11:09 +0100
changeset 3493 4c7b405cf1ca
parent 3491 f00e158ecd02
child 3495 494403a0af56
Workaround for stc bug ({} arrays are sometimes mis-compiled)
JavaNativeMethod.st
tools/java/src/stx/libjava/tools/compiler/CompileError.java
--- a/JavaNativeMethod.st	Sat Jul 04 16:12:25 2015 +0100
+++ b/JavaNativeMethod.st	Wed Aug 19 21:11:09 2015 +0100
@@ -491,7 +491,7 @@
         arguments: args;
         selector: (TrampolineSelectors at: aNumber + 1);
         statements:
-            { (ReturnNode expression: sendTree) };
+            (Array with: (ReturnNode expression: sendTree));
         yourself.
 
     compiler := ByteCodeCompiler new.
--- a/tools/java/src/stx/libjava/tools/compiler/CompileError.java	Sat Jul 04 16:12:25 2015 +0100
+++ b/tools/java/src/stx/libjava/tools/compiler/CompileError.java	Wed Aug 19 21:11:09 2015 +0100
@@ -55,7 +55,7 @@
             
             field.set(null, "stx/libjava/tools/compiler/CompileError".toCharArray());
         } catch (SecurityException e) {
-            throw new RuntimeException("Failed to modify ConstantPool.JavaLangErrorConstantPoolName field!",e);          
+            throw new RuntimeException("Failed to modify ConstantPool.JavaLangErrorConstantPoolName field!",e);            
         } catch (NoSuchFieldException e) {
             throw new RuntimeException("Failed to modify ConstantPool.JavaLangErrorConstantPoolName field!",e);
         } catch (IllegalArgumentException e) {