X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=blobdiff_plain;f=src%2Fedu%2Fuci%2Feecs%2FspecCompiler%2FcodeGenerator%2FCodeVariables.java;h=7e4ab29c446c74db5683957664c197fe86600aa7;hp=bcc6e418ca80a8eab903606a567160306d0b3ab5;hb=8ac7b8682c102a5c2661e7798c9a0f11cfcec4e3;hpb=733e0543b9eac173556602ce4b65837feaab6230 diff --git a/src/edu/uci/eecs/specCompiler/codeGenerator/CodeVariables.java b/src/edu/uci/eecs/specCompiler/codeGenerator/CodeVariables.java index bcc6e41..7e4ab29 100644 --- a/src/edu/uci/eecs/specCompiler/codeGenerator/CodeVariables.java +++ b/src/edu/uci/eecs/specCompiler/codeGenerator/CodeVariables.java @@ -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));