changes with lines of spec counted
[cdsspec-compiler.git] / benchmark / cliffc-hashtable / cliffc_hashtable.h
index 1160c13..c09b7a1 100644 (file)
@@ -111,8 +111,7 @@ class cliffc_hashtable {
                        //      model_print("cleaning up\n");
                        @DefineFunc:
                        bool equals_key(void *ptr1, void *ptr2) {
-                               TypeK *key1 = (TypeK*) ptr1,
-                                       *key2 = (TypeK*) ptr2;
+                               TypeK *key1 = (TypeK*) ptr1, *key2 = (TypeK*) ptr2;
                                if (key1 == NULL || key2 == NULL)
                                        return false;
                                return key1->equals(key2);
@@ -122,8 +121,7 @@ class cliffc_hashtable {
                        bool equals_val(void *ptr1, void *ptr2) {
                                if (ptr1 == ptr2)
                                        return true;
-                               TypeV *val1 = (TypeV*) ptr1,
-                                       *val2 = (TypeV*) ptr2;
+                               TypeV *val1 = (TypeV*) ptr1, *val2 = (TypeV*) ptr2;
                                if (val1 == NULL || val2 == NULL)
                                        return false;
                                return val1->equals(val2);
@@ -131,8 +129,7 @@ class cliffc_hashtable {
 
                        @DefineFunc:
                        bool equals_id(void *ptr1, void *ptr2) {
-                               id_tag_t *id1 = (id_tag_t*) ptr1,
-                                       *id2 = (id_tag_t*) ptr2;
+                               id_tag_t *id1 = (id_tag_t*) ptr1, *id2 = (id_tag_t*) ptr2;
                                if (id1 == NULL || id2 == NULL)
                                        return false;
                                return (*id1).tag == (*id2).tag;
@@ -422,13 +419,13 @@ friend class CHM;
                @Action:
                        TypeV *_Old_Val = (TypeV*) spec_table_get(map, key);
                        //bool passed = equals_val(_Old_Val, __RET__);
-                       bool passed = false;
-                       if (!passed) {
-                               int old = _Old_Val == NULL ? 0 : _Old_Val->_val;
-                               int ret = __RET__ == NULL ? 0 : __RET__->_val;
+                       //bool passed = false;
+                       //if (!passed) {
+                               //int old = _Old_Val == NULL ? 0 : _Old_Val->_val;
+                               //int ret = __RET__ == NULL ? 0 : __RET__->_val;
                                //model_print("Get: key: %d, _Old_Val: %d, RET: %d\n",
                                //key->_val, old, ret);
-                       }
+                       //}
                @Post_check:
                        //__RET__ == NULL ? true : equals_val(_Old_Val, __RET__)
                        equals_val(_Old_Val, __RET__)
@@ -462,13 +459,13 @@ friend class CHM;
                        TypeV *_Old_Val = (TypeV*) spec_table_get(map, key);
                        spec_table_put(map, key, val);
                        //bool passed = equals_val(__RET__, _Old_Val);
-                       bool passed = false;
-                       if (!passed) {
-                               int old = _Old_Val == NULL ? 0 : _Old_Val->_val;
-                               int ret = __RET__ == NULL ? 0 : __RET__->_val;
+                       //bool passed = false;
+                       //if (!passed) {
+                               //int old = _Old_Val == NULL ? 0 : _Old_Val->_val;
+                               //int ret = __RET__ == NULL ? 0 : __RET__->_val;
                                //model_print("Put: key: %d, val: %d, _Old_Val: %d, RET: %d\n",
                                //      key->_val, val->_val, old, ret);
-                       }
+                       //}
                @Post_check:
                        equals_val(__RET__, _Old_Val)
                @End