edits
[cdsspec-compiler.git] / src / edu / uci / eecs / specCompiler / codeGenerator / CodeVariables.java
index bcc6e418ca80a8eab903606a567160306d0b3ab5..7e4ab29c446c74db5683957664c197fe86600aa7 100644 (file)
@@ -671,6 +671,10 @@ public class CodeVariables {
                        newCode.add("\t"
                                        + ASSIGN_TO_PTR("rule", "interface_num_after",
                                                        interfaceNumAfter));
+                       newCode.add("\t"
+                                       + ASSIGN_TO_PTR("rule", "rule",
+                                                       "\"" + rule.condition + "\""));
+                       
                        newCode.add("\t"
                                        + ASSIGN_TO_PTR("rule", "condition", conditionFuncName));
 
@@ -989,13 +993,15 @@ public class CodeVariables {
                String structName = "cp_clear", anno = "annotation_cp_clear";
                newCode.add("\t\t"
                                + STRUCT_NEW_DECLARE_DEFINE(ANNO_CP_CLEAR, structName));
-               // String labelNum = Integer.toString(semantics.commitPointLabel2Num
-               // .get(construct.label));
-               // String interfaceNum = getCPInterfaceNum(semantics, construct.label);
-               // newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "label_num",
-               // labelNum));
-               // newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "interface_num",
-               // interfaceNum));
+                
+               String labelNum = Integer.toString(semantics.commitPointLabel2Num
+                               .get(construct.label));
+               String labelName = construct.label;
+               newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "label_name",
+                               "\"" + labelName + "\""));
+               newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "label_num",
+                               labelNum));
+               
                newCode.add("\t\t" + STRUCT_NEW_DECLARE_DEFINE(SPEC_ANNOTATION, anno));
                newCode.add("\t\t"
                                + ASSIGN_TO_PTR(anno, "type", SPEC_ANNO_TYPE_CP_CLEAR));