aslparseop.c (4b49587c3dd54aed8eb103d838a89ca79484a9b6) | aslparseop.c (6f1f1a6395c91c5a845727d7313921a6fe3d297b) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: aslparseop - Parse op create/allocate/cache interfaces 4 * 5 *****************************************************************************/ 6 7/****************************************************************************** 8 * --- 191 unchanged lines hidden (view full) --- 200 NumChildren, UtGetOpName(ParseOpcode)); 201 202 /* Some extra debug output based on the parse opcode */ 203 204 switch (ParseOpcode) 205 { 206 case PARSEOP_ASL_CODE: 207 | 1/****************************************************************************** 2 * 3 * Module Name: aslparseop - Parse op create/allocate/cache interfaces 4 * 5 *****************************************************************************/ 6 7/****************************************************************************** 8 * --- 191 unchanged lines hidden (view full) --- 200 NumChildren, UtGetOpName(ParseOpcode)); 201 202 /* Some extra debug output based on the parse opcode */ 203 204 switch (ParseOpcode) 205 { 206 case PARSEOP_ASL_CODE: 207 |
208 Gbl_ParseTreeRoot = Op; | 208 AslGbl_ParseTreeRoot = Op; |
209 Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; 210 DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->"); 211 break; 212 213 case PARSEOP_DEFINITION_BLOCK: 214 215 DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->"); 216 break; --- 562 unchanged lines hidden (view full) --- 779{ 780 ACPI_PARSE_OBJECT *Op; 781 ACPI_PARSE_OBJECT *LatestOp; 782 783 784 Op = UtParseOpCacheCalloc (); 785 786 Op->Asl.ParseOpcode = (UINT16) ParseOpcode; | 209 Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; 210 DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->"); 211 break; 212 213 case PARSEOP_DEFINITION_BLOCK: 214 215 DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->"); 216 break; --- 562 unchanged lines hidden (view full) --- 779{ 780 ACPI_PARSE_OBJECT *Op; 781 ACPI_PARSE_OBJECT *LatestOp; 782 783 784 Op = UtParseOpCacheCalloc (); 785 786 Op->Asl.ParseOpcode = (UINT16) ParseOpcode; |
787 Op->Asl.Filename = Gbl_Files[ASL_FILE_INPUT].Filename; 788 Op->Asl.LineNumber = Gbl_CurrentLineNumber; 789 Op->Asl.LogicalLineNumber = Gbl_LogicalLineNumber; 790 Op->Asl.LogicalByteOffset = Gbl_CurrentLineOffset; 791 Op->Asl.Column = Gbl_CurrentColumn; | 787 Op->Asl.Filename = AslGbl_Files[ASL_FILE_INPUT].Filename; 788 Op->Asl.LineNumber = AslGbl_CurrentLineNumber; 789 Op->Asl.LogicalLineNumber = AslGbl_LogicalLineNumber; 790 Op->Asl.LogicalByteOffset = AslGbl_CurrentLineOffset; 791 Op->Asl.Column = AslGbl_CurrentColumn; |
792 793 UtSetParseOpName (Op); 794 795 /* The following is for capturing comments */ 796 797 if (AcpiGbl_CaptureComments) 798 { | 792 793 UtSetParseOpName (Op); 794 795 /* The following is for capturing comments */ 796 797 if (AcpiGbl_CaptureComments) 798 { |
799 LatestOp = Gbl_CommentState.LatestParseOp; | 799 LatestOp = AslGbl_CommentState.LatestParseOp; |
800 Op->Asl.InlineComment = NULL; 801 Op->Asl.EndNodeComment = NULL; 802 Op->Asl.CommentList = NULL; 803 Op->Asl.FileChanged = FALSE; 804 805 /* 806 * Check to see if the file name has changed before resetting the 807 * latest parse op. 808 */ 809 if (LatestOp && 810 (ParseOpcode != PARSEOP_INCLUDE) && 811 (ParseOpcode != PARSEOP_INCLUDE_END) && 812 strcmp (LatestOp->Asl.Filename, Op->Asl.Filename)) 813 { 814 CvDbgPrint ("latest op: %s\n", LatestOp->Asl.ParseOpName); 815 Op->Asl.FileChanged = TRUE; | 800 Op->Asl.InlineComment = NULL; 801 Op->Asl.EndNodeComment = NULL; 802 Op->Asl.CommentList = NULL; 803 Op->Asl.FileChanged = FALSE; 804 805 /* 806 * Check to see if the file name has changed before resetting the 807 * latest parse op. 808 */ 809 if (LatestOp && 810 (ParseOpcode != PARSEOP_INCLUDE) && 811 (ParseOpcode != PARSEOP_INCLUDE_END) && 812 strcmp (LatestOp->Asl.Filename, Op->Asl.Filename)) 813 { 814 CvDbgPrint ("latest op: %s\n", LatestOp->Asl.ParseOpName); 815 Op->Asl.FileChanged = TRUE; |
816 if (Gbl_IncludeFileStack) | 816 if (AslGbl_IncludeFileStack) |
817 { | 817 { |
818 Op->Asl.ParentFilename = Gbl_IncludeFileStack->Filename; | 818 Op->Asl.ParentFilename = AslGbl_IncludeFileStack->Filename; |
819 } 820 else 821 { 822 Op->Asl.ParentFilename = NULL; 823 } 824 } 825 | 819 } 820 else 821 { 822 Op->Asl.ParentFilename = NULL; 823 } 824 } 825 |
826 Gbl_CommentState.LatestParseOp = Op; | 826 AslGbl_CommentState.LatestParseOp = Op; |
827 CvDbgPrint ("TrAllocateOp=Set latest parse op to this op.\n"); 828 CvDbgPrint (" Op->Asl.ParseOpName = %s\n", | 827 CvDbgPrint ("TrAllocateOp=Set latest parse op to this op.\n"); 828 CvDbgPrint (" Op->Asl.ParseOpName = %s\n", |
829 Gbl_CommentState.LatestParseOp->Asl.ParseOpName); | 829 AslGbl_CommentState.LatestParseOp->Asl.ParseOpName); |
830 CvDbgPrint (" Op->Asl.ParseOpcode = 0x%x\n", ParseOpcode); 831 832 if (Op->Asl.FileChanged) 833 { 834 CvDbgPrint(" file has been changed!\n"); 835 } 836 837 /* 838 * if this parse op's syntax uses () and {} (i.e. Package(1){0x00}) then 839 * set a flag in the comment state. This facilitates paring comments for 840 * these types of opcodes. 841 */ 842 if ((CvParseOpBlockType(Op) == (BLOCK_PAREN | BLOCK_BRACE)) && 843 (ParseOpcode != PARSEOP_DEFINITION_BLOCK)) 844 { 845 CvDbgPrint ("Parsing paren/Brace op now!\n"); | 830 CvDbgPrint (" Op->Asl.ParseOpcode = 0x%x\n", ParseOpcode); 831 832 if (Op->Asl.FileChanged) 833 { 834 CvDbgPrint(" file has been changed!\n"); 835 } 836 837 /* 838 * if this parse op's syntax uses () and {} (i.e. Package(1){0x00}) then 839 * set a flag in the comment state. This facilitates paring comments for 840 * these types of opcodes. 841 */ 842 if ((CvParseOpBlockType(Op) == (BLOCK_PAREN | BLOCK_BRACE)) && 843 (ParseOpcode != PARSEOP_DEFINITION_BLOCK)) 844 { 845 CvDbgPrint ("Parsing paren/Brace op now!\n"); |
846 Gbl_CommentState.ParsingParenBraceNode = Op; | 846 AslGbl_CommentState.ParsingParenBraceNode = Op; |
847 } 848 | 847 } 848 |
849 if (Gbl_CommentListHead) | 849 if (AslGbl_CommentListHead) |
850 { 851 CvDbgPrint ("Transferring...\n"); | 850 { 851 CvDbgPrint ("Transferring...\n"); |
852 Op->Asl.CommentList = Gbl_CommentListHead; 853 Gbl_CommentListHead = NULL; 854 Gbl_CommentListTail = NULL; | 852 Op->Asl.CommentList = AslGbl_CommentListHead; 853 AslGbl_CommentListHead = NULL; 854 AslGbl_CommentListTail = NULL; |
855 CvDbgPrint (" Transferred current comment list to this op.\n"); 856 CvDbgPrint (" %s\n", Op->Asl.CommentList->Comment); 857 } 858 | 855 CvDbgPrint (" Transferred current comment list to this op.\n"); 856 CvDbgPrint (" %s\n", Op->Asl.CommentList->Comment); 857 } 858 |
859 if (Gbl_InlineCommentBuffer) | 859 if (AslGbl_InlineCommentBuffer) |
860 { | 860 { |
861 Op->Asl.InlineComment = Gbl_InlineCommentBuffer; 862 Gbl_InlineCommentBuffer = NULL; | 861 Op->Asl.InlineComment = AslGbl_InlineCommentBuffer; 862 AslGbl_InlineCommentBuffer = NULL; |
863 CvDbgPrint ("Transferred current inline comment list to this op.\n"); 864 } 865 } 866 867 return (Op); 868} 869 870 --- 18 unchanged lines hidden (view full) --- 889 UINT32 FlagBit = 1; 890 UINT32 i; 891 892 893 for (i = 0; i < ACPI_NUM_OP_FLAGS; i++) 894 { 895 if (Flags & FlagBit) 896 { | 863 CvDbgPrint ("Transferred current inline comment list to this op.\n"); 864 } 865 } 866 867 return (Op); 868} 869 870 --- 18 unchanged lines hidden (view full) --- 889 UINT32 FlagBit = 1; 890 UINT32 i; 891 892 893 for (i = 0; i < ACPI_NUM_OP_FLAGS; i++) 894 { 895 if (Flags & FlagBit) 896 { |
897 DbgPrint (OutputLevel, " %s", Gbl_OpFlagNames[i]); | 897 DbgPrint (OutputLevel, " %s", AslGbl_OpFlagNames[i]); |
898 } 899 900 FlagBit <<= 1; 901 } 902} | 898 } 899 900 FlagBit <<= 1; 901 } 902} |