harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcfi...@apache.org
Subject svn commit: r644633 - in /harmony/enhanced/drlvm/trunk/vm: em/src/ gc_gen/src/common/ include/open/ jitrino/src/jet/ jitrino/src/vm/ vmcore/build/ vmcore/src/class_support/ vmcore/src/init/ vmcore/src/interpreter/ vmcore/src/jvmti/ vmcore/src/thread/ v...
Date Fri, 04 Apr 2008 07:25:11 GMT
Author: mcfirst
Date: Fri Apr  4 00:25:02 2008
New Revision: 644633

URL: http://svn.apache.org/viewvc?rev=644633&view=rev
Log:
Applying properties interface change patch from HARMONY-5593 [drlvm][jit]Improve VM-JIT interface in open/vm_interface.h

Added:
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h
Modified:
    harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_options.cpp
    harmony/enhanced/drlvm/trunk/vm/include/open/types.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/interpreter/interp_exports.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/verify_stack_enumeration.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/crash_dump.cpp
    harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp Fri Apr  4 00:25:02 2008
@@ -24,6 +24,7 @@
 #include "EdgeProfileCollector.h"
 #include "NValueProfileCollector.h"
 
+#include "open/vm_properties.h"
 #include "jit_import.h"
 #include "em_intf.h"
 #include "open/vm.h"
@@ -193,9 +194,9 @@
 
     std::string path = origPath;
     if (path.find('/') == path.npos && path.find('\\') == path.npos ) {
-        char* c_string_tmp_value = get_property(O_A_H_VM_VMDIR, JAVA_PROPERTIES);
+        char* c_string_tmp_value = vm_properties_get_value(O_A_H_VM_VMDIR, JAVA_PROPERTIES);
         std::string dir = c_string_tmp_value == NULL ? "" : c_string_tmp_value;
-        destroy_property_value(c_string_tmp_value);
+        vm_properties_destroy_value(c_string_tmp_value);
         if (libPrefix.length() > 0 && !startsWith(path, libPrefix)) {
             path = libPrefix + path;
         }
@@ -278,15 +279,15 @@
             } else if (startsWith(line, "-D") && (idx = line.find('=')) != std::string::npos) {
                 std::string name = line.substr(2, idx-2);                   
                 std::string value = line.substr(idx+1);
-                if (!is_property_set(name.c_str(), JAVA_PROPERTIES)) {
-                    set_property(name.c_str(), value.c_str(), JAVA_PROPERTIES);
+                if (!vm_property_is_set(name.c_str(), JAVA_PROPERTIES)) {
+                    vm_properties_set_value(name.c_str(), value.c_str(), JAVA_PROPERTIES);
                 }
                 continue;
             } else if (startsWith(line, "-XD") && (idx = line.find('=')) != std::string::npos) {
                 std::string name = line.substr(3, idx-3);                   
                 std::string value = line.substr(idx+1);
-                if (!is_property_set(name.c_str(),VM_PROPERTIES)) {
-                    set_property(name.c_str(), value.c_str(), VM_PROPERTIES);
+                if (!vm_property_is_set(name.c_str(),VM_PROPERTIES)) {
+                    vm_properties_set_value(name.c_str(), value.c_str(), VM_PROPERTIES);
                 }
                 continue;
             } else if (startsWith(line, "-XX:") && line.length() >= 5) {
@@ -309,8 +310,8 @@
                     }
                 }
 
-                if (!is_property_set(name.c_str(),VM_PROPERTIES)) {
-                    set_property(name.c_str(), value.c_str(), VM_PROPERTIES);
+                if (!vm_property_is_set(name.c_str(),VM_PROPERTIES)) {
+                    vm_properties_set_value(name.c_str(), value.c_str(), VM_PROPERTIES);
                 }
                 continue;
             } 
@@ -326,12 +327,12 @@
 }
 
 std::string DrlEMImpl::readConfiguration() {
-    char* c_string_tmp_value = get_property("em.properties", VM_PROPERTIES);
+    char* c_string_tmp_value = vm_properties_get_value("em.properties", VM_PROPERTIES);
     std::string  configFileName = c_string_tmp_value == NULL ? "" : c_string_tmp_value;
-    destroy_property_value(c_string_tmp_value);
+    vm_properties_destroy_value(c_string_tmp_value);
     if (configFileName.empty()) {
-        bool jitTiMode = get_boolean_property("vm.jvmti.enabled", FALSE, VM_PROPERTIES);
-        bool interpreterMode = get_boolean_property("vm.use_interpreter", FALSE, VM_PROPERTIES);
+        bool jitTiMode = vm_property_get_boolean("vm.jvmti.enabled", FALSE, VM_PROPERTIES);
+        bool interpreterMode = vm_property_get_boolean("vm.use_interpreter", FALSE, VM_PROPERTIES);
         configFileName = interpreterMode ? "interpreter" : (jitTiMode ? "ti" : "client");
     } 
     if (!endsWith(configFileName, EM_CONFIG_EXT)) {
@@ -339,9 +340,9 @@
     }
 
     if (configFileName.find('/') == configFileName.npos && configFileName.find('\\') == configFileName.npos ) {
-        c_string_tmp_value = get_property(O_A_H_VM_VMDIR, JAVA_PROPERTIES);
+        c_string_tmp_value = vm_properties_get_value(O_A_H_VM_VMDIR, JAVA_PROPERTIES);
         std::string defaultConfigDir = c_string_tmp_value == NULL ? "" : c_string_tmp_value;
-        destroy_property_value(c_string_tmp_value);
+        vm_properties_destroy_value(c_string_tmp_value);
         
         configFileName = defaultConfigDir + "/" + configFileName;
     }
@@ -405,13 +406,13 @@
 
 std::string DrlEMImpl::getJITLibFromCmdLine(const std::string& jitName) const {
     std::string propName = std::string("em.")+jitName+".jitPath";
-    char* c_string_tmp_value = get_property(propName.c_str(), VM_PROPERTIES);
+    char* c_string_tmp_value = vm_properties_get_value(propName.c_str(), VM_PROPERTIES);
     std::string jitLib  = c_string_tmp_value == NULL ? "" : c_string_tmp_value;
-    destroy_property_value(c_string_tmp_value);
+    vm_properties_destroy_value(c_string_tmp_value);
     if (jitLib.empty()) {
-        c_string_tmp_value = get_property("em.jitPath", VM_PROPERTIES);
+        c_string_tmp_value = vm_properties_get_value("em.jitPath", VM_PROPERTIES);
         jitLib = c_string_tmp_value == NULL ? "" : c_string_tmp_value;
-        destroy_property_value(c_string_tmp_value);
+        vm_properties_destroy_value(c_string_tmp_value);
     }
     return jitLib;
 }

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp Fri Apr  4 00:25:02 2008
@@ -20,6 +20,7 @@
  */
 
 #include <cxxlog.h>
+#include "open/vm_properties.h"
 #include "port_sysinfo.h"
 #include "vm_threads.h"
 #include "jit_runtime_support.h"
@@ -57,7 +58,7 @@
 
 static void init_gc_helpers()
 {
-    set_property("vm.component.classpath.gc_gen", "gc_gen.jar", VM_PROPERTIES);
+    vm_properties_set_value("vm.component.classpath.gc_gen", "gc_gen.jar", VM_PROPERTIES);
     vm_helper_register_magic_helper(VM_RT_NEW_RESOLVED_USING_VTABLE_AND_SIZE, "org/apache/harmony/drlvm/gc_gen/GCHelper", "alloc");
     vm_helper_register_magic_helper(VM_RT_NEW_VECTOR_USING_VTABLE,  "org/apache/harmony/drlvm/gc_gen/GCHelper", "allocArray");
     vm_helper_register_magic_helper(VM_RT_GC_HEAP_WRITE_REF,  "org/apache/harmony/drlvm/gc_gen/GCHelper", "write_barrier_slot_rem");

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_options.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_options.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_options.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_options.cpp Fri Apr  4 00:25:02 2008
@@ -16,6 +16,7 @@
  */
 
 #include "gc_common.h"
+#include "open/vm_properties.h"
 
 /* FIXME:: need refactoring this function to distribute the options 
    interpretation to their respective modules. */
@@ -94,75 +95,37 @@
   return gc;
 }
 
-static int get_int_property(const char *property_name)
+static int vm_property_get_integer(const char *property_name)
 {
     assert(property_name);
-    char *value = get_property(property_name, VM_PROPERTIES);
-    int return_value;
-    if (NULL != value)
-    {
-        return_value = atoi(value);
-        destroy_property_value(value);
-    }else{
+    if(!vm_property_is_set(property_name, VM_PROPERTIES)) {
         DIE2("gc.base","Warning: property value "<<property_name<<"is not set!");
         exit(0);
     }
-      
-    return return_value;
+
+    return vm_property_get_integer(property_name, 0, VM_PROPERTIES);
 }
 
-static Boolean get_boolean_property(const char *property_name)
+static BOOLEAN vm_property_get_boolean(const char *property_name)
 {
   assert(property_name);
-  char *value = get_property(property_name, VM_PROPERTIES);
-  if (NULL == value){
+  if (!vm_property_is_set(property_name, VM_PROPERTIES)){
     DIE2("gc.base","Warning: property value "<<property_name<<" is not set!");
     exit(0);
   }
-  
-  Boolean return_value;
-  if (0 == strcmp("no", value)
-      || 0 == strcmp("off", value)
-      || 0 == strcmp("false", value)
-      || 0 == strcmp("0", value))
-  {
-    return_value = FALSE;
-  }
-  else if (0 == strcmp("yes", value)
-           || 0 == strcmp("on", value)
-           || 0 == strcmp("true", value)
-           || 0 == strcmp("1", value))
-  {
-    return_value = TRUE;
-  }else{
-    DIE2("gc.base","Warning: property value "<<property_name<<" is not set! Use upper case?");
-    exit(0);
-  }
-    
-  destroy_property_value(value);
-  return return_value;
+
+  return vm_property_get_boolean(property_name, FALSE, VM_PROPERTIES);
 }
 
-static size_t get_size_property(const char* name) 
+static size_t vm_property_get_size(const char* property_name)
 {
-  char* size_string = get_property(name, VM_PROPERTIES);
-  size_t size = atol(size_string);
-  int sizeModifier = tolower(size_string[strlen(size_string) - 1]);
-  destroy_property_value(size_string);
-
-  size_t unit = 1;
-  switch (sizeModifier) {
-  case 'k': unit = 1024; break;
-  case 'm': unit = 1024 * 1024; break;
-  case 'g': unit = 1024 * 1024 * 1024;break;
-  }
-
-  size_t res = size * unit;
-  if (res / unit != size) {
-    /* overflow happened */
-    return 0;
-  }
-  return res;
+    assert(property_name);
+    if(!vm_property_is_set(property_name, VM_PROPERTIES)) {
+        DIE2("gc.base","Warning: property value "<<property_name<<" is not set!");
+        exit(0);
+    }
+
+    return vm_property_get_size(property_name, 0, VM_PROPERTIES);
 }
 
 void gc_decide_concurrent_algorithm(char* concurrent_algo);
@@ -174,28 +137,28 @@
   TRACE2("gc.process", "GC: parse options ...\n");
 
   GC* gc;
-  
+
   /* GC algorithm decision */
   /* Step 1: */
   char* minor_algo = NULL;
   char* major_algo = NULL;
   char* unique_algo = NULL;
-  
-  if (is_property_set("gc.minor_algorithm", VM_PROPERTIES) == 1) {
-    minor_algo = get_property("gc.minor_algorithm", VM_PROPERTIES);
+
+  if (vm_property_is_set("gc.minor_algorithm", VM_PROPERTIES) == 1) {
+    minor_algo = vm_properties_get_value("gc.minor_algorithm", VM_PROPERTIES);
   }
-  
-  if (is_property_set("gc.major_algorithm", VM_PROPERTIES) == 1) {
-    major_algo = get_property("gc.major_algorithm", VM_PROPERTIES);
+
+  if (vm_property_is_set("gc.major_algorithm", VM_PROPERTIES) == 1) {
+    major_algo = vm_properties_get_value("gc.major_algorithm", VM_PROPERTIES);
   }
-    
-  if (is_property_set("gc.uniqe_algorithm", VM_PROPERTIES) == 1) {
-    unique_algo = get_property("gc.unique_algorithm", VM_PROPERTIES);
+
+  if (vm_property_is_set("gc.uniqe_algorithm", VM_PROPERTIES) == 1) {
+    unique_algo = vm_properties_get_value("gc.unique_algorithm", VM_PROPERTIES);
   }
 
   Boolean has_los = FALSE;
-  if (is_property_set("gc.has_los", VM_PROPERTIES) == 1) {
-    has_los = get_boolean_property("gc.has_los");
+  if (vm_property_is_set("gc.has_los", VM_PROPERTIES) == 1) {
+    has_los = vm_property_get_boolean("gc.has_los");
   }
 
   if(unique_algo){
@@ -203,24 +166,23 @@
       WARN2("gc.base","Warning: generational options cannot be set with unique_algo, ignored.");
     }
     gc = gc_decide_collection_algo(unique_algo, has_los);
-    destroy_property_value(unique_algo);  
-  
+    vm_properties_destroy_value(unique_algo);  
   }else{ /* default */
     gc = gc_gen_decide_collection_algo(minor_algo, major_algo, has_los);
-    if( minor_algo) destroy_property_value(minor_algo);
-    if( major_algo) destroy_property_value(major_algo);
+    if( minor_algo) vm_properties_destroy_value(minor_algo);
+    if( major_algo) vm_properties_destroy_value(major_algo);
   }
-  
-  if (is_property_set("gc.gen_mode", VM_PROPERTIES) == 1) {
-    Boolean gen_mode = get_boolean_property("gc.gen_mode");
+
+  if (vm_property_is_set("gc.gen_mode", VM_PROPERTIES) == 1) {
+    Boolean gen_mode = vm_property_get_boolean("gc.gen_mode");
     gc_set_gen_mode(gen_mode);
   }
 
   /* Step 2: */
 
   /* NOTE:: this has to stay after above!! */
-  if (is_property_set("gc.force_major_collect", VM_PROPERTIES) == 1) {
-    FORCE_FULL_COMPACT = get_boolean_property("gc.force_major_collect");
+  if (vm_property_is_set("gc.force_major_collect", VM_PROPERTIES) == 1) {
+    FORCE_FULL_COMPACT = vm_property_get_boolean("gc.force_major_collect");
     if(FORCE_FULL_COMPACT){
       gc_set_gen_mode(FALSE);
     }
@@ -230,8 +192,8 @@
   /* NOTE:: this has to stay after above!! */
   gc->generate_barrier = gc_is_gen_mode();
   
-  if (is_property_set("gc.generate_barrier", VM_PROPERTIES) == 1) {
-    Boolean generate_barrier = get_boolean_property("gc.generate_barrier");
+  if (vm_property_is_set("gc.generate_barrier", VM_PROPERTIES) == 1) {
+    Boolean generate_barrier = vm_property_get_boolean("gc.generate_barrier");
     gc->generate_barrier = (generate_barrier || gc->generate_barrier);
   }
   
@@ -240,8 +202,8 @@
   POINTER_SIZE_INT max_heap_size = HEAP_SIZE_DEFAULT;
   POINTER_SIZE_INT min_heap_size = min_heap_size_bytes;
   
-  if (is_property_set("gc.mx", VM_PROPERTIES) == 1) {
-    max_heap_size = get_size_property("gc.mx");
+  if (vm_property_is_set("gc.mx", VM_PROPERTIES) == 1) {
+    max_heap_size = vm_property_get_size("gc.mx");
 
     if (max_heap_size < min_heap_size){
       max_heap_size = min_heap_size;
@@ -259,8 +221,8 @@
     }
   }
 
-  if (is_property_set("gc.ms", VM_PROPERTIES) == 1) {
-    min_heap_size = get_size_property("gc.ms");
+  if (vm_property_is_set("gc.ms", VM_PROPERTIES) == 1) {
+    min_heap_size = vm_property_get_size("gc.ms");
     if (min_heap_size < min_heap_size_bytes){
       min_heap_size = min_heap_size_bytes;
       WARN2("gc.base","Warning: Min heap size you set is too small, reset to "<<min_heap_size/MB<<" MB!");
@@ -275,84 +237,82 @@
   min_heap_size_bytes = min_heap_size;
   max_heap_size_bytes = max_heap_size;
 
-  if (is_property_set("gc.nos_size", VM_PROPERTIES) == 1) {
-    NOS_SIZE = get_size_property("gc.nos_size");
+  if (vm_property_is_set("gc.nos_size", VM_PROPERTIES) == 1) {
+    NOS_SIZE = vm_property_get_size("gc.nos_size");
   }
 
-  if (is_property_set("gc.min_nos_size", VM_PROPERTIES) == 1) {
-    MIN_NOS_SIZE = get_size_property("gc.min_nos_size");
+  if (vm_property_is_set("gc.min_nos_size", VM_PROPERTIES) == 1) {
+    MIN_NOS_SIZE = vm_property_get_size("gc.min_nos_size");
   }
 
-  if (is_property_set("gc.init_los_size", VM_PROPERTIES) == 1) {
-    INIT_LOS_SIZE = get_size_property("gc.init_los_size");
+  if (vm_property_is_set("gc.init_los_size", VM_PROPERTIES) == 1) {
+    INIT_LOS_SIZE = vm_property_get_size("gc.init_los_size");
   }  
 
-  if (is_property_set("gc.num_collectors", VM_PROPERTIES) == 1) {
-    unsigned int num = get_int_property("gc.num_collectors");
+  if (vm_property_is_set("gc.num_collectors", VM_PROPERTIES) == 1) {
+    unsigned int num = vm_property_get_integer("gc.num_collectors");
     NUM_COLLECTORS = (num==0)? NUM_COLLECTORS:num;
   }
 
-  if (is_property_set("gc.num_markers", VM_PROPERTIES) == 1) {
-    unsigned int num = get_int_property("gc.num_markers");
+  if (vm_property_is_set("gc.num_markers", VM_PROPERTIES) == 1) {
+    unsigned int num = vm_property_get_integer("gc.num_markers");
     NUM_MARKERS = (num==0)? NUM_MARKERS:num;
   }
 
-  if (is_property_set("gc.tospace_size", VM_PROPERTIES) == 1) {
-    TOSPACE_SIZE = get_size_property("gc.tospace_size");
+  if (vm_property_is_set("gc.tospace_size", VM_PROPERTIES) == 1) {
+    TOSPACE_SIZE = vm_property_get_size("gc.tospace_size");
   }
 
-  if (is_property_set("gc.mos_reserve_size", VM_PROPERTIES) == 1) {
-    MOS_RESERVE_SIZE = get_size_property("gc.mos_reserve_size");
+  if (vm_property_is_set("gc.mos_reserve_size", VM_PROPERTIES) == 1) {
+    MOS_RESERVE_SIZE = vm_property_get_size("gc.mos_reserve_size");
   }
 
-  if (is_property_set("gc.nos_partial_forward", VM_PROPERTIES) == 1) {
-    NOS_PARTIAL_FORWARD = get_boolean_property("gc.nos_partial_forward");
+  if (vm_property_is_set("gc.nos_partial_forward", VM_PROPERTIES) == 1) {
+    NOS_PARTIAL_FORWARD = vm_property_get_boolean("gc.nos_partial_forward");
   }
     
-  if (is_property_set("gc.minor_collectors", VM_PROPERTIES) == 1) {
-    MINOR_COLLECTORS = get_int_property("gc.minor_collectors");
+  if (vm_property_is_set("gc.minor_collectors", VM_PROPERTIES) == 1) {
+    MINOR_COLLECTORS = vm_property_get_integer("gc.minor_collectors");
   }
 
-  if (is_property_set("gc.major_collectors", VM_PROPERTIES) == 1) {
-    MAJOR_COLLECTORS = get_int_property("gc.major_collectors");
+  if (vm_property_is_set("gc.major_collectors", VM_PROPERTIES) == 1) {
+    MAJOR_COLLECTORS = vm_property_get_integer("gc.major_collectors");
   }
 
-  if (is_property_set("gc.ignore_finref", VM_PROPERTIES) == 1) {
-    IGNORE_FINREF = get_boolean_property("gc.ignore_finref");
+  if (vm_property_is_set("gc.ignore_finref", VM_PROPERTIES) == 1) {
+    IGNORE_FINREF = vm_property_get_boolean("gc.ignore_finref");
   }
 
-  if (is_property_set("gc.verify", VM_PROPERTIES) == 1) {
-    char* value = get_property("gc.verify", VM_PROPERTIES);
+  if (vm_property_is_set("gc.verify", VM_PROPERTIES) == 1) {
+    char* value = vm_properties_get_value("gc.verify", VM_PROPERTIES);
     GC_VERIFY = strdup(value);
-    destroy_property_value(value);
+    vm_properties_destroy_value(value);
   }
 
-  if (is_property_set("gc.gen_nongen_switch", VM_PROPERTIES) == 1){
-    GEN_NONGEN_SWITCH= get_boolean_property("gc.gen_nongen_switch");
+  if (vm_property_is_set("gc.gen_nongen_switch", VM_PROPERTIES) == 1){
+    GEN_NONGEN_SWITCH= vm_property_get_boolean("gc.gen_nongen_switch");
     gc->generate_barrier = TRUE;
   }
 
-  if (is_property_set("gc.heap_iteration", VM_PROPERTIES) == 1) {
-    JVMTI_HEAP_ITERATION = get_boolean_property("gc.heap_iteration");
+  if (vm_property_is_set("gc.heap_iteration", VM_PROPERTIES) == 1) {
+    JVMTI_HEAP_ITERATION = vm_property_get_boolean("gc.heap_iteration");
   }
 
-  if (is_property_set("gc.ignore_vtable_tracing", VM_PROPERTIES) == 1) {
-    IGNORE_VTABLE_TRACING = get_boolean_property("gc.ignore_vtable_tracing");
+  if (vm_property_is_set("gc.ignore_vtable_tracing", VM_PROPERTIES) == 1) {
+    IGNORE_VTABLE_TRACING = vm_property_get_boolean("gc.ignore_vtable_tracing");
   }
 
-  if (is_property_set("gc.use_large_page", VM_PROPERTIES) == 1){
-    char* value = get_property("gc.use_large_page", VM_PROPERTIES);
+  if (vm_property_is_set("gc.use_large_page", VM_PROPERTIES) == 1){
+    char* value = vm_properties_get_value("gc.use_large_page", VM_PROPERTIES);
     large_page_hint = strdup(value);
-    destroy_property_value(value);
+    vm_properties_destroy_value(value);
   }
 
-  if (is_property_set("gc.share_los_boundary", VM_PROPERTIES) == 1){
-    share_los_boundary = get_boolean_property("gc.share_los_boundary");     
+  if (vm_property_is_set("gc.share_los_boundary", VM_PROPERTIES) == 1){
+    share_los_boundary = vm_property_get_boolean("gc.share_los_boundary");
   }
-
-
-  if (is_property_set("gc.concurrent_gc", VM_PROPERTIES) == 1){
-    Boolean use_all_concurrent_phase= get_boolean_property("gc.concurrent_gc");
+  if (vm_property_is_set("gc.concurrent_gc", VM_PROPERTIES) == 1){
+    Boolean use_all_concurrent_phase= vm_property_get_boolean("gc.concurrent_gc");
     if(use_all_concurrent_phase){
       USE_CONCURRENT_ENUMERATION = TRUE;
       USE_CONCURRENT_MARK = TRUE;
@@ -361,24 +321,24 @@
     }
   }
 
-  if (is_property_set("gc.concurrent_enumeration", VM_PROPERTIES) == 1){
-    USE_CONCURRENT_ENUMERATION= get_boolean_property("gc.concurrent_enumeration");
+  if (vm_property_is_set("gc.concurrent_enumeration", VM_PROPERTIES) == 1){
+    USE_CONCURRENT_ENUMERATION= vm_property_get_boolean("gc.concurrent_enumeration");
     if(USE_CONCURRENT_ENUMERATION){
       USE_CONCURRENT_GC = TRUE;      
       gc->generate_barrier = TRUE;
     }
   }
 
-  if (is_property_set("gc.concurrent_mark", VM_PROPERTIES) == 1){
-    USE_CONCURRENT_MARK= get_boolean_property("gc.concurrent_mark");
+  if (vm_property_is_set("gc.concurrent_mark", VM_PROPERTIES) == 1){
+    USE_CONCURRENT_MARK= vm_property_get_boolean("gc.concurrent_mark");
     if(USE_CONCURRENT_MARK){
       USE_CONCURRENT_GC = TRUE;      
       gc->generate_barrier = TRUE;
     }
   }
 
-  if (is_property_set("gc.concurrent_sweep", VM_PROPERTIES) == 1){
-    USE_CONCURRENT_SWEEP= get_boolean_property("gc.concurrent_sweep");
+  if (vm_property_is_set("gc.concurrent_sweep", VM_PROPERTIES) == 1){
+    USE_CONCURRENT_SWEEP= vm_property_get_boolean("gc.concurrent_sweep");
     if(USE_CONCURRENT_SWEEP){
       USE_CONCURRENT_GC = TRUE;
     }
@@ -386,39 +346,39 @@
  
   char* concurrent_algo = NULL;
   
-  if (is_property_set("gc.concurrent_algorithm", VM_PROPERTIES) == 1) {
-    concurrent_algo = get_property("gc.concurrent_algorithm", VM_PROPERTIES);
+  if (vm_property_is_set("gc.concurrent_algorithm", VM_PROPERTIES) == 1) {
+    concurrent_algo = vm_properties_get_value("gc.concurrent_algorithm", VM_PROPERTIES);
   }
   
   gc_decide_concurrent_algorithm(concurrent_algo);
 
 #if defined(ALLOC_ZEROING) && defined(ALLOC_PREFETCH)
-  if(is_property_set("gc.prefetch",VM_PROPERTIES) ==1) {
-    PREFETCH_ENABLED = get_boolean_property("gc.prefetch");
+  if(vm_property_is_set("gc.prefetch",VM_PROPERTIES) ==1) {
+    PREFETCH_ENABLED = vm_property_get_boolean("gc.prefetch");
   }
 
-  if(is_property_set("gc.prefetch_distance",VM_PROPERTIES)==1) {
-    PREFETCH_DISTANCE = get_size_property("gc.prefetch_distance");
+  if(vm_property_is_set("gc.prefetch_distance",VM_PROPERTIES)==1) {
+    PREFETCH_DISTANCE = vm_property_get_size("gc.prefetch_distance");
     if(!PREFETCH_ENABLED) {
       WARN2("gc.prefetch_distance","Warning: Prefetch distance set with Prefetch disabled!");
     }
   }
 
-  if(is_property_set("gc.prefetch_stride",VM_PROPERTIES)==1) {
-    PREFETCH_STRIDE = get_size_property("gc.prefetch_stride");
+  if(vm_property_is_set("gc.prefetch_stride",VM_PROPERTIES)==1) {
+    PREFETCH_STRIDE = vm_property_get_size("gc.prefetch_stride");
     if(!PREFETCH_ENABLED) {
       WARN2("gc.prefetch_stride","Warning: Prefetch stride set  with Prefetch disabled!");
     }  
   }
   
-  if(is_property_set("gc.zeroing_size",VM_PROPERTIES)==1) {
-    ZEROING_SIZE = get_size_property("gc.zeroing_size");
+  if(vm_property_is_set("gc.zeroing_size",VM_PROPERTIES)==1) {
+    ZEROING_SIZE = vm_property_get_size("gc.zeroing_size");
   }   
 #endif
 
 #ifdef PREFETCH_SUPPORTED
-  if(is_property_set("gc.mark_prefetch",VM_PROPERTIES) ==1) {
-    mark_prefetch = get_boolean_property("gc.mark_prefetch");
+  if(vm_property_is_set("gc.mark_prefetch",VM_PROPERTIES) ==1) {
+    mark_prefetch = vm_property_get_boolean("gc.mark_prefetch");
   }  
 #endif
 

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/types.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/types.h?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/types.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/types.h Fri Apr  4 00:25:02 2008
@@ -96,11 +96,4 @@
 
 typedef void *GC_Enumeration_Handle;
 
-//tmp location
-typedef enum {
-    VM_PROPERTIES  = 0,
-    JAVA_PROPERTIES = 1
-    } PropertyTable;
-
-
 #endif //!_VM_TYPES_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=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Fri Apr  4 00:25:02 2008
@@ -567,76 +567,6 @@
 VMEXPORT unsigned vm_get_vtable_ptr_size();
 
 /**
- * Sets the property for <code>table_number</code> property table. <code>NULL</code> value is supported.
- */
-VMEXPORT void set_property(const char* key, const char* value, PropertyTable table_number);
-
-/**
- * @return The value of the property from <code>table_number</code> property table if it
- *         has been set by <code>set_property</code> function. Otherwise <code>NULL</code>.
- */
-VMEXPORT char* get_property(const char* key, PropertyTable table_number);
-
-/**
- * Safety frees memory of value returned by <code>get_property</code> function.
- */ 
-VMEXPORT void destroy_property_value(char* value);
-
-/**
- * Checks if the property is set. 
- *
- * @return -1 if <code>table_number</code> is incorrect.<BR>
- *          1 if property is set in <code>table_number</code> property table.<BR>
- *          0 otherwise.
- */
-VMEXPORT int is_property_set(const char* key, PropertyTable table_number);
-
-/**
- * Unsets the property in <code>table_number</code> property table.
- */
-VMEXPORT void unset_property(const char* key, PropertyTable table_number);
-
-/**
- * @return An array of keys from <code>table_number</code> properties table.
- */ 
-VMEXPORT char** get_properties_keys(PropertyTable table_number);
-
-/**
- * @return An array of keys which start with specified prefix from 
- *         <code>table_number</code> properties table.
- */ 
-VMEXPORT char** get_properties_keys_staring_with(const char* prefix, PropertyTable table_number);
-
-/**
- * Safety frees array of keys memory which returned by <code>get_properties_keys</code>
- * or <code>get_properties_keys_staring_with</code> functions.
- */
-VMEXPORT void destroy_properties_keys(char** keys);
-
-/**
- * Tries to interpret property value as <code>Boolean</code> and returns it. 
- * In case of failure returns <code>default_value</code>.
- */
-VMEXPORT Boolean get_boolean_property(const char* property, Boolean default_value, PropertyTable table_number);
-
-/**
- * Tries to interpret property value as <code>int</code> and returns it. In case of failure 
- * returns <code>default_value</code>.
- */
-VMEXPORT int get_int_property(const char *property_name, int default_value, PropertyTable table_number);
-
-/**
- * Tries to interpret property value as <code>int</code> and returns it. In case of failure 
- * returns <code>default_value</code>.
- */
-VMEXPORT size_t get_size_property(const char *property_name, size_t default_value, PropertyTable table_number);
-
-
-//Tries to interpret property value as int and returns it. In case of failure returns default_value.
-// Numbers can include 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes (for example, 32k is the same as 32768).
-VMEXPORT int64 get_numerical_property(const char *property_name, int64 default_value, PropertyTable table_number);
-
-/**
  * Returns the address of the global flag that specifies whether
  * MethodEntry event is enabled. JIT should call this function in case
  * a method is compiled with exe_notify_method_entry flag set.

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h Fri Apr  4 00:25:02 2008
@@ -117,14 +117,6 @@
 PROTOTYPE_WITH_NAME(UDATA       , vm_tls_is_fast, (void));//UDATA VMCALL hythread_uses_fast_tls
 PROTOTYPE_WITH_NAME(IDATA       , vm_get_tls_offset_in_segment, (void));//IDATA VMCALL hythread_get_hythread_offset_in_tls(void)
 
-
-PROTOTYPE_WITH_NAME(void        , vm_properties_destroy_keys, (char** keys));//void destroy_properties_keys(char** keys)
-PROTOTYPE_WITH_NAME(void        , vm_properties_destroy_value, (char* value));//void destroy_property_value(char* value)
-PROTOTYPE_WITH_NAME(char**      , vm_properties_get_keys, (PropertyTable table_number));//char** get_properties_keys(PropertyTable table_number);
-PROTOTYPE_WITH_NAME(char**      , vm_properties_get_keys_starting_with, (const char* prefix, PropertyTable table_number));//get_properties_keys_staring_with
-PROTOTYPE_WITH_NAME(char*       , vm_properties_get_value, (const char* key, PropertyTable table_number));//char* get_property(const char* key, PropertyTable table_number)
-
-
 PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_object_class, ()); // get_system_object_class
 PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_class_class, ()); // get_system_class_class
 PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_string_class, ()); // get_system_string_class

Added: harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h?rev=644633&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h Fri Apr  4 00:25:02 2008
@@ -0,0 +1,88 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+#ifndef __PROPERTIES_H__
+#define __PROPERTIES_H__
+
+#include <stddef.h>
+#include "open/common.h"
+#include "open/platform_types.h"
+
+typedef enum { VM_PROPERTIES  = 0, JAVA_PROPERTIES = 1 } PropertyTable;
+
+/**
+ * Sets the property for <code>table_number</code> property table. <code>NULL</code> value is supported.
+ */
+DECLARE_OPEN(void, vm_properties_set_value, (const char* key, const char* value, PropertyTable table_number));
+
+/**
+ * @return The value of the property from <code>table_number</code> property table if it
+ *         has been set by <code>vm_properties_set_value</code> function. Otherwise <code>NULL</code>.
+ */
+DECLARE_OPEN(char*, vm_properties_get_value, (const char* key, PropertyTable table_number));
+
+/**
+ * Safety frees memory of value returned by <code>vm_properties_get_value</code> function.
+ */ 
+DECLARE_OPEN(void, vm_properties_destroy_value, (char* value));
+
+/**
+ * Checks if the property is set. 
+ *
+ * @return -1 if <code>table_number</code> is incorrect.<BR>
+ *          1 if property is set in <code>table_number</code> property table.<BR>
+ *          0 otherwise.
+ */
+DECLARE_OPEN(int, vm_property_is_set, (const char* key, PropertyTable table_number));
+
+/**
+ * @return An array of keys from <code>table_number</code> properties table.
+ */ 
+DECLARE_OPEN(char**, vm_properties_get_keys, (PropertyTable table_number));
+
+/**
+ * @return An array of keys which start with specified prefix from 
+ *         <code>table_number</code> properties table.
+ */ 
+DECLARE_OPEN(char**, vm_properties_get_keys_starting_with, (const char* prefix, PropertyTable table_number));
+
+/**
+ * Safety frees array of keys memory which returned by <code>vm_properties_get_keys</code>
+ * or <code>vm_properties_get_keys_starting_with</code> functions.
+ */
+DECLARE_OPEN(void, vm_properties_destroy_keys, (char** keys));
+
+/**
+ * Tries to interpret property value as <code>Boolean</code> and returns it. 
+ * In case of failure returns <code>default_value</code>.
+ */
+DECLARE_OPEN(BOOLEAN, vm_property_get_boolean, (const char* property, BOOLEAN default_value, PropertyTable table_number));
+
+/**
+ * Tries to interpret property value as <code>int</code> and returns it. In case of failure 
+ * returns <code>default_value</code>.
+ */
+DECLARE_OPEN(int, vm_property_get_integer, (const char *property_name, int default_value, PropertyTable table_number));
+
+/**
+ * Tries to interpret property value as <code>int</code> and returns it.
+ * In case of failure returns <code>default_value</code>.
+ * Numbers can include 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes
+ * (for example, 32k is the same as 32768).
+ */
+DECLARE_OPEN(size_t, vm_property_get_size, (const char *property_name, size_t default_value, PropertyTable table_number));
+
+#endif

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Fri Apr  4 00:25:02 2008
@@ -30,6 +30,7 @@
 #endif
 
 #include "open/vm.h"
+#include "open/vm_properties.h"
 #include "open/hythread_ext.h"
 #include "open/vm_class_info.h"
 #include "open/vm_type_access.h"
@@ -1477,7 +1478,7 @@
     VTBL_BASE = (const char*)vm_get_vtable_base();
     NULL_REF  = g_refs_squeeze ? OBJ_BASE : NULL;
 
-    g_jvmtiMode = (bool)get_boolean_property("vm.jvmti.enabled", false, VM_PROPERTIES);
+    g_jvmtiMode = (bool)vm_property_get_boolean("vm.jvmti.enabled", false, VM_PROPERTIES);
     
     rt_helper_monitor_enter = 
                 (char*)vm_helper_get_addr(VM_RT_MONITOR_ENTER);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp Fri Apr  4 00:25:02 2008
@@ -24,6 +24,7 @@
 
 #define DYNAMIC_OPEN
 #include "VMInterface.h"
+#include "open/vm_properties.h"
 #include "open/vm_class_info.h"
 #include "open/vm_type_access.h"
 #include "open/vm_field_access.h"
@@ -196,11 +197,11 @@
 static  vm_tls_is_fast_t  vm_tls_is_fast = 0;//UDATA VMCALL hythread_uses_fast_tls
 static  vm_get_tls_offset_in_segment_t  vm_get_tls_offset_in_segment = 0;//IDATA VMCALL hythread_get_hythread_offset_in_tls(void)
 
-static  vm_properties_destroy_keys_t  vm_properties_destroy_keys = 0;//void destroy_properties_keys(char** keys)
-static  vm_properties_destroy_value_t  vm_properties_destroy_value = 0;//void destroy_property_value(char* value)
-static  vm_properties_get_keys_t  vm_properties_get_keys = 0;//char** get_properties_keys(PropertyTable table_number);
+static  vm_properties_destroy_keys_t  vm_properties_destroy_keys = 0;//void vm_properties_destroy_keys(char** keys)
+static  vm_properties_destroy_value_t  vm_properties_destroy_value = 0;//void vm_properties_destroy_value(char* value)
+static  vm_properties_get_keys_t  vm_properties_get_keys = 0;//char** vm_properties_get_keys(PropertyTable table_number);
 static  vm_properties_get_keys_starting_with_t vm_properties_get_keys_starting_with = 0;
-static  vm_properties_get_value_t vm_properties_get_value = 0;//char* get_property(const char* key, PropertyTable table_number)
+static  vm_properties_get_value_t vm_properties_get_value = 0;//char* vm_properties_get_value(const char* key, PropertyTable table_number)
 
 
 static  vm_get_system_object_class_t  vm_get_system_object_class = 0; // get_system_object_class

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp Fri Apr  4 00:25:02 2008
@@ -91,8 +91,8 @@
     class_cp_get_method_descriptor;
     class_cp_get_method_name;
     curr_arg;
-    destroy_properties_keys;
-    destroy_property_value;
+    vm_properties_destroy_keys;
+    vm_properties_destroy_value;
     field_get_address;
     field_get_class;
     field_get_class_of_field_type;
@@ -121,18 +121,17 @@
     gc_max_memory;
     gc_time_since_last_gc;
     gc_total_memory;
-    get_boolean_property;
+    vm_property_get_boolean;
     get_curr_arg_class;
     get_file_and_line;
-    get_int_property;
+    vm_property_get_integer;
     get_jvalue_arg_array;
     get_method_entry_flag_address;
     get_method_exit_flag_address;
-    get_numerical_property;
-    get_properties_keys;
-    get_properties_keys_staring_with;
-    get_property;
-    get_size_property;
+    vm_properties_get_keys;
+    vm_properties_get_keys_starting_with;
+    vm_properties_get_value;
+    vm_property_get_size;
     get_system_class_class;
     get_system_object_class;
     get_system_string_class;
@@ -144,7 +143,7 @@
     is_info_enabled;
     is_it_finalize_thread;
     is_log_enabled;
-    is_property_set;
+    vm_property_is_set;
     is_trace_enabled;
     is_warn_enabled;
     Java_java_lang_ClassLoader_defineClass0;
@@ -546,7 +545,7 @@
     set_native_finalizer_thread_flag;
     set_native_ref_enqueue_thread_flag;
     set_out;
-    set_property;
+    vm_properties_set_value;
     set_thread_specific_out;
     set_threshold;
     shutdown_log_system;
@@ -569,7 +568,6 @@
     type_info_is_vector;
     type_info_is_void;
     uncompress_compressed_reference;
-    unset_property;
     vector_first_element_offset;
     vector_first_element_offset_class_handle;
     vector_first_element_offset_unboxed;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp Fri Apr  4 00:25:02 2008
@@ -22,6 +22,7 @@
 #define LOG_DOMAIN "vm.core"
 #include "cxxlog.h"
 
+#include "open/vm_properties.h"
 #include "classloader.h"
 #include "lock_manager.h"
 #include "compile.h"
@@ -2231,7 +2232,7 @@
     return CC_Vm;
 } //vm_managed_calling_convention
 
-void set_property(const char* key, const char* value, PropertyTable table_number) 
+void vm_properties_set_value(const char* key, const char* value, PropertyTable table_number) 
 {
     assert(key);
     switch(table_number) {
@@ -2246,7 +2247,7 @@
     }
 }
 
-char* get_property(const char* key, PropertyTable table_number)
+char* vm_properties_get_value(const char* key, PropertyTable table_number)
 {
     assert(key);
     char* value;
@@ -2264,7 +2265,7 @@
     return value;
 }
 
-void destroy_property_value(char* value)
+void vm_properties_destroy_value(char* value)
 {
     if (value)
     {
@@ -2273,7 +2274,7 @@
     }
 }
 
-int is_property_set(const char* key, PropertyTable table_number)
+int vm_property_is_set(const char* key, PropertyTable table_number)
 {
     int value;
     assert(key);
@@ -2291,22 +2292,7 @@
     return value;
 }
 
-void unset_property(const char* key, PropertyTable table_number)
-{
-    assert(key);
-    switch(table_number) {
-    case JAVA_PROPERTIES: 
-        VM_Global_State::loader_env->JavaProperties()->unset(key);
-        break;
-    case VM_PROPERTIES: 
-        VM_Global_State::loader_env->VmProperties()->unset(key);
-        break;
-    default:
-        ASSERT(0, "Unknown property table: " << table_number);
-    }
-}
-
-char** get_properties_keys(PropertyTable table_number)
+char** vm_properties_get_keys(PropertyTable table_number)
 {
     char** value;
     switch(table_number) {
@@ -2323,7 +2309,7 @@
     return value;
 }
 
-char** get_properties_keys_staring_with(const char* prefix, PropertyTable table_number)
+char** vm_properties_get_keys_starting_with(const char* prefix, PropertyTable table_number)
 {
     assert(prefix);
     char** value;
@@ -2341,7 +2327,7 @@
     return value;
 }
 
-void destroy_properties_keys(char** keys)
+void vm_properties_destroy_keys(char** keys)
 {
     if (keys)
     {
@@ -2350,49 +2336,23 @@
     }
 }
 
-int get_int_property(const char *property_name, int default_value, PropertyTable table_number)
+int vm_property_get_integer(const char *property_name, int default_value, PropertyTable table_number)
 {
     assert(property_name);
-    char *value = get_property(property_name, table_number);
+    char *value = vm_properties_get_value(property_name, table_number);
     int return_value = default_value;
     if (NULL != value)
     {
         return_value = atoi(value);
-        destroy_property_value(value);
+        vm_properties_destroy_value(value);
     }
     return return_value;
 }
 
-int64 get_numerical_property(const char *property_name, int64 default_value, PropertyTable table_number)
-{
-    assert(property_name);
-    char *value = get_property(property_name, table_number);
-    int64 return_value = default_value;
-    if (NULL != value)
-    {
-        int64 size = atol(value);
-        int sizeModifier = tolower(value[strlen(value) - 1]);
-        destroy_property_value(value);
-
-        size_t unit = 1;
-        switch (sizeModifier) {
-        case 'k': unit = 1024; break;
-        case 'm': unit = 1024 * 1024; break;
-        case 'g': unit = 1024 * 1024 * 1024;break;
-        }
-
-        return_value = size * unit;
-        if (return_value / unit != size) {
-            /* overflow happened */
-            return_value = default_value;
-        }
-    }
-    return return_value;
-}
-Boolean get_boolean_property(const char *property_name, Boolean default_value, PropertyTable table_number)
+BOOLEAN vm_property_get_boolean(const char *property_name, BOOLEAN default_value, PropertyTable table_number)
 {
     assert(property_name);
-    char *value = get_property(property_name, table_number);
+    char *value = vm_properties_get_value(property_name, table_number);
     if (NULL == value)
     {
         return default_value;
@@ -2412,18 +2372,18 @@
     {
         return_value = TRUE;
     }
-    destroy_property_value(value);
+    vm_properties_destroy_value(value);
     return return_value;
 }
 
-size_t get_size_property(const char *property_name, size_t default_value, PropertyTable table_number) 
+size_t vm_property_get_size(const char *property_name, size_t default_value, PropertyTable table_number) 
 {
   char* size_string; 
   size_t size; 
   int sizeModifier;
   size_t unit = 1;
 
-  size_string = get_property(property_name, table_number);
+  size_string = vm_properties_get_value(property_name, table_number);
 
   if (size_string == NULL) {
     return default_value;
@@ -2431,7 +2391,7 @@
 
   size = atol(size_string);
   sizeModifier = tolower(size_string[strlen(size_string) - 1]);
-  destroy_property_value(size_string);
+  vm_properties_destroy_value(size_string);
 
   switch (sizeModifier) {
   case 'k': unit = 1024; break;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp Fri Apr  4 00:25:02 2008
@@ -22,6 +22,7 @@
 #define LOG_DOMAIN util::CLASS_LOGGER
 #include "cxxlog.h"
 
+#include "open/vm_properties.h"
 #include "environment.h"
 #include "Package.h"
 #include "String_Pool.h"
@@ -312,13 +313,13 @@
 }
 
 static size_t parse_size_prop(const char* name, size_t default_size) {
-    if(!is_property_set(name, VM_PROPERTIES)) {
+    if(!vm_property_is_set(name, VM_PROPERTIES)) {
         return default_size;
     }
 
-    char* value = get_property(name, VM_PROPERTIES);
+    char* value = vm_properties_get_value(name, VM_PROPERTIES);
     size_t size = parse_size(value);
-    destroy_property_value(value);
+    vm_properties_destroy_value(value);
     return size;
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp Fri Apr  4 00:25:02 2008
@@ -26,6 +26,7 @@
 #include <sstream>
 
 #include "open/vm_method_access.h"
+#include "open/vm_properties.h"
 #include "classloader.h"
 #include "object_layout.h"
 #include "String_Pool.h"
@@ -1647,7 +1648,7 @@
     STD_FREE(vmboot);
 
     // check if vm.bootclasspath.appendclasspath property is set to true
-    if( TRUE == get_boolean_property("vm.bootclasspath.appendclasspath", FALSE, VM_PROPERTIES) ) {
+    if( TRUE == vm_property_get_boolean("vm.bootclasspath.appendclasspath", FALSE, VM_PROPERTIES) ) {
         // append classpath to bootclasspath
         char * cp = m_env->JavaProperties()->get("java.class.path");
         SetClasspathFromString(cp, tmp_pool);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp Fri Apr  4 00:25:02 2008
@@ -24,6 +24,7 @@
 #include <apr_dso.h>
 #include "port_dso.h"
 
+#include "open/vm_properties.h"
 #include "open/gc.h"
 #include "open/hythread_ext.h"
 #include "open/jthread.h"   // this is for jthread_self()
@@ -185,15 +186,15 @@
     } else if (strcmp(func_name,"vm_compiled_method_load") == 0) {
         return (void*)compiled_method_load;
     } else if (strcmp(func_name,"vm_properties_destroy_keys") == 0) {
-        return (void*)destroy_properties_keys;
+        return (void*)vm_properties_destroy_keys;
     } else if (strcmp(func_name,"vm_properties_destroy_value") == 0) {
-        return (void*)destroy_property_value;
+        return (void*)vm_properties_destroy_value;
     } else if (strcmp(func_name,"vm_properties_get_keys") == 0) {
-        return (void*)get_properties_keys;
+        return (void*)vm_properties_get_keys;
     } else if (strcmp(func_name,"vm_properties_get_keys_starting_with") == 0) {
-        return (void*)get_properties_keys_staring_with;
+        return (void*)vm_properties_get_keys_starting_with;
     } else if (strcmp(func_name,"vm_properties_get_value") == 0) {
-        return (void*)get_property;
+        return (void*)vm_properties_get_value;
     } else {
         return NULL;
     }
@@ -287,11 +288,11 @@
         return JNI_OK;
     }
 
-    int64 ms = get_numerical_property("gc.ms", 0, VM_PROPERTIES);
-    int64 mx = get_numerical_property("gc.mx", 0, VM_PROPERTIES);
+    size_t ms = vm_property_get_size("gc.ms", 0, VM_PROPERTIES);
+    size_t mx = vm_property_get_size("gc.mx", 0, VM_PROPERTIES);
     // Currently 4Gb is maximum for compressed mode
     // If GC cannot allocate heap up to 4Gb, gc_init() will fail
-    int64 max_size = ((int64)4096)*1024*1024;
+    size_t max_size = ((int64)4096)*1024*1024;
 
 #ifdef REFS_USE_COMPRESSED
     if (ms >= max_size || mx >= max_size)
@@ -302,7 +303,7 @@
 #elif defined(REFS_USE_RUNTIME_SWITCH)
     if (ms >= max_size || mx >= max_size)
     { // Large heap; use uncompressed references
-        set_property("vm.compress_references", "false", VM_PROPERTIES);
+        vm_properties_set_value("vm.compress_references", "false", VM_PROPERTIES);
         vm_env->compress_references = false;
         return JNI_OK;
     }
@@ -827,21 +828,21 @@
         return JNI_ERR;
     }
 
-    tm_properties->use_soft_unreservation = get_boolean_property("thread.soft_unreservation", FALSE, VM_PROPERTIES);
+    tm_properties->use_soft_unreservation = vm_property_get_boolean("thread.soft_unreservation", FALSE, VM_PROPERTIES);
 
     parse_vm_arguments2(vm_env);
 
-    vm_env->verify = get_boolean_property("vm.use_verifier", TRUE, VM_PROPERTIES);
+    vm_env->verify = vm_property_get_boolean("vm.use_verifier", TRUE, VM_PROPERTIES);
 #ifdef REFS_USE_RUNTIME_SWITCH
-    vm_env->compress_references = get_boolean_property("vm.compress_references", TRUE, VM_PROPERTIES);
+    vm_env->compress_references = vm_property_get_boolean("vm.compress_references", TRUE, VM_PROPERTIES);
 #endif
     // use platform default values for field sorting and field compaction
     // if these values are not specifed on command line
     // see Global_Env::Global_Env for defaults
-    vm_env->sort_fields = get_boolean_property("vm.sort_fields", vm_env->sort_fields, VM_PROPERTIES);
-    vm_env->compact_fields = get_boolean_property("vm.compact_fields", vm_env->compact_fields, VM_PROPERTIES);
-    vm_env->use_common_jar_cache = get_boolean_property("vm.common_jar_cache", TRUE, VM_PROPERTIES);
-    vm_env->map_bootsrtap_jars = get_boolean_property("vm.map_bootstrap_jars", FALSE, VM_PROPERTIES);
+    vm_env->sort_fields = vm_property_get_boolean("vm.sort_fields", vm_env->sort_fields, VM_PROPERTIES);
+    vm_env->compact_fields = vm_property_get_boolean("vm.compact_fields", vm_env->compact_fields, VM_PROPERTIES);
+    vm_env->use_common_jar_cache = vm_property_get_boolean("vm.common_jar_cache", TRUE, VM_PROPERTIES);
+    vm_env->map_bootsrtap_jars = vm_property_get_boolean("vm.map_bootstrap_jars", FALSE, VM_PROPERTIES);
 
     vm_env->init_pools();
 
@@ -858,7 +859,7 @@
     parse_jit_arguments(&vm_env->vm_arguments);
 
     vm_env->pin_interned_strings = 
-        (bool)get_boolean_property("vm.pin_interned_strings", FALSE, VM_PROPERTIES);
+        (bool)vm_property_get_boolean("vm.pin_interned_strings", FALSE, VM_PROPERTIES);
 
     initialize_verify_stack_enumeration();
 
@@ -1059,7 +1060,7 @@
 
     hythread_suspend_enable();
 
-    if (get_boolean_property("vm.finalize", TRUE, VM_PROPERTIES)) {
+    if (vm_property_get_boolean("vm.finalize", TRUE, VM_PROPERTIES)) {
         // Load and initialize finalizer thread.
         vm_env->java_lang_FinalizerThread_Class =
             preload_class(vm_env, "java/lang/FinalizerThread");

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/interpreter/interp_exports.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/interpreter/interp_exports.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/interpreter/interp_exports.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/interpreter/interp_exports.cpp Fri Apr  4 00:25:02 2008
@@ -19,6 +19,7 @@
  * @version $Revision: 1.1.2.1.4.3 $
  */  
 #include <stdlib.h>
+#include "open/vm_properties.h"
 #include "mon_enter_exit.h"
 #include "interpreter.h"
 #include "interpreter_exports.h"
@@ -40,7 +41,7 @@
     static bool val;
     if (!inited) {
         val = interp_enabled && 
-            get_boolean_property("vm.use_interpreter", FALSE, VM_PROPERTIES);
+            vm_property_get_boolean("vm.use_interpreter", FALSE, VM_PROPERTIES);
         inited = true;
         INFO2("init", "Use interpreter = " << val);
     }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp Fri Apr  4 00:25:02 2008
@@ -30,10 +30,11 @@
 #include "jvmti.h"
 #include "jvmti_internal.h"
 #include "jvmti_utils.h"
+#include "open/vm_properties.h"
 #include "open/vm_util.h"
 #include "environment.h"
 #include <string.h>
-#include "properties.h"
+//#include "properties.h"
 #include "jvmti_break_intf.h"
 #include "interpreter_exports.h"
 
@@ -317,11 +318,11 @@
             !strncmp(option, "-Xrun", 5))
         {
             TRACE2("jvmti", "Enabling EM JVMTI mode");
-            set_property("vm.jvmti.enabled", "true", VM_PROPERTIES);
+            vm_properties_set_value("vm.jvmti.enabled", "true", VM_PROPERTIES);
             break;
         }
     }
-    if (TRUE == get_boolean_property("vm.jvmti.enabled", FALSE, VM_PROPERTIES)) {
+    if (TRUE == vm_property_get_boolean("vm.jvmti.enabled", FALSE, VM_PROPERTIES)) {
         p_env->TI->setEnabled();
     }
 }
@@ -517,14 +518,14 @@
                                        const char *lib_name,
                                        char **p_path1, char **p_path2)
 {
-    char *vm_libs = vm->vm_env->JavaProperties()->get("vm.boot.library.path");
+    char *vm_libs = vm_properties_get_value("vm.boot.library.path", JAVA_PROPERTIES);
     assert(vm_libs);
     char *path1 = apr_pstrdup(pool, vm_libs);
     char *path2 = port_dso_name_decorate(lib_name, pool);
     path1 = port_filepath_merge(path1, path2, pool);
     *p_path1 = path1;
     *p_path2 = path2;
-    vm->vm_env->VmProperties()->destroy(vm_libs);
+    vm_properties_destroy_value(vm_libs);
 }
 
 jint load_agentlib(Agent *agent, const char *str, JavaVM_Internal *vm)
@@ -656,7 +657,7 @@
     {
         status = true;
 
-        cml_report_inlined = (bool) get_boolean_property(
+        cml_report_inlined = (bool) vm_property_get_boolean(
                 "vm.jvmti.compiled_method_load.inlined",
                 FALSE, VM_PROPERTIES);
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp Fri Apr  4 00:25:02 2008
@@ -24,6 +24,7 @@
 
 #include <apr_file_info.h>
 
+#include "open/vm_properties.h"
 #include "jvmti_direct.h"
 #include "jvmti_utils.h"
 #include "environment.h"
@@ -78,7 +79,7 @@
     const char* bcp_property = XBOOTCLASSPATH_A;
 
     // get bootclasspath property
-    char *bcp_prop = get_property(bcp_property, VM_PROPERTIES);
+    char *bcp_prop = vm_properties_get_value(bcp_property, VM_PROPERTIES);
 
     size_t len_bcp = 0;
 
@@ -94,17 +95,17 @@
         strcpy(new_bcp + len_bcp + 1, segment);
 
         // update bootclasspath property
-        set_property(bcp_property, new_bcp, VM_PROPERTIES);
-        set_property(bcp_property, new_bcp, JAVA_PROPERTIES);
+        vm_properties_set_value(bcp_property, new_bcp, VM_PROPERTIES);
+        vm_properties_set_value(bcp_property, new_bcp, JAVA_PROPERTIES);
 
         STD_FREE(new_bcp);
     } else {
         // update bootclasspath property
-        set_property(bcp_property, segment, VM_PROPERTIES);
-        set_property(bcp_property, segment, JAVA_PROPERTIES);
+        vm_properties_set_value(bcp_property, segment, VM_PROPERTIES);
+        vm_properties_set_value(bcp_property, segment, JAVA_PROPERTIES);
     }
     
-    destroy_property_value(bcp_prop);
+    vm_properties_destroy_value(bcp_prop);
 
     return JVMTI_ERROR_NONE;
 }
@@ -145,7 +146,7 @@
 
     jint properties_count = 0;
 
-    char** keys = get_properties_keys(JAVA_PROPERTIES);
+    char** keys = vm_properties_get_keys(JAVA_PROPERTIES);
     while(keys[properties_count] != NULL)
         properties_count++;
 
@@ -164,7 +165,7 @@
             for (int jjj = 0; jjj < iii; jjj++)
                 _deallocate((unsigned char *)prop_names_array[iii]);
             _deallocate((unsigned char *)prop_names_array);
-            destroy_properties_keys(keys);
+            vm_properties_destroy_keys(keys);
             return errorCode;
         }
         strcpy(prop_names_array[iii], keys[iii]);
@@ -172,7 +173,7 @@
 
     *count_ptr = properties_count;
     *property_ptr = prop_names_array;
-    destroy_properties_keys(keys);
+    vm_properties_destroy_keys(keys);
 
     return JVMTI_ERROR_NONE;
 }
@@ -201,7 +202,7 @@
     if (NULL == property || NULL == value_ptr)
         return JVMTI_ERROR_NULL_POINTER;
 
-    char *value = get_property(property, JAVA_PROPERTIES);
+    char *value = vm_properties_get_value(property, JAVA_PROPERTIES);
     if (NULL == value)
         return JVMTI_ERROR_NOT_AVAILABLE;
 
@@ -211,7 +212,7 @@
         strcpy(ret, value);
         *value_ptr = ret;
     }
-    destroy_property_value(value);
+    vm_properties_destroy_value(value);
 
     return errorCode;
 }
@@ -244,7 +245,7 @@
         return JVMTI_ERROR_NOT_AVAILABLE;
 
     Global_Env *vm_env = ((TIEnv*)env)->vm->vm_env;
-    set_property(property, value, JAVA_PROPERTIES);
+    vm_properties_set_value(property, value, JAVA_PROPERTIES);
 
     return JVMTI_ERROR_NONE;
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp Fri Apr  4 00:25:02 2008
@@ -22,6 +22,7 @@
 
 #include <open/jthread.h>
 #include <open/hythread_ext.h>
+#include "open/vm_properties.h"
 #include "vm_threads.h"
 #include "jni.h"
 
@@ -240,7 +241,7 @@
 
     static size_t default_stacksize;
     if (0 == default_stacksize) {
-        size_t stack_size = get_size_property("thread.stacksize", 0, VM_PROPERTIES);
+        size_t stack_size = vm_property_get_size("thread.stacksize", 0, VM_PROPERTIES);
         default_stacksize = stack_size ? stack_size : TM_DEFAULT_STACKSIZE;
     }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/verify_stack_enumeration.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/verify_stack_enumeration.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/verify_stack_enumeration.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/verify_stack_enumeration.cpp Fri Apr  4 00:25:02 2008
@@ -30,8 +30,9 @@
 #include <set>
 
 #define LOG_DOMAIN "verify.rse"
-#include "open/gc.h"
 #include "cxxlog.h"
+#include "open/gc.h"
+#include "open/vm_properties.h"
 
 #include "root_set_enum_internal.h"
 #include "verify_stack_enumeration.h"
@@ -209,15 +210,15 @@
 
 void initialize_verify_stack_enumeration()
 {
-    verify_stack_enumeration_flag = get_boolean_property("verify.rse", false, VM_PROPERTIES);
+    verify_stack_enumeration_flag = vm_property_get_boolean("verify.rse", false, VM_PROPERTIES);
     if (verify_stack_enumeration_flag) {
         INFO("verify stack enumeration mode");
 
-        int n = get_int_property("verify.rse.after", 0, VM_PROPERTIES);
+        int n = vm_property_get_integer("verify.rse.after", 0, VM_PROPERTIES);
         if (n > 0) verify_stack_enumeration_counter = n;
         INFO(">verify after " << verify_stack_enumeration_counter);
 
-        n = get_int_property("verify.rse.period", 0, VM_PROPERTIES);
+        n = vm_property_get_integer("verify.rse.period", 0, VM_PROPERTIES);
         if (n > 0) verify_stack_enumeration_period = n;
         INFO(">verify each " << verify_stack_enumeration_period 
                 << num_suffix(verify_stack_enumeration_period) << " iteration");

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/crash_dump.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/crash_dump.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/crash_dump.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/crash_dump.cpp Fri Apr  4 00:25:02 2008
@@ -17,6 +17,7 @@
 
 //#include <ctype.h>
 
+#include "open/vm_properties.h"
 #include "port_dso.h"
 #include "port_modules.h"
 #include "port_crash_handler.h"
@@ -308,10 +309,10 @@
 
 #ifdef PLATFORM_POSIX
     bool call_dbg = (VM_Global_State::loader_env == NULL) ||
-            get_boolean_property("vm.crash_handler", FALSE, VM_PROPERTIES);
+            vm_property_get_boolean("vm.crash_handler", FALSE, VM_PROPERTIES);
 #else // WIN
     bool call_dbg = (VM_Global_State::loader_env == NULL) ||
-            get_boolean_property("vm.assert_dialog", TRUE, VM_PROPERTIES);
+            vm_property_get_boolean("vm.assert_dialog", TRUE, VM_PROPERTIES);
 #endif
     if (!call_dbg)
         flags &= ~PORT_CRASH_CALL_DEBUGGER;

Modified: harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp?rev=644633&r1=644632&r2=644633&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp Fri Apr  4 00:25:02 2008
@@ -20,6 +20,7 @@
  */  
 #include <assert.h>
 
+#include "open/vm_properties.h"
 #include "open/hythread.h"
 
 #include "platform_lowlevel.h"
@@ -146,9 +147,9 @@
 vmiError JNICALL 
 GetSystemProperty(VMInterface *vmi, char *key, char **valuePtr)
 {
-    char* value = get_property(key, JAVA_PROPERTIES);
+    char* value = vm_properties_get_value(key, JAVA_PROPERTIES);
     *valuePtr = value ? strdup(value) : NULL;
-    destroy_property_value(value);
+    vm_properties_destroy_value(value);
     return VMI_ERROR_NONE;
 }
 
@@ -158,13 +159,13 @@
     if (!value || !key) {
         return VMI_ERROR_ILLEGAL_ARG;
     }
-    set_property(key, value, JAVA_PROPERTIES);
+    vm_properties_set_value(key, value, JAVA_PROPERTIES);
     return VMI_ERROR_NONE;
 }
 
 vmiError JNICALL CountSystemProperties(VMInterface *vmi, int *countPtr)
 {
-    char** keys = get_properties_keys(JAVA_PROPERTIES);
+    char** keys = vm_properties_get_keys(JAVA_PROPERTIES);
     int count = 0;
 
     while(keys[count] != NULL) {
@@ -172,29 +173,29 @@
     }
 
     *countPtr = count;
-    destroy_properties_keys(keys);
+    vm_properties_destroy_keys(keys);
     return VMI_ERROR_NONE;
 }
 
 vmiError JNICALL IterateSystemProperties(VMInterface *vmi,
         vmiSystemPropertyIterator iterator, void *userData)
 {
-    char** keys = get_properties_keys(JAVA_PROPERTIES);
+    char** keys = vm_properties_get_keys(JAVA_PROPERTIES);
     int count = 0;
 
     while(keys[count] != NULL) {
-        char* value = get_property(keys[count], JAVA_PROPERTIES);
+        char* value = vm_properties_get_value(keys[count], JAVA_PROPERTIES);
         /* 
          * FIXME: possible inconsistency between iterator and 
          * properties count.
          */
         if (value) {
             iterator((char*)strdup(keys[count]), (char*)strdup(value), userData);
-            destroy_property_value(value);
+            vm_properties_destroy_value(value);
         }
         count++;
     }
-    destroy_properties_keys(keys);
+    vm_properties_destroy_keys(keys);
     return VMI_ERROR_NONE;
 }
 



Mime
View raw message