changes
authorPeizhao Ou <peizhaoo@uci.edu>
Sat, 17 Jan 2015 02:04:32 +0000 (18:04 -0800)
committerPeizhao Ou <peizhaoo@uci.edu>
Sat, 17 Jan 2015 02:04:32 +0000 (18:04 -0800)
benchmark/chase-lev-deque-bugfix/deque.h
benchmark/cliffc-hashtable/cliffc_hashtable.h
src/edu/uci/eecs/specCompiler/codeGenerator/CodeGenerator.java
src/edu/uci/eecs/specCompiler/codeGenerator/CodeVariables.java

index f188a8f..0e2fb2b 100644 (file)
@@ -37,12 +37,15 @@ typedef struct {
         id_tag_t *tag;
         @InitVar:
             __deque = new_spec_list();
+                       model_print("init_list\n");
             tag = new_id_tag(); // Beginning of available id
                @Cleanup:
-                       if (__deque)
-                               free_spec_list(__deque);
+                       if (__deque) {
+                               //free_spec_list(__deque);
+                               model_print("free_list\n");
+                       }
                        if (tag)
-                               free_id_tag();
+                               free_id_tag(tag);
         @DefineFunc:
             tag_elem_t* new_tag_elem(call_id_t id, int data) {
                 tag_elem_t *e = (tag_elem_t*) CMODEL_MALLOC(sizeof(tag_elem_t));
index b5b941e..1160c13 100644 (file)
@@ -107,7 +107,8 @@ class cliffc_hashtable {
                                map = new_spec_table_default(equals_key);
                                id_map = new_spec_table_default(equals_id);
                                tag = new_id_tag();
-
+                       //@Cleanup:
+                       //      model_print("cleaning up\n");
                        @DefineFunc:
                        bool equals_key(void *ptr1, void *ptr2) {
                                TypeK *key1 = (TypeK*) ptr1,
index 49299d1..61e9fea 100644 (file)
@@ -328,7 +328,7 @@ public class CodeGenerator {
 //             File[][] sources = { srcLinuxRWLocks,  srcMSQueue, srcRCU,
 //                             srcDeque, srcMCSLock, srcSPSCQueue, srcMPMCQueue, srcHashtable };
 
-                File[][] sources = {srcMSQueue };
+                File[][] sources = {srcMSQueue,srcHashtable, srcDeque };
                // Compile all the benchmarks
                for (int i = 0; i < sources.length; i++) {
                        CodeGenerator gen = new CodeGenerator(sources[i]);
index 999221b..3d4583d 100644 (file)
@@ -461,9 +461,9 @@ public class CodeVariables {
                String structName = "anno_init", anno = "init";
                newCode.add("\t" + STRUCT_NEW_DECLARE_DEFINE(ANNO_INIT, structName));
                newCode.add("\t"
-                               + ASSIGN_TO_PTR(structName, "init_func", "__SPEC_INIT__"));
+                               + ASSIGN_TO_PTR(structName, "init_func", "(void*) __SPEC_INIT__"));
                newCode.add("\t"
-                               + ASSIGN_TO_PTR(structName, "cleanup_func", "__SPEC_CLEANUP__"));
+                               + ASSIGN_TO_PTR(structName, "cleanup_func", "(void*) __SPEC_CLEANUP__"));
                newCode.add("\t"
                                + ASSIGN_TO_PTR(structName, "func_table", "func_ptr_table"));
                newCode.add("\t"