harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r471488 - in /incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java: JavaByteCodeTranslator.cpp JavaByteCodeTranslator.h
Date Sun, 05 Nov 2006 18:36:41 GMT
Author: geirm
Date: Sun Nov  5 10:36:41 2006
New Revision: 471488

URL: http://svn.apache.org/viewvc?view=rev&rev=471488
Log:
HARMONY-1911

[drlvm][opt] failed assert in class_get_addr_of_constant

Ubunut 6 - smoke, c-unit, ~kernel, testcase

Although it shows a new problem - I'll file a JIRA


Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp?view=diff&rev=471488&r1=471487&r2=471488
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
(original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
Sun Nov  5 10:36:41 2006
@@ -3429,14 +3429,14 @@
                 uint32 constPoolIndex = su8(byteCodes + (off++));
                 // load 32-bit quantity from constant pool
                 Type* constantType = compilationInterface.getConstantType(&methodToCompile,constPoolIndex);
+                if ( !(constantType->isInt4() || constantType->isSingle()) ) {
+                    // only integer and floating-point types 
+                    //     are implemented for streamed array loads
+                    return 0;
+                }
                 const void* constantAddress =
                     compilationInterface.getConstantValue(&methodToCompile,constPoolIndex);
-                if (constantType->isInt4() || constantType->isSingle()) {
-                    value = *(uint32*)constantAddress;
-                } else {
-                    // Invalid type!
-                    assert(0);
-                }
+                value = *(uint32*)constantAddress;
             }
             break;
         case 0x13:        // ldc_w
@@ -3445,14 +3445,14 @@
                 uint32 constPoolIndex = su16(byteCodes + off);
                 // load 32-bit quantity from constant pool
                 Type* constantType = compilationInterface.getConstantType(&methodToCompile,constPoolIndex);
+                if ( !(constantType->isInt4() || constantType->isSingle()) ) {
+                    // only integer and floating-point types 
+                    //     are implemented for streamed array loads
+                    return 0;
+                }
                 const void* constantAddress =
                     compilationInterface.getConstantValue(&methodToCompile,constPoolIndex);
-                if (constantType->isInt4() || constantType->isSingle()) {
-                    value = *(uint32*)constantAddress;
-                } else {
-                    // Invalid type!
-                    assert(0);
-                }
+                value = *(uint32*)constantAddress;
             }
             off += 2;
             break;
@@ -3460,16 +3460,16 @@
             {
                 if ((off + 1) >= byteCodeLength) return 0;
                 uint32 constPoolIndex = su16(byteCodes + off);
-                // load 32-bit quantity from constant pool
+                // load 64-bit quantity from constant pool
                 Type* constantType = compilationInterface.getConstantType(&methodToCompile,constPoolIndex);
+                if ( !(constantType->isInt8() || constantType->isDouble()) ) {
+                    // only integer and floating-point types 
+                    //     are implemented for streamed array loads
+                    return 0;
+                }
                 const void* constantAddress =
                     compilationInterface.getConstantValue(&methodToCompile,constPoolIndex);
-                if (constantType->isInt8() || constantType->isDouble()) {
-                    value = *(uint64*)constantAddress;
-                } else {
-                    // Invalid type!
-                    assert(0);
-                }
+                value = *(uint64*)constantAddress;
             }
             off += 2;
             break;

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h?view=diff&rev=471488&r1=471487&r2=471488
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h
(original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h
Sun Nov  5 10:36:41 2006
@@ -388,7 +388,7 @@
     // If they are then substitute array initializers with jit helper array copy instruction.
     // Returns the length of bytecodes converted by this routine.
     uint32 checkForArrayInitializer(Opnd* arrayOpnd, const uint8* byteCodes, uint32 offset,
const uint32 byteCodeLength);
-    // Obtain the next numeric value from the bytecode.
+    // Obtain the next numeric value from the bytecode in array initialization sequence
     // Returns number of bytes read from the byteCodes array.
     uint32 getNumericValue(const uint8* byteCodes, uint32 offset, const uint32 byteCodeLength,
uint64& value);
 



Mime
View raw message