harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcfi...@apache.org
Subject svn commit: r650090 - in /harmony/enhanced/drlvm/trunk/vm: include/open/ interpreter/src/ port/include/tl/ port/src/tl/ vmcore/include/ vmcore/src/lil/ipf/ vmcore/src/util/ipf/base/ vmcore/src/util/ipf/code_emit/ vmcore/src/util/ipf/include/
Date Mon, 21 Apr 2008 10:40:20 GMT
Author: mcfirst
Date: Mon Apr 21 03:40:07 2008
New Revision: 650090

URL: http://svn.apache.org/viewvc?rev=650090&view=rev
Log:
Applying both patches from HARMONY-5763 [drlvm][ipf] fixing IPF compilation

Modified:
    harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
    harmony/enhanced/drlvm/trunk/vm/port/include/tl/memory_pool.h
    harmony/enhanced/drlvm/trunk/vm/port/src/tl/memory_pool.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_log.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/lil_code_generator_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/m2n_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/stack_iterator_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/ini_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/code_emit/Code_Emitter.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Code_Emitter.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Emitter_IR.h

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm.h?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Mon Apr 21 03:40:07 2008
@@ -113,15 +113,6 @@
  VMEXPORT unsigned class_get_unboxed_data_offset(Class_Handle ch);
 
 /**
- * @return The class of the array element of the given class.
- *
- * The behavior is undefined if the parameter does not represent
- * an array class.
- */
- VMEXPORT Class_Handle class_get_array_element_class(Class_Handle ch);
-
-
-/**
  * @return Class handle given object's <code>VTable_Handle</code>.
  */ 
  DECLARE_OPEN(Class_Handle, vtable_get_class, (VTable_Handle vh));

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h Mon Apr 21 03:40:07 2008
@@ -15,28 +15,18 @@
  *  limitations under the License.
  */
 /**
- * @version $Revision: 1.23.4.1.4.3 $
- */
-
-/**
  * @file
  * Major interpreter-related definitions.
  */
-#include "cxxlog.h"
-#include "vm_log.h"
-
 #include "environment.h"
 #include "vm_threads.h"
 #include "open/bytecodes.h"
 #include "open/vm_util.h"
 #include "ini.h"
 #include "jvmti_types.h"
+#include "vm_log.h"
 
 //#define INTERPRETER_DEEP_DEBUG
-/** \def DEBUG_PRINT(a)
-  * \brief Calls <code>TRACE2</code> with the interpreter category.*/
-#define DEBUG_PRINT(a) TRACE2("interpreter", a)
-
 /** \def DEBUG(a)
   * \brief Does nothing.*/
 #define DEBUG(a)
@@ -47,8 +37,8 @@
 #  define DEBUG_BYTECODE(a)
 #else
 /** \def DEBUG_BYTECODE(a)
-  * \brief If <code>DEBUG</code> is on, calls DEBUG_PRINT(a).*/
-#  define DEBUG_BYTECODE(a) { if (frame.dump_bytecodes)  DEBUG_PRINT(a); }
+  * \brief If <code>DEBUG</code> is on, calls TRACE(a).*/
+#  define DEBUG_BYTECODE(a) { if (frame.dump_bytecodes)  TRACE(a); }
 #endif
 
 /** \def DEBUG_GC(a)
@@ -57,15 +47,8 @@
   */
 #define DEBUG_GC(a)             TRACE2("gc_interpreter", a)
 
-/** \def DEBUG2(a)
-  * \brief Calls <code>INFO(a)</code>.*/
-#define DEBUG2(a) INFO(a)
 /** <code>TRUE</code> if the interpreter enables debug.*/
 extern bool interpreter_enable_debug;
-
-/** \def DEBUG_TRACE_PLAIN(a) 
-  * \brief Calls <code>TRACE2</code> with the interpreter category.*/
-#define DEBUG_TRACE_PLAIN(a)    TRACE2("interpreter", a)
 
 /** \def DEBUG_TRACE(a)
   * \brief Calls <code>TRACE2</code> with the <code>folded_interpreter</code>

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp Mon Apr 21 03:40:07
2008
@@ -279,7 +279,7 @@
     }
 
     DEBUG_TRACE("\n<<< native_invoke_static     : " << method);
-    DEBUG_TRACE_PLAIN("interpreter static native: " << frame.method);
+    TRACE("interpreter static native: " << frame.method);
 
     M2N_ALLOC_MACRO;
     
@@ -438,7 +438,7 @@
                 if (ref != 0) {
                     ASSERT_OBJECT(*ref);
                     if (!*ref) {
-                        DEBUG2(
+                        INFO(
                         "VM WARNING: Reference with null value returned from jni function:\n"
                         "VM WARNING: Method name: "
                         << method->get_class()->get_name()->bytes
@@ -558,7 +558,7 @@
     assert(method->is_native());
     assert(!method->is_static());
 
-    DEBUG_TRACE_PLAIN("interpreter virtual native: " << frame.method);
+    TRACE("interpreter virtual native: " << frame.method);
     DEBUG_TRACE("\n<<< native_invoke_virtual: " << method);
 
     int n_ints = 0;
@@ -717,7 +717,7 @@
                     ASSERT_OBJECT(*ref);
 
                     if (!*ref) {
-                        DEBUG2(
+                        INFO(
                         "VM WARNING: Reference with null value returned from jni function:\n"
                         "VM WARNING: Method name: "
                         << method->get_class()->get_name()->bytes

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp Mon Apr 21 03:40:07
2008
@@ -255,7 +255,7 @@
     }
 
     DEBUG_TRACE("\n<<< native_invoke_static     : " << method);
-    DEBUG_TRACE_PLAIN("interpreter static native: " << frame.method);
+    TRACE("interpreter static native: " << frame.method);
 
     M2N_ALLOC_MACRO;
     
@@ -354,7 +354,7 @@
                 if (ref != 0) {
                     ASSERT_OBJECT(*ref);
                     if (!*ref) {
-                        DEBUG2(
+                        INFO(
                         "VM WARNING: Reference with null value returned from jni function:\n"
                         "VM WARNING: Method name: " << method <<
                         "\nVM WARNING: Not allowed, return NULL (0) instead\n");
@@ -471,7 +471,7 @@
     assert(method->is_native());
     assert(!method->is_static());
 
-    DEBUG_TRACE_PLAIN("interpreter virtual native: " << frame.method);
+    TRACE("interpreter virtual native: " << frame.method);
     DEBUG_TRACE("\n<<< native_invoke_virtual: " << method);
 
     uword *args = (uword*) ALLOC_FRAME((sz + 1) * sizeof(uword));
@@ -576,7 +576,7 @@
                     ASSERT_OBJECT(*ref);
 
                     if (!*ref) {
-                        DEBUG2(
+                        INFO(
                         "VM WARNING: Reference with null value returned from jni function:\n"
                         "VM WARNING: Method name: " << method << 
                         "\nVM WARNING: Not allowed, return NULL (0) instead\n");

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp Mon Apr 21 03:40:07
2008
@@ -14,10 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/** 
- * @author Ivan Volosyuk
- * @version $Revision: 1.21.4.5.4.3 $
- */  
 #include "interpreter.h"
 #include "interpreter_exports.h"
 #include "interpreter_imports.h"
@@ -41,14 +37,14 @@
         case M2N_OBJECT_HANDLES:
             return (uint64*) &m2n->local_object_handles;
         case M2N_METHOD:
-            DEBUG2("get_stacked_register_address for method\n");
-            ABORT("Unexpected register");
+            INFO("get_stacked_register_address for method:");
+            DIE(("Unexpected register"));
         case M2N_FRAME_TYPE:
             return (uint64*) &m2n->current_frame_type;
             
         default:
-            DEBUG2("get_stacked_register_address: " << (int)reg);
-            ABORT("Unexpected register");
+            INFO("get_stacked_register_address: " << (int)reg);
+            DIE(("Unexpected register"));
     }
     return 0;
 }
@@ -76,7 +72,7 @@
     DEBUG_TRACE("\n<<< interpreter_invoke_native: "
            << method->get_class()->get_name()->bytes << " "
            << method->get_name()->bytes
-           << method->get_descriptor()->bytes << endl);
+           << method->get_descriptor()->bytes);
 
     GenericFunctionPointer f = interpreterGetNativeMethodAddr(method);
     if (f == 0) {
@@ -157,7 +153,7 @@
                 arg_words[argId++] = args[pos++].j;
                 break;
             default:
-                ABORT("Unexpected java type");
+                DIE(("Unexpected java type"));
         }
     }
     assert(argId <= sz + 2);
@@ -236,9 +232,9 @@
             break;
 
         default:
-            ABORT("Unexpected java type");
+            DIE(("Unexpected java type"));
     }
-    DEBUG("invokeJNI: done\n");
+    TRACE("invokeJNI: done\n");
 
     if (exn_raised()) {
         if ((resultPtr != NULL) && (ret_type != JAVA_TYPE_VOID)) {   
@@ -267,7 +263,7 @@
 interpreterInvokeStaticNative(StackFrame& prevFrame, StackFrame& frame, Method *method)
{
 
     DEBUG_TRACE("\n<<< native_invoke_static     : " << method);
-    DEBUG_TRACE_PLAIN("interpreter static native: " << frame.method);
+    TRACE("interpreter static native: " << frame.method);
 
     GenericFunctionPointer f = interpreterGetNativeMethodAddr(method);
     if (f == 0) {
@@ -363,7 +359,7 @@
                 pos-= 2;
                 break;
             default:
-                ABORT("Unexpected java type");
+                DIE(("Unexpected java type"));
         }
     }
     assert(*mtype == ')');
@@ -410,7 +406,7 @@
                 if (ref != 0) {
                     ASSERT_OBJECT(*ref);
                     if (!*ref) {
-                        DEBUG2(
+                        INFO(
                         "VM WARNING: Reference with null value returned from jni function:\n"
                         "VM WARNING: Method name: "
                         << method->get_class()->get_name()->bytes
@@ -514,9 +510,9 @@
             break;
 
         default:
-            ABORT("Unexpected java type");
+            DIE(("Unexpected java type"));
     }
-    DEBUG("invokeJNI: done\n");
+    TRACE("invokeJNI: done\n");
 
     if (method->is_synchronized()) {
         vm_monitor_exit_wrapper(frame.This);
@@ -536,7 +532,7 @@
     assert(method->is_native());
     assert(!method->is_static());
 
-    DEBUG_TRACE_PLAIN("interpreter virtual native: " << frame.method);
+    TRACE("interpreter virtual native: " << frame.method);
     DEBUG_TRACE("\n<<< native_invoke_virtual: " << method);
 
     uword *args = (uword*) ALLOC_FRAME((sz + 1) * sizeof(uword));
@@ -631,7 +627,7 @@
                 pos-=2;
                 break;
             default:
-                ABORT("Unexpected java type");
+                DIE(("Unexpected java type"));
         }
     }
     assert(*mtype == ')');
@@ -677,7 +673,7 @@
                 if (ref != 0) {
                     ASSERT_OBJECT(*ref);
                     if (!*ref) {
-                        DEBUG2(
+                        INFO(
                         "VM WARNING: Reference with null value returned from jni function:\n"
                         "VM WARNING: Method name: "
                         << method->get_class()->get_name()->bytes
@@ -782,9 +778,9 @@
             break;
 
         default:
-            ABORT("Unexpected java type");
+            DIE(("Unexpected java type"));
     }
-    DEBUG("invokeJNI: done\n");
+    TRACE("invokeJNI: done\n");
 
     if (method->is_synchronized()) {
         vm_monitor_exit_wrapper(frame.This);

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Mon Apr 21 03:40:07 2008
@@ -2501,7 +2501,7 @@
     int stackLength = 0;
     size_t available;
     
-    DEBUG_TRACE_PLAIN("interpreter: " << frame.method);
+    TRACE("interpreter: " << frame.method);
 
     assert(frame.method->is_static() || frame.This);
     
@@ -2950,14 +2950,14 @@
                     case OPCODE_IINC: Opcode_WIDE_IINC(frame); break;
                     case OPCODE_RET: Opcode_WIDE_RET(frame); break;
                     default:
-                     DEBUG2("wide bytecode " << (int)*ip1 << " not implemented\n");
+                     INFO("wide bytecode " << (int)*ip1 << " not implemented\n");
                      stackDump(stdout, frame);
                      DIE(("Unexpected wide bytecode"));
                 }
                 break;
             }
 
-            default: DEBUG2("bytecode " << (int)ip0 << " not implemented\n");
+            default: INFO("bytecode " << (int)ip0 << " not implemented\n");
                      stackDump(stdout, frame);
                      DIE(("Unexpected bytecode"));
         }

Modified: harmony/enhanced/drlvm/trunk/vm/port/include/tl/memory_pool.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/include/tl/memory_pool.h?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/include/tl/memory_pool.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/include/tl/memory_pool.h Mon Apr 21 03:40:07 2008
@@ -16,10 +16,10 @@
  */
 #ifndef TL_MEMORY_POOL_H
 #define TL_MEMORY_POOL_H
+#include "clog.h"
 
 #include <apr_pools.h>
 #include "open/types.h"
-#include "clog.h"
 
 namespace tl {
 

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/tl/memory_pool.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/tl/memory_pool.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/tl/memory_pool.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/tl/memory_pool.cpp Mon Apr 21 03:40:07 2008
@@ -19,6 +19,7 @@
 
 tl::MemoryPool::MemoryPool()
 {
+    VERIFY_SUCCESS(apr_initialize());
     VERIFY_SUCCESS(apr_pool_create(&pool, NULL));
 }
 
@@ -30,6 +31,8 @@
 tl::MemoryPool::~MemoryPool()
 {
     apr_pool_destroy(pool);
+    // decrease number of APR instances
+    apr_terminate();
 }
 
 void * tl::MemoryPool::alloc(size_t size)

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_log.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_log.h?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_log.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_log.h Mon Apr 21 03:40:07 2008
@@ -20,7 +20,7 @@
 #ifndef _VMCORE_LOG_H
 #define _VMCORE_LOG_H
 
-//#include "open/vm_log.h"
+#include "cxxlog.h"
 #include "object_layout.h"
 #include "object_handles.h"
 #include "vtable.h"
@@ -101,3 +101,4 @@
 }
 
 #endif /* _VMCORE_LOG_H */
+

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/lil_code_generator_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/lil_code_generator_ipf.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/lil_code_generator_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/lil_code_generator_ipf.cpp Mon Apr
21 03:40:07 2008
@@ -364,7 +364,7 @@
                 return i;
         }
 
-        ABORT("Label not found");
+        DIE(("Label not found"));
         return 0;
     }  // get_label_id
 
@@ -539,7 +539,7 @@
         }
 
         default:
-            ASSERT(0, "Unklown variable kind");
+            DIE(("Unklown variable kind"));
             return new(mem) LcgIpfLoc(LLK_Gr, 0);  // should never be reached
         }
     }  // get_var_loc
@@ -918,7 +918,7 @@
             emitter.ipf_shl(dest_reg, src1_reg, src2_reg, current_predicate);
             break;
         default:
-            ASSERT(0, "Unexpected operation");  // control should never reach this point
+            DIE(("Unexpected operation"));  // control should never reach this point
         }
 
         if (dest->kind == LLK_Stk) {
@@ -972,7 +972,7 @@
                 emitter.ipf_and(dest_reg->addr, tmp_addl->addr, src_reg->addr, current_predicate);
             }
         } else {
-            ASSERT(0, "Unexpected operation");  // invalid value in o
+            DIE(("Unexpected operation"));  // invalid value in o
         }
 
         if (dest_reg != dest) {
@@ -1040,7 +1040,7 @@
             emitter.ipf_zxt(sxt_size_4, dest_reg, src_reg, current_predicate);
             break;
         default:
-            ASSERT(0, "Unexpected operation");  // control should never reach this point
+            DIE(("Unexpected operation"));  // control should never reach this point
         }
 
         if (dest->kind == LLK_Stk) {
@@ -1106,7 +1106,7 @@
                 emitter.ipf_stf(float_mem_size_d, mem_st_spill, mem_none, tmp_addr1->addr,
src->addr, current_predicate);
             }
             else {
-                ASSERT(0, "Unexpected kind");  // src shouldn't be a GR!
+                DIE(("Unexpected kind"));  // src shouldn't be a GR!
             }
         }
         else if (dest->kind == LLK_Gr) {
@@ -1121,7 +1121,7 @@
                 emitter.ipf_mov(dest->addr, src->addr, current_predicate);
             }
             else {
-                ASSERT(0, "Unexpected kind");  // src->kind shouldn't be LLK_Fr or LLK_Stk16
+                DIE(("Unexpected kind"));  // src->kind shouldn't be LLK_Fr or LLK_Stk16
             }
         }
         else if (dest->kind == LLK_Fr)  {
@@ -1142,11 +1142,11 @@
                 emitter.ipf_fmov(dest->addr, src->addr, current_predicate);
             }
             else {
-                ASSERT(0, "Unexpected kind");  // src should not be GR!
+                DIE(("Unexpected kind"));  // src should not be GR!
             }
         }
         else {
-            ASSERT(0, "Unknown kind");  // dest->kind has illegal value!
+            DIE(("Unknown kind"));  // dest->kind has illegal value!
         }
     }  // move
 
@@ -1185,7 +1185,7 @@
                 op1_reg = op1_loc->addr;
             }
             else {
-                ASSERT(0, "Wrong kind");  // comparisons available only for ints!
+                DIE(("Wrong kind"));  // comparisons available only for ints!
             }
         }
 
@@ -1208,7 +1208,7 @@
                     op2_reg = op2_loc->addr;
                 }
                 else {
-                    ASSERT(0, "Wrong kind");  // comparisons available only for ints!
+                    DIE(("Wrong kind"));  // comparisons available only for ints!
                 }
             }
         }
@@ -1234,7 +1234,7 @@
         case LP_Ult:
             emitter_p = icmp_ltu; break;
         default:
-            ASSERT(0, "Unknown predicate");  // should never be reached
+            DIE(("Unknown predicate"));  // should never be reached
         }
 
         emitter.ipf_cmp(emitter_p, cmp_unc, true_pr, false_pr, op1_reg, op2_reg, false, 0);
@@ -1310,7 +1310,7 @@
                 if (iloc)
                     emitter.ipf_shladd(tmp_addr3->addr, iloc->addr, shift, 0, current_predicate);
                 else // no index
-                    ASSERT(0, "Can't have no base, no index and no offset");
+                    DIE(("Can't have no base, no index and no offset"));
             }
             return tmp_addr3;
         }  // else (bloc)
@@ -1542,7 +1542,7 @@
                     result = op1_imm << op2_imm;
                     break;
                 default:
-                    ASSERT(0, "Unexpected LIL operation");   // control should never reach
this point
+                    DIE(("Unexpected LIL operation"));   // control should never reach this
point
                 }
                 move_imm(dest_loc, result);
             }
@@ -1561,7 +1561,7 @@
                     bin_op(o, dest_loc, tmp_res, src2_loc);
                     break;
                 default:
-                    ASSERT(0, "Unexpected LIL operation");  // control should never reach
this point
+                    DIE(("Unexpected LIL operation"));  // control should never reach this
point
                 }
             }
             else if (lil_operand_is_immed(op2)) {
@@ -1604,7 +1604,7 @@
                     result = (int64) (uint64) (uint32) imm;
                     break;
                 default:
-                    ASSERT(0, "Unexpected LIL operation");  // control should never reach
this point
+                    DIE(("Unexpected LIL operation"));  // control should never reach this
point
                 }
                 move_imm(dest_loc, result);
             }
@@ -1658,15 +1658,15 @@
         case LT_F4:
         case LT_F8:
         case LT_Void:
-            ASSERT(0, "Unexpected LIL type");  // types not allowed in loads / stores
+            DIE(("Unexpected LIL type"));  // types not allowed in loads / stores
         default:
-            ASSERT(0, "Unknown LIL type");  // invalid value in type
+            DIE(("Unknown LIL type"));  // invalid value in type
         }
 
         Ld_Flag ld_flag = mem_ld_none;
         switch (acqrel) {
         case LAR_Acquire: ld_flag = mem_ld_acq; break;
-        case LAR_Release: ASSERT(0, "Unexpected acqrel value"); break;
+        case LAR_Release: DIE(("Unexpected acqrel value")); break;
         case LAR_None: break;
         }
 
@@ -1686,7 +1686,7 @@
                 emitter.ipf_sxt(ext_size, dst_loc->addr, dst_loc->addr, current_predicate);
         }
         else {
-            ASSERT(0, "Unexpected kind");  // dst_loc shouldn't be FR or STK16
+            DIE(("Unexpected kind"));  // dst_loc shouldn't be FR or STK16
         }
     }  // ld
 
@@ -1712,14 +1712,14 @@
         case LT_F4:
         case LT_F8:
         case LT_Void:
-            ASSERT(0, "Unexpected LIL type");  // types not allowed in loads / stores
+            DIE(("Unexpected LIL type"));  // types not allowed in loads / stores
         default:
-            ASSERT(0, "Unknown LIL type");  // invalid value in type
+            DIE(("Unknown LIL type"));  // invalid value in type
         }
 
         St_Flag st_flag = mem_st_none;
         switch (acqrel) {
-        case LAR_Acquire: ASSERT(0, "Unexpected value of acqrel"); break;
+        case LAR_Acquire: DIE(("Unexpected value of acqrel")); break;
         case LAR_Release: st_flag = mem_st_rel; break;
         case LAR_None: break;
         }
@@ -1752,7 +1752,7 @@
             emitter.ipf_st(size, st_flag, mem_none, addr_loc->addr, src_loc->addr,
current_predicate);
         }
         else {
-            ASSERT(0, "Unexpected kind");  // src_loc shouldn't be FR or STK16!
+            DIE(("Unexpected kind"));  // src_loc shouldn't be FR or STK16!
         }
     }  // st
 
@@ -1796,9 +1796,9 @@
         case LT_F4:
         case LT_F8:
         case LT_Void:
-            ASSERT(0, "Unexpected LIL type");  // types not allowed in loads / stores
+            DIE(("Unexpected LIL type"));  // types not allowed in loads / stores
         default:
-            ASSERT(0, "Unknown LIL type");  // invalid value in type
+            DIE(("Unknown LIL type"));  // invalid value in type
         }
 
         Cmpxchg_Flag flag = mem_cmpxchg_acq;
@@ -1806,7 +1806,7 @@
         case LAR_Acquire: flag = mem_cmpxchg_acq; break;
         case LAR_Release: flag = mem_cmpxchg_rel; break;
         default:
-            ASSERT(0, "Unexpected value of acqrel");
+            DIE(("Unexpected value of acqrel"));
         }
 
         const LcgIpfLoc* src_loc = NULL;
@@ -1950,7 +1950,7 @@
                     call_addr_gr = tmp_res->addr;
                 }
                 else {
-                    ASSERT(0, "Unexpected kind");  // address can't be FP!
+                    DIE(("Unexpected kind"));  // address can't be FP!
                 }
                 emitter.ipf_mtbr(tmp_br, call_addr_gr);
                 emitter.ipf_bri(br_cond, br_many, br_sptk, br_none, tmp_br);
@@ -1998,7 +1998,7 @@
                 call_addr_gr = tmp_res->addr;
             }
             else {
-                ASSERT(0, "Unexpected kind");  // address can't be FP!
+                DIE(("Unexpected kind"));  // address can't be FP!
             }
             if (context.has_push_m2n()) {
                 emitter.ipf_mtbr(BRANCH_CALL_REG, call_addr_gr);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/m2n_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/m2n_ipf.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/m2n_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/m2n_ipf.cpp Mon Apr 21 03:40:07 2008
@@ -14,15 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/** 
- * @author Intel, Evgueni Brevnov, Ivan Volosyuk
- * @version $Revision: 1.1.2.1.4.4 $
- */  
-
-
-#define LOG_DOMAIN = "vm.m2n"
-#include "cxxlog.h"
-
 #include "Code_Emitter.h"
 #include "environment.h"
 #include "m2n.h"
@@ -149,21 +140,19 @@
 void m2n_set_ip(M2nFrame* lm2nf, NativeCodePtr ip)
 {
     assert(lm2nf);
-    ABORT("Not implemented");
+    DIE(("Not implemented"));
 }
 
 // sets pointer to the registers used for jvmti PopFrame
 void set_pop_frame_registers(M2nFrame* m2nf, Registers* regs) {
     // FIXME: not sure we want to support this function on IPF
-    assert(0);
-    abort();
+    DIE(("Not implemented"));
 }
 
 // returns pointer to the registers used for jvmti PopFrame
 Registers* get_pop_frame_registers(M2nFrame* m2nf) {
     // FIXME: not sure we want to support this function on IPF
-    assert(0);
-    abort();
+    DIE(("Not implemented"));
     return 0;
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/stack_iterator_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/stack_iterator_ipf.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/stack_iterator_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/ipf/stack_iterator_ipf.cpp Mon Apr 21 03:40:07
2008
@@ -435,13 +435,13 @@
 // We do not support threads suspended in managed code yet.
 StackIterator* si_create_from_registers(Registers*, bool is_ip_past, M2nFrame*)
 {
-    ABORT("Not implemented");
+    DIE(("Not implemented"));
     return NULL;
 }
 
 void si_fill_from_registers(StackIterator* si, Registers*, bool is_ip_past, M2nFrame*)
 {
-    ABORT("Not implemented");
+    DIE(("Not implemented"));
 }
 
 size_t si_size(){
@@ -537,7 +537,7 @@
 // 20040713 Experimental: set the code chunk in the stack iterator
 void si_set_code_chunk_info(StackIterator* si, CodeChunkInfo* cci)
 {
-    ABORT("Not implemented");
+    DIE(("Not implemented"));
 }
 
 CodeChunkInfo* si_get_code_chunk_info(StackIterator* si)
@@ -612,11 +612,11 @@
 
 void si_copy_to_registers(StackIterator* si, Registers*)
 {
-    ABORT("Not implemented");
+    DIE(("Not implemented"));
 }
 
 void si_set_callback(StackIterator* si, NativeCodePtr* callback) {
-    ABORT("Not implemented");
+    DIE(("Not implemented"));
 }
 
 extern "C" void do_loadrs_asm(int loadrs);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp Mon Apr 21 03:40:07
2008
@@ -300,7 +300,7 @@
 
 static unsigned default_override_size(Method *m)
 {
-    ABORT("Not implemented");
+    DIE(("Not implemented"));
     return 0;
 }
 
@@ -337,7 +337,7 @@
 
 // 20030711: This function might not be compressed references safe
 static void protect_value_type(Class_Handle c, uint64* start, GcFrame* gc) {
-    ABORT("It is supposed that the function is never called");
+    DIE(("It is supposed that the function is never called"));
     assert(!hythread_is_suspend_enabled());
     unsigned num_fields = class_num_instance_fields_recursive(c);
     for(unsigned i=0; i<num_fields; i++) {
@@ -415,7 +415,7 @@
         case VM_DATA_TYPE_VALUE:
         {
             // 20030711: Must verify this with the calling convention
-            ABORT("Unexpected data type");
+            DIE(("Unexpected data type"));
             // This should never cause loading
             Class_Handle c = type_info_get_class(tih);
             assert(c);
@@ -423,7 +423,7 @@
             break;
         }
         default:
-            ABORT("Unexpected data type");
+            DIE(("Unexpected data type"));
         }
     }
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/ini_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/ini_ipf.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/ini_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/ini_ipf.cpp Mon Apr 21 03:40:07
2008
@@ -14,32 +14,20 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/** 
- * @author Intel, Evgueni Brevnov
- * @version $Revision: 1.1.2.1.4.3 $
- */  
-//
-
-// Internal Native Interface
-//
-
-//MVM
-#include <iostream>
-
-using namespace std;
+#define LOG_DOMAIN "init.ipf"
+#include "cxxlog.h"
 
-#include <stdio.h>
-#include <assert.h>
+#include "open/types.h"
+#include "open/vm_util.h"
+#include "open/hythread_ext.h"
 
+// Internal Native Interface
 #include "environment.h"
-#include "open/types.h"
 #include "Class.h"
 #include "exceptions.h"
 #include "vm_threads.h"
 
 #include "compile.h"
-#include "open/vm_util.h"
-#include "open/hythread_ext.h"
 
 #include "merced.h"
 #include "vm_stats.h"
@@ -50,11 +38,8 @@
 #include "nogc.h"
 #include "open/gc.h"
 #include "interpreter.h"
-#include "cxxlog.h"
-
-
 #include "ini.h"
-
+#include "vtable.h"
 
 
 void *get_vm_execute_java_method()

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp Mon
Apr 21 03:40:07 2008
@@ -14,26 +14,14 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/** 
- * @author Intel, Evgueni Brevnov, Ivan Volosyuk
- * @version $Revision: 1.1.2.1.4.4 $
- */  
-//
-
-
-
-//MVM
-#include <iostream>
+#define LOG_DOMAIN "vm.helpers"
+#include "cxxlog.h"
 
 #ifdef PLATFORM_POSIX
 #include <unistd.h>
 #endif
 
-using namespace std;
-
 #include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
 #include <float.h>
 #include <math.h>
 
@@ -69,9 +57,6 @@
 #include "stub_code_utils.h"
 #include "vm_ipf.h"
 
-#define LOG_DOMAIN "vm.helpers"
-#include "cxxlog.h"
-
 #include "dump.h"
 #include "vm_stats.h"
 #include "internal_jit_intf.h"
@@ -684,7 +669,7 @@
     {
         emitter.ipf_ld(int_mem_size_4, mem_ld_none, mem_none, sc3, sub_object);
         emitter.ipf_adds(sc6, offset_depth, super_class);
-        emit_mov_imm_compactor(emitter, sc4, offset_superclasses + vm_get_vtable_base_address());
+        emit_mov_imm_compactor(emitter, sc4, offset_superclasses + (UDATA) vm_get_vtable_base_address());
     }
     else
     {
@@ -735,7 +720,7 @@
         (void **)p_class_is_subtype,
         out0, save_pfs, save_b0, save_gp);
     // sc3 contains the vtable pointer or the vtable offset
-    emit_mov_imm_compactor(emitter, sc2, (vm_is_vtable_compressed() ? vm_get_vtable_base_address()
: 0) + offset_clss);
+    emit_mov_imm_compactor(emitter, sc2, (vm_is_vtable_compressed() ? (UDATA) vm_get_vtable_base_address()
: 0) + offset_clss);
     emitter.ipf_add(sc1, sc2, sc3);
     emitter.ipf_ld(int_mem_size_8, mem_ld_none, mem_none, out0+0, sc1);
     emitter.ipf_mov(out0+1, super_class);
@@ -966,7 +951,7 @@
     if (vm_is_vtable_compressed())
     {
         emitter.ipf_ld(int_mem_size_4, mem_ld_none, mem_none, sc5, src);
-        emit_mov_imm_compactor(emitter, sc1, vm_get_vtable_base_address() + offset_clss);
+        emit_mov_imm_compactor(emitter, sc1, (UDATA) vm_get_vtable_base_address() + offset_clss);
     }
     else
     {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/code_emit/Code_Emitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/code_emit/Code_Emitter.cpp?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/code_emit/Code_Emitter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/code_emit/Code_Emitter.cpp Mon Apr
21 03:40:07 2008
@@ -14,20 +14,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/** 
- * @author Intel, Evgueni Brevnov
- * @version $Revision: 1.1.2.1.4.3 $
- */  
-//
-
+#define LOG_DOMAIN "emitter.ipf"
+#include "cxxlog.h"
 
 #include <memory.h> 
 #include "open/types.h"
 #include "Code_Emitter.h"
 
-#define LOG_DOMAIN "emitter.ipf"
-#include "cxxlog.h"
-
 /////////////////////////////////////////////////////////////////////////////
 //               Statistics gathering
 /////////////////////////////////////////////////////////////////////////////
@@ -249,8 +242,7 @@
     memset(reg_map,0x80,ENC_N_REG);  
 
     // FIXME cannot use passed memory pool 
-    VERIFY(APR_SUCCESS == apr_allocator_create(&allocator), \
-        "Cannot create memory allocator");
+    VERIFY_SUCCESS(apr_allocator_create(&allocator));
     arena = apr_allocator_alloc(allocator, estimate_mem_size(byteCodeSize));
     arena->next = NULL;
 
@@ -417,7 +409,7 @@
         u=(uint64 *)(bundle + 8);
         *u |= instr << 23;
         break;
-    default: ASSERT(0, "Unexpected slot");
+    default: DIE(("Unexpected slot"));
     }
 }
  
@@ -448,7 +440,7 @@
         nop_code = 0x4000000000;
         break;
     default:
-        ASSERT(0, "Unexpected syllable type");
+        DIE(("Unexpected syllable type"));
     }
     return nop_code;
 }
@@ -472,7 +464,7 @@
     case ST_i: return nop_i;
     case ST_b: return nop_b;
     case ST_f: return nop_f;
-    default: ASSERT(0, "Unexpected syllable type");
+    default: DIE(("Unexpected syllable type"));
     }
     return 0;
 }
@@ -1154,7 +1146,7 @@
             schedule_two_IR_ne(prev_ir, ir, curr_instr_couple_is_unordered);
         coupled_instr_state = ENC_single_instr;
         break;
-    default: ASSERT(0, "Unknown instruction state");
+    default: DIE(("Unknown instruction state"));
     }
 }
 
@@ -1183,7 +1175,7 @@
         u=(uint64*)(code_buf+offset+8);
         *u |= imm21_fmt <<36;
         break;
-    default: ASSERT(0, "Unexpected slot");
+    default: DIE(("Unexpected slot"));
     }
 }
 
@@ -1358,7 +1350,7 @@
                 patches=new(mem_pool) Movl_Patch(patches,curr_offset,sl_n, patch_target_id);

                 break;
             default:
-                ASSERT(0, "Unexpected syllable type");
+                DIE(("Unexpected syllable type"));
             }
         }
     }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Code_Emitter.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Code_Emitter.h?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Code_Emitter.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Code_Emitter.h Mon Apr 21
03:40:07 2008
@@ -14,21 +14,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/** 
- * @author Intel, Evgueni Brevnov
- * @version $Revision: 1.1.2.1.4.3 $
- */  
-
 #ifndef _MERCED_CODE_EMITTER_H
 #define _MERCED_CODE_EMITTER_H
 
-#include <stdio.h>
-
-#include "merced.h"
-#include "bit_vector.h"
 #include "open/types.h"
 #include "Emitter_IR.h"
-#include "log_macro.h"
+#include "merced.h"
+#include "bit_vector.h"
 #include "vm_java_support.h"
 
 typedef Encoder_Instr_IR   Instr_IR;
@@ -257,7 +249,7 @@
 
     void ipf_nop (EM_Syllable_Type tv, unsigned imm21=0)
       { encoder->ipf_nop(tv, imm21);
-        ABORT("Not implemented");  //ToDo: nop assumes several form depending on which slot
+        DIE(("Not implemented"));  //ToDo: nop assumes several form depending on which slot
     }
 
     void ipf_add (unsigned dest, unsigned src1, unsigned src2, unsigned pred=0)
@@ -410,7 +402,7 @@
     
     void ipf_brcall (Branch_Prefetch_Hint ph, Branch_Whether_Hint wh, Branch_Dealloc_Hint
dh, unsigned b1, unsigned target25, unsigned pred=0)
       { // No relative address calls in JIT or VM
-        ABORT("No relative address calls in JIT or VM");}
+        DIE(("No relative address calls in JIT or VM"));}
 
     void ipf_bri (Branch_Type btype, Branch_Prefetch_Hint ph, Branch_Whether_Hint wh, Branch_Dealloc_Hint
dh, unsigned b2, unsigned pred=0)
       { assert(btype == br_cond);
@@ -1362,7 +1354,7 @@
 
 private:
 
-    void operator delete (void *) { ABORT("Not implemented"); }
+    void operator delete (void *) { DIE(("Not implemented")); }
 
 
 protected: // data
@@ -1751,7 +1743,7 @@
     }
 private: // functions
 
-    void operator delete (void *) { ABORT("Not implemented"); }
+    void operator delete (void *) { DIE(("Not implemented")); }
 
     virtual void emit_bundle(Bundle_IR * bundle);
     virtual void place_instr_into_slot(Bundle_IR * bundle, int slot, Unsch_Instr_IR&
instr, unsigned need_stop);
@@ -1897,7 +1889,7 @@
 
 private:
 
-    void operator delete (void *) { ABORT("Not implemented"); }
+    void operator delete (void *) { DIE(("Not implemented")); }
 
     // set whether instruction sets/resets reference
     void set_def_ref (bool def_ref) {
@@ -1942,6 +1934,5 @@
 //                     Statistics gathering
 ////////////////////////////////////////////////////////////////////////////////
 
-#endif // __CODE_EMITTER_H
-
+#endif /* _CODE_EMITTER_H */
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Emitter_IR.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Emitter_IR.h?rev=650090&r1=650089&r2=650090&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Emitter_IR.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/include/Emitter_IR.h Mon Apr 21 03:40:07
2008
@@ -14,18 +14,12 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/** 
- * @author Intel, Evgueni Brevnov
- * @version $Revision: 1.1.2.1.4.3 $
- */  
-
 #ifndef _EMITTER_IR_H
 #define _EMITTER_IR_H
 
+#include "tl/memory_pool.h"
 #include "merced.h"
 #include "open/types.h"
-#include "tl/memory_pool.h"
-#include "log_macro.h"
 
 // defines
 
@@ -45,7 +39,7 @@
         // assure little-endian because get_slot01_code_image() needs it
     }
 
-    void code_emit() { ABORT("Not implemented"); }     // shouldn't be called
+    void code_emit() { DIE(("Not implemented")); }     // shouldn't be called
 
     void get_slot01_code_image(uint64 *p_code_image1, uint64 *p_code_image2) {
         uint64& code_image1 = *p_code_image1;



Mime
View raw message