Home | History | Annotate | Download | only in compiler

Lines Matching defs:Op

3  * Module Name: aslparseop - Parse op create/allocate/cache interfaces
165 * PARAMETERS: ParseOpcode - Opcode to be assigned to the op
168 * op. NumChildren long.
170 * RETURN: Pointer to the new op. Aborts on allocation failure
172 * DESCRIPTION: Create a new parse op and link together a list of child
173 * ops underneath the new op.
183 ACPI_PARSE_OBJECT *Op;
193 /* Allocate one new op */
195 Op = TrAllocateOp (ParseOpcode);
198 "\nCreateOp Ln/Col %u/%u NewParent %p Child %u Op %s ",
199 Op->Asl.LineNumber, Op->Asl.Column, Op,
208 AslGbl_ParseTreeRoot = Op;
209 Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
235 /* Link the new op to its children */
262 Op->Asl.Child = Child;
278 Op->Asl.CommentList = Child->Asl.CommentList;
279 Op->Asl.EndBlkComment = Child->Asl.EndBlkComment;
280 Op->Asl.InlineComment = Child->Asl.InlineComment;
281 Op->Asl.FileChanged = Child->Asl.FileChanged;
293 Op->Asl.Filename = Child->Asl.Filename;
294 Op->Asl.ParentFilename = Child->Asl.ParentFilename;
300 Child->Asl.Parent = Op;
312 (Op->Asl.ParseOpcode == PARSEOP_RESOURCETEMPLATE))
314 CvDbgPrint ("Transferred current comment list to this op.\n");
315 Op->Asl.CommentList = Child->Asl.CommentList;
318 Op->Asl.InlineComment = Child->Asl.InlineComment;
329 Child->Asl.Parent = Op;
337 return (Op);
345 * PARAMETERS: ParseOpcode - New opcode to be assigned to the op
347 * RETURN: Pointer to the new op. Aborts on allocation failure
349 * DESCRIPTION: Create a simple leaf op (no children or peers, and no value
350 * assigned to the op)
358 ACPI_PARSE_OBJECT *Op;
361 Op = TrAllocateOp (ParseOpcode);
364 "\nCreateLeafOp Ln/Col %u/%u NewOp %p Op %s\n\n",
365 Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode));
367 return (Op);
375 * PARAMETERS: ParseOpcode - New opcode to be assigned to the op
376 * Value - Value to be assigned to the op
378 * RETURN: Pointer to the new op. Aborts on allocation failure
380 * DESCRIPTION: Create a leaf op (no children or peers) with a value
390 ACPI_PARSE_OBJECT *Op;
395 Op = TrAllocateOp (ParseOpcode);
396 Op->Asl.Value.Integer = Value;
400 "Op %s Value %8.8X%8.8X ",
401 Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode),
408 DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Op->Asl.Value.String);
417 if (islower ((int) Op->Asl.Value.Name[i]))
419 AcpiUtStrupr (&Op->Asl.Value.Name[i]);
420 AslError (ASL_REMARK, ASL_MSG_LOWER_CASE_NAMESEG, Op, Op
424 DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Op->Asl.Value.String);
431 StringPtr = Op->Asl.Value.Name;
436 AcpiUtStrupr (&Op->Asl.Value.Name[i]);
437 AslError (ASL_REMARK, ASL_MSG_LOWER_CASE_NAMEPATH, Op, Op->Asl.Value.Name);
442 DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Op->Asl.Value.String);
447 DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Op->Asl.Value.String);
466 return (Op);
474 * PARAMETERS: OriginalOp - Op to be copied
476 * RETURN: Pointer to the new op. Aborts on allocation failure
478 * DESCRIPTION: Copy an existing op (and subtree). Used in ASL+ (C-style)
480 * operands. A new op and subtree must be created from the
485 * parse Op in a possible subtree has a NULL Next pointer.
504 ACPI_PARSE_OBJECT *Op;
512 Op = UtParseOpCacheCalloc ();
516 Op->Asl.Value = OriginalOp->Asl.Value;
517 Op->Asl.Filename = OriginalOp->Asl.Filename;
518 Op->Asl.LineNumber = OriginalOp->Asl.LineNumber;
519 Op->Asl.LogicalLineNumber = OriginalOp->Asl.LogicalLineNumber;
520 Op->Asl.LogicalByteOffset = OriginalOp->Asl.LogicalByteOffset;
521 Op->Asl.Column = OriginalOp->Asl.Column;
522 Op->Asl.Flags = OriginalOp->Asl.Flags;
523 Op->Asl.CompileFlags = OriginalOp->Asl.CompileFlags;
524 Op->Asl.AmlOpcode = OriginalOp->Asl.AmlOpcode;
525 Op->Asl.ParseOpcode = OriginalOp->Asl.ParseOpcode;
526 Op->Asl.Parent = ParentOp;
528 UtSetParseOpName (Op);
530 /* Copy a possible subtree below this op */
534 Op->Asl.Child = TrCreateTargetOp (OriginalOp->Asl.Child, Op);
537 if (OriginalOp->Asl.Next) /* Null for top-level op */
539 Op->Asl.Next = TrCreateTargetOp (OriginalOp->Asl.Next, ParentOp);
542 return (Op);
553 * RETURN: Pointer to the new op. Aborts on allocation failure
652 /* Set the appropriate line numbers for the new op */
669 * RETURN: Pointer to the new op. Aborts on allocation failure
671 * DESCRIPTION: Create a "null" target op. This is defined by the ACPI
681 ACPI_PARSE_OBJECT *Op;
684 Op = TrAllocateOp (PARSEOP_ZERO);
685 Op->Asl.CompileFlags |= (OP_IS_TARGET | OP_COMPILE_TIME_CONST);
688 "\nCreateNullTargetOp Ln/Col %u/%u NewOp %p Op %s\n",
689 Op->Asl.LineNumber, Op->Asl.Column, Op,
690 UtGetOpName (Op->Asl.ParseOpcode));
692 return (Op);
702 * RETURN: Pointer to the new op. Aborts on allocation failure
704 * DESCRIPTION: Create a leaf op (no children or peers) for one of the
718 ACPI_PARSE_OBJECT *Op = NULL;
730 Op = TrAllocateOp (PARSEOP_INTEGER);
731 Op->Asl.Value.Integer = Op->Asl.LineNumber;
738 Op = TrAllocateOp (PARSEOP___METHOD__);
739 Op->Asl.Value.String = NULL;
744 Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
746 /* Op.Asl.Filename contains the full pathname to the file */
748 Op->Asl.Value.String = Op->Asl.Filename;
753 Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
757 Status = FlSplitInputPathname (Op->Asl.Filename, NULL, &Filename);
763 Op->Asl.Value.String = Filename;
768 Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
772 Op->Asl.Value.String = "";
782 Op->Asl.Value.String = TimeString;
793 "Op %s Value %8.8X%8.8X\n",
794 Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode),
795 ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
797 return (Op);
805 * PARAMETERS: ParseOpcode - Opcode to be assigned to the op
807 * RETURN: New parse op. Aborts on allocation failure
809 * DESCRIPTION: Allocate and initialize a new parse op for the parse tree
817 ACPI_PARSE_OBJECT *Op;
823 Op = UtParseOpCacheCalloc ();
825 Op->Asl.ParseOpcode = (UINT16) ParseOpcode;
826 Op->Asl.Filename = AslGbl_Files[ASL_FILE_INPUT].Filename;
827 Op->Asl.LineNumber = AslGbl_CurrentLineNumber;
828 Op->Asl.LogicalLineNumber = AslGbl_LogicalLineNumber;
829 Op->Asl.LogicalByteOffset = AslGbl_CurrentLineOffset;
830 Op->Asl.Column = AslGbl_CurrentColumn;
832 UtSetParseOpName (Op);
839 Op->Asl.InlineComment = NULL;
840 Op->Asl.EndNodeComment = NULL;
841 Op->Asl.CommentList = NULL;
842 Op->Asl.FileChanged = FALSE;
846 * latest parse op.
851 strcmp (LatestOp->Asl.Filename, Op->Asl.Filename))
853 CvDbgPrint ("latest op: %s\n", LatestOp->Asl.ParseOpName);
854 Op->Asl.FileChanged = TRUE;
857 Op->Asl.ParentFilename = AslGbl_IncludeFileStack->Filename;
861 Op->Asl.ParentFilename = NULL;
865 AslGbl_CommentState.LatestParseOp = Op;
866 CvDbgPrint ("%s=Set latest parse op to this op.\n", ACPI_GET_FUNCTION_NAME);
867 CvDbgPrint (" Op->Asl.ParseOpName = %s\n",
869 CvDbgPrint (" Op->Asl.ParseOpcode = 0x%x\n", ParseOpcode);
871 if (Op->Asl.FileChanged)
877 * if this parse op's syntax uses () and {} (i.e. Package(1){0x00}) then
881 if ((CvParseOpBlockType(Op) == (BLOCK_PAREN | BLOCK_BRACE)) &&
884 CvDbgPrint ("Parsing paren/Brace op now!\n");
885 AslGbl_CommentState.ParsingParenBraceNode = Op;
891 Op->Asl.CommentList = AslGbl_CommentListHead;
894 CvDbgPrint (" Transferred current comment list to this op.\n");
895 CvDbgPrint (" %s\n", Op->Asl.CommentList->Comment);
900 Op->Asl.InlineComment = AslGbl_InlineCommentBuffer;
902 CvDbgPrint ("Transferred current inline comment list to this op.\n");
906 return (Op);