harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r428045 - in /incubator/harmony/enhanced/drlvm/trunk/vm: vmcore/include/environment.h vmcore/src/class_support/Environment.cpp vmcore/src/init/parse_arguments.cpp vmi/src/vmi.cpp
Date Wed, 02 Aug 2006 16:44:22 GMT
Author: geirm
Date: Wed Aug  2 09:44:16 2006
New Revision: 428045

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

Fixes DRLVM so it remembers the portlib that is passed
to it by launcher.


Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h?rev=428045&r1=428044&r2=428045&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h Wed Aug  2 09:44:16
2006
@@ -41,6 +41,8 @@
     Properties&               properties;
     DebugUtilsTI*             TI;
     NSOTableItem*             nsoTable;
+    void*                     portLib;  // Classlib's port library
+    
     //
     // globals
     //

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp?rev=428045&r1=428044&r2=428045&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp Wed
Aug  2 09:44:16 2006
@@ -139,6 +139,8 @@
     shutting_down = 0;
 
     TI = NULL;
+    portLib = NULL;
+
 
     nsoTable = nso_init_lookup_table(&this->string_pool);
 }       //Global_Env::Global_Env

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp?rev=428045&r1=428044&r2=428045&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Wed Aug
 2 09:44:16 2006
@@ -278,7 +278,8 @@
             add_pair_to_properties(p_env->properties, "vm.cleanupOnExit", "true");   
   
         }
         else if (strcmp(option, "_org.apache.harmony.vmi.portlib") == 0) {
-            // Ignore _org.apache.harmony.vmi.portlib for now;
+            // Store a pointer to the portlib
+            p_env->portLib = p_env->vm_arguments.options[i].extraInfo;
         }
         else {
             ECHO("Unknown option " << option << USE_JAVA_HELP);

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp?rev=428045&r1=428044&r2=428045&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmi/src/vmi.cpp Wed Aug  2 09:44:16 2006
@@ -124,6 +124,13 @@
 
     if (! initialized)
     {
+        // First, try to get the portlib pointer from global env (must have been put there
during args parse)
+        portLibPointer = (HyPortLibrary*)VM_Global_State::loader_env->portLib;
+        if (NULL != portLibPointer) {
+			initialized = 1;
+            return portLibPointer;
+        }
+        // If the above fails, initialize portlib here
         int rc;
         HyPortLibraryVersion portLibraryVersion;
         HYPORT_SET_VERSION(&portLibraryVersion, HYPORT_CAPABILITY_MASK);
@@ -140,8 +147,8 @@
     //        know there is portLib is initialized there already.
     portLibPointer = &portLib;
     }
-    TRACE("vmi->GetPortLibrary(): returning: " << &portLib);
-    return &portLib;
+    TRACE("vmi->GetPortLibrary(): returning: " << portLibPointer);
+    return portLibPointer;
 }
 
 
@@ -175,8 +182,9 @@
     {
         return zipCachePool;
     }
+    HyPortLibrary *portLibPointer = GetPortLibrary(vmi);
     assert(portLibPointer);
-    zipCachePool = zipCachePool_new(&portLib);
+    zipCachePool = zipCachePool_new(portLibPointer);
     assert(zipCachePool);
     return zipCachePool;
 }



Mime
View raw message