harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r648619 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Date Wed, 16 Apr 2008 08:35:23 GMT
Author: varlax
Date: Wed Apr 16 01:35:21 2008
New Revision: 648619

URL: http://svn.apache.org/viewvc?rev=648619&view=rev
Log:
Applied HARMONY-5735 [drlvm][kernel][performance] ThreadLocal.get lookup optimization

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java?rev=648619&r1=648618&r2=648619&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Wed Apr 16 01:35:21 2008
@@ -961,12 +961,18 @@
             localValues.put(local, value);
             return value;
         }
-        if (localValues.containsKey(local)) {
-            return localValues.get(local);
+        value = localValues.get(local);
+        if (value != null) {
+            return value;
+        } else {
+            if (localValues.containsKey(local)) {
+                return null;
+            } else {
+                value = local.initialValue();
+                localValues.put(local, value);
+                return value;
+            }
         }
-        value = local.initialValue();
-        localValues.put(local, value);
-        return value;
     }
     
     /**



Mime
View raw message