harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r633424 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src: main/PMF.cpp vm/VMInterface.cpp vm/VMInterface.h
Date Tue, 04 Mar 2008 11:05:54 GMT
Author: varlax
Date: Tue Mar  4 03:05:48 2008
New Revision: 633424

URL: http://svn.apache.org/viewvc?rev=633424&view=rev
Log:
More laconic interface for VMPropertyIterator

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp?rev=633424&r1=633423&r2=633424&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp Tue Mar  4 03:05:48 2008
@@ -1357,9 +1357,7 @@
 
 void PMF::processVMProperties ()
 {
-    VMPropertyIterator it(mm, "jit.");
-    while(!it.isOver()) {
-        it.next();
+    for (VMPropertyIterator it(mm, "jit."); it.next();) {
         processCmd(it.getKey() + 4, it.getValue());
     }
 }

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=633424&r1=633423&r2=633424&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp Tue Mar  4 03:05:48 2008
@@ -968,18 +968,16 @@
     destroy_properties_keys(keys);
 }
 
-bool 
-VMPropertyIterator::isOver() const {
-    return keys[iterator] ? false : true;
-}
-
-void 
+bool
 VMPropertyIterator::next() {
-    assert(!isOver());
+    if (!keys[iterator]) {
+        return false;
+    }
     key = mm.copy(keys[iterator]);
     char* nval = get_property(keys[iterator++], VM_PROPERTIES);
     value = mm.copy(nval);
     destroy_property_value(nval);
+    return true;
 }
 
 } //namespace Jitrino

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h?rev=633424&r1=633423&r2=633424&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h Tue Mar  4 03:05:48 2008
@@ -551,8 +551,7 @@
 public:
     VMPropertyIterator(MemoryManager& m, const char* prefix);
     ~VMPropertyIterator();
-    bool isOver() const;
-    void next();
+    bool next();
     char* getKey() const { return key; }
     char* getValue() const { return value; }
 private:



Mime
View raw message