ACK: [PATCH 1/2] ACPICA: Update to version 20170629
Alex Hung
alex.hung at canonical.com
Tue Jul 4 08:11:14 UTC 2017
On 2017-06-29 09:31 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Changes in this release of ACPICA are detailed at the following
> link on the ACPICA developer mailing list:
>
> https://lists.acpica.org/pipermail/devel/2017-June/001333.html
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpica/source/common/acfileio.c | 30 +
> src/acpica/source/common/adisasm.c | 6 +
> src/acpica/source/common/adwalk.c | 16 +-
> src/acpica/source/common/ahpredef.c | 9 +
> src/acpica/source/common/dmtbinfo.c | 4 +
> src/acpica/source/compiler/Makefile.am | 1 +
> src/acpica/source/compiler/aslanalyze.c | 4 +-
> src/acpica/source/compiler/aslbtypes.c | 2 +-
> src/acpica/source/compiler/aslcodegen.c | 4 +-
> src/acpica/source/compiler/aslcompiler.h | 103 +-
> src/acpica/source/compiler/aslcstyle.y | 166 +--
> src/acpica/source/compiler/asldefine.h | 2 +-
> src/acpica/source/compiler/aslexternal.c | 12 +-
> src/acpica/source/compiler/aslfold.c | 40 +-
> src/acpica/source/compiler/aslglobal.h | 34 +-
> src/acpica/source/compiler/aslhelpers.y | 38 +-
> src/acpica/source/compiler/aslkeywords.y | 348 +++---
> src/acpica/source/compiler/asllength.c | 6 +-
> src/acpica/source/compiler/asllisting.c | 10 +-
> src/acpica/source/compiler/aslload.c | 22 +-
> src/acpica/source/compiler/asllookup.c | 2 +-
> src/acpica/source/compiler/aslmap.c | 42 +-
> src/acpica/source/compiler/aslmapoutput.c | 2 +-
> src/acpica/source/compiler/aslmethod.c | 30 +-
> src/acpica/source/compiler/asloffset.c | 4 +-
> src/acpica/source/compiler/aslopcodes.c | 12 +-
> src/acpica/source/compiler/aslopt.c | 4 +-
> src/acpica/source/compiler/aslparseop.c | 945 ++++++++++++++
> src/acpica/source/compiler/aslpld.c | 6 +-
> src/acpica/source/compiler/aslpredef.c | 2 +-
> src/acpica/source/compiler/aslprimaries.y | 548 ++++----
> src/acpica/source/compiler/aslprintf.c | 14 +-
> src/acpica/source/compiler/aslresource.c | 16 +-
> src/acpica/source/compiler/aslresources.y | 178 +--
> src/acpica/source/compiler/aslrules.y | 216 ++--
> src/acpica/source/compiler/aslstartup.c | 2 +-
> src/acpica/source/compiler/aslsupport.y | 2 +-
> src/acpica/source/compiler/asltransform.c | 53 +-
> src/acpica/source/compiler/asltree.c | 1304 +++-----------------
> src/acpica/source/compiler/asltypes.h | 44 +-
> src/acpica/source/compiler/aslwalks.c | 2 +-
> src/acpica/source/compiler/aslxref.c | 10 +-
> src/acpica/source/compiler/cvcompiler.c | 152 ++-
> src/acpica/source/compiler/cvdisasm.c | 46 +-
> src/acpica/source/compiler/cvparser.c | 176 +--
> .../source/components/disassembler/dmopcode.c | 19 +-
> src/acpica/source/components/executer/excreate.c | 6 +
> src/acpica/source/components/hardware/hwxfsleep.c | 15 +-
> src/acpica/source/components/namespace/nsaccess.c | 7 +
> src/acpica/source/components/parser/psobject.c | 25 +
> src/acpica/source/components/tables/tbdata.c | 259 +++-
> src/acpica/source/components/tables/tbinstal.c | 174 +--
> src/acpica/source/components/tables/tbutils.c | 38 +-
> src/acpica/source/components/tables/tbxface.c | 38 +-
> src/acpica/source/components/tables/tbxfload.c | 4 +-
> src/acpica/source/components/utilities/utresrc.c | 14 +-
> src/acpica/source/include/acapps.h | 4 +
> src/acpica/source/include/aclocal.h | 14 +-
> src/acpica/source/include/acobject.h | 10 +-
> src/acpica/source/include/acpixf.h | 15 +-
> src/acpica/source/include/actables.h | 8 +-
> src/acpica/source/include/actbl.h | 15 +
> src/acpica/source/include/actbl2.h | 16 +-
> src/acpica/source/include/platform/acenv.h | 5 +
> src/acpica/source/include/platform/aclinux.h | 5 +
> src/acpica/source/tools/acpiexec/aeexception.c | 15 +-
> 66 files changed, 2893 insertions(+), 2482 deletions(-)
> create mode 100644 src/acpica/source/compiler/aslparseop.c
>
> diff --git a/src/acpica/source/common/acfileio.c b/src/acpica/source/common/acfileio.c
> index a334d541..a4e227a6 100644
> --- a/src/acpica/source/common/acfileio.c
> +++ b/src/acpica/source/common/acfileio.c
> @@ -175,6 +175,36 @@ AcCheckTextModeCorruption (
>
> /*******************************************************************************
> *
> + * FUNCTION: AcDeleteTableList
> + *
> + * PARAMETERS: ListHead - List to delete
> + *
> + * RETURN: Status
> + *
> + * DESCRIPTION: Delete a list of tables. This is useful for removing memory
> + * allocated by AcGetAllTablesFromFile
> + *
> + ******************************************************************************/
> +
> +void
> +AcDeleteTableList (
> + ACPI_NEW_TABLE_DESC *ListHead)
> +{
> + ACPI_NEW_TABLE_DESC *Current = ListHead;
> + ACPI_NEW_TABLE_DESC *Previous = Current;
> +
> +
> + while (Current)
> + {
> + Current = Current->Next;
> + AcpiOsFree (Previous);
> + Previous = Current;
> + }
> +}
> +
> +
> +/*******************************************************************************
> + *
> * FUNCTION: AcGetAllTablesFromFile
> *
> * PARAMETERS: Filename - Table filename
> diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c
> index c0d44cdf..bfc815d4 100644
> --- a/src/acpica/source/common/adisasm.c
> +++ b/src/acpica/source/common/adisasm.c
> @@ -408,6 +408,8 @@ Cleanup:
> ACPI_FREE (Table);
> }
>
> + AcDeleteTableList (ListHead);
> +
> if (File)
> {
> fclose (File);
> @@ -748,6 +750,7 @@ AdDoExternalFileList (
> continue;
> }
>
> + AcDeleteTableList (ExternalListHead);
> return (Status);
> }
>
> @@ -761,6 +764,7 @@ AdDoExternalFileList (
> {
> AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
> AcpiFormatException (Status));
> + AcDeleteTableList (ExternalListHead);
> return (Status);
> }
>
> @@ -781,6 +785,8 @@ AdDoExternalFileList (
> ExternalFileList = ExternalFileList->Next;
> }
>
> + AcDeleteTableList (ExternalListHead);
> +
> if (ACPI_FAILURE (GlobalStatus))
> {
> return (GlobalStatus);
> diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c
> index 887835cb..e7bb924b 100644
> --- a/src/acpica/source/common/adwalk.c
> +++ b/src/acpica/source/common/adwalk.c
> @@ -536,11 +536,20 @@ AcpiDmDumpDescending (
> case AML_NAME_OP:
> case AML_METHOD_OP:
> case AML_DEVICE_OP:
> +
> + AcpiOsPrintf ("%4.4s",
> + ACPI_CAST_PTR (char, &Op->Named.Name));
> + break;
> +
> case AML_INT_NAMEDFIELD_OP:
>
> - AcpiOsPrintf ("%4.4s", ACPI_CAST_PTR (char, &Op->Named.Name));
> + AcpiOsPrintf ("%4.4s Length: (bits) %8.8X%8.8X (bytes) %8.8X%8.8X",
> + ACPI_CAST_PTR (char, &Op->Named.Name),
> + ACPI_FORMAT_UINT64 (Op->Common.Value.Integer),
> + ACPI_FORMAT_UINT64 (Op->Common.Value.Integer / 8));
> break;
>
> +
> default:
>
> break;
> @@ -1070,10 +1079,10 @@ AcpiDmCommonDescendingOp (
> {
> ACPI_STATUS Status;
>
> +
> /* Resource descriptor conversion */
>
> Status = AcpiDmProcessResourceDescriptors (Op, Level, Context);
> -
> if (ACPI_FAILURE (Status))
> {
> return (Status);
> @@ -1082,7 +1091,6 @@ AcpiDmCommonDescendingOp (
> /* Switch/Case conversion */
>
> Status = AcpiDmProcessSwitch (Op);
> -
> return (AE_OK);
> }
>
> @@ -1113,6 +1121,7 @@ AcpiDmProcessResourceDescriptors (
> ACPI_OBJECT_TYPE ObjectType;
> ACPI_STATUS Status;
>
> +
> WalkState = Info->WalkState;
> OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
>
> @@ -1138,7 +1147,6 @@ AcpiDmProcessResourceDescriptors (
> * If so, convert the reference into a symbolic reference.
> */
> AcpiDmCheckResourceReference (Op, WalkState);
> -
> return (AE_OK);
> }
>
> diff --git a/src/acpica/source/common/ahpredef.c b/src/acpica/source/common/ahpredef.c
> index edcfa2f0..5cd1064c 100644
> --- a/src/acpica/source/common/ahpredef.c
> +++ b/src/acpica/source/common/ahpredef.c
> @@ -474,6 +474,15 @@ AcpiAhMatchPredefinedName (
> const AH_PREDEFINED_NAME *Info;
>
>
> + /* Nameseg must start with an underscore */
> +
> + if (*Nameseg != '_')
> + {
> + return (NULL);
> + }
> +
> + /* Search for a match in the predefined name table */
> +
> for (Info = AslPredefinedInfo; Info->Name; Info++)
> {
> if (ACPI_COMPARE_NAME (Nameseg, Info->Name))
> diff --git a/src/acpica/source/common/dmtbinfo.c b/src/acpica/source/common/dmtbinfo.c
> index 692763fd..56dd5539 100644
> --- a/src/acpica/source/common/dmtbinfo.c
> +++ b/src/acpica/source/common/dmtbinfo.c
> @@ -1838,6 +1838,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] =
> {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Flags), "Flags (decoded below)", 0},
> {ACPI_DMT_FLAG0, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "COHACC Override", 0},
> {ACPI_DMT_FLAG1, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "HTTU Override", 0},
> + {ACPI_DMT_FLAG3, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "Proximity Domain Valid", 0},
> {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Reserved), "Reserved", 0},
> {ACPI_DMT_UINT64, ACPI_IORT4_OFFSET (VatosAddress), "VATOS Address", 0},
> {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Model), "Model", 0},
> @@ -1845,6 +1846,9 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] =
> {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (PriGsiv), "PRI GSIV", 0},
> {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (GerrGsiv), "GERR GSIV", 0},
> {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (SyncGsiv), "Sync GSIV", 0},
> + {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0},
> + {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Reserved1), "Reserved", 0},
> + {ACPI_DMT_UINT16, ACPI_IORT4_OFFSET (Reserved2), "Reserved", 0},
> ACPI_DMT_TERMINATOR
> };
>
> diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am
> index 382fc07d..5c0e75d2 100644
> --- a/src/acpica/source/compiler/Makefile.am
> +++ b/src/acpica/source/compiler/Makefile.am
> @@ -99,6 +99,7 @@ libfwtsiasl_la_SOURCES = \
> aslopcodes.c \
> asloperands.c \
> aslopt.c \
> + aslparseop.c \
> aslpld.c \
> aslpredef.c \
> aslresource.c \
> diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c
> index 1df0dad0..664dad08 100644
> --- a/src/acpica/source/compiler/aslanalyze.c
> +++ b/src/acpica/source/compiler/aslanalyze.c
> @@ -435,13 +435,13 @@ AnCheckMethodReturnValue (
> /* Examine the parent op of this method */
>
> OwningOp = Node->Op;
> - if (OwningOp->Asl.CompileFlags & NODE_METHOD_NO_RETVAL)
> + if (OwningOp->Asl.CompileFlags & OP_METHOD_NO_RETVAL)
> {
> /* Method NEVER returns a value */
>
> AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, Op->Asl.ExternalName);
> }
> - else if (OwningOp->Asl.CompileFlags & NODE_METHOD_SOME_NO_RETVAL)
> + else if (OwningOp->Asl.CompileFlags & OP_METHOD_SOME_NO_RETVAL)
> {
> /* Method SOMETIMES returns a value, SOMETIMES not */
>
> diff --git a/src/acpica/source/compiler/aslbtypes.c b/src/acpica/source/compiler/aslbtypes.c
> index 6a4e9bef..5bae87d6 100644
> --- a/src/acpica/source/compiler/aslbtypes.c
> +++ b/src/acpica/source/compiler/aslbtypes.c
> @@ -560,7 +560,7 @@ AnGetBtype (
> return (ACPI_UINT32_MAX);
> }
>
> - if (ReferencedNode->Asl.CompileFlags & NODE_METHOD_TYPED)
> + if (ReferencedNode->Asl.CompileFlags & OP_METHOD_TYPED)
> {
> ThisNodeBtype = ReferencedNode->Asl.AcpiBtype;
> }
> diff --git a/src/acpica/source/compiler/aslcodegen.c b/src/acpica/source/compiler/aslcodegen.c
> index 903f771d..a527ddda 100644
> --- a/src/acpica/source/compiler/aslcodegen.c
> +++ b/src/acpica/source/compiler/aslcodegen.c
> @@ -291,6 +291,8 @@ CgAmlWriteWalk (
> /* 19 */ Op->Asl.LogicalLineNumber,
> /* 20 */ Op->Asl.EndLogicalLine);
>
> + TrPrintOpFlags (Op->Asl.CompileFlags, ASL_TREE_OUTPUT);
> + DbgPrint (ASL_TREE_OUTPUT, "\n");
> return (AE_OK);
> }
>
> @@ -438,7 +440,7 @@ CgWriteAmlOpcode (
>
> /* Does this opcode have an associated "PackageLength" field? */
>
> - if (Op->Asl.CompileFlags & NODE_AML_PACKAGE)
> + if (Op->Asl.CompileFlags & OP_AML_PACKAGE)
> {
> if (Op->Asl.AmlPkgLenBytes == 1)
> {
> diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
> index 07a7d512..c3794246 100644
> --- a/src/acpica/source/compiler/aslcompiler.h
> +++ b/src/acpica/source/compiler/aslcompiler.h
> @@ -790,17 +790,6 @@ TrAmlTransformWalkEnd (
>
>
> /*
> - * asltree - parse tree support
> - */
> -ACPI_STATUS
> -TrWalkParseTree (
> - ACPI_PARSE_OBJECT *Op,
> - UINT32 Visitation,
> - ASL_WALK_CALLBACK DescendingCallback,
> - ASL_WALK_CALLBACK AscendingCallback,
> - void *Context);
> -
> -/*
> * aslexternal - External opcode support
> */
> ACPI_STATUS
> @@ -826,104 +815,112 @@ ExDoExternal (
> #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
>
>
> -void
> -TrSetParent (
> - ACPI_PARSE_OBJECT *Op,
> - ACPI_PARSE_OBJECT *ParentOp);
> -
> -ACPI_PARSE_OBJECT *
> -TrAllocateNode (
> - UINT32 ParseOpcode);
> -
> -void
> -TrPrintNodeCompileFlags (
> - UINT32 Flags);
> -
> -void
> -TrReleaseNode (
> - ACPI_PARSE_OBJECT *Op);
> -
> -ACPI_PARSE_OBJECT *
> -TrUpdateNode (
> - UINT32 ParseOpcode,
> - ACPI_PARSE_OBJECT *Op);
> -
> +/*
> + * aslparseop.c - Parse op create/allocate/cache
> + */
> ACPI_PARSE_OBJECT *
> -TrCreateNode (
> +TrCreateOp (
> UINT32 ParseOpcode,
> UINT32 NumChildren,
> ...);
>
> ACPI_PARSE_OBJECT *
> -TrCreateLeafNode (
> +TrCreateLeafOp (
> UINT32 ParseOpcode);
>
> ACPI_PARSE_OBJECT *
> -TrCreateNullTarget (
> +TrCreateNullTargetOp (
> void);
>
> ACPI_PARSE_OBJECT *
> -TrCreateAssignmentNode (
> +TrCreateAssignmentOp (
> ACPI_PARSE_OBJECT *Target,
> ACPI_PARSE_OBJECT *Source);
>
> ACPI_PARSE_OBJECT *
> -TrCreateTargetOperand (
> +TrCreateTargetOp (
> ACPI_PARSE_OBJECT *OriginalOp,
> ACPI_PARSE_OBJECT *ParentOp);
>
> ACPI_PARSE_OBJECT *
> -TrCreateValuedLeafNode (
> +TrCreateValuedLeafOp (
> UINT32 ParseOpcode,
> UINT64 Value);
>
> ACPI_PARSE_OBJECT *
> -TrCreateConstantLeafNode (
> +TrCreateConstantLeafOp (
> UINT32 ParseOpcode);
>
> ACPI_PARSE_OBJECT *
> -TrLinkChildren (
> - ACPI_PARSE_OBJECT *Op,
> - UINT32 NumChildren,
> - ...);
> +TrAllocateOp (
> + UINT32 ParseOpcode);
>
> void
> -TrSetEndLineNumber (
> +TrPrintOpFlags (
> + UINT32 Flags,
> + UINT32 OutputLevel);
> +
> +
> +/*
> + * asltree.c - Parse tree management
> + */
> +void
> +TrSetOpParent (
> + ACPI_PARSE_OBJECT *Op,
> + ACPI_PARSE_OBJECT *ParentOp);
> +
> +ACPI_PARSE_OBJECT *
> +TrSetOpIntegerValue (
> + UINT32 ParseOpcode,
> ACPI_PARSE_OBJECT *Op);
>
> void
> -TrSetCurrentFilename (
> +TrSetOpEndLineNumber (
> ACPI_PARSE_OBJECT *Op);
>
> void
> -TrWalkTree (
> - void);
> +TrSetOpCurrentFilename (
> + ACPI_PARSE_OBJECT *Op);
>
> ACPI_PARSE_OBJECT *
> -TrLinkPeerNode (
> +TrLinkOpChildren (
> + ACPI_PARSE_OBJECT *Op,
> + UINT32 NumChildren,
> + ...);
> +
> +ACPI_PARSE_OBJECT *
> +TrLinkPeerOp (
> ACPI_PARSE_OBJECT *Op1,
> ACPI_PARSE_OBJECT *Op2);
>
> ACPI_PARSE_OBJECT *
> -TrLinkChildNode (
> +TrLinkChildOp (
> ACPI_PARSE_OBJECT *Op1,
> ACPI_PARSE_OBJECT *Op2);
>
> ACPI_PARSE_OBJECT *
> -TrSetNodeFlags (
> +TrSetOpFlags (
> ACPI_PARSE_OBJECT *Op,
> UINT32 Flags);
>
> ACPI_PARSE_OBJECT *
> -TrSetNodeAmlLength (
> +TrSetOpAmlLength (
> ACPI_PARSE_OBJECT *Op,
> UINT32 Length);
>
> ACPI_PARSE_OBJECT *
> -TrLinkPeerNodes (
> +TrLinkPeerOps (
> UINT32 NumPeers,
> ...);
>
> +ACPI_STATUS
> +TrWalkParseTree (
> + ACPI_PARSE_OBJECT *Op,
> + UINT32 Visitation,
> + ASL_WALK_CALLBACK DescendingCallback,
> + ASL_WALK_CALLBACK AscendingCallback,
> + void *Context);
> +
>
> /*
> * aslfiles - File I/O support
> diff --git a/src/acpica/source/compiler/aslcstyle.y b/src/acpica/source/compiler/aslcstyle.y
> index 031a3829..928e3a4e 100644
> --- a/src/acpica/source/compiler/aslcstyle.y
> +++ b/src/acpica/source/compiler/aslcstyle.y
> @@ -201,59 +201,59 @@ Expression
>
> /* Unary operators */
>
> - : PARSEOP_EXP_LOGICAL_NOT {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
> - TermArg {$$ = TrLinkChildren ($<n>2,1,$3);}
> - | PARSEOP_EXP_NOT {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
> - TermArg {$$ = TrLinkChildren ($<n>2,2,$3,TrCreateNullTarget ());}
> + : PARSEOP_EXP_LOGICAL_NOT {$<n>$ = TrCreateLeafOp (PARSEOP_LNOT);}
> + TermArg {$$ = TrLinkOpChildren ($<n>2,1,$3);}
> + | PARSEOP_EXP_NOT {$<n>$ = TrCreateLeafOp (PARSEOP_NOT);}
> + TermArg {$$ = TrLinkOpChildren ($<n>2,2,$3,TrCreateNullTargetOp ());}
>
> - | SuperName PARSEOP_EXP_INCREMENT {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
> - {$$ = TrLinkChildren ($<n>3,1,$1);}
> - | SuperName PARSEOP_EXP_DECREMENT {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
> - {$$ = TrLinkChildren ($<n>3,1,$1);}
> + | SuperName PARSEOP_EXP_INCREMENT {$<n>$ = TrCreateLeafOp (PARSEOP_INCREMENT);}
> + {$$ = TrLinkOpChildren ($<n>3,1,$1);}
> + | SuperName PARSEOP_EXP_DECREMENT {$<n>$ = TrCreateLeafOp (PARSEOP_DECREMENT);}
> + {$$ = TrLinkOpChildren ($<n>3,1,$1);}
>
> /* Binary operators: math and logical */
>
> - | TermArg PARSEOP_EXP_ADD {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> - | TermArg PARSEOP_EXP_DIVIDE {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
> - TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
> - TrCreateNullTarget ());}
> - | TermArg PARSEOP_EXP_MODULO {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> - | TermArg PARSEOP_EXP_MULTIPLY {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> - | TermArg PARSEOP_EXP_SHIFT_LEFT {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> - | TermArg PARSEOP_EXP_SHIFT_RIGHT {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> - | TermArg PARSEOP_EXP_SUBTRACT {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> -
> - | TermArg PARSEOP_EXP_AND {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> - | TermArg PARSEOP_EXP_OR {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> - | TermArg PARSEOP_EXP_XOR {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> -
> - | TermArg PARSEOP_EXP_GREATER {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
> - TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> - | TermArg PARSEOP_EXP_GREATER_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATEREQUAL);}
> - TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> - | TermArg PARSEOP_EXP_LESS {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
> - TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> - | TermArg PARSEOP_EXP_LESS_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LLESSEQUAL);}
> - TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> -
> - | TermArg PARSEOP_EXP_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
> - TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> - | TermArg PARSEOP_EXP_NOT_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LNOTEQUAL);}
> - TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> -
> - | TermArg PARSEOP_EXP_LOGICAL_AND {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
> - TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> - | TermArg PARSEOP_EXP_LOGICAL_OR {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> + | TermArg PARSEOP_EXP_ADD {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> + | TermArg PARSEOP_EXP_DIVIDE {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,4,$1,$4,TrCreateNullTargetOp (),
> + TrCreateNullTargetOp ());}
> + | TermArg PARSEOP_EXP_MODULO {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> + | TermArg PARSEOP_EXP_MULTIPLY {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> + | TermArg PARSEOP_EXP_SHIFT_LEFT {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> + | TermArg PARSEOP_EXP_SHIFT_RIGHT {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> + | TermArg PARSEOP_EXP_SUBTRACT {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> +
> + | TermArg PARSEOP_EXP_AND {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> + | TermArg PARSEOP_EXP_OR {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> + | TermArg PARSEOP_EXP_XOR {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
> +
> + | TermArg PARSEOP_EXP_GREATER {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
> + | TermArg PARSEOP_EXP_GREATER_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATEREQUAL);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
> + | TermArg PARSEOP_EXP_LESS {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
> + | TermArg PARSEOP_EXP_LESS_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LLESSEQUAL);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
> +
> + | TermArg PARSEOP_EXP_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
> + | TermArg PARSEOP_EXP_NOT_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LNOTEQUAL);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
> +
> + | TermArg PARSEOP_EXP_LOGICAL_AND {$<n>$ = TrCreateLeafOp (PARSEOP_LAND);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
> + | TermArg PARSEOP_EXP_LOGICAL_OR {$<n>$ = TrCreateLeafOp (PARSEOP_LOR);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
>
> /* Parentheses */
>
> @@ -280,8 +280,8 @@ IndexExpTerm
> : SuperName
> PARSEOP_EXP_INDEX_LEFT
> TermArg
> - PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX);
> - TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
> + PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafOp (PARSEOP_INDEX);
> + TrLinkOpChildren ($$,3,$1,$3,TrCreateNullTargetOp ());}
> ;
>
>
> @@ -304,7 +304,7 @@ EqualsTerm
>
> | SuperName
> PARSEOP_EXP_EQUALS
> - TermArg {$$ = TrCreateAssignmentNode ($1, $3);}
> + TermArg {$$ = TrCreateAssignmentOp ($1, $3);}
>
> /* Chained equals: (a=RefOf)=b, a=b=c=d etc. */
>
> @@ -312,47 +312,47 @@ EqualsTerm
> EqualsTerm
> PARSEOP_CLOSE_PAREN
> PARSEOP_EXP_EQUALS
> - TermArg {$$ = TrCreateAssignmentNode ($2, $5);}
> + TermArg {$$ = TrCreateAssignmentOp ($2, $5);}
>
> /* Compound assignments -- Add (operand, operand, target) */
>
> - | TermArg PARSEOP_EXP_ADD_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_ADD_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_DIV_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
> - TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_DIV_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,4,$1,$4,TrCreateNullTargetOp (),
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_MOD_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_MOD_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_MUL_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_MUL_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_SHL_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_SHL_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_SHR_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_SHR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_SUB_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_SUB_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_AND_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_AND_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_OR_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_OR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
>
> - | TermArg PARSEOP_EXP_XOR_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
> - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
> + | TermArg PARSEOP_EXP_XOR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
> + TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
> + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
> ;
> diff --git a/src/acpica/source/compiler/asldefine.h b/src/acpica/source/compiler/asldefine.h
> index 2b6d73d6..a7d1a289 100644
> --- a/src/acpica/source/compiler/asldefine.h
> +++ b/src/acpica/source/compiler/asldefine.h
> @@ -290,7 +290,7 @@
>
> #define ASL_PARSE_TREE_DEBUG2 \
> " %08X %04X %04X %01X %04X %04X %05X %05X "\
> - "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d\n"
> + "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d"
>
> /*
> * Macros for ASL/ASL+ converter
> diff --git a/src/acpica/source/compiler/aslexternal.c b/src/acpica/source/compiler/aslexternal.c
> index 67a95e56..21729bd7 100644
> --- a/src/acpica/source/compiler/aslexternal.c
> +++ b/src/acpica/source/compiler/aslexternal.c
> @@ -202,7 +202,7 @@ ExDoExternal (
>
> /* Create new list node of arbitrary type */
>
> - ListOp = TrAllocateNode (PARSEOP_DEFAULT_ARG);
> + ListOp = TrAllocateOp (PARSEOP_DEFAULT_ARG);
>
> /* Store External node as child */
>
> @@ -266,7 +266,7 @@ ExInsertArgCount (
>
> /* Skip if External node already handled */
>
> - if (Next->Asl.Child->Asl.CompileFlags & NODE_VISITED)
> + if (Next->Asl.Child->Asl.CompileFlags & OP_VISITED)
> {
> Next = Next->Asl.Next;
> continue;
> @@ -282,7 +282,7 @@ ExInsertArgCount (
> continue;
> }
>
> - Next->Asl.Child->Asl.CompileFlags |= NODE_VISITED;
> + Next->Asl.Child->Asl.CompileFlags |= OP_VISITED;
>
> /*
> * Since we will reposition Externals to the Root, set Namepath
> @@ -544,7 +544,7 @@ ExMoveExternals (
> Next->Asl.Child->Asl.Next->Asl.Value.Integer;
>
> if (ObjType == ACPI_TYPE_METHOD &&
> - !(Next->Asl.CompileFlags & NODE_VISITED))
> + !(Next->Asl.CompileFlags & OP_VISITED))
> {
> if (Next == Prev)
> {
> @@ -578,12 +578,12 @@ ExMoveExternals (
>
> Gbl_ExternalsListHead->Asl.ParseOpcode = PARSEOP_IF;
> Gbl_ExternalsListHead->Asl.AmlOpcode = AML_IF_OP;
> - Gbl_ExternalsListHead->Asl.CompileFlags = NODE_AML_PACKAGE;
> + Gbl_ExternalsListHead->Asl.CompileFlags = OP_AML_PACKAGE;
> UtSetParseOpName (Gbl_ExternalsListHead);
>
> /* Create a Zero op for the If predicate */
>
> - PredicateOp = TrAllocateNode (PARSEOP_ZERO);
> + PredicateOp = TrAllocateOp (PARSEOP_ZERO);
> PredicateOp->Asl.AmlOpcode = AML_ZERO_OP;
>
> PredicateOp->Asl.Parent = Gbl_ExternalsListHead;
> diff --git a/src/acpica/source/compiler/aslfold.c b/src/acpica/source/compiler/aslfold.c
> index 27090a22..511db575 100644
> --- a/src/acpica/source/compiler/aslfold.c
> +++ b/src/acpica/source/compiler/aslfold.c
> @@ -232,8 +232,8 @@ OpcAmlConstantWalk (
> * Only interested in subtrees that could possibly contain
> * expressions that can be evaluated at this time
> */
> - if ((!(Op->Asl.CompileFlags & NODE_COMPILE_TIME_CONST)) ||
> - (Op->Asl.CompileFlags & NODE_IS_TARGET))
> + if ((!(Op->Asl.CompileFlags & OP_COMPILE_TIME_CONST)) ||
> + (Op->Asl.CompileFlags & OP_IS_TARGET))
> {
> return (AE_OK);
> }
> @@ -412,7 +412,7 @@ OpcAmlCheckForConstant (
> {
> /* Error if there is a target operand */
>
> - if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> + if (Op->Asl.CompileFlags & OP_IS_TARGET)
> {
> AslError (ASL_ERROR, ASL_MSG_INVALID_TARGET, Op, NULL);
> Status = AE_TYPE;
> @@ -420,11 +420,11 @@ OpcAmlCheckForConstant (
>
> /* Error if expression cannot be reduced (folded) */
>
> - if (!(NextOp->Asl.CompileFlags & NODE_COULD_NOT_REDUCE))
> + if (!(NextOp->Asl.CompileFlags & OP_COULD_NOT_REDUCE))
> {
> /* Ensure only one error message per statement */
>
> - NextOp->Asl.CompileFlags |= NODE_COULD_NOT_REDUCE;
> + NextOp->Asl.CompileFlags |= OP_COULD_NOT_REDUCE;
> DbgPrint (ASL_PARSE_OUTPUT,
> "**** Could not reduce operands for NAME opcode ****\n");
>
> @@ -441,7 +441,7 @@ OpcAmlCheckForConstant (
>
> /* This is not a 3/4/5 opcode, but maybe can convert to STORE */
>
> - if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> + if (Op->Asl.CompileFlags & OP_IS_TARGET)
> {
> DbgPrint (ASL_PARSE_OUTPUT,
> "**** Valid Target, transform to Store ****\n");
> @@ -484,7 +484,7 @@ OpcAmlCheckForConstant (
>
> DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
>
> - if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> + if (Op->Asl.CompileFlags & OP_IS_TARGET)
> {
> if (Op->Asl.ParseOpcode == PARSEOP_ZERO)
> {
> @@ -496,7 +496,7 @@ OpcAmlCheckForConstant (
> }
> }
>
> - if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
> + if (Op->Asl.CompileFlags & OP_IS_TERM_ARG)
> {
> DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " TERMARG");
> }
> @@ -505,7 +505,7 @@ CleanupAndExit:
>
> /* Dump the node compile flags also */
>
> - TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
> + TrPrintOpFlags (Op->Asl.CompileFlags, ASL_PARSE_OUTPUT);
> DbgPrint (ASL_PARSE_OUTPUT, "\n");
> return (Status);
> }
> @@ -543,7 +543,7 @@ TrSimpleConstantReduction (
>
> /* Allocate a new temporary root for this subtree */
>
> - RootOp = TrAllocateNode (PARSEOP_INTEGER);
> + RootOp = TrAllocateOp (PARSEOP_INTEGER);
> if (!RootOp)
> {
> return (AE_NO_MEMORY);
> @@ -654,7 +654,7 @@ TrTransformToStoreOp (
> * Create a NULL (zero) target so that we can use the
> * interpreter to evaluate the expression.
> */
> - NewTarget = TrCreateNullTarget ();
> + NewTarget = TrCreateNullTargetOp ();
> NewTarget->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
>
> /* Handle one-operand cases (NOT, TOBCD, etc.) */
> @@ -670,7 +670,7 @@ TrTransformToStoreOp (
> Child2->Asl.Next = NewTarget;
> NewTarget->Asl.Parent = OriginalTarget->Asl.Parent;
>
> - NewParent = TrAllocateNode (PARSEOP_INTEGER);
> + NewParent = TrAllocateOp (PARSEOP_INTEGER);
> NewParent->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP;
>
> OriginalParent = Op->Common.Parent;
> @@ -799,12 +799,12 @@ TrInstallReducedConstant (
> */
> Op->Asl.ParseOpcode = PARSEOP_BUFFER;
> Op->Common.AmlOpcode = AML_BUFFER_OP;
> - Op->Asl.CompileFlags = NODE_AML_PACKAGE;
> + Op->Asl.CompileFlags = OP_AML_PACKAGE;
> UtSetParseOpName (Op);
>
> /* Child node is the buffer length */
>
> - LengthOp = TrAllocateNode (PARSEOP_INTEGER);
> + LengthOp = TrAllocateOp (PARSEOP_INTEGER);
>
> LengthOp->Asl.AmlOpcode = AML_DWORD_OP;
> LengthOp->Asl.Value.Integer = ObjDesc->Buffer.Length;
> @@ -815,7 +815,7 @@ TrInstallReducedConstant (
>
> /* Next child is the raw buffer data */
>
> - DataOp = TrAllocateNode (PARSEOP_RAW_DATA);
> + DataOp = TrAllocateOp (PARSEOP_RAW_DATA);
> DataOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
> DataOp->Asl.AmlLength = ObjDesc->Buffer.Length;
> DataOp->Asl.Value.String = (char *) ObjDesc->Buffer.Pointer;
> @@ -863,25 +863,25 @@ OpcUpdateIntegerNode (
> {
> case 1:
>
> - TrUpdateNode (PARSEOP_BYTECONST, Op);
> + TrSetOpIntegerValue (PARSEOP_BYTECONST, Op);
> Op->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
> break;
>
> case 2:
>
> - TrUpdateNode (PARSEOP_WORDCONST, Op);
> + TrSetOpIntegerValue (PARSEOP_WORDCONST, Op);
> Op->Asl.AmlOpcode = AML_RAW_DATA_WORD;
> break;
>
> case 4:
>
> - TrUpdateNode (PARSEOP_DWORDCONST, Op);
> + TrSetOpIntegerValue (PARSEOP_DWORDCONST, Op);
> Op->Asl.AmlOpcode = AML_RAW_DATA_DWORD;
> break;
>
> case 8:
>
> - TrUpdateNode (PARSEOP_QWORDCONST, Op);
> + TrSetOpIntegerValue (PARSEOP_QWORDCONST, Op);
> Op->Asl.AmlOpcode = AML_RAW_DATA_QWORD;
> break;
>
> @@ -889,7 +889,7 @@ OpcUpdateIntegerNode (
> default:
>
> OpcSetOptimalIntegerSize (Op);
> - TrUpdateNode (PARSEOP_INTEGER, Op);
> + TrSetOpIntegerValue (PARSEOP_INTEGER, Op);
> break;
> }
>
> diff --git a/src/acpica/source/compiler/aslglobal.h b/src/acpica/source/compiler/aslglobal.h
> index 16b798c1..0c58041f 100644
> --- a/src/acpica/source/compiler/aslglobal.h
> +++ b/src/acpica/source/compiler/aslglobal.h
> @@ -196,9 +196,37 @@ ASL_FILE_INFO Gbl_Files [ASL_NUM_FILES] =
> {NULL, NULL, "Converter db :", "Converter debug Output"}
> };
>
> +/* Table below must match the defines with the same names in actypes.h */
> +
> +const char *Gbl_OpFlagNames[ACPI_NUM_OP_FLAGS] =
> +{
> + "OP_VISITED",
> + "OP_AML_PACKAGE",
> + "OP_IS_TARGET",
> + "OP_IS_RESOURCE_DESC",
> + "OP_IS_RESOURCE_FIELD",
> + "OP_HAS_NO_EXIT",
> + "OP_IF_HAS_NO_EXIT",
> + "OP_NAME_INTERNALIZED",
> + "OP_METHOD_NO_RETVAL",
> + "OP_METHOD_SOME_NO_RETVAL",
> + "OP_RESULT_NOT_USED",
> + "OP_METHOD_TYPED",
> + "OP_COULD_NOT_REDUCE",
> + "OP_COMPILE_TIME_CONST",
> + "OP_IS_TERM_ARG",
> + "OP_WAS_ONES_OP",
> + "OP_IS_NAME_DECLARATION",
> + "OP_COMPILER_EMITTED",
> + "OP_IS_DUPLICATE",
> + "OP_IS_RESOURCE_DATA",
> + "OP_IS_NULL_RETURN"
> +};
> +
> #else
> extern UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS];
> extern ASL_FILE_INFO Gbl_Files [ASL_NUM_FILES];
> +extern const char *Gbl_OpFlagNames[ACPI_NUM_OP_FLAGS];
> #endif
>
>
> @@ -387,9 +415,9 @@ ASL_EXTERN ASL_COMMENT_STATE Gbl_CommentState;
> * Determines if an inline comment should be saved in the InlineComment or NodeEndComment
> * field of ACPI_PARSE_OBJECT.
> */
> -ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_Comment_List_Head, NULL);
> -ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_Comment_List_Tail, NULL);
> -ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_Inline_Comment_Buffer, NULL);
> +ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_CommentListHead, NULL);
> +ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_CommentListTail, NULL);
> +ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_InlineCommentBuffer, NULL);
>
> /* Static structures */
>
> diff --git a/src/acpica/source/compiler/aslhelpers.y b/src/acpica/source/compiler/aslhelpers.y
> index f200bf2b..cd898b15 100644
> --- a/src/acpica/source/compiler/aslhelpers.y
> +++ b/src/acpica/source/compiler/aslhelpers.y
> @@ -160,11 +160,11 @@ NoEcho('
> ******************************************************************************/
>
> OptionalBusMasterKeyword
> - : ',' {$$ = TrCreateLeafNode (
> + : ',' {$$ = TrCreateLeafOp (
> PARSEOP_BUSMASTERTYPE_MASTER);}
> - | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode (
> + | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafOp (
> PARSEOP_BUSMASTERTYPE_MASTER);}
> - | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafNode (
> + | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafOp (
> PARSEOP_BUSMASTERTYPE_NOTMASTER);}
> ;
>
> @@ -176,9 +176,9 @@ OptionalAccessAttribTerm
> ;
>
> OptionalAccessSize
> - : {$$ = TrCreateValuedLeafNode (
> + : {$$ = TrCreateValuedLeafOp (
> PARSEOP_BYTECONST, 0);}
> - | ',' {$$ = TrCreateValuedLeafNode (
> + | ',' {$$ = TrCreateValuedLeafOp (
> PARSEOP_BYTECONST, 0);}
> | ',' ByteConstExpr {$$ = $2;}
> ;
> @@ -243,10 +243,10 @@ OptionalIoRestriction
> ;
>
> OptionalListString
> - : {$$ = TrCreateValuedLeafNode (
> + : {$$ = TrCreateValuedLeafOp (
> PARSEOP_STRING_LITERAL,
> ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
> - | ',' {$$ = TrCreateValuedLeafNode (
> + | ',' {$$ = TrCreateValuedLeafOp (
> PARSEOP_STRING_LITERAL,
> ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
> | ',' TermArg {$$ = $2;}
> @@ -280,13 +280,13 @@ OptionalNameString_Last
> ;
>
> OptionalNameString_First
> - : {$$ = TrCreateLeafNode (
> + : {$$ = TrCreateLeafOp (
> PARSEOP_ZERO);}
> | NameString {$$ = $1;}
> ;
>
> OptionalObjectTypeKeyword
> - : {$$ = TrCreateLeafNode (
> + : {$$ = TrCreateLeafOp (
> PARSEOP_OBJECTTYPE_UNK);}
> | ',' ObjectTypeKeyword {$$ = $2;}
> ;
> @@ -308,33 +308,33 @@ OptionalRangeType
> ;
>
> OptionalReadWriteKeyword
> - : {$$ = TrCreateLeafNode (
> + : {$$ = TrCreateLeafOp (
> PARSEOP_READWRITETYPE_BOTH);}
> - | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafNode (
> + | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafOp (
> PARSEOP_READWRITETYPE_BOTH);}
> - | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafNode (
> + | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafOp (
> PARSEOP_READWRITETYPE_READONLY);}
> ;
>
> OptionalResourceType_First
> - : {$$ = TrCreateLeafNode (
> + : {$$ = TrCreateLeafOp (
> PARSEOP_RESOURCETYPE_CONSUMER);}
> | ResourceTypeKeyword {$$ = $1;}
> ;
>
> OptionalResourceType
> - : {$$ = TrCreateLeafNode (
> + : {$$ = TrCreateLeafOp (
> PARSEOP_RESOURCETYPE_CONSUMER);}
> - | ',' {$$ = TrCreateLeafNode (
> + | ',' {$$ = TrCreateLeafOp (
> PARSEOP_RESOURCETYPE_CONSUMER);}
> | ',' ResourceTypeKeyword {$$ = $2;}
> ;
>
> /* Same as above except default is producer */
> OptionalProducerResourceType
> - : {$$ = TrCreateLeafNode (
> + : {$$ = TrCreateLeafOp (
> PARSEOP_RESOURCETYPE_PRODUCER);}
> - | ',' {$$ = TrCreateLeafNode (
> + | ',' {$$ = TrCreateLeafOp (
> PARSEOP_RESOURCETYPE_PRODUCER);}
> | ',' ResourceTypeKeyword {$$ = $2;}
> ;
> @@ -395,9 +395,9 @@ OptionalWordConstExpr
> ;
>
> OptionalXferSize
> - : {$$ = TrCreateValuedLeafNode (
> + : {$$ = TrCreateValuedLeafOp (
> PARSEOP_XFERSIZE_32, 2);}
> - | ',' {$$ = TrCreateValuedLeafNode (
> + | ',' {$$ = TrCreateValuedLeafOp (
> PARSEOP_XFERSIZE_32, 2);}
> | ',' XferSizeKeyword {$$ = $2;}
> ;
> diff --git a/src/acpica/source/compiler/aslkeywords.y b/src/acpica/source/compiler/aslkeywords.y
> index 08fbfc70..e259d849 100644
> --- a/src/acpica/source/compiler/aslkeywords.y
> +++ b/src/acpica/source/compiler/aslkeywords.y
> @@ -159,46 +159,46 @@ NoEcho('
> ******************************************************************************/
>
> AccessAttribKeyword
> - : PARSEOP_ACCESSATTRIB_BLOCK {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK);}
> - | PARSEOP_ACCESSATTRIB_BLOCK_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK_CALL);}
> - | PARSEOP_ACCESSATTRIB_BYTE {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BYTE);}
> - | PARSEOP_ACCESSATTRIB_QUICK {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_QUICK );}
> - | PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_SND_RCV);}
> - | PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD);}
> - | PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD_CALL);}
> + : PARSEOP_ACCESSATTRIB_BLOCK {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BLOCK);}
> + | PARSEOP_ACCESSATTRIB_BLOCK_CALL {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BLOCK_CALL);}
> + | PARSEOP_ACCESSATTRIB_BYTE {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BYTE);}
> + | PARSEOP_ACCESSATTRIB_QUICK {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_QUICK );}
> + | PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_SND_RCV);}
> + | PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_WORD);}
> + | PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_WORD_CALL);}
> | PARSEOP_ACCESSATTRIB_MULTIBYTE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_MULTIBYTE);}
> ByteConst
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_ACCESSATTRIB_RAW_BYTES
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_RAW_BYTES);}
> ByteConst
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_ACCESSATTRIB_RAW_PROCESS
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
> ByteConst
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> ;
>
> AccessTypeKeyword
> - : PARSEOP_ACCESSTYPE_ANY {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_ANY);}
> - | PARSEOP_ACCESSTYPE_BYTE {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BYTE);}
> - | PARSEOP_ACCESSTYPE_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_WORD);}
> - | PARSEOP_ACCESSTYPE_DWORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_DWORD);}
> - | PARSEOP_ACCESSTYPE_QWORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_QWORD);}
> - | PARSEOP_ACCESSTYPE_BUF {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BUF);}
> + : PARSEOP_ACCESSTYPE_ANY {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_ANY);}
> + | PARSEOP_ACCESSTYPE_BYTE {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_BYTE);}
> + | PARSEOP_ACCESSTYPE_WORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_WORD);}
> + | PARSEOP_ACCESSTYPE_DWORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_DWORD);}
> + | PARSEOP_ACCESSTYPE_QWORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_QWORD);}
> + | PARSEOP_ACCESSTYPE_BUF {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_BUF);}
> ;
>
> AddressingModeKeyword
> - : PARSEOP_ADDRESSINGMODE_7BIT {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_7BIT);}
> - | PARSEOP_ADDRESSINGMODE_10BIT {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_10BIT);}
> + : PARSEOP_ADDRESSINGMODE_7BIT {$$ = TrCreateLeafOp (PARSEOP_ADDRESSINGMODE_7BIT);}
> + | PARSEOP_ADDRESSINGMODE_10BIT {$$ = TrCreateLeafOp (PARSEOP_ADDRESSINGMODE_10BIT);}
> ;
>
> AddressKeyword
> - : PARSEOP_ADDRESSTYPE_MEMORY {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_MEMORY);}
> - | PARSEOP_ADDRESSTYPE_RESERVED {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_RESERVED);}
> - | PARSEOP_ADDRESSTYPE_NVS {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_NVS);}
> - | PARSEOP_ADDRESSTYPE_ACPI {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_ACPI);}
> + : PARSEOP_ADDRESSTYPE_MEMORY {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_MEMORY);}
> + | PARSEOP_ADDRESSTYPE_RESERVED {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_RESERVED);}
> + | PARSEOP_ADDRESSTYPE_NVS {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_NVS);}
> + | PARSEOP_ADDRESSTYPE_ACPI {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_ACPI);}
> ;
>
> AddressSpaceKeyword
> @@ -207,130 +207,130 @@ AddressSpaceKeyword
> ;
>
> BitsPerByteKeyword
> - : PARSEOP_BITSPERBYTE_FIVE {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_FIVE);}
> - | PARSEOP_BITSPERBYTE_SIX {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_SIX);}
> - | PARSEOP_BITSPERBYTE_SEVEN {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_SEVEN);}
> - | PARSEOP_BITSPERBYTE_EIGHT {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_EIGHT);}
> - | PARSEOP_BITSPERBYTE_NINE {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_NINE);}
> + : PARSEOP_BITSPERBYTE_FIVE {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_FIVE);}
> + | PARSEOP_BITSPERBYTE_SIX {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_SIX);}
> + | PARSEOP_BITSPERBYTE_SEVEN {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_SEVEN);}
> + | PARSEOP_BITSPERBYTE_EIGHT {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_EIGHT);}
> + | PARSEOP_BITSPERBYTE_NINE {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_NINE);}
> ;
>
> ClockPhaseKeyword
> - : PARSEOP_CLOCKPHASE_FIRST {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_FIRST);}
> - | PARSEOP_CLOCKPHASE_SECOND {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_SECOND);}
> + : PARSEOP_CLOCKPHASE_FIRST {$$ = TrCreateLeafOp (PARSEOP_CLOCKPHASE_FIRST);}
> + | PARSEOP_CLOCKPHASE_SECOND {$$ = TrCreateLeafOp (PARSEOP_CLOCKPHASE_SECOND);}
> ;
>
> ClockPolarityKeyword
> - : PARSEOP_CLOCKPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_LOW);}
> - | PARSEOP_CLOCKPOLARITY_HIGH {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_HIGH);}
> + : PARSEOP_CLOCKPOLARITY_LOW {$$ = TrCreateLeafOp (PARSEOP_CLOCKPOLARITY_LOW);}
> + | PARSEOP_CLOCKPOLARITY_HIGH {$$ = TrCreateLeafOp (PARSEOP_CLOCKPOLARITY_HIGH);}
> ;
>
> DecodeKeyword
> - : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_POS);}
> - | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_SUB);}
> + : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafOp (PARSEOP_DECODETYPE_POS);}
> + | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafOp (PARSEOP_DECODETYPE_SUB);}
> ;
>
> DevicePolarityKeyword
> - : PARSEOP_DEVICEPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_LOW);}
> - | PARSEOP_DEVICEPOLARITY_HIGH {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_HIGH);}
> + : PARSEOP_DEVICEPOLARITY_LOW {$$ = TrCreateLeafOp (PARSEOP_DEVICEPOLARITY_LOW);}
> + | PARSEOP_DEVICEPOLARITY_HIGH {$$ = TrCreateLeafOp (PARSEOP_DEVICEPOLARITY_HIGH);}
> ;
>
> DMATypeKeyword
> - : PARSEOP_DMATYPE_A {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_A);}
> - | PARSEOP_DMATYPE_COMPATIBILITY {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_COMPATIBILITY);}
> - | PARSEOP_DMATYPE_B {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_B);}
> - | PARSEOP_DMATYPE_F {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_F);}
> + : PARSEOP_DMATYPE_A {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_A);}
> + | PARSEOP_DMATYPE_COMPATIBILITY {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_COMPATIBILITY);}
> + | PARSEOP_DMATYPE_B {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_B);}
> + | PARSEOP_DMATYPE_F {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_F);}
> ;
>
> EndianKeyword
> - : PARSEOP_ENDIAN_LITTLE {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_LITTLE);}
> - | PARSEOP_ENDIAN_BIG {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_BIG);}
> + : PARSEOP_ENDIAN_LITTLE {$$ = TrCreateLeafOp (PARSEOP_ENDIAN_LITTLE);}
> + | PARSEOP_ENDIAN_BIG {$$ = TrCreateLeafOp (PARSEOP_ENDIAN_BIG);}
> ;
>
> FlowControlKeyword
> - : PARSEOP_FLOWCONTROL_HW {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_HW);}
> - | PARSEOP_FLOWCONTROL_NONE {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_NONE);}
> - | PARSEOP_FLOWCONTROL_SW {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_SW);}
> + : PARSEOP_FLOWCONTROL_HW {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_HW);}
> + | PARSEOP_FLOWCONTROL_NONE {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_NONE);}
> + | PARSEOP_FLOWCONTROL_SW {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_SW);}
> ;
>
> InterruptLevel
> - : PARSEOP_INTLEVEL_ACTIVEBOTH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEBOTH);}
> - | PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEHIGH);}
> - | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVELOW);}
> + : PARSEOP_INTLEVEL_ACTIVEBOTH {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVEBOTH);}
> + | PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVEHIGH);}
> + | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVELOW);}
> ;
>
> InterruptTypeKeyword
> - : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_EDGE);}
> - | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_LEVEL);}
> + : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafOp (PARSEOP_INTTYPE_EDGE);}
> + | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafOp (PARSEOP_INTTYPE_LEVEL);}
> ;
>
> IODecodeKeyword
> - : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_16);}
> - | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_10);}
> + : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafOp (PARSEOP_IODECODETYPE_16);}
> + | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafOp (PARSEOP_IODECODETYPE_10);}
> ;
>
> IoRestrictionKeyword
> - : PARSEOP_IORESTRICT_IN {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_IN);}
> - | PARSEOP_IORESTRICT_OUT {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_OUT);}
> - | PARSEOP_IORESTRICT_NONE {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_NONE);}
> - | PARSEOP_IORESTRICT_PRESERVE {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_PRESERVE);}
> + : PARSEOP_IORESTRICT_IN {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_IN);}
> + | PARSEOP_IORESTRICT_OUT {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_OUT);}
> + | PARSEOP_IORESTRICT_NONE {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_NONE);}
> + | PARSEOP_IORESTRICT_PRESERVE {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_PRESERVE);}
> ;
>
> LockRuleKeyword
> - : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_LOCK);}
> - | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_NOLOCK);}
> + : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafOp (PARSEOP_LOCKRULE_LOCK);}
> + | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafOp (PARSEOP_LOCKRULE_NOLOCK);}
> ;
>
> MatchOpKeyword
> - : PARSEOP_MATCHTYPE_MTR {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MTR);}
> - | PARSEOP_MATCHTYPE_MEQ {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MEQ);}
> - | PARSEOP_MATCHTYPE_MLE {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLE);}
> - | PARSEOP_MATCHTYPE_MLT {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLT);}
> - | PARSEOP_MATCHTYPE_MGE {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGE);}
> - | PARSEOP_MATCHTYPE_MGT {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGT);}
> + : PARSEOP_MATCHTYPE_MTR {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MTR);}
> + | PARSEOP_MATCHTYPE_MEQ {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MEQ);}
> + | PARSEOP_MATCHTYPE_MLE {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MLE);}
> + | PARSEOP_MATCHTYPE_MLT {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MLT);}
> + | PARSEOP_MATCHTYPE_MGE {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MGE);}
> + | PARSEOP_MATCHTYPE_MGT {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MGT);}
> ;
>
> MaxKeyword
> - : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_FIXED);}
> - | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_NOTFIXED);}
> + : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafOp (PARSEOP_MAXTYPE_FIXED);}
> + | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafOp (PARSEOP_MAXTYPE_NOTFIXED);}
> ;
>
> MemTypeKeyword
> - : PARSEOP_MEMTYPE_CACHEABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_CACHEABLE);}
> - | PARSEOP_MEMTYPE_WRITECOMBINING {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_WRITECOMBINING);}
> - | PARSEOP_MEMTYPE_PREFETCHABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_PREFETCHABLE);}
> - | PARSEOP_MEMTYPE_NONCACHEABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_NONCACHEABLE);}
> + : PARSEOP_MEMTYPE_CACHEABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_CACHEABLE);}
> + | PARSEOP_MEMTYPE_WRITECOMBINING {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_WRITECOMBINING);}
> + | PARSEOP_MEMTYPE_PREFETCHABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_PREFETCHABLE);}
> + | PARSEOP_MEMTYPE_NONCACHEABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_NONCACHEABLE);}
> ;
>
> MinKeyword
> - : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_FIXED);}
> - | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_NOTFIXED);}
> + : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafOp (PARSEOP_MINTYPE_FIXED);}
> + | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafOp (PARSEOP_MINTYPE_NOTFIXED);}
> ;
>
> ObjectTypeKeyword
> - : PARSEOP_OBJECTTYPE_UNK {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
> - | PARSEOP_OBJECTTYPE_INT {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_INT);}
> - | PARSEOP_OBJECTTYPE_STR {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_STR);}
> - | PARSEOP_OBJECTTYPE_BUF {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BUF);}
> - | PARSEOP_OBJECTTYPE_PKG {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PKG);}
> - | PARSEOP_OBJECTTYPE_FLD {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_FLD);}
> - | PARSEOP_OBJECTTYPE_DEV {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DEV);}
> - | PARSEOP_OBJECTTYPE_EVT {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_EVT);}
> - | PARSEOP_OBJECTTYPE_MTH {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTH);}
> - | PARSEOP_OBJECTTYPE_MTX {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTX);}
> - | PARSEOP_OBJECTTYPE_OPR {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_OPR);}
> - | PARSEOP_OBJECTTYPE_POW {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_POW);}
> - | PARSEOP_OBJECTTYPE_PRO {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PRO);}
> - | PARSEOP_OBJECTTYPE_THZ {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_THZ);}
> - | PARSEOP_OBJECTTYPE_BFF {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BFF);}
> - | PARSEOP_OBJECTTYPE_DDB {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DDB);}
> + : PARSEOP_OBJECTTYPE_UNK {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_UNK);}
> + | PARSEOP_OBJECTTYPE_INT {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_INT);}
> + | PARSEOP_OBJECTTYPE_STR {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_STR);}
> + | PARSEOP_OBJECTTYPE_BUF {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_BUF);}
> + | PARSEOP_OBJECTTYPE_PKG {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_PKG);}
> + | PARSEOP_OBJECTTYPE_FLD {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_FLD);}
> + | PARSEOP_OBJECTTYPE_DEV {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_DEV);}
> + | PARSEOP_OBJECTTYPE_EVT {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_EVT);}
> + | PARSEOP_OBJECTTYPE_MTH {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_MTH);}
> + | PARSEOP_OBJECTTYPE_MTX {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_MTX);}
> + | PARSEOP_OBJECTTYPE_OPR {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_OPR);}
> + | PARSEOP_OBJECTTYPE_POW {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_POW);}
> + | PARSEOP_OBJECTTYPE_PRO {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_PRO);}
> + | PARSEOP_OBJECTTYPE_THZ {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_THZ);}
> + | PARSEOP_OBJECTTYPE_BFF {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_BFF);}
> + | PARSEOP_OBJECTTYPE_DDB {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_DDB);}
> ;
>
> ParityTypeKeyword
> - : PARSEOP_PARITYTYPE_SPACE {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_SPACE);}
> - | PARSEOP_PARITYTYPE_MARK {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_MARK);}
> - | PARSEOP_PARITYTYPE_ODD {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_ODD);}
> - | PARSEOP_PARITYTYPE_EVEN {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_EVEN);}
> - | PARSEOP_PARITYTYPE_NONE {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_NONE);}
> + : PARSEOP_PARITYTYPE_SPACE {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_SPACE);}
> + | PARSEOP_PARITYTYPE_MARK {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_MARK);}
> + | PARSEOP_PARITYTYPE_ODD {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_ODD);}
> + | PARSEOP_PARITYTYPE_EVEN {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_EVEN);}
> + | PARSEOP_PARITYTYPE_NONE {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_NONE);}
> ;
>
> PinConfigByte
> @@ -339,125 +339,125 @@ PinConfigByte
> ;
>
> PinConfigKeyword
> - : PARSEOP_PIN_NOPULL {$$ = TrCreateLeafNode (PARSEOP_PIN_NOPULL);}
> - | PARSEOP_PIN_PULLDOWN {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLDOWN);}
> - | PARSEOP_PIN_PULLUP {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLUP);}
> - | PARSEOP_PIN_PULLDEFAULT {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLDEFAULT);}
> + : PARSEOP_PIN_NOPULL {$$ = TrCreateLeafOp (PARSEOP_PIN_NOPULL);}
> + | PARSEOP_PIN_PULLDOWN {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLDOWN);}
> + | PARSEOP_PIN_PULLUP {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLUP);}
> + | PARSEOP_PIN_PULLDEFAULT {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLDEFAULT);}
> ;
>
> PldKeyword
> - : PARSEOP_PLD_REVISION {$$ = TrCreateLeafNode (PARSEOP_PLD_REVISION);}
> - | PARSEOP_PLD_IGNORECOLOR {$$ = TrCreateLeafNode (PARSEOP_PLD_IGNORECOLOR);}
> - | PARSEOP_PLD_RED {$$ = TrCreateLeafNode (PARSEOP_PLD_RED);}
> - | PARSEOP_PLD_GREEN {$$ = TrCreateLeafNode (PARSEOP_PLD_GREEN);}
> - | PARSEOP_PLD_BLUE {$$ = TrCreateLeafNode (PARSEOP_PLD_BLUE);}
> - | PARSEOP_PLD_WIDTH {$$ = TrCreateLeafNode (PARSEOP_PLD_WIDTH);}
> - | PARSEOP_PLD_HEIGHT {$$ = TrCreateLeafNode (PARSEOP_PLD_HEIGHT);}
> - | PARSEOP_PLD_USERVISIBLE {$$ = TrCreateLeafNode (PARSEOP_PLD_USERVISIBLE);}
> - | PARSEOP_PLD_DOCK {$$ = TrCreateLeafNode (PARSEOP_PLD_DOCK);}
> - | PARSEOP_PLD_LID {$$ = TrCreateLeafNode (PARSEOP_PLD_LID);}
> - | PARSEOP_PLD_PANEL {$$ = TrCreateLeafNode (PARSEOP_PLD_PANEL);}
> - | PARSEOP_PLD_VERTICALPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_VERTICALPOSITION);}
> - | PARSEOP_PLD_HORIZONTALPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_HORIZONTALPOSITION);}
> - | PARSEOP_PLD_SHAPE {$$ = TrCreateLeafNode (PARSEOP_PLD_SHAPE);}
> - | PARSEOP_PLD_GROUPORIENTATION {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPORIENTATION);}
> - | PARSEOP_PLD_GROUPTOKEN {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPTOKEN);}
> - | PARSEOP_PLD_GROUPPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPPOSITION);}
> - | PARSEOP_PLD_BAY {$$ = TrCreateLeafNode (PARSEOP_PLD_BAY);}
> - | PARSEOP_PLD_EJECTABLE {$$ = TrCreateLeafNode (PARSEOP_PLD_EJECTABLE);}
> - | PARSEOP_PLD_EJECTREQUIRED {$$ = TrCreateLeafNode (PARSEOP_PLD_EJECTREQUIRED);}
> - | PARSEOP_PLD_CABINETNUMBER {$$ = TrCreateLeafNode (PARSEOP_PLD_CABINETNUMBER);}
> - | PARSEOP_PLD_CARDCAGENUMBER {$$ = TrCreateLeafNode (PARSEOP_PLD_CARDCAGENUMBER);}
> - | PARSEOP_PLD_REFERENCE {$$ = TrCreateLeafNode (PARSEOP_PLD_REFERENCE);}
> - | PARSEOP_PLD_ROTATION {$$ = TrCreateLeafNode (PARSEOP_PLD_ROTATION);}
> - | PARSEOP_PLD_ORDER {$$ = TrCreateLeafNode (PARSEOP_PLD_ORDER);}
> - | PARSEOP_PLD_RESERVED {$$ = TrCreateLeafNode (PARSEOP_PLD_RESERVED);}
> - | PARSEOP_PLD_VERTICALOFFSET {$$ = TrCreateLeafNode (PARSEOP_PLD_VERTICALOFFSET);}
> - | PARSEOP_PLD_HORIZONTALOFFSET {$$ = TrCreateLeafNode (PARSEOP_PLD_HORIZONTALOFFSET);}
> + : PARSEOP_PLD_REVISION {$$ = TrCreateLeafOp (PARSEOP_PLD_REVISION);}
> + | PARSEOP_PLD_IGNORECOLOR {$$ = TrCreateLeafOp (PARSEOP_PLD_IGNORECOLOR);}
> + | PARSEOP_PLD_RED {$$ = TrCreateLeafOp (PARSEOP_PLD_RED);}
> + | PARSEOP_PLD_GREEN {$$ = TrCreateLeafOp (PARSEOP_PLD_GREEN);}
> + | PARSEOP_PLD_BLUE {$$ = TrCreateLeafOp (PARSEOP_PLD_BLUE);}
> + | PARSEOP_PLD_WIDTH {$$ = TrCreateLeafOp (PARSEOP_PLD_WIDTH);}
> + | PARSEOP_PLD_HEIGHT {$$ = TrCreateLeafOp (PARSEOP_PLD_HEIGHT);}
> + | PARSEOP_PLD_USERVISIBLE {$$ = TrCreateLeafOp (PARSEOP_PLD_USERVISIBLE);}
> + | PARSEOP_PLD_DOCK {$$ = TrCreateLeafOp (PARSEOP_PLD_DOCK);}
> + | PARSEOP_PLD_LID {$$ = TrCreateLeafOp (PARSEOP_PLD_LID);}
> + | PARSEOP_PLD_PANEL {$$ = TrCreateLeafOp (PARSEOP_PLD_PANEL);}
> + | PARSEOP_PLD_VERTICALPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_VERTICALPOSITION);}
> + | PARSEOP_PLD_HORIZONTALPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_HORIZONTALPOSITION);}
> + | PARSEOP_PLD_SHAPE {$$ = TrCreateLeafOp (PARSEOP_PLD_SHAPE);}
> + | PARSEOP_PLD_GROUPORIENTATION {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPORIENTATION);}
> + | PARSEOP_PLD_GROUPTOKEN {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPTOKEN);}
> + | PARSEOP_PLD_GROUPPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPPOSITION);}
> + | PARSEOP_PLD_BAY {$$ = TrCreateLeafOp (PARSEOP_PLD_BAY);}
> + | PARSEOP_PLD_EJECTABLE {$$ = TrCreateLeafOp (PARSEOP_PLD_EJECTABLE);}
> + | PARSEOP_PLD_EJECTREQUIRED {$$ = TrCreateLeafOp (PARSEOP_PLD_EJECTREQUIRED);}
> + | PARSEOP_PLD_CABINETNUMBER {$$ = TrCreateLeafOp (PARSEOP_PLD_CABINETNUMBER);}
> + | PARSEOP_PLD_CARDCAGENUMBER {$$ = TrCreateLeafOp (PARSEOP_PLD_CARDCAGENUMBER);}
> + | PARSEOP_PLD_REFERENCE {$$ = TrCreateLeafOp (PARSEOP_PLD_REFERENCE);}
> + | PARSEOP_PLD_ROTATION {$$ = TrCreateLeafOp (PARSEOP_PLD_ROTATION);}
> + | PARSEOP_PLD_ORDER {$$ = TrCreateLeafOp (PARSEOP_PLD_ORDER);}
> + | PARSEOP_PLD_RESERVED {$$ = TrCreateLeafOp (PARSEOP_PLD_RESERVED);}
> + | PARSEOP_PLD_VERTICALOFFSET {$$ = TrCreateLeafOp (PARSEOP_PLD_VERTICALOFFSET);}
> + | PARSEOP_PLD_HORIZONTALOFFSET {$$ = TrCreateLeafOp (PARSEOP_PLD_HORIZONTALOFFSET);}
> ;
>
> RangeTypeKeyword
> - : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ISAONLY);}
> - | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_NONISAONLY);}
> - | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ENTIRE);}
> + : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_ISAONLY);}
> + | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_NONISAONLY);}
> + | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_ENTIRE);}
> ;
>
> RegionSpaceKeyword
> - : PARSEOP_REGIONSPACE_IO {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IO);}
> - | PARSEOP_REGIONSPACE_MEM {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_MEM);}
> - | PARSEOP_REGIONSPACE_PCI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCI);}
> - | PARSEOP_REGIONSPACE_EC {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_EC);}
> - | PARSEOP_REGIONSPACE_SMBUS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_SMBUS);}
> - | PARSEOP_REGIONSPACE_CMOS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_CMOS);}
> - | PARSEOP_REGIONSPACE_PCIBAR {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCIBAR);}
> - | PARSEOP_REGIONSPACE_IPMI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);}
> - | PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GPIO);}
> - | PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GSBUS);}
> - | PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCC);}
> - | PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_FFIXEDHW);}
> + : PARSEOP_REGIONSPACE_IO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_IO);}
> + | PARSEOP_REGIONSPACE_MEM {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_MEM);}
> + | PARSEOP_REGIONSPACE_PCI {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCI);}
> + | PARSEOP_REGIONSPACE_EC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_EC);}
> + | PARSEOP_REGIONSPACE_SMBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_SMBUS);}
> + | PARSEOP_REGIONSPACE_CMOS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_CMOS);}
> + | PARSEOP_REGIONSPACE_PCIBAR {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCIBAR);}
> + | PARSEOP_REGIONSPACE_IPMI {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_IPMI);}
> + | PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GPIO);}
> + | PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GSBUS);}
> + | PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCC);}
> + | PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_FFIXEDHW);}
> ;
>
> ResourceTypeKeyword
> - : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
> - | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_PRODUCER);}
> + : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafOp (PARSEOP_RESOURCETYPE_CONSUMER);}
> + | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafOp (PARSEOP_RESOURCETYPE_PRODUCER);}
> ;
>
> SerializeRuleKeyword
> - : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_SERIAL);}
> - | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL);}
> + : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafOp (PARSEOP_SERIALIZERULE_SERIAL);}
> + | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafOp (PARSEOP_SERIALIZERULE_NOTSERIAL);}
> ;
>
> ShareTypeKeyword
> - : PARSEOP_SHARETYPE_SHARED {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHARED);}
> - | PARSEOP_SHARETYPE_EXCLUSIVE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVE);}
> - | PARSEOP_SHARETYPE_SHAREDWAKE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHAREDWAKE);}
> - | PARSEOP_SHARETYPE_EXCLUSIVEWAKE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVEWAKE);}
> + : PARSEOP_SHARETYPE_SHARED {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_SHARED);}
> + | PARSEOP_SHARETYPE_EXCLUSIVE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_EXCLUSIVE);}
> + | PARSEOP_SHARETYPE_SHAREDWAKE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_SHAREDWAKE);}
> + | PARSEOP_SHARETYPE_EXCLUSIVEWAKE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_EXCLUSIVEWAKE);}
> ;
>
> SlaveModeKeyword
> - : PARSEOP_SLAVEMODE_CONTROLLERINIT {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_CONTROLLERINIT);}
> - | PARSEOP_SLAVEMODE_DEVICEINIT {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_DEVICEINIT);}
> + : PARSEOP_SLAVEMODE_CONTROLLERINIT {$$ = TrCreateLeafOp (PARSEOP_SLAVEMODE_CONTROLLERINIT);}
> + | PARSEOP_SLAVEMODE_DEVICEINIT {$$ = TrCreateLeafOp (PARSEOP_SLAVEMODE_DEVICEINIT);}
> ;
>
> StopBitsKeyword
> - : PARSEOP_STOPBITS_TWO {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_TWO);}
> - | PARSEOP_STOPBITS_ONEPLUSHALF {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ONEPLUSHALF);}
> - | PARSEOP_STOPBITS_ONE {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ONE);}
> - | PARSEOP_STOPBITS_ZERO {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ZERO);}
> + : PARSEOP_STOPBITS_TWO {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_TWO);}
> + | PARSEOP_STOPBITS_ONEPLUSHALF {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ONEPLUSHALF);}
> + | PARSEOP_STOPBITS_ONE {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ONE);}
> + | PARSEOP_STOPBITS_ZERO {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ZERO);}
> ;
>
> TranslationKeyword
> - : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_SPARSE);}
> - | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_DENSE);}
> + : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafOp (PARSEOP_TRANSLATIONTYPE_SPARSE);}
> + | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafOp (PARSEOP_TRANSLATIONTYPE_DENSE);}
> ;
>
> TypeKeyword
> - : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafNode (PARSEOP_TYPE_TRANSLATION);}
> - | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafNode (PARSEOP_TYPE_STATIC);}
> + : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafOp (PARSEOP_TYPE_TRANSLATION);}
> + | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafOp (PARSEOP_TYPE_STATIC);}
> ;
>
> UpdateRuleKeyword
> - : PARSEOP_UPDATERULE_PRESERVE {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_PRESERVE);}
> - | PARSEOP_UPDATERULE_ONES {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ONES);}
> - | PARSEOP_UPDATERULE_ZEROS {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ZEROS);}
> + : PARSEOP_UPDATERULE_PRESERVE {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_PRESERVE);}
> + | PARSEOP_UPDATERULE_ONES {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_ONES);}
> + | PARSEOP_UPDATERULE_ZEROS {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_ZEROS);}
> ;
>
> WireModeKeyword
> - : PARSEOP_WIREMODE_FOUR {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_FOUR);}
> - | PARSEOP_WIREMODE_THREE {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_THREE);}
> + : PARSEOP_WIREMODE_FOUR {$$ = TrCreateLeafOp (PARSEOP_WIREMODE_FOUR);}
> + | PARSEOP_WIREMODE_THREE {$$ = TrCreateLeafOp (PARSEOP_WIREMODE_THREE);}
> ;
>
> XferSizeKeyword
> - : PARSEOP_XFERSIZE_8 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_8, 0);}
> - | PARSEOP_XFERSIZE_16 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_16, 1);}
> - | PARSEOP_XFERSIZE_32 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);}
> - | PARSEOP_XFERSIZE_64 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_64, 3);}
> - | PARSEOP_XFERSIZE_128 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_128, 4);}
> - | PARSEOP_XFERSIZE_256 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_256, 5);}
> + : PARSEOP_XFERSIZE_8 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_8, 0);}
> + | PARSEOP_XFERSIZE_16 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_16, 1);}
> + | PARSEOP_XFERSIZE_32 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_32, 2);}
> + | PARSEOP_XFERSIZE_64 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_64, 3);}
> + | PARSEOP_XFERSIZE_128 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_128, 4);}
> + | PARSEOP_XFERSIZE_256 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_256, 5);}
> ;
>
> XferTypeKeyword
> - : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8);}
> - | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8_16);}
> - | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_16);}
> + : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_8);}
> + | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_8_16);}
> + | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_16);}
> ;
> diff --git a/src/acpica/source/compiler/asllength.c b/src/acpica/source/compiler/asllength.c
> index 58e69008..28ae2929 100644
> --- a/src/acpica/source/compiler/asllength.c
> +++ b/src/acpica/source/compiler/asllength.c
> @@ -338,7 +338,7 @@ CgGenerateAmlOpcodeLength (
> /* Does this opcode have an associated "PackageLength" field? */
>
> Op->Asl.AmlPkgLenBytes = 0;
> - if (Op->Asl.CompileFlags & NODE_AML_PACKAGE)
> + if (Op->Asl.CompileFlags & OP_AML_PACKAGE)
> {
> Op->Asl.AmlPkgLenBytes = CgGetPackageLenByteCount (
> Op, Op->Asl.AmlSubtreeLength);
> @@ -459,7 +459,7 @@ CgGenerateAmlLengths (
> case PARSEOP_NAMESTRING:
> case PARSEOP_METHODCALL:
>
> - if (Op->Asl.CompileFlags & NODE_NAME_INTERNALIZED)
> + if (Op->Asl.CompileFlags & OP_NAME_INTERNALIZED)
> {
> break;
> }
> @@ -475,7 +475,7 @@ CgGenerateAmlLengths (
>
> Op->Asl.ExternalName = Op->Asl.Value.String;
> Op->Asl.Value.String = Buffer;
> - Op->Asl.CompileFlags |= NODE_NAME_INTERNALIZED;
> + Op->Asl.CompileFlags |= OP_NAME_INTERNALIZED;
> Op->Asl.AmlLength = strlen (Buffer);
>
> /*
> diff --git a/src/acpica/source/compiler/asllisting.c b/src/acpica/source/compiler/asllisting.c
> index e8919d24..6fe01f49 100644
> --- a/src/acpica/source/compiler/asllisting.c
> +++ b/src/acpica/source/compiler/asllisting.c
> @@ -313,7 +313,7 @@ LsAmlListingWalk (
>
> LsWriteNodeToListing (Op, FileId);
>
> - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DATA)
> + if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DATA)
> {
> /* Buffer is a resource template, don't dump the data all at once */
>
> @@ -445,7 +445,7 @@ LsTreeWriteWalk (
> Op->Asl.LineNumber, Op->Asl.EndLine,
> Op->Asl.LogicalLineNumber, Op->Asl.EndLogicalLine);
>
> - TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
> + TrPrintOpFlags (Op->Asl.CompileFlags, ASL_TREE_OUTPUT);
> DbgPrint (ASL_TREE_OUTPUT, "\n");
> return (AE_OK);
> }
> @@ -616,7 +616,7 @@ LsWriteNodeToListing (
>
> case PARSEOP_DEFAULT_ARG:
>
> - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
> + if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
> {
> LsWriteSourceLines (Op->Asl.LineNumber, Op->Asl.EndLogicalLine,
> FileId);
> @@ -660,7 +660,7 @@ LsWriteNodeToListing (
>
> case AML_NAME_OP:
>
> - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
> + if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
> {
> LsWriteSourceLines (Op->Asl.LineNumber, Op->Asl.LogicalLineNumber,
> FileId);
> @@ -779,7 +779,7 @@ LsWriteNodeToListing (
> default:
>
> if ((Op->Asl.ParseOpcode == PARSEOP_BUFFER) &&
> - (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC))
> + (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC))
> {
> return;
> }
> diff --git a/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c
> index bd564b33..2c825f0f 100644
> --- a/src/acpica/source/compiler/aslload.c
> +++ b/src/acpica/source/compiler/aslload.c
> @@ -316,7 +316,8 @@ LdLoadFieldElements (
> return (Status);
> }
> else if (Status == AE_ALREADY_EXISTS &&
> - (Node->Flags & ANOBJ_IS_EXTERNAL))
> + (Node->Flags & ANOBJ_IS_EXTERNAL) &&
> + Node->OwnerId != WalkState->OwnerId)
> {
> Node->Type = (UINT8) ACPI_TYPE_LOCAL_REGION_FIELD;
> }
> @@ -564,7 +565,7 @@ LdNamespace1Begin (
> * a new scope so that the resource subfield names can be entered into
> * the namespace underneath this name
> */
> - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
> + if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
> {
> ForceNewScope = TRUE;
> }
> @@ -614,7 +615,7 @@ LdNamespace1Begin (
>
> case PARSEOP_DEFAULT_ARG:
>
> - if (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC)
> + if (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC)
> {
> Status = LdLoadResourceElements (Op, WalkState);
> return_ACPI_STATUS (Status);
> @@ -823,11 +824,16 @@ LdNamespace1Begin (
>
> Status = AE_OK;
>
> - if (Node->OwnerId == WalkState->OwnerId)
> + if (Node->OwnerId == WalkState->OwnerId &&
> + !(Node->Flags & IMPLICIT_EXTERNAL))
> {
> AslError (ASL_ERROR, ASL_MSG_NAME_EXISTS, Op,
> Op->Asl.ExternalName);
> }
> + if (Node->Flags & IMPLICIT_EXTERNAL)
> + {
> + Node->Flags &= ~IMPLICIT_EXTERNAL;
> + }
> }
> else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
> (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
> @@ -1000,7 +1006,7 @@ LdNamespace2Begin (
> /* Get the type to determine if we should push the scope */
>
> if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) &&
> - (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC))
> + (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC))
> {
> ObjectType = ACPI_TYPE_LOCAL_RESOURCE;
> }
> @@ -1013,7 +1019,7 @@ LdNamespace2Begin (
>
> if (Op->Asl.ParseOpcode == PARSEOP_NAME)
> {
> - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
> + if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
> {
> ForceNewScope = TRUE;
> }
> @@ -1124,7 +1130,7 @@ LdCommonNamespaceEnd (
> /* Get the type to determine if we should pop the scope */
>
> if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) &&
> - (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC))
> + (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC))
> {
> /* TBD: Merge into AcpiDsMapNamedOpcodeToDataType */
>
> @@ -1139,7 +1145,7 @@ LdCommonNamespaceEnd (
>
> if (Op->Asl.ParseOpcode == PARSEOP_NAME)
> {
> - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
> + if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
> {
> ForceNewScope = TRUE;
> }
> diff --git a/src/acpica/source/compiler/asllookup.c b/src/acpica/source/compiler/asllookup.c
> index 73157465..acec3024 100644
> --- a/src/acpica/source/compiler/asllookup.c
> +++ b/src/acpica/source/compiler/asllookup.c
> @@ -413,7 +413,7 @@ LkGetNameOp (
> /* Name must appear as the last parameter */
>
> NameOp = Op->Asl.Child;
> - while (!(NameOp->Asl.CompileFlags & NODE_IS_NAME_DECLARATION))
> + while (!(NameOp->Asl.CompileFlags & OP_IS_NAME_DECLARATION))
> {
> NameOp = NameOp->Asl.Next;
> }
> diff --git a/src/acpica/source/compiler/aslmap.c b/src/acpica/source/compiler/aslmap.c
> index aed87661..a51bd60f 100644
> --- a/src/acpica/source/compiler/aslmap.c
> +++ b/src/acpica/source/compiler/aslmap.c
> @@ -267,7 +267,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* ARG4 */ OP_TABLE_ENTRY (AML_ARG4, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
> /* ARG5 */ OP_TABLE_ENTRY (AML_ARG5, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
> /* ARG6 */ OP_TABLE_ENTRY (AML_ARG6, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
> -/* BANKFIELD */ OP_TABLE_ENTRY (AML_BANK_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
> +/* BANKFIELD */ OP_TABLE_ENTRY (AML_BANK_FIELD_OP, 0, OP_AML_PACKAGE, 0),
> /* BITSPERBYTE_EIGHT */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
> /* BITSPERBYTE_FIVE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* BITSPERBYTE_NINE */ OP_TABLE_ENTRY (AML_BYTE_OP, 4, 0, 0),
> @@ -275,7 +275,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* BITSPERBYTE_SIX */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* BREAK */ OP_TABLE_ENTRY (AML_BREAK_OP, 0, 0, 0),
> /* BREAKPOINT */ OP_TABLE_ENTRY (AML_BREAKPOINT_OP, 0, 0, 0),
> -/* BUFFER */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_BUFFER),
> +/* BUFFER */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_BUFFER),
> /* BUSMASTERTYPE_MASTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* BUSMASTERTYPE_NOTMASTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* BYTECONST */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, 0, 0, ACPI_BTYPE_INTEGER),
> @@ -306,7 +306,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* DEFAULT_ARG */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* DEFINITIONBLOCK */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* DEREFOF */ OP_TABLE_ENTRY (AML_DEREF_OF_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE | ACPI_BTYPE_STRING),
> -/* DEVICE */ OP_TABLE_ENTRY (AML_DEVICE_OP, 0, NODE_AML_PACKAGE, 0),
> +/* DEVICE */ OP_TABLE_ENTRY (AML_DEVICE_OP, 0, OP_AML_PACKAGE, 0),
> /* DEVICEPOLARITY_HIGH */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* DEVICEPOLARITY_LOW */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* DIVIDE */ OP_TABLE_ENTRY (AML_DIVIDE_OP, 0, 0, ACPI_BTYPE_INTEGER),
> @@ -320,8 +320,8 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* DWORDMEMORY */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* DWORDSPACE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* EISAID */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, 0, ACPI_BTYPE_INTEGER),
> -/* ELSE */ OP_TABLE_ENTRY (AML_ELSE_OP, 0, NODE_AML_PACKAGE, 0),
> -/* ELSEIF */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, NODE_AML_PACKAGE, 0),
> +/* ELSE */ OP_TABLE_ENTRY (AML_ELSE_OP, 0, OP_AML_PACKAGE, 0),
> +/* ELSEIF */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, OP_AML_PACKAGE, 0),
> /* ENDDEPENDENTFN */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* ENDIAN_BIG */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* ENDIAN_LITTLE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> @@ -333,7 +333,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* EXTENDEDSPACE */ OP_TABLE_ENTRY (AML_RAW_DATA_QWORD, 0, 0, ACPI_BTYPE_INTEGER),
> /* EXTERNAL */ OP_TABLE_ENTRY (AML_EXTERNAL_OP, 0, 0, 0),
> /* FATAL */ OP_TABLE_ENTRY (AML_FATAL_OP, 0, 0, 0),
> -/* FIELD */ OP_TABLE_ENTRY (AML_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
> +/* FIELD */ OP_TABLE_ENTRY (AML_FIELD_OP, 0, OP_AML_PACKAGE, 0),
> /* FINDSETLEFTBIT */ OP_TABLE_ENTRY (AML_FIND_SET_LEFT_BIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* FINDSETRIGHTBIT */ OP_TABLE_ENTRY (AML_FIND_SET_RIGHT_BIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* FIXEDDMA */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> @@ -342,17 +342,17 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* FLOWCONTROL_NONE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* FLOWCONTROL_SW */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
> /* FROMBCD */ OP_TABLE_ENTRY (AML_FROM_BCD_OP, 0, 0, ACPI_BTYPE_INTEGER),
> -/* FUNCTION */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, NODE_AML_PACKAGE, 0),
> +/* FUNCTION */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, OP_AML_PACKAGE, 0),
> /* GPIOINT */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* GPIOIO */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* I2CSERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* I2CSERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> -/* IF */ OP_TABLE_ENTRY (AML_IF_OP, 0, NODE_AML_PACKAGE, 0),
> +/* IF */ OP_TABLE_ENTRY (AML_IF_OP, 0, OP_AML_PACKAGE, 0),
> /* INCLUDE */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* INCLUDE_END */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* INCREMENT */ OP_TABLE_ENTRY (AML_INCREMENT_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* INDEX */ OP_TABLE_ENTRY (AML_INDEX_OP, 0, 0, ACPI_BTYPE_REFERENCE_OBJECT),
> -/* INDEXFIELD */ OP_TABLE_ENTRY (AML_INDEX_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
> +/* INDEXFIELD */ OP_TABLE_ENTRY (AML_INDEX_FIELD_OP, 0, OP_AML_PACKAGE, 0),
> /* INTEGER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* INTERRUPT */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* INTLEVEL_ACTIVEBOTH */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
> @@ -406,7 +406,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* MEMTYPE_NONCACHEABLE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* MEMTYPE_PREFETCHABLE */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
> /* MEMTYPE_WRITECOMBINING */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
> -/* METHOD */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, NODE_AML_PACKAGE, 0),
> +/* METHOD */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, OP_AML_PACKAGE, 0),
> /* METHODCALL */ OP_TABLE_ENTRY (AML_INT_METHODCALL_OP, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
> /* MID */ OP_TABLE_ENTRY (AML_MID_OP, 0, 0, ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER),
> /* MINTYPE_FIXED */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> @@ -444,8 +444,8 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* ONES */ OP_TABLE_ENTRY (AML_ONES_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* OPERATIONREGION */ OP_TABLE_ENTRY (AML_REGION_OP, 0, 0, 0),
> /* OR */ OP_TABLE_ENTRY (AML_BIT_OR_OP, 0, 0, ACPI_BTYPE_INTEGER),
> -/* PACKAGE */ OP_TABLE_ENTRY (AML_PACKAGE_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
> -/* PACKAGEP_LENGTH */ OP_TABLE_ENTRY (AML_PACKAGE_LENGTH, 0, NODE_AML_PACKAGE, 0),
> +/* PACKAGE */ OP_TABLE_ENTRY (AML_PACKAGE_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
> +/* PACKAGEP_LENGTH */ OP_TABLE_ENTRY (AML_PACKAGE_LENGTH, 0, OP_AML_PACKAGE, 0),
> /* PARITYTYPE_EVEN */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* PARITYTYPE_MARK */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
> /* PARITYTYPE_NONE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> @@ -460,8 +460,8 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* PIN_PULLDEFAULT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* PIN_PULLDOWN */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
> /* PIN_PULLUP */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> -/* POWERRESOURCE */ OP_TABLE_ENTRY (AML_POWER_RESOURCE_OP, 0, NODE_AML_PACKAGE, 0),
> -/* PROCESSOR */ OP_TABLE_ENTRY (AML_PROCESSOR_OP, 0, NODE_AML_PACKAGE, 0),
> +/* POWERRESOURCE */ OP_TABLE_ENTRY (AML_POWER_RESOURCE_OP, 0, OP_AML_PACKAGE, 0),
> +/* PROCESSOR */ OP_TABLE_ENTRY (AML_PROCESSOR_OP, 0, OP_AML_PACKAGE, 0),
> /* QWORDCONST */ OP_TABLE_ENTRY (AML_RAW_DATA_QWORD, 0, 0, ACPI_BTYPE_INTEGER),
> /* QWORDIO */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* QWORDMEMORY */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> @@ -494,7 +494,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* RESOURCETYPE_PRODUCER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* RETURN */ OP_TABLE_ENTRY (AML_RETURN_OP, 0, 0, 0),
> /* REVISION */ OP_TABLE_ENTRY (AML_REVISION_OP, 0, 0, ACPI_BTYPE_INTEGER),
> -/* SCOPE */ OP_TABLE_ENTRY (AML_SCOPE_OP, 0, NODE_AML_PACKAGE, 0),
> +/* SCOPE */ OP_TABLE_ENTRY (AML_SCOPE_OP, 0, OP_AML_PACKAGE, 0),
> /* SERIALIZERULE_NOTSERIAL */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* SERIALIZERULE_SERIAL */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* SHARETYPE_EXCLUSIVE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> @@ -521,7 +521,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* STRING_LITERAL */ OP_TABLE_ENTRY (AML_STRING_OP, 0, 0, ACPI_BTYPE_STRING),
> /* SUBTRACT */ OP_TABLE_ENTRY (AML_SUBTRACT_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* SWITCH */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> -/* THERMALZONE */ OP_TABLE_ENTRY (AML_THERMAL_ZONE_OP, 0, NODE_AML_PACKAGE, 0),
> +/* THERMALZONE */ OP_TABLE_ENTRY (AML_THERMAL_ZONE_OP, 0, OP_AML_PACKAGE, 0),
> /* TIMER */ OP_TABLE_ENTRY (AML_TIMER_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* TOBCD */ OP_TABLE_ENTRY (AML_TO_BCD_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* TOBUFFER */ OP_TABLE_ENTRY (AML_TO_BUFFER_OP, 0, 0, ACPI_BTYPE_BUFFER),
> @@ -529,23 +529,23 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* TOHEXSTRING */ OP_TABLE_ENTRY (AML_TO_HEX_STRING_OP, 0, 0, ACPI_BTYPE_STRING),
> /* TOINTEGER */ OP_TABLE_ENTRY (AML_TO_INTEGER_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* TOSTRING */ OP_TABLE_ENTRY (AML_TO_STRING_OP, 0, 0, ACPI_BTYPE_STRING),
> -/* TOUUID */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_INTEGER),
> +/* TOUUID */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_INTEGER),
> /* TRANSLATIONTYPE_DENSE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* TRANSLATIONTYPE_SPARSE */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* TYPE_STATIC */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* TYPE_TRANSLATION */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* UART_SERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> /* UART_SERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> -/* UNICODE */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, NODE_AML_PACKAGE, 0),
> +/* UNICODE */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, OP_AML_PACKAGE, 0),
> /* UNLOAD */ OP_TABLE_ENTRY (AML_UNLOAD_OP, 0, 0, 0),
> /* UPDATERULE_ONES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ONES, 0, 0),
> /* UPDATERULE_PRESERVE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_PRESERVE, 0, 0),
> /* UPDATERULE_ZEROS */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ZEROS,0, 0),
> -/* VARIABLE_PACKAGE */ OP_TABLE_ENTRY (AML_VARIABLE_PACKAGE_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
> +/* VARIABLE_PACKAGE */ OP_TABLE_ENTRY (AML_VARIABLE_PACKAGE_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
> /* VENDORLONG */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* VENDORSHORT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* WAIT */ OP_TABLE_ENTRY (AML_WAIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
> -/* WHILE */ OP_TABLE_ENTRY (AML_WHILE_OP, 0, NODE_AML_PACKAGE, 0),
> +/* WHILE */ OP_TABLE_ENTRY (AML_WHILE_OP, 0, OP_AML_PACKAGE, 0),
> /* WIREMODE_FOUR */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* WIREMODE_THREE */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
> /* WORDBUSNUMBER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> @@ -563,7 +563,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* XFERTYPE_16 */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
> /* XOR */ OP_TABLE_ENTRY (AML_BIT_XOR_OP, 0, 0, ACPI_BTYPE_INTEGER),
> /* ZERO */ OP_TABLE_ENTRY (AML_ZERO_OP, 0, 0, ACPI_BTYPE_INTEGER),
> -/* TOPLD */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_INTEGER),
> +/* TOPLD */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_INTEGER),
> /* XFERSIZE_128 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* REVISION */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* IGNORECOLOR */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> diff --git a/src/acpica/source/compiler/aslmapoutput.c b/src/acpica/source/compiler/aslmapoutput.c
> index de5dc1c6..5fdb54cd 100644
> --- a/src/acpica/source/compiler/aslmapoutput.c
> +++ b/src/acpica/source/compiler/aslmapoutput.c
> @@ -685,7 +685,7 @@ MpNamespaceXrefBegin (
> * are references to other objects within the namespace and the
> * parent objects of name declarations
> */
> - if (Op->Asl.CompileFlags & NODE_IS_NAME_DECLARATION)
> + if (Op->Asl.CompileFlags & OP_IS_NAME_DECLARATION)
> {
> return (AE_OK);
> }
> diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
> index 2b313997..9734b643 100644
> --- a/src/acpica/source/compiler/aslmethod.c
> +++ b/src/acpica/source/compiler/aslmethod.c
> @@ -380,7 +380,7 @@ MtMethodAnalysisWalkBegin (
> * If the local is being used as a target, mark the local
> * initialized
> */
> - if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> + if (Op->Asl.CompileFlags & OP_IS_TARGET)
> {
> MethodInfo->LocalInitialized[RegisterNumber] = TRUE;
> }
> @@ -425,7 +425,7 @@ MtMethodAnalysisWalkBegin (
> * If the Arg is being used as a target, mark the local
> * initialized
> */
> - if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> + if (Op->Asl.CompileFlags & OP_IS_TARGET)
> {
> MethodInfo->ArgInitialized[RegisterNumber] = TRUE;
> }
> @@ -464,7 +464,7 @@ MtMethodAnalysisWalkBegin (
>
> /*
> * A child indicates a possible return value. A simple Return or
> - * Return() is marked with NODE_IS_NULL_RETURN by the parser so
> + * Return() is marked with OP_IS_NULL_RETURN by the parser so
> * that it is not counted as a "real" return-with-value, although
> * the AML code that is actually emitted is Return(0). The AML
> * definition of Return has a required parameter, so we are
> @@ -472,7 +472,7 @@ MtMethodAnalysisWalkBegin (
> */
> if ((Op->Asl.Child) &&
> (Op->Asl.Child->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG) &&
> - (!(Op->Asl.Child->Asl.CompileFlags & NODE_IS_NULL_RETURN)))
> + (!(Op->Asl.Child->Asl.CompileFlags & OP_IS_NULL_RETURN)))
> {
> MethodInfo->NumReturnWithValue++;
> }
> @@ -704,7 +704,7 @@ MtMethodAnalysisWalkEnd (
> * of the method can possibly terminate without a return statement.
> */
> if ((!AnLastStatementIsReturn (Op)) &&
> - (!(Op->Asl.CompileFlags & NODE_HAS_NO_EXIT)))
> + (!(Op->Asl.CompileFlags & OP_HAS_NO_EXIT)))
> {
> /*
> * No return statement, and execution can possibly exit
> @@ -736,11 +736,11 @@ MtMethodAnalysisWalkEnd (
> {
> if (MethodInfo->NumReturnWithValue)
> {
> - Op->Asl.CompileFlags |= NODE_METHOD_SOME_NO_RETVAL;
> + Op->Asl.CompileFlags |= OP_METHOD_SOME_NO_RETVAL;
> }
> else
> {
> - Op->Asl.CompileFlags |= NODE_METHOD_NO_RETVAL;
> + Op->Asl.CompileFlags |= OP_METHOD_NO_RETVAL;
> }
> }
>
> @@ -784,7 +784,7 @@ MtMethodAnalysisWalkEnd (
> * The parent block does not "exit" and continue execution -- the
> * method is terminated here with the Return() statement.
> */
> - Op->Asl.Parent->Asl.CompileFlags |= NODE_HAS_NO_EXIT;
> + Op->Asl.Parent->Asl.CompileFlags |= OP_HAS_NO_EXIT;
>
> /* Used in the "typing" pass later */
>
> @@ -804,7 +804,7 @@ MtMethodAnalysisWalkEnd (
>
> case PARSEOP_IF:
>
> - if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
> + if ((Op->Asl.CompileFlags & OP_HAS_NO_EXIT) &&
> (Op->Asl.Next) &&
> (Op->Asl.Next->Asl.ParseOpcode == PARSEOP_ELSE))
> {
> @@ -813,32 +813,32 @@ MtMethodAnalysisWalkEnd (
> * (it contains an unconditional Return)
> * mark the ELSE block to remember this fact.
> */
> - Op->Asl.Next->Asl.CompileFlags |= NODE_IF_HAS_NO_EXIT;
> + Op->Asl.Next->Asl.CompileFlags |= OP_IF_HAS_NO_EXIT;
> }
> break;
>
> case PARSEOP_ELSE:
>
> - if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
> - (Op->Asl.CompileFlags & NODE_IF_HAS_NO_EXIT))
> + if ((Op->Asl.CompileFlags & OP_HAS_NO_EXIT) &&
> + (Op->Asl.CompileFlags & OP_IF_HAS_NO_EXIT))
> {
> /*
> * This ELSE block has no exit and the corresponding IF block
> * has no exit either. Therefore, the parent node has no exit.
> */
> - Op->Asl.Parent->Asl.CompileFlags |= NODE_HAS_NO_EXIT;
> + Op->Asl.Parent->Asl.CompileFlags |= OP_HAS_NO_EXIT;
> }
> break;
>
>
> default:
>
> - if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
> + if ((Op->Asl.CompileFlags & OP_HAS_NO_EXIT) &&
> (Op->Asl.Parent))
> {
> /* If this node has no exit, then the parent has no exit either */
>
> - Op->Asl.Parent->Asl.CompileFlags |= NODE_HAS_NO_EXIT;
> + Op->Asl.Parent->Asl.CompileFlags |= OP_HAS_NO_EXIT;
> }
> break;
> }
> diff --git a/src/acpica/source/compiler/asloffset.c b/src/acpica/source/compiler/asloffset.c
> index 0964d4fe..c57c1261 100644
> --- a/src/acpica/source/compiler/asloffset.c
> +++ b/src/acpica/source/compiler/asloffset.c
> @@ -211,7 +211,7 @@ LsAmlOffsetWalk (
>
> /* Ignore actual data blocks for resource descriptors */
>
> - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DATA)
> + if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DATA)
> {
> return (AE_OK); /* Do NOT update the global AML offset */
> }
> @@ -228,7 +228,7 @@ LsAmlOffsetWalk (
> /* Named resource descriptor (has a descriptor tag) */
>
> if ((Node->Type == ACPI_TYPE_LOCAL_RESOURCE) &&
> - (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC))
> + (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC))
> {
> LsEmitOffsetTableEntry (FileId, Node, 0, Gbl_CurrentAmlOffset,
> Op->Asl.ParseOpName, 0, Op->Asl.Extra, AML_BUFFER_OP);
> diff --git a/src/acpica/source/compiler/aslopcodes.c b/src/acpica/source/compiler/aslopcodes.c
> index 74d1ecef..1fffc1e7 100644
> --- a/src/acpica/source/compiler/aslopcodes.c
> +++ b/src/acpica/source/compiler/aslopcodes.c
> @@ -550,7 +550,7 @@ OpcDoConnection (
> */
> BufferOp->Asl.ParseOpcode = PARSEOP_BUFFER;
> BufferOp->Asl.AmlOpcode = AML_BUFFER_OP;
> - BufferOp->Asl.CompileFlags = NODE_AML_PACKAGE | NODE_IS_RESOURCE_DESC;
> + BufferOp->Asl.CompileFlags = OP_AML_PACKAGE | OP_IS_RESOURCE_DESC;
> UtSetParseOpName (BufferOp);
>
> BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
> @@ -598,7 +598,7 @@ OpcDoUnicode (
>
> /* Change op into a buffer object */
>
> - Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
> + Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
> Op->Asl.ParseOpcode = PARSEOP_BUFFER;
> UtSetParseOpName (Op);
>
> @@ -756,7 +756,7 @@ OpcDoEisaId (
> */
> Op->Asl.Value.Integer = EisaId;
>
> - Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
> + Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
> Op->Asl.ParseOpcode = PARSEOP_INTEGER;
> (void) OpcSetOptimalIntegerSize (Op);
>
> @@ -808,12 +808,12 @@ OpcDoUuId (
>
> /* Disable further optimization */
>
> - Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
> + Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
> UtSetParseOpName (Op);
>
> /* Child node is the buffer length */
>
> - NewOp = TrAllocateNode (PARSEOP_INTEGER);
> + NewOp = TrAllocateOp (PARSEOP_INTEGER);
>
> NewOp->Asl.AmlOpcode = AML_BYTE_OP;
> NewOp->Asl.Value.Integer = 16;
> @@ -824,7 +824,7 @@ OpcDoUuId (
>
> /* Peer to the child is the raw buffer data */
>
> - NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
> + NewOp = TrAllocateOp (PARSEOP_RAW_DATA);
> NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
> NewOp->Asl.AmlLength = 16;
> NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
> diff --git a/src/acpica/source/compiler/aslopt.c b/src/acpica/source/compiler/aslopt.c
> index d5908ab8..79e41da2 100644
> --- a/src/acpica/source/compiler/aslopt.c
> +++ b/src/acpica/source/compiler/aslopt.c
> @@ -699,7 +699,7 @@ OptOptimizeNamePath (
>
> if (!(Flags & (AML_NAMED | AML_CREATE)))
> {
> - if (Op->Asl.CompileFlags & NODE_IS_NAME_DECLARATION)
> + if (Op->Asl.CompileFlags & OP_IS_NAME_DECLARATION)
> {
> /* We don't want to fuss with actual name declaration nodes here */
>
> @@ -893,7 +893,7 @@ OptOptimizeNamePath (
> /* Name must appear as the last parameter */
>
> NextOp = Op->Asl.Child;
> - while (!(NextOp->Asl.CompileFlags & NODE_IS_NAME_DECLARATION))
> + while (!(NextOp->Asl.CompileFlags & OP_IS_NAME_DECLARATION))
> {
> NextOp = NextOp->Asl.Next;
> }
> diff --git a/src/acpica/source/compiler/aslparseop.c b/src/acpica/source/compiler/aslparseop.c
> new file mode 100644
> index 00000000..4e6e5a16
> --- /dev/null
> +++ b/src/acpica/source/compiler/aslparseop.c
> @@ -0,0 +1,945 @@
> +/******************************************************************************
> + *
> + * Module Name: aslparseop - Parse op create/allocate/cache interfaces
> + *
> + *****************************************************************************/
> +
> +/******************************************************************************
> + *
> + * 1. Copyright Notice
> + *
> + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
> + * All rights reserved.
> + *
> + * 2. License
> + *
> + * 2.1. This is your license from Intel Corp. under its intellectual property
> + * rights. You may have additional license terms from the party that provided
> + * you this software, covering your right to use that party's intellectual
> + * property rights.
> + *
> + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
> + * copy of the source code appearing in this file ("Covered Code") an
> + * irrevocable, perpetual, worldwide license under Intel's copyrights in the
> + * base code distributed originally by Intel ("Original Intel Code") to copy,
> + * make derivatives, distribute, use and display any portion of the Covered
> + * Code in any form, with the right to sublicense such rights; and
> + *
> + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
> + * license (with the right to sublicense), under only those claims of Intel
> + * patents that are infringed by the Original Intel Code, to make, use, sell,
> + * offer to sell, and import the Covered Code and derivative works thereof
> + * solely to the minimum extent necessary to exercise the above copyright
> + * license, and in no event shall the patent license extend to any additions
> + * to or modifications of the Original Intel Code. No other license or right
> + * is granted directly or by implication, estoppel or otherwise;
> + *
> + * The above copyright and patent license is granted only if the following
> + * conditions are met:
> + *
> + * 3. Conditions
> + *
> + * 3.1. Redistribution of Source with Rights to Further Distribute Source.
> + * Redistribution of source code of any substantial portion of the Covered
> + * Code or modification with rights to further distribute source must include
> + * the above Copyright Notice, the above License, this list of Conditions,
> + * and the following Disclaimer and Export Compliance provision. In addition,
> + * Licensee must cause all Covered Code to which Licensee contributes to
> + * contain a file documenting the changes Licensee made to create that Covered
> + * Code and the date of any change. Licensee must include in that file the
> + * documentation of any changes made by any predecessor Licensee. Licensee
> + * must include a prominent statement that the modification is derived,
> + * directly or indirectly, from Original Intel Code.
> + *
> + * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
> + * Redistribution of source code of any substantial portion of the Covered
> + * Code or modification without rights to further distribute source must
> + * include the following Disclaimer and Export Compliance provision in the
> + * documentation and/or other materials provided with distribution. In
> + * addition, Licensee may not authorize further sublicense of source of any
> + * portion of the Covered Code, and must include terms to the effect that the
> + * license from Licensee to its licensee is limited to the intellectual
> + * property embodied in the software Licensee provides to its licensee, and
> + * not to intellectual property embodied in modifications its licensee may
> + * make.
> + *
> + * 3.3. Redistribution of Executable. Redistribution in executable form of any
> + * substantial portion of the Covered Code or modification must reproduce the
> + * above Copyright Notice, and the following Disclaimer and Export Compliance
> + * provision in the documentation and/or other materials provided with the
> + * distribution.
> + *
> + * 3.4. Intel retains all right, title, and interest in and to the Original
> + * Intel Code.
> + *
> + * 3.5. Neither the name Intel nor any other trademark owned or controlled by
> + * Intel shall be used in advertising or otherwise to promote the sale, use or
> + * other dealings in products derived from or relating to the Covered Code
> + * without prior written authorization from Intel.
> + *
> + * 4. Disclaimer and Export Compliance
> + *
> + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
> + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
> + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
> + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
> + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
> + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
> + * PARTICULAR PURPOSE.
> + *
> + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
> + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
> + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
> + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
> + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
> + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
> + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
> + * LIMITED REMEDY.
> + *
> + * 4.3. Licensee shall not export, either directly or indirectly, any of this
> + * software or system incorporating such software without first obtaining any
> + * required license or other approval from the U. S. Department of Commerce or
> + * any other agency or department of the United States Government. In the
> + * event Licensee exports any such software from the United States or
> + * re-exports any such software from a foreign destination, Licensee shall
> + * ensure that the distribution and export/re-export of the software is in
> + * compliance with all laws, regulations, orders, or other restrictions of the
> + * U.S. Export Administration Regulations. Licensee agrees that neither it nor
> + * any of its subsidiaries will export/re-export any technical data, process,
> + * software, or service, directly or indirectly, to any country for which the
> + * United States government or any agency thereof requires an export license,
> + * other governmental approval, or letter of assurance, without first obtaining
> + * such license, approval or letter.
> + *
> + *****************************************************************************
> + *
> + * Alternatively, you may choose to be licensed under the terms of the
> + * following license:
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + * notice, this list of conditions, and the following disclaimer,
> + * without modification.
> + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
> + * substantially similar to the "NO WARRANTY" disclaimer below
> + * ("Disclaimer") and any redistribution must be conditioned upon
> + * including a substantially similar Disclaimer requirement for further
> + * binary redistribution.
> + * 3. Neither the names of the above-listed copyright holders nor the names
> + * of any contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + *
> + * Alternatively, you may choose to be licensed under the terms of the
> + * GNU General Public License ("GPL") version 2 as published by the Free
> + * Software Foundation.
> + *
> + *****************************************************************************/
> +
> +#include "aslcompiler.h"
> +#include "aslcompiler.y.h"
> +#include "acapps.h"
> +#include "acconvert.h"
> +
> +#define _COMPONENT ACPI_COMPILER
> + ACPI_MODULE_NAME ("aslparseop")
> +
> +
> +/* Local prototypes */
> +
> +static ACPI_PARSE_OBJECT *
> +TrGetOpFromCache (
> + void);
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrCreateOp
> + *
> + * PARAMETERS: ParseOpcode - Opcode to be assigned to the op
> + * NumChildren - Number of children to follow
> + * ... - A list of child ops to link to the new
> + * op. NumChildren long.
> + *
> + * RETURN: Pointer to the new op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Create a new parse op and link together a list of child
> + * ops underneath the new op.
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrCreateOp (
> + UINT32 ParseOpcode,
> + UINT32 NumChildren,
> + ...)
> +{
> + ACPI_PARSE_OBJECT *Op;
> + ACPI_PARSE_OBJECT *Child;
> + ACPI_PARSE_OBJECT *PrevChild;
> + va_list ap;
> + UINT32 i;
> + BOOLEAN FirstChild;
> +
> +
> + va_start (ap, NumChildren);
> +
> + /* Allocate one new op */
> +
> + Op = TrAllocateOp (ParseOpcode);
> +
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nCreateOp Ln/Col %u/%u NewParent %p Child %u Op %s ",
> + Op->Asl.LineNumber, Op->Asl.Column, Op,
> + NumChildren, UtGetOpName(ParseOpcode));
> +
> + /* Some extra debug output based on the parse opcode */
> +
> + switch (ParseOpcode)
> + {
> + case PARSEOP_ASL_CODE:
> +
> + Gbl_ParseTreeRoot = Op;
> + Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
> + DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
> + break;
> +
> + case PARSEOP_DEFINITION_BLOCK:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
> + break;
> +
> + case PARSEOP_OPERATIONREGION:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
> + break;
> +
> + case PARSEOP_OR:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "OR->");
> + break;
> +
> + default:
> +
> + /* Nothing to do for other opcodes */
> +
> + break;
> + }
> +
> + /* Link the new op to its children */
> +
> + PrevChild = NULL;
> + FirstChild = TRUE;
> + for (i = 0; i < NumChildren; i++)
> + {
> + /* Get the next child */
> +
> + Child = va_arg (ap, ACPI_PARSE_OBJECT *);
> + DbgPrint (ASL_PARSE_OUTPUT, "%p, ", Child);
> +
> + /*
> + * If child is NULL, this means that an optional argument
> + * was omitted. We must create a placeholder with a special
> + * opcode (DEFAULT_ARG) so that the code generator will know
> + * that it must emit the correct default for this argument
> + */
> + if (!Child)
> + {
> + Child = TrAllocateOp (PARSEOP_DEFAULT_ARG);
> + }
> +
> + /* Link first child to parent */
> +
> + if (FirstChild)
> + {
> + FirstChild = FALSE;
> + Op->Asl.Child = Child;
> +
> + /*
> + * For the ASL-/ASL+ converter: if the ParseOp is a Connection,
> + * External, Offset or AccessAs, it means that the comments in the
> + * FirstChild belongs to their parent due to the parsing order in
> + * the .y files. To correct this, take the comments in the
> + * FirstChild place it in the parent. This also means that
> + * legitimate comments for the child gets put to the parent.
> + */
> + if (Gbl_CaptureComments &&
> + ((ParseOpcode == PARSEOP_CONNECTION) ||
> + (ParseOpcode == PARSEOP_EXTERNAL) ||
> + (ParseOpcode == PARSEOP_OFFSET) ||
> + (ParseOpcode == PARSEOP_ACCESSAS)))
> + {
> + Op->Asl.CommentList = Child->Asl.CommentList;
> + Op->Asl.EndBlkComment = Child->Asl.EndBlkComment;
> + Op->Asl.InlineComment = Child->Asl.InlineComment;
> + Op->Asl.FileChanged = Child->Asl.FileChanged;
> +
> + Child->Asl.CommentList = NULL;
> + Child->Asl.EndBlkComment = NULL;
> + Child->Asl.InlineComment = NULL;
> + Child->Asl.FileChanged = FALSE;
> +
> + /*
> + * These do not need to be "passed off". They can be copied
> + * because the code for these opcodes should be printed in the
> + * same file.
> + */
> + Op->Asl.Filename = Child->Asl.Filename;
> + Op->Asl.ParentFilename = Child->Asl.ParentFilename;
> + }
> + }
> +
> + /* Point all children to parent */
> +
> + Child->Asl.Parent = Op;
> +
> + /* Link children in a peer list */
> +
> + if (PrevChild)
> + {
> + PrevChild->Asl.Next = Child;
> + };
> +
> + /* Get the comment from last child in the resource template call */
> +
> + if (Gbl_CaptureComments &&
> + (Op->Asl.ParseOpcode == PARSEOP_RESOURCETEMPLATE))
> + {
> + CvDbgPrint ("Transferred current comment list to this op.\n");
> + Op->Asl.CommentList = Child->Asl.CommentList;
> + Child->Asl.CommentList = NULL;
> +
> + Op->Asl.InlineComment = Child->Asl.InlineComment;
> + Child->Asl.InlineComment = NULL;
> + }
> +
> + /*
> + * This child might be a list, point all ops in the list
> + * to the same parent
> + */
> + while (Child->Asl.Next)
> + {
> + Child = Child->Asl.Next;
> + Child->Asl.Parent = Op;
> + }
> +
> + PrevChild = Child;
> + }
> +
> + va_end(ap);
> + DbgPrint (ASL_PARSE_OUTPUT, "\n");
> + return (Op);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrCreateLeafOp
> + *
> + * PARAMETERS: ParseOpcode - New opcode to be assigned to the op
> + *
> + * RETURN: Pointer to the new op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Create a simple leaf op (no children or peers, and no value
> + * assigned to the op)
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrCreateLeafOp (
> + UINT32 ParseOpcode)
> +{
> + ACPI_PARSE_OBJECT *Op;
> +
> +
> + Op = TrAllocateOp (ParseOpcode);
> +
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nCreateLeafOp Ln/Col %u/%u NewOp %p Op %s\n\n",
> + Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode));
> +
> + return (Op);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrCreateValuedLeafOp
> + *
> + * PARAMETERS: ParseOpcode - New opcode to be assigned to the op
> + * Value - Value to be assigned to the op
> + *
> + * RETURN: Pointer to the new op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Create a leaf op (no children or peers) with a value
> + * assigned to it
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrCreateValuedLeafOp (
> + UINT32 ParseOpcode,
> + UINT64 Value)
> +{
> + ACPI_PARSE_OBJECT *Op;
> +
> +
> + Op = TrAllocateOp (ParseOpcode);
> + Op->Asl.Value.Integer = Value;
> +
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nCreateValuedLeafOp Ln/Col %u/%u NewOp %p "
> + "Op %s Value %8.8X%8.8X ",
> + Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode),
> + ACPI_FORMAT_UINT64 (Value));
> +
> + switch (ParseOpcode)
> + {
> + case PARSEOP_STRING_LITERAL:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
> + break;
> +
> + case PARSEOP_NAMESEG:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
> + break;
> +
> + case PARSEOP_NAMESTRING:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
> + break;
> +
> + case PARSEOP_EISAID:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
> + break;
> +
> + case PARSEOP_METHOD:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "METHOD");
> + break;
> +
> + case PARSEOP_INTEGER:
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "INTEGER->%8.8X%8.8X",
> + ACPI_FORMAT_UINT64 (Value));
> + break;
> +
> + default:
> + break;
> + }
> +
> + DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
> + return (Op);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrCreateTargetOp
> + *
> + * PARAMETERS: OriginalOp - Op to be copied
> + *
> + * RETURN: Pointer to the new op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Copy an existing op (and subtree). Used in ASL+ (C-style)
> + * expressions where the target is the same as one of the
> + * operands. A new op and subtree must be created from the
> + * original so that the parse tree can be linked properly.
> + *
> + * NOTE: This code is specific to target operands that are the last
> + * operand in an ASL/AML operator. Meaning that the top-level
> + * parse Op in a possible subtree has a NULL Next pointer.
> + * This simplifies the recursion.
> + *
> + * Subtree example:
> + * DeRefOf (Local1) += 32
> + *
> + * This gets converted to:
> + * Add (DeRefOf (Local1), 32, DeRefOf (Local1))
> + *
> + * Each DeRefOf has a single child, Local1. Even more complex
> + * subtrees can be created via the Index and DeRefOf operators.
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrCreateTargetOp (
> + ACPI_PARSE_OBJECT *OriginalOp,
> + ACPI_PARSE_OBJECT *ParentOp)
> +{
> + ACPI_PARSE_OBJECT *Op;
> +
> +
> + if (!OriginalOp)
> + {
> + return (NULL);
> + }
> +
> + Op = TrGetOpFromCache ();
> +
> + /* Copy the pertinent values (omit link pointer fields) */
> +
> + Op->Asl.Value = OriginalOp->Asl.Value;
> + Op->Asl.Filename = OriginalOp->Asl.Filename;
> + Op->Asl.LineNumber = OriginalOp->Asl.LineNumber;
> + Op->Asl.LogicalLineNumber = OriginalOp->Asl.LogicalLineNumber;
> + Op->Asl.LogicalByteOffset = OriginalOp->Asl.LogicalByteOffset;
> + Op->Asl.Column = OriginalOp->Asl.Column;
> + Op->Asl.Flags = OriginalOp->Asl.Flags;
> + Op->Asl.CompileFlags = OriginalOp->Asl.CompileFlags;
> + Op->Asl.AmlOpcode = OriginalOp->Asl.AmlOpcode;
> + Op->Asl.ParseOpcode = OriginalOp->Asl.ParseOpcode;
> + Op->Asl.Parent = ParentOp;
> +
> + UtSetParseOpName (Op);
> +
> + /* Copy a possible subtree below this op */
> +
> + if (OriginalOp->Asl.Child)
> + {
> + Op->Asl.Child = TrCreateTargetOp (OriginalOp->Asl.Child, Op);
> + }
> +
> + if (OriginalOp->Asl.Next) /* Null for top-level op */
> + {
> + Op->Asl.Next = TrCreateTargetOp (OriginalOp->Asl.Next, ParentOp);
> + }
> +
> + return (Op);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrCreateAssignmentOp
> + *
> + * PARAMETERS: Target - Assignment target
> + * Source - Assignment source
> + *
> + * RETURN: Pointer to the new op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Implements the C-style '=' operator. It changes the parse
> + * tree if possible to utilize the last argument of the math
> + * operators which is a target operand -- thus saving invocation
> + * of and additional Store() operator. An optimization.
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrCreateAssignmentOp (
> + ACPI_PARSE_OBJECT *Target,
> + ACPI_PARSE_OBJECT *Source)
> +{
> + ACPI_PARSE_OBJECT *TargetOp;
> + ACPI_PARSE_OBJECT *SourceOp1;
> + ACPI_PARSE_OBJECT *SourceOp2;
> + ACPI_PARSE_OBJECT *Operator;
> +
> +
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nTrCreateAssignmentOp Line [%u to %u] Source %s Target %s\n",
> + Source->Asl.LineNumber, Source->Asl.EndLine,
> + UtGetOpName (Source->Asl.ParseOpcode),
> + UtGetOpName (Target->Asl.ParseOpcode));
> +
> + TrSetOpFlags (Target, OP_IS_TARGET);
> +
> + switch (Source->Asl.ParseOpcode)
> + {
> + /*
> + * Only these operators can be optimized because they have
> + * a target operand
> + */
> + case PARSEOP_ADD:
> + case PARSEOP_AND:
> + case PARSEOP_DIVIDE:
> + case PARSEOP_INDEX:
> + case PARSEOP_MOD:
> + case PARSEOP_MULTIPLY:
> + case PARSEOP_NOT:
> + case PARSEOP_OR:
> + case PARSEOP_SHIFTLEFT:
> + case PARSEOP_SHIFTRIGHT:
> + case PARSEOP_SUBTRACT:
> + case PARSEOP_XOR:
> +
> + break;
> +
> + /* Otherwise, just create a normal Store operator */
> +
> + default:
> + goto CannotOptimize;
> + }
> +
> + /*
> + * Transform the parse tree such that the target is moved to the
> + * last operand of the operator
> + */
> + SourceOp1 = Source->Asl.Child;
> + SourceOp2 = SourceOp1->Asl.Next;
> +
> + /* NOT only has one operand, but has a target */
> +
> + if (Source->Asl.ParseOpcode == PARSEOP_NOT)
> + {
> + SourceOp2 = SourceOp1;
> + }
> +
> + /* DIVIDE has an extra target operand (remainder) */
> +
> + if (Source->Asl.ParseOpcode == PARSEOP_DIVIDE)
> + {
> + SourceOp2 = SourceOp2->Asl.Next;
> + }
> +
> + TargetOp = SourceOp2->Asl.Next;
> +
> + /*
> + * Can't perform this optimization if there already is a target
> + * for the operator (ZERO is a "no target" placeholder).
> + */
> + if (TargetOp->Asl.ParseOpcode != PARSEOP_ZERO)
> + {
> + goto CannotOptimize;
> + }
> +
> + /* Link in the target as the final operand */
> +
> + SourceOp2->Asl.Next = Target;
> + Target->Asl.Parent = Source;
> + return (Source);
> +
> +
> +CannotOptimize:
> +
> + Operator = TrAllocateOp (PARSEOP_STORE);
> + TrLinkOpChildren (Operator, 2, Source, Target);
> +
> + /* Set the appropriate line numbers for the new op */
> +
> + Operator->Asl.LineNumber = Target->Asl.LineNumber;
> + Operator->Asl.LogicalLineNumber = Target->Asl.LogicalLineNumber;
> + Operator->Asl.LogicalByteOffset = Target->Asl.LogicalByteOffset;
> + Operator->Asl.Column = Target->Asl.Column;
> +
> + return (Operator);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrCreateNullTargetOp
> + *
> + * PARAMETERS: None
> + *
> + * RETURN: Pointer to the new op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Create a "null" target op. This is defined by the ACPI
> + * specification to be a zero AML opcode, and indicates that
> + * no target has been specified for the parent operation
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrCreateNullTargetOp (
> + void)
> +{
> + ACPI_PARSE_OBJECT *Op;
> +
> +
> + Op = TrAllocateOp (PARSEOP_ZERO);
> + Op->Asl.CompileFlags |= (OP_IS_TARGET | OP_COMPILE_TIME_CONST);
> +
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nCreateNullTargetOp Ln/Col %u/%u NewOp %p Op %s\n",
> + Op->Asl.LineNumber, Op->Asl.Column, Op,
> + UtGetOpName (Op->Asl.ParseOpcode));
> +
> + return (Op);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrCreateConstantLeafOp
> + *
> + * PARAMETERS: ParseOpcode - The constant opcode
> + *
> + * RETURN: Pointer to the new op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Create a leaf op (no children or peers) for one of the
> + * special constants - __LINE__, __FILE__, and __DATE__.
> + *
> + * Note: An implemenation of __FUNC__ cannot happen here because we don't
> + * have a full parse tree at this time and cannot find the parent control
> + * method. If it is ever needed, __FUNC__ must be implemented later, after
> + * the parse tree has been fully constructed.
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrCreateConstantLeafOp (
> + UINT32 ParseOpcode)
> +{
> + ACPI_PARSE_OBJECT *Op = NULL;
> + time_t CurrentTime;
> + char *StaticTimeString;
> + char *TimeString;
> + char *Filename;
> +
> +
> + switch (ParseOpcode)
> + {
> + case PARSEOP___LINE__:
> +
> + Op = TrAllocateOp (PARSEOP_INTEGER);
> + Op->Asl.Value.Integer = Op->Asl.LineNumber;
> + break;
> +
> + case PARSEOP___PATH__:
> +
> + Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
> +
> + /* Op.Asl.Filename contains the full pathname to the file */
> +
> + Op->Asl.Value.String = Op->Asl.Filename;
> + break;
> +
> + case PARSEOP___FILE__:
> +
> + Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
> +
> + /* Get the simple filename from the full path */
> +
> + FlSplitInputPathname (Op->Asl.Filename, NULL, &Filename);
> + Op->Asl.Value.String = Filename;
> + break;
> +
> + case PARSEOP___DATE__:
> +
> + Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
> +
> + /* Get a copy of the current time */
> +
> + CurrentTime = time (NULL);
> + StaticTimeString = ctime (&CurrentTime);
> + TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
> + strcpy (TimeString, StaticTimeString);
> +
> + TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
> + Op->Asl.Value.String = TimeString;
> + break;
> +
> + default: /* This would be an internal error */
> +
> + return (NULL);
> + }
> +
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nCreateConstantLeafOp Ln/Col %u/%u NewOp %p "
> + "Op %s Value %8.8X%8.8X \n",
> + Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode),
> + ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
> +
> + return (Op);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrAllocateOp
> + *
> + * PARAMETERS: ParseOpcode - Opcode to be assigned to the op
> + *
> + * RETURN: New parse op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Allocate and initialize a new parse op for the parse tree
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrAllocateOp (
> + UINT32 ParseOpcode)
> +{
> + ACPI_PARSE_OBJECT *Op;
> + ACPI_PARSE_OBJECT *LatestOp;
> +
> +
> + Op = TrGetOpFromCache ();
> +
> + Op->Asl.ParseOpcode = (UINT16) ParseOpcode;
> + Op->Asl.Filename = Gbl_Files[ASL_FILE_INPUT].Filename;
> + Op->Asl.LineNumber = Gbl_CurrentLineNumber;
> + Op->Asl.LogicalLineNumber = Gbl_LogicalLineNumber;
> + Op->Asl.LogicalByteOffset = Gbl_CurrentLineOffset;
> + Op->Asl.Column = Gbl_CurrentColumn;
> +
> + UtSetParseOpName (Op);
> +
> + /* The following is for capturing comments */
> +
> + if(Gbl_CaptureComments)
> + {
> + LatestOp = Gbl_CommentState.LatestParseOp;
> + Op->Asl.InlineComment = NULL;
> + Op->Asl.EndNodeComment = NULL;
> + Op->Asl.CommentList = NULL;
> + Op->Asl.FileChanged = FALSE;
> +
> + /*
> + * Check to see if the file name has changed before resetting the
> + * latest parse op.
> + */
> + if (LatestOp &&
> + (ParseOpcode != PARSEOP_INCLUDE) &&
> + (ParseOpcode != PARSEOP_INCLUDE_END) &&
> + strcmp (LatestOp->Asl.Filename, Op->Asl.Filename))
> + {
> + CvDbgPrint ("latest op: %s\n", LatestOp->Asl.ParseOpName);
> + Op->Asl.FileChanged = TRUE;
> + if (Gbl_IncludeFileStack)
> + {
> + Op->Asl.ParentFilename = Gbl_IncludeFileStack->Filename;
> + }
> + else
> + {
> + Op->Asl.ParentFilename = NULL;
> + }
> + }
> +
> + Gbl_CommentState.LatestParseOp = Op;
> + CvDbgPrint ("TrAllocateOp=Set latest parse op to this op.\n");
> + CvDbgPrint (" Op->Asl.ParseOpName = %s\n",
> + Gbl_CommentState.LatestParseOp->Asl.ParseOpName);
> + CvDbgPrint (" Op->Asl.ParseOpcode = 0x%x\n", ParseOpcode);
> +
> + if (Op->Asl.FileChanged)
> + {
> + CvDbgPrint(" file has been changed!\n");
> + }
> +
> + /*
> + * if this parse op's syntax uses () and {} (i.e. Package(1){0x00}) then
> + * set a flag in the comment state. This facilitates paring comments for
> + * these types of opcodes.
> + */
> + if ((CvParseOpBlockType(Op) == (BLOCK_PAREN | BLOCK_BRACE)) &&
> + (ParseOpcode != PARSEOP_DEFINITION_BLOCK))
> + {
> + CvDbgPrint ("Parsing paren/Brace op now!\n");
> + Gbl_CommentState.ParsingParenBraceNode = Op;
> + }
> +
> + if (Gbl_CommentListHead)
> + {
> + CvDbgPrint ("Transferring...\n");
> + Op->Asl.CommentList = Gbl_CommentListHead;
> + Gbl_CommentListHead = NULL;
> + Gbl_CommentListTail = NULL;
> + CvDbgPrint (" Transferred current comment list to this op.\n");
> + CvDbgPrint (" %s\n", Op->Asl.CommentList->Comment);
> + }
> +
> + if (Gbl_InlineCommentBuffer)
> + {
> + Op->Asl.InlineComment = Gbl_InlineCommentBuffer;
> + Gbl_InlineCommentBuffer = NULL;
> + CvDbgPrint ("Transferred current inline comment list to this op.\n");
> + }
> + }
> +
> + return (Op);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrGetOpFromCache
> + *
> + * PARAMETERS: None
> + *
> + * RETURN: New parse op. Aborts on allocation failure
> + *
> + * DESCRIPTION: Allocate a new parse op for the parse tree. Bypass the local
> + * dynamic memory manager for performance reasons (This has a
> + * major impact on the speed of the compiler.)
> + *
> + ******************************************************************************/
> +
> +static ACPI_PARSE_OBJECT *
> +TrGetOpFromCache (
> + void)
> +{
> + ASL_CACHE_INFO *Cache;
> +
> +
> + if (Gbl_ParseOpCacheNext >= Gbl_ParseOpCacheLast)
> + {
> + /* Allocate a new buffer */
> +
> + Cache = UtLocalCalloc (sizeof (Cache->Next) +
> + (sizeof (ACPI_PARSE_OBJECT) * ASL_PARSEOP_CACHE_SIZE));
> +
> + /* Link new cache buffer to head of list */
> +
> + Cache->Next = Gbl_ParseOpCacheList;
> + Gbl_ParseOpCacheList = Cache;
> +
> + /* Setup cache management pointers */
> +
> + Gbl_ParseOpCacheNext = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Cache->Buffer);
> + Gbl_ParseOpCacheLast = Gbl_ParseOpCacheNext + ASL_PARSEOP_CACHE_SIZE;
> + }
> +
> + Gbl_ParseOpCount++;
> + return (Gbl_ParseOpCacheNext++);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrPrintOpFlags
> + *
> + * PARAMETERS: Flags - Flags word to be decoded
> + * OutputLevel - Debug output level: ASL_TREE_OUTPUT etc.
> + *
> + * RETURN: None
> + *
> + * DESCRIPTION: Decode a flags word to text. Displays all flags that are set.
> + *
> + ******************************************************************************/
> +
> +void
> +TrPrintOpFlags (
> + UINT32 Flags,
> + UINT32 OutputLevel)
> +{
> + UINT32 FlagBit = 1;
> + UINT32 i;
> +
> +
> + for (i = 0; i < ACPI_NUM_OP_FLAGS; i++)
> + {
> + if (Flags & FlagBit)
> + {
> + DbgPrint (OutputLevel, " %s", Gbl_OpFlagNames[i]);
> + }
> +
> + FlagBit <<= 1;
> + }
> +}
> diff --git a/src/acpica/source/compiler/aslpld.c b/src/acpica/source/compiler/aslpld.c
> index e7964bdb..862eef03 100644
> --- a/src/acpica/source/compiler/aslpld.c
> +++ b/src/acpica/source/compiler/aslpld.c
> @@ -682,12 +682,12 @@ OpcDoPld (
>
> /* Disable further optimization */
>
> - Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
> + Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
> UtSetParseOpName (Op);
>
> /* Child node is the buffer length */
>
> - NewOp = TrAllocateNode (PARSEOP_INTEGER);
> + NewOp = TrAllocateOp (PARSEOP_INTEGER);
>
> NewOp->Asl.AmlOpcode = AML_BYTE_OP;
> NewOp->Asl.Value.Integer = 20;
> @@ -698,7 +698,7 @@ OpcDoPld (
>
> /* Peer to the child is the raw buffer data */
>
> - NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
> + NewOp = TrAllocateOp (PARSEOP_RAW_DATA);
> NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
> NewOp->Asl.AmlLength = 20;
> NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
> diff --git a/src/acpica/source/compiler/aslpredef.c b/src/acpica/source/compiler/aslpredef.c
> index 2ba9b4f6..095f1d4f 100644
> --- a/src/acpica/source/compiler/aslpredef.c
> +++ b/src/acpica/source/compiler/aslpredef.c
> @@ -666,7 +666,7 @@ ApCheckForSpecialName (
> {
> /* Ignore if actually emitted by the compiler */
>
> - if (Op->Asl.CompileFlags & NODE_COMPILER_EMITTED)
> + if (Op->Asl.CompileFlags & OP_COMPILER_EMITTED)
> {
> return (ACPI_NOT_RESERVED_NAME);
> }
> diff --git a/src/acpica/source/compiler/aslprimaries.y b/src/acpica/source/compiler/aslprimaries.y
> index 3d0fa48c..3c8ced1e 100644
> --- a/src/acpica/source/compiler/aslprimaries.y
> +++ b/src/acpica/source/compiler/aslprimaries.y
> @@ -166,7 +166,7 @@ AccessAsTerm
> PARSEOP_OPEN_PAREN
> AccessTypeKeyword
> OptionalAccessAttribTerm
> - PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_ACCESSAS,2,$3,$4);}
> | PARSEOP_ACCESSAS
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -174,10 +174,10 @@ AccessAsTerm
>
> AcquireTerm
> : PARSEOP_ACQUIRE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ACQUIRE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp(PARSEOP_ACQUIRE);}
> SuperName
> ',' WordConstExpr
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$6);}
> | PARSEOP_ACQUIRE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -185,11 +185,11 @@ AcquireTerm
>
> AddTerm
> : PARSEOP_ADD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_ADD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -197,11 +197,11 @@ AddTerm
>
> AliasTerm
> : PARSEOP_ALIAS
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ALIAS);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ALIAS);}
> NameString
> NameStringItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,
> - TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
> + TrSetOpFlags ($5, OP_IS_NAME_DECLARATION));}
> | PARSEOP_ALIAS
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -209,29 +209,29 @@ AliasTerm
>
> AndTerm
> : PARSEOP_AND
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_AND
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> ;
>
> ArgTerm
> - : PARSEOP_ARG0 {$$ = TrCreateLeafNode (PARSEOP_ARG0);}
> - | PARSEOP_ARG1 {$$ = TrCreateLeafNode (PARSEOP_ARG1);}
> - | PARSEOP_ARG2 {$$ = TrCreateLeafNode (PARSEOP_ARG2);}
> - | PARSEOP_ARG3 {$$ = TrCreateLeafNode (PARSEOP_ARG3);}
> - | PARSEOP_ARG4 {$$ = TrCreateLeafNode (PARSEOP_ARG4);}
> - | PARSEOP_ARG5 {$$ = TrCreateLeafNode (PARSEOP_ARG5);}
> - | PARSEOP_ARG6 {$$ = TrCreateLeafNode (PARSEOP_ARG6);}
> + : PARSEOP_ARG0 {$$ = TrCreateLeafOp (PARSEOP_ARG0);}
> + | PARSEOP_ARG1 {$$ = TrCreateLeafOp (PARSEOP_ARG1);}
> + | PARSEOP_ARG2 {$$ = TrCreateLeafOp (PARSEOP_ARG2);}
> + | PARSEOP_ARG3 {$$ = TrCreateLeafOp (PARSEOP_ARG3);}
> + | PARSEOP_ARG4 {$$ = TrCreateLeafOp (PARSEOP_ARG4);}
> + | PARSEOP_ARG5 {$$ = TrCreateLeafOp (PARSEOP_ARG5);}
> + | PARSEOP_ARG6 {$$ = TrCreateLeafOp (PARSEOP_ARG6);}
> ;
>
> BankFieldTerm
> : PARSEOP_BANKFIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_BANKFIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_BANKFIELD);}
> NameString
> NameStringItem
> TermArgItem
> @@ -239,7 +239,7 @@ BankFieldTerm
> ',' LockRuleKeyword
> ',' UpdateRuleKeyword
> PARSEOP_CLOSE_PAREN '{'
> - FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7,
> + FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,7,
> $4,$5,$6,$8,$10,$12,$15);}
> | PARSEOP_BANKFIELD
> PARSEOP_OPEN_PAREN
> @@ -248,17 +248,17 @@ BankFieldTerm
> ;
>
> BreakTerm
> - : PARSEOP_BREAK {$$ = TrCreateNode (PARSEOP_BREAK, 0);}
> + : PARSEOP_BREAK {$$ = TrCreateOp (PARSEOP_BREAK, 0);}
> ;
>
> BreakPointTerm
> - : PARSEOP_BREAKPOINT {$$ = TrCreateNode (PARSEOP_BREAKPOINT, 0);}
> + : PARSEOP_BREAKPOINT {$$ = TrCreateOp (PARSEOP_BREAKPOINT, 0);}
> ;
>
> BufferTerm
> - : PARSEOP_BUFFER {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER); COMMENT_CAPTURE_OFF; }
> + : PARSEOP_BUFFER {$<n>$ = TrCreateLeafOp (PARSEOP_BUFFER); COMMENT_CAPTURE_OFF; }
> OptionalDataCount
> - '{' BufferTermData '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5); COMMENT_CAPTURE_ON;}
> + '{' BufferTermData '}' {$$ = TrLinkOpChildren ($<n>2,2,$3,$5); COMMENT_CAPTURE_ON;}
> ;
>
> BufferTermData
> @@ -268,10 +268,10 @@ BufferTermData
>
> CaseTerm
> : PARSEOP_CASE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CASE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CASE);}
> DataObject
> PARSEOP_CLOSE_PAREN '{'
> - TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
> | PARSEOP_CASE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -279,11 +279,11 @@ CaseTerm
>
> ConcatTerm
> : PARSEOP_CONCATENATE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONCATENATE);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_CONCATENATE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -291,12 +291,12 @@ ConcatTerm
>
> ConcatResTerm
> : PARSEOP_CONCATENATERESTEMPLATE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (
> PARSEOP_CONCATENATERESTEMPLATE);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_CONCATENATERESTEMPLATE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -304,10 +304,10 @@ ConcatResTerm
>
> CondRefOfTerm
> : PARSEOP_CONDREFOF
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CONDREFOF);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONDREFOF);}
> CondRefOfSource
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_CONDREFOF
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -317,15 +317,15 @@ ConnectionTerm
> : PARSEOP_CONNECTION
> PARSEOP_OPEN_PAREN
> NameString
> - PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);}
> + PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_CONNECTION,1,$3);}
> | PARSEOP_CONNECTION
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CONNECTION);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONNECTION);}
> ResourceMacroTerm
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3, 1,
> - TrLinkChildren (
> - TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3,
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3, 1,
> + TrLinkOpChildren (
> + TrCreateLeafOp (PARSEOP_RESOURCETEMPLATE), 3,
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
> $4));}
> | PARSEOP_CONNECTION
> PARSEOP_OPEN_PAREN
> @@ -333,16 +333,16 @@ ConnectionTerm
> ;
>
> ContinueTerm
> - : PARSEOP_CONTINUE {$$ = TrCreateNode (PARSEOP_CONTINUE, 0);}
> + : PARSEOP_CONTINUE {$$ = TrCreateOp (PARSEOP_CONTINUE, 0);}
> ;
>
> CopyObjectTerm
> : PARSEOP_COPYOBJECT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_COPYOBJECT);}
> TermArg
> ',' SimpleName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,
> - TrSetNodeFlags ($6, NODE_IS_TARGET));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
> + TrSetOpFlags ($6, OP_IS_TARGET));}
> | PARSEOP_COPYOBJECT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -350,12 +350,12 @@ CopyObjectTerm
>
> CreateBitFieldTerm
> : PARSEOP_CREATEBITFIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEBITFIELD);}
> TermArg
> TermArgItem
> NameStringItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
> - TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
> + TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
> | PARSEOP_CREATEBITFIELD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -363,12 +363,12 @@ CreateBitFieldTerm
>
> CreateByteFieldTerm
> : PARSEOP_CREATEBYTEFIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEBYTEFIELD);}
> TermArg
> TermArgItem
> NameStringItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
> - TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
> + TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
> | PARSEOP_CREATEBYTEFIELD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -376,12 +376,12 @@ CreateByteFieldTerm
>
> CreateDWordFieldTerm
> : PARSEOP_CREATEDWORDFIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEDWORDFIELD);}
> TermArg
> TermArgItem
> NameStringItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
> - TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
> + TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
> | PARSEOP_CREATEDWORDFIELD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -389,13 +389,13 @@ CreateDWordFieldTerm
>
> CreateFieldTerm
> : PARSEOP_CREATEFIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEFIELD);}
> TermArg
> TermArgItem
> TermArgItem
> NameStringItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,
> - TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,
> + TrSetOpFlags ($7, OP_IS_NAME_DECLARATION));}
> | PARSEOP_CREATEFIELD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -403,12 +403,12 @@ CreateFieldTerm
>
> CreateQWordFieldTerm
> : PARSEOP_CREATEQWORDFIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEQWORDFIELD);}
> TermArg
> TermArgItem
> NameStringItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
> - TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
> + TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
> | PARSEOP_CREATEQWORDFIELD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -416,12 +416,12 @@ CreateQWordFieldTerm
>
> CreateWordFieldTerm
> : PARSEOP_CREATEWORDFIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEWORDFIELD);}
> TermArg
> TermArgItem
> NameStringItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
> - TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
> + TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
> | PARSEOP_CREATEWORDFIELD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -429,44 +429,44 @@ CreateWordFieldTerm
>
> DataRegionTerm
> : PARSEOP_DATATABLEREGION
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DATATABLEREGION);}
> NameString
> TermArgItem
> TermArgItem
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$5,$6,$7);}
> | PARSEOP_DATATABLEREGION
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> ;
>
> DebugTerm
> - : PARSEOP_DEBUG {$$ = TrCreateLeafNode (PARSEOP_DEBUG);}
> + : PARSEOP_DEBUG {$$ = TrCreateLeafOp (PARSEOP_DEBUG);}
> ;
>
> DecTerm
> : PARSEOP_DECREMENT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DECREMENT);}
> SuperName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_DECREMENT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> ;
>
> DefaultTerm
> - : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFAULT);}
> - TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
> + : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafOp (PARSEOP_DEFAULT);}
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_DEFAULT '{'
> error '}' {$$ = AslDoError(); yyclearin;}
> ;
>
> DerefOfTerm
> : PARSEOP_DEREFOF
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DEREFOF);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEREFOF);}
> DerefOfSource
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_DEREFOF
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -474,11 +474,11 @@ DerefOfTerm
>
> DeviceTerm
> : PARSEOP_DEVICE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEVICE);}
> NameString
> PARSEOP_CLOSE_PAREN '{'
> - TermList '}' {$$ = TrLinkChildren ($<n>3,2,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
> | PARSEOP_DEVICE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -486,12 +486,12 @@ DeviceTerm
>
> DivideTerm
> : PARSEOP_DIVIDE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
> TermArg
> TermArgItem
> Target
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,$7);}
> | PARSEOP_DIVIDE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -501,21 +501,21 @@ EISAIDTerm
> : PARSEOP_EISAID
> PARSEOP_OPEN_PAREN
> StringData
> - PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_EISAID, $3);}
> + PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_EISAID, $3);}
> | PARSEOP_EISAID
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> ;
>
> ElseIfTerm
> - : IfTerm ElseTerm {$$ = TrLinkPeerNode ($1,$2);}
> + : IfTerm ElseTerm {$$ = TrLinkPeerOp ($1,$2);}
> ;
>
> ElseTerm
> : {$$ = NULL;}
> | PARSEOP_ELSE '{'
> - TermList {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
> - '}' {$$ = TrLinkChildren ($<n>4,1,$3);}
> + TermList {$<n>$ = TrCreateLeafOp (PARSEOP_ELSE);}
> + '}' {$$ = TrLinkOpChildren ($<n>4,1,$3);}
>
> | PARSEOP_ELSE '{'
> error '}' {$$ = AslDoError(); yyclearin;}
> @@ -524,12 +524,12 @@ ElseTerm
> error {$$ = AslDoError(); yyclearin;}
>
> | PARSEOP_ELSEIF
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
> - TermArg {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ELSE);}
> + TermArg {$<n>$ = TrCreateLeafOp (PARSEOP_IF);}
> PARSEOP_CLOSE_PAREN '{'
> - TermList '}' {TrLinkChildren ($<n>5,2,$4,$8);}
> - ElseTerm {TrLinkPeerNode ($<n>5,$11);}
> - {$$ = TrLinkChildren ($<n>3,1,$<n>5);}
> + TermList '}' {TrLinkOpChildren ($<n>5,2,$4,$8);}
> + ElseTerm {TrLinkPeerOp ($<n>5,$11);}
> + {$$ = TrLinkOpChildren ($<n>3,1,$<n>5);}
>
> | PARSEOP_ELSEIF
> PARSEOP_OPEN_PAREN
> @@ -541,10 +541,10 @@ ElseTerm
>
> EventTerm
> : PARSEOP_EVENT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_EVENT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EVENT);}
> NameString
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION));}
> | PARSEOP_EVENT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -557,7 +557,7 @@ ExternalTerm
> OptionalObjectTypeKeyword
> OptionalParameterTypePackage
> OptionalParameterTypesPackage
> - PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
> | PARSEOP_EXTERNAL
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -565,11 +565,11 @@ ExternalTerm
>
> FatalTerm
> : PARSEOP_FATAL
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FATAL);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FATAL);}
> ByteConstExpr
> ',' DWordConstExpr
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
> | PARSEOP_FATAL
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -577,13 +577,13 @@ FatalTerm
>
> FieldTerm
> : PARSEOP_FIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIELD);}
> NameString
> ',' AccessTypeKeyword
> ',' LockRuleKeyword
> ',' UpdateRuleKeyword
> PARSEOP_CLOSE_PAREN '{'
> - FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$8,$10,$13);}
> + FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$6,$8,$10,$13);}
> | PARSEOP_FIELD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN
> @@ -592,10 +592,10 @@ FieldTerm
>
> FindSetLeftBitTerm
> : PARSEOP_FINDSETLEFTBIT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FINDSETLEFTBIT);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_FINDSETLEFTBIT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -603,10 +603,10 @@ FindSetLeftBitTerm
>
> FindSetRightBitTerm
> : PARSEOP_FINDSETRIGHTBIT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FINDSETRIGHTBIT);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_FINDSETRIGHTBIT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -615,29 +615,29 @@ FindSetRightBitTerm
> /* Convert a For() loop to a While() loop */
> ForTerm
> : PARSEOP_FOR
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WHILE);}
> OptionalTermArg ',' {}
> OptionalPredicate ','
> - OptionalTermArg {$<n>$ = TrLinkPeerNode ($4,$<n>3);
> - TrSetParent ($9,$<n>3);} /* New parent is WHILE */
> + OptionalTermArg {$<n>$ = TrLinkPeerOp ($4,$<n>3);
> + TrSetOpParent ($9,$<n>3);} /* New parent is WHILE */
> PARSEOP_CLOSE_PAREN
> - '{' TermList '}' {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);}
> - {$<n>$ = TrLinkPeerNode ($13,$9);
> + '{' TermList '}' {$<n>$ = TrLinkOpChildren ($<n>3,2,$7,$13);}
> + {$<n>$ = TrLinkPeerOp ($13,$9);
> $$ = $<n>10;}
> ;
>
> OptionalPredicate
> - : {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);}
> + : {$$ = TrCreateValuedLeafOp (PARSEOP_INTEGER, 1);}
> | TermArg {$$ = $1;}
> ;
>
> FprintfTerm
> : PARSEOP_FPRINTF
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FPRINTF);}
> TermArg ','
> StringData
> PrintfArgList
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
> | PARSEOP_FPRINTF
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -645,10 +645,10 @@ FprintfTerm
>
> FromBCDTerm
> : PARSEOP_FROMBCD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FROMBCD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FROMBCD);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_FROMBCD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -656,16 +656,16 @@ FromBCDTerm
>
> FunctionTerm
> : PARSEOP_FUNCTION
> - PARSEOP_OPEN_PAREN {COMMENT_CAPTURE_OFF; $<n>$ = TrCreateLeafNode (PARSEOP_METHOD); }
> + PARSEOP_OPEN_PAREN {COMMENT_CAPTURE_OFF; $<n>$ = TrCreateLeafOp (PARSEOP_METHOD); }
> NameString
> OptionalParameterTypePackage
> OptionalParameterTypesPackage
> PARSEOP_CLOSE_PAREN '{' {COMMENT_CAPTURE_ON; }
> - TermList '}' {$$ = TrLinkChildren ($<n>3,7,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
> - TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),
> - TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL),
> - TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),$5,$6,$10);}
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
> + TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),
> + TrCreateLeafOp (PARSEOP_SERIALIZERULE_NOTSERIAL),
> + TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),$5,$6,$10);}
> | PARSEOP_FUNCTION
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -673,10 +673,10 @@ FunctionTerm
>
> IfTerm
> : PARSEOP_IF
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IF);}
> TermArg
> PARSEOP_CLOSE_PAREN '{'
> - TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
>
> | PARSEOP_IF
> PARSEOP_OPEN_PAREN
> @@ -687,20 +687,20 @@ IncludeTerm
> : PARSEOP_INCLUDE
> PARSEOP_OPEN_PAREN
> String
> - PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_INCLUDE, $3);
> + PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_INCLUDE, $3);
> FlOpenIncludeFile ($3);}
> ;
>
> IncludeEndTerm
> - : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE_END);
> - TrSetCurrentFilename ($$);}
> + : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafOp (PARSEOP_INCLUDE_END);
> + TrSetOpCurrentFilename ($$);}
> ;
>
> IncTerm
> : PARSEOP_INCREMENT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INCREMENT);}
> SuperName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_INCREMENT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -708,14 +708,14 @@ IncTerm
>
> IndexFieldTerm
> : PARSEOP_INDEXFIELD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INDEXFIELD);}
> NameString
> NameStringItem
> ',' AccessTypeKeyword
> ',' LockRuleKeyword
> ',' UpdateRuleKeyword
> PARSEOP_CLOSE_PAREN '{'
> - FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);}
> + FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);}
> | PARSEOP_INDEXFIELD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN
> @@ -724,11 +724,11 @@ IndexFieldTerm
>
> IndexTerm
> : PARSEOP_INDEX
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_INDEX);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INDEX);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_INDEX
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -736,10 +736,10 @@ IndexTerm
>
> LAndTerm
> : PARSEOP_LAND
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LAND);}
> TermArg
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_LAND
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -747,10 +747,10 @@ LAndTerm
>
> LEqualTerm
> : PARSEOP_LEQUAL
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
> TermArg
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_LEQUAL
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -758,11 +758,11 @@ LEqualTerm
>
> LGreaterEqualTerm
> : PARSEOP_LGREATEREQUAL
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
> TermArg
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1,
> - TrLinkChildren ($<n>3,2,$4,$5));}
> + PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
> + TrLinkOpChildren ($<n>3,2,$4,$5));}
> | PARSEOP_LGREATEREQUAL
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -770,10 +770,10 @@ LGreaterEqualTerm
>
> LGreaterTerm
> : PARSEOP_LGREATER
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
> TermArg
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_LGREATER
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -781,11 +781,11 @@ LGreaterTerm
>
> LLessEqualTerm
> : PARSEOP_LLESSEQUAL
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
> TermArg
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1,
> - TrLinkChildren ($<n>3,2,$4,$5));}
> + PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
> + TrLinkOpChildren ($<n>3,2,$4,$5));}
> | PARSEOP_LLESSEQUAL
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -793,10 +793,10 @@ LLessEqualTerm
>
> LLessTerm
> : PARSEOP_LLESS
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
> TermArg
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_LLESS
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -804,11 +804,11 @@ LLessTerm
>
> LNotEqualTerm
> : PARSEOP_LNOTEQUAL
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
> TermArg
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1,
> - TrLinkChildren ($<n>3,2,$4,$5));}
> + PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
> + TrLinkOpChildren ($<n>3,2,$4,$5));}
> | PARSEOP_LNOTEQUAL
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -816,9 +816,9 @@ LNotEqualTerm
>
> LNotTerm
> : PARSEOP_LNOT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LNOT);}
> TermArg
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_LNOT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -826,14 +826,14 @@ LNotTerm
>
> LoadTableTerm
> : PARSEOP_LOADTABLE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LOADTABLE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOADTABLE);}
> TermArg
> TermArgItem
> TermArgItem
> OptionalListString
> OptionalListString
> OptionalReference
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
> | PARSEOP_LOADTABLE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -841,32 +841,32 @@ LoadTableTerm
>
> LoadTerm
> : PARSEOP_LOAD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LOAD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOAD);}
> NameString
> RequiredTarget
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_LOAD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> ;
>
> LocalTerm
> - : PARSEOP_LOCAL0 {$$ = TrCreateLeafNode (PARSEOP_LOCAL0);}
> - | PARSEOP_LOCAL1 {$$ = TrCreateLeafNode (PARSEOP_LOCAL1);}
> - | PARSEOP_LOCAL2 {$$ = TrCreateLeafNode (PARSEOP_LOCAL2);}
> - | PARSEOP_LOCAL3 {$$ = TrCreateLeafNode (PARSEOP_LOCAL3);}
> - | PARSEOP_LOCAL4 {$$ = TrCreateLeafNode (PARSEOP_LOCAL4);}
> - | PARSEOP_LOCAL5 {$$ = TrCreateLeafNode (PARSEOP_LOCAL5);}
> - | PARSEOP_LOCAL6 {$$ = TrCreateLeafNode (PARSEOP_LOCAL6);}
> - | PARSEOP_LOCAL7 {$$ = TrCreateLeafNode (PARSEOP_LOCAL7);}
> + : PARSEOP_LOCAL0 {$$ = TrCreateLeafOp (PARSEOP_LOCAL0);}
> + | PARSEOP_LOCAL1 {$$ = TrCreateLeafOp (PARSEOP_LOCAL1);}
> + | PARSEOP_LOCAL2 {$$ = TrCreateLeafOp (PARSEOP_LOCAL2);}
> + | PARSEOP_LOCAL3 {$$ = TrCreateLeafOp (PARSEOP_LOCAL3);}
> + | PARSEOP_LOCAL4 {$$ = TrCreateLeafOp (PARSEOP_LOCAL4);}
> + | PARSEOP_LOCAL5 {$$ = TrCreateLeafOp (PARSEOP_LOCAL5);}
> + | PARSEOP_LOCAL6 {$$ = TrCreateLeafOp (PARSEOP_LOCAL6);}
> + | PARSEOP_LOCAL7 {$$ = TrCreateLeafOp (PARSEOP_LOCAL7);}
> ;
>
> LOrTerm
> : PARSEOP_LOR
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOR);}
> TermArg
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_LOR
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -874,14 +874,14 @@ LOrTerm
>
> MatchTerm
> : PARSEOP_MATCH
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MATCH);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MATCH);}
> TermArg
> ',' MatchOpKeyword
> TermArgItem
> ',' MatchOpKeyword
> TermArgItem
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
> | PARSEOP_MATCH
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -889,7 +889,7 @@ MatchTerm
>
> MethodTerm
> : PARSEOP_METHOD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD); COMMENT_CAPTURE_OFF;}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_METHOD); COMMENT_CAPTURE_OFF;}
> NameString
> OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);}
> OptionalSerializeRuleKeyword
> @@ -897,8 +897,8 @@ MethodTerm
> OptionalParameterTypePackage
> OptionalParameterTypesPackage
> PARSEOP_CLOSE_PAREN '{' {COMMENT_CAPTURE_ON;}
> - TermList '}' {$$ = TrLinkChildren ($<n>3,7,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
> $5,$7,$8,$9,$10,$14);}
> | PARSEOP_METHOD
> PARSEOP_OPEN_PAREN
> @@ -907,12 +907,12 @@ MethodTerm
>
> MidTerm
> : PARSEOP_MID
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MID);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MID);}
> TermArg
> TermArgItem
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,$7);}
> | PARSEOP_MID
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -920,11 +920,11 @@ MidTerm
>
> ModTerm
> : PARSEOP_MOD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_MOD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -932,11 +932,11 @@ ModTerm
>
> MultiplyTerm
> : PARSEOP_MULTIPLY
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_MULTIPLY
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -944,11 +944,11 @@ MultiplyTerm
>
> MutexTerm
> : PARSEOP_MUTEX
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MUTEX);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MUTEX);}
> NameString
> ',' ByteConstExpr
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$6);}
> | PARSEOP_MUTEX
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -956,11 +956,11 @@ MutexTerm
>
> NameTerm
> : PARSEOP_NAME
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NAME);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NAME);}
> NameString
> ',' DataObject
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$6);}
> | PARSEOP_NAME
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -968,27 +968,27 @@ NameTerm
>
> NAndTerm
> : PARSEOP_NAND
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NAND);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NAND);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_NAND
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> ;
>
> NoOpTerm
> - : PARSEOP_NOOP {$$ = TrCreateNode (PARSEOP_NOOP, 0);}
> + : PARSEOP_NOOP {$$ = TrCreateOp (PARSEOP_NOOP, 0);}
> ;
>
> NOrTerm
> : PARSEOP_NOR
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NOR);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOR);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_NOR
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -996,10 +996,10 @@ NOrTerm
>
> NotifyTerm
> : PARSEOP_NOTIFY
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NOTIFY);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOTIFY);}
> SuperName
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_NOTIFY
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1007,10 +1007,10 @@ NotifyTerm
>
> NotTerm
> : PARSEOP_NOT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOT);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_NOT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1018,9 +1018,9 @@ NotTerm
>
> ObjectTypeTerm
> : PARSEOP_OBJECTTYPE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE);}
> ObjectTypeSource
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_OBJECTTYPE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1030,7 +1030,7 @@ OffsetTerm
> : PARSEOP_OFFSET
> PARSEOP_OPEN_PAREN
> AmlPackageLengthTerm
> - PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);}
> + PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_OFFSET,1,$3);}
> | PARSEOP_OFFSET
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1038,13 +1038,13 @@ OffsetTerm
>
> OpRegionTerm
> : PARSEOP_OPERATIONREGION
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OPERATIONREGION);}
> NameString
> ',' OpRegionSpaceIdTerm
> TermArgItem
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
> $6,$7,$8);}
> | PARSEOP_OPERATIONREGION
> PARSEOP_OPEN_PAREN
> @@ -1058,30 +1058,30 @@ OpRegionSpaceIdTerm
>
> OrTerm
> : PARSEOP_OR
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_OR
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> ;
>
> PackageTerm
> - : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);}
> + : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafOp (PARSEOP_VAR_PACKAGE);}
> OptionalDataCount
> - '{' PackageList '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);}
> + '{' PackageList '}' {$$ = TrLinkOpChildren ($<n>2,2,$3,$5);}
>
> PowerResTerm
> : PARSEOP_POWERRESOURCE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_POWERRESOURCE);}
> NameString
> ',' ByteConstExpr
> ',' WordConstExpr
> PARSEOP_CLOSE_PAREN '{'
> - TermList '}' {$$ = TrLinkChildren ($<n>3,4,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,4,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
> $6,$8,$11);}
> | PARSEOP_POWERRESOURCE
> PARSEOP_OPEN_PAREN
> @@ -1090,10 +1090,10 @@ PowerResTerm
>
> PrintfTerm
> : PARSEOP_PRINTF
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PRINTF);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PRINTF);}
> StringData
> PrintfArgList
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_PRINTF
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1103,19 +1103,19 @@ PrintfArgList
> : {$$ = NULL;}
> | TermArg {$$ = $1;}
> | PrintfArgList ','
> - TermArg {$$ = TrLinkPeerNode ($1, $3);}
> + TermArg {$$ = TrLinkPeerOp ($1, $3);}
> ;
>
> ProcessorTerm
> : PARSEOP_PROCESSOR
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PROCESSOR);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PROCESSOR);}
> NameString
> ',' ByteConstExpr
> OptionalDWordConstExpr
> OptionalByteConstExpr
> PARSEOP_CLOSE_PAREN '{'
> - TermList '}' {$$ = TrLinkChildren ($<n>3,5,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,5,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
> $6,$7,$8,$11);}
> | PARSEOP_PROCESSOR
> PARSEOP_OPEN_PAREN
> @@ -1124,10 +1124,10 @@ ProcessorTerm
>
> RawDataBufferTerm
> : PARSEOP_DATABUFFER
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DATABUFFER);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DATABUFFER);}
> OptionalWordConst
> PARSEOP_CLOSE_PAREN '{'
> - ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
> + ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
> | PARSEOP_DATABUFFER
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1139,10 +1139,10 @@ RawDataBufferTerm
> */
> RefOfTerm
> : PARSEOP_REFOF
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_REFOF);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_REFOF);}
> RefOfSource
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,
> - TrSetNodeFlags ($4, NODE_IS_TARGET));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,
> + TrSetOpFlags ($4, OP_IS_TARGET));}
> | PARSEOP_REFOF
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1150,9 +1150,9 @@ RefOfTerm
>
> ReleaseTerm
> : PARSEOP_RELEASE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_RELEASE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RELEASE);}
> SuperName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_RELEASE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1160,9 +1160,9 @@ ReleaseTerm
>
> ResetTerm
> : PARSEOP_RESET
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_RESET);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RESET);}
> SuperName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_RESET
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1170,13 +1170,13 @@ ResetTerm
>
> ReturnTerm
> : PARSEOP_RETURN
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_RETURN);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RETURN);}
> OptionalReturnArg
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> - | PARSEOP_RETURN {$$ = TrLinkChildren (
> - TrCreateLeafNode (PARSEOP_RETURN),1,
> - TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
> - NODE_IS_NULL_RETURN));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> + | PARSEOP_RETURN {$$ = TrLinkOpChildren (
> + TrCreateLeafOp (PARSEOP_RETURN),1,
> + TrSetOpFlags (TrCreateLeafOp (PARSEOP_ZERO),
> + OP_IS_NULL_RETURN));}
> | PARSEOP_RETURN
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1184,11 +1184,11 @@ ReturnTerm
>
> ScopeTerm
> : PARSEOP_SCOPE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SCOPE);}
> NameString
> PARSEOP_CLOSE_PAREN '{'
> - TermList '}' {$$ = TrLinkChildren ($<n>3,2,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
> | PARSEOP_SCOPE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1196,11 +1196,11 @@ ScopeTerm
>
> ShiftLeftTerm
> : PARSEOP_SHIFTLEFT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_SHIFTLEFT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1208,11 +1208,11 @@ ShiftLeftTerm
>
> ShiftRightTerm
> : PARSEOP_SHIFTRIGHT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_SHIFTRIGHT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1220,9 +1220,9 @@ ShiftRightTerm
>
> SignalTerm
> : PARSEOP_SIGNAL
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SIGNAL);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SIGNAL);}
> SuperName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_SIGNAL
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1230,9 +1230,9 @@ SignalTerm
>
> SizeOfTerm
> : PARSEOP_SIZEOF
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SIZEOF);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SIZEOF);}
> SuperName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_SIZEOF
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1240,9 +1240,9 @@ SizeOfTerm
>
> SleepTerm
> : PARSEOP_SLEEP
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SLEEP);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SLEEP);}
> TermArg
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_SLEEP
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1250,9 +1250,9 @@ SleepTerm
>
> StallTerm
> : PARSEOP_STALL
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_STALL);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STALL);}
> TermArg
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_STALL
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1260,11 +1260,11 @@ StallTerm
>
> StoreTerm
> : PARSEOP_STORE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_STORE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STORE);}
> TermArg
> ',' SuperName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,
> - TrSetNodeFlags ($6, NODE_IS_TARGET));}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
> + TrSetOpFlags ($6, OP_IS_TARGET));}
> | PARSEOP_STORE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1272,11 +1272,11 @@ StoreTerm
>
> SubtractTerm
> : PARSEOP_SUBTRACT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_SUBTRACT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1284,10 +1284,10 @@ SubtractTerm
>
> SwitchTerm
> : PARSEOP_SWITCH
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SWITCH);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SWITCH);}
> TermArg
> PARSEOP_CLOSE_PAREN '{'
> - CaseDefaultTermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
> + CaseDefaultTermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
> | PARSEOP_SWITCH
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1295,11 +1295,11 @@ SwitchTerm
>
> ThermalZoneTerm
> : PARSEOP_THERMALZONE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_THERMALZONE);}
> NameString
> PARSEOP_CLOSE_PAREN '{'
> - TermList '}' {$$ = TrLinkChildren ($<n>3,2,
> - TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> + TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
> + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
> | PARSEOP_THERMALZONE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1307,10 +1307,10 @@ ThermalZoneTerm
>
> TimerTerm
> : PARSEOP_TIMER
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TIMER);}
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,0);}
> - | PARSEOP_TIMER {$$ = TrLinkChildren (
> - TrCreateLeafNode (PARSEOP_TIMER),0);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TIMER);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,0);}
> + | PARSEOP_TIMER {$$ = TrLinkOpChildren (
> + TrCreateLeafOp (PARSEOP_TIMER),0);}
> | PARSEOP_TIMER
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1318,10 +1318,10 @@ TimerTerm
>
> ToBCDTerm
> : PARSEOP_TOBCD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOBCD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOBCD);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_TOBCD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1329,10 +1329,10 @@ ToBCDTerm
>
> ToBufferTerm
> : PARSEOP_TOBUFFER
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOBUFFER);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOBUFFER);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_TOBUFFER
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1340,10 +1340,10 @@ ToBufferTerm
>
> ToDecimalStringTerm
> : PARSEOP_TODECIMALSTRING
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TODECIMALSTRING);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_TODECIMALSTRING
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1351,10 +1351,10 @@ ToDecimalStringTerm
>
> ToHexStringTerm
> : PARSEOP_TOHEXSTRING
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOHEXSTRING);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_TOHEXSTRING
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1362,10 +1362,10 @@ ToHexStringTerm
>
> ToIntegerTerm
> : PARSEOP_TOINTEGER
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOINTEGER);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOINTEGER);}
> TermArg
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_TOINTEGER
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1373,9 +1373,9 @@ ToIntegerTerm
>
> ToPLDTerm
> : PARSEOP_TOPLD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOPLD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOPLD);}
> PldKeywordList
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_TOPLD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1384,26 +1384,26 @@ ToPLDTerm
> PldKeywordList
> : {$$ = NULL;}
> | PldKeyword
> - PARSEOP_EXP_EQUALS Integer {$$ = TrLinkChildren ($1,1,$3);}
> + PARSEOP_EXP_EQUALS Integer {$$ = TrLinkOpChildren ($1,1,$3);}
> | PldKeyword
> - PARSEOP_EXP_EQUALS String {$$ = TrLinkChildren ($1,1,$3);}
> + PARSEOP_EXP_EQUALS String {$$ = TrLinkOpChildren ($1,1,$3);}
> | PldKeywordList ',' /* Allows a trailing comma at list end */
> | PldKeywordList ','
> PldKeyword
> - PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
> + PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerOp ($1,TrLinkOpChildren ($3,1,$5));}
> | PldKeywordList ','
> PldKeyword
> - PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
> + PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerOp ($1,TrLinkOpChildren ($3,1,$5));}
> ;
>
>
> ToStringTerm
> : PARSEOP_TOSTRING
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOSTRING);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOSTRING);}
> TermArg
> OptionalCount
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_TOSTRING
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1413,7 +1413,7 @@ ToUUIDTerm
> : PARSEOP_TOUUID
> PARSEOP_OPEN_PAREN
> StringData
> - PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);}
> + PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_TOUUID, $3);}
> | PARSEOP_TOUUID
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1421,9 +1421,9 @@ ToUUIDTerm
>
> UnicodeTerm
> : PARSEOP_UNICODE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_UNICODE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UNICODE);}
> StringData
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,0,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,0,$4);}
> | PARSEOP_UNICODE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1431,9 +1431,9 @@ UnicodeTerm
>
> UnloadTerm
> : PARSEOP_UNLOAD
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_UNLOAD);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UNLOAD);}
> SuperName
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
> | PARSEOP_UNLOAD
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1441,10 +1441,10 @@ UnloadTerm
>
> WaitTerm
> : PARSEOP_WAIT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WAIT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WAIT);}
> SuperName
> TermArgItem
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
> | PARSEOP_WAIT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1452,11 +1452,11 @@ WaitTerm
>
> XOrTerm
> : PARSEOP_XOR
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
> TermArg
> TermArgItem
> Target
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
> | PARSEOP_XOR
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -1464,10 +1464,10 @@ XOrTerm
>
> WhileTerm
> : PARSEOP_WHILE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WHILE);}
> TermArg
> PARSEOP_CLOSE_PAREN
> - '{' TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
> + '{' TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
> | PARSEOP_WHILE
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> diff --git a/src/acpica/source/compiler/aslprintf.c b/src/acpica/source/compiler/aslprintf.c
> index a9584bc5..e5f56f11 100644
> --- a/src/acpica/source/compiler/aslprintf.c
> +++ b/src/acpica/source/compiler/aslprintf.c
> @@ -191,7 +191,7 @@ OpcDoPrintf (
>
> /* Store destination is the Debug op */
>
> - DestOp = TrAllocateNode (PARSEOP_DEBUG);
> + DestOp = TrAllocateOp (PARSEOP_DEBUG);
> DestOp->Asl.AmlOpcode = AML_DEBUG_OP;
> DestOp->Asl.Parent = Op;
> DestOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
> @@ -296,7 +296,7 @@ OpcParsePrintf (
> NewString = UtStringCacheCalloc (StringLength + 1);
> strncpy (NewString, StartPosition, StringLength);
>
> - NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
> + NewOp = TrAllocateOp (PARSEOP_STRING_LITERAL);
> NewOp->Asl.Value.String = NewString;
> NewOp->Asl.AmlOpcode = AML_STRING_OP;
> NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
> @@ -357,7 +357,7 @@ OpcParsePrintf (
> */
> if (!Op->Asl.Child)
> {
> - NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
> + NewOp = TrAllocateOp (PARSEOP_STRING_LITERAL);
> NewOp->Asl.Value.String = "";
> NewOp->Asl.AmlOpcode = AML_STRING_OP;
> NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
> @@ -385,7 +385,7 @@ OpcParsePrintf (
> NewString = UtStringCacheCalloc (StringLength + 1);
> strncpy (NewString, StartPosition, StringLength);
>
> - NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
> + NewOp = TrAllocateOp (PARSEOP_STRING_LITERAL);
> NewOp->Asl.Value.String = NewString;
> NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
> NewOp->Asl.AmlOpcode = AML_STRING_OP;
> @@ -423,7 +423,7 @@ OpcParsePrintf (
>
> /* Disable further optimization */
>
> - Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
> + Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
> UtSetParseOpName (Op);
>
> /* Set Store destination */
> @@ -461,7 +461,7 @@ OpcCreateConcatenateNode (
> return;
> }
>
> - NewConcatOp = TrAllocateNode (PARSEOP_CONCATENATE);
> + NewConcatOp = TrAllocateOp (PARSEOP_CONCATENATE);
> NewConcatOp->Asl.AmlOpcode = AML_CONCATENATE_OP;
> NewConcatOp->Asl.AcpiBtype = 0x7;
> NewConcatOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
> @@ -479,7 +479,7 @@ OpcCreateConcatenateNode (
> /* Third arg is Zero (not used) */
>
> NewConcatOp->Asl.Child->Asl.Next->Asl.Next =
> - TrAllocateNode (PARSEOP_ZERO);
> + TrAllocateOp (PARSEOP_ZERO);
> NewConcatOp->Asl.Child->Asl.Next->Asl.Next->Asl.Parent =
> NewConcatOp;
>
> diff --git a/src/acpica/source/compiler/aslresource.c b/src/acpica/source/compiler/aslresource.c
> index 42931452..eb0c22a1 100644
> --- a/src/acpica/source/compiler/aslresource.c
> +++ b/src/acpica/source/compiler/aslresource.c
> @@ -573,7 +573,7 @@ RsCreateResourceField (
> {
>
> Op->Asl.ExternalName = Name;
> - Op->Asl.CompileFlags |= NODE_IS_RESOURCE_FIELD;
> + Op->Asl.CompileFlags |= OP_IS_RESOURCE_FIELD;
>
> Op->Asl.Value.Tag.BitOffset = (ByteOffset * 8) + BitOffset;
> Op->Asl.Value.Tag.BitLength = BitLength;
> @@ -719,9 +719,9 @@ RsCheckListForDuplicates (
> {
> /* Emit error only once per duplicate node */
>
> - if (!(NextOp->Asl.CompileFlags & NODE_IS_DUPLICATE))
> + if (!(NextOp->Asl.CompileFlags & OP_IS_DUPLICATE))
> {
> - NextOp->Asl.CompileFlags |= NODE_IS_DUPLICATE;
> + NextOp->Asl.CompileFlags |= OP_IS_DUPLICATE;
> AslError (ASL_ERROR, ASL_MSG_DUPLICATE_ITEM,
> NextOp, NULL);
> }
> @@ -1033,7 +1033,7 @@ RsDoOneResourceDescriptor (
> * references to the descriptor can be resolved.
> */
> Info->DescriptorTypeOp->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
> - Info->DescriptorTypeOp->Asl.CompileFlags = NODE_IS_RESOURCE_DESC;
> + Info->DescriptorTypeOp->Asl.CompileFlags = OP_IS_RESOURCE_DESC;
> Info->DescriptorTypeOp->Asl.Value.Integer = Info->CurrentByteOffset;
>
> if (Rnode)
> @@ -1132,7 +1132,7 @@ RsDoResourceTemplate (
>
> if (Op->Asl.Parent)
> {
> - Op->Asl.Parent->Asl.CompileFlags |= NODE_IS_RESOURCE_DESC;
> + Op->Asl.Parent->Asl.CompileFlags |= OP_IS_RESOURCE_DESC;
> }
>
> /* ResourceTemplate Opcode is first (Op) */
> @@ -1171,7 +1171,7 @@ RsDoResourceTemplate (
> Info.DescriptorTypeOp = DescriptorTypeOp;
> Info.CurrentByteOffset = CurrentByteOffset;
>
> - DescriptorTypeOp->Asl.CompileFlags |= NODE_IS_RESOURCE_DESC;
> + DescriptorTypeOp->Asl.CompileFlags |= OP_IS_RESOURCE_DESC;
> Rnode = RsDoOneResourceDescriptor (&Info, &State);
>
> /*
> @@ -1206,7 +1206,7 @@ RsDoResourceTemplate (
> */
> Op->Asl.ParseOpcode = PARSEOP_BUFFER;
> Op->Asl.AmlOpcode = AML_BUFFER_OP;
> - Op->Asl.CompileFlags = NODE_AML_PACKAGE | NODE_IS_RESOURCE_DESC;
> + Op->Asl.CompileFlags = OP_AML_PACKAGE | OP_IS_RESOURCE_DESC;
> UtSetParseOpName (Op);
>
> BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
> @@ -1219,7 +1219,7 @@ RsDoResourceTemplate (
> BufferOp->Asl.AmlOpcodeLength = 0;
> BufferOp->Asl.AmlLength = CurrentByteOffset;
> BufferOp->Asl.Value.Buffer = (UINT8 *) HeadRnode.Next;
> - BufferOp->Asl.CompileFlags |= NODE_IS_RESOURCE_DATA;
> + BufferOp->Asl.CompileFlags |= OP_IS_RESOURCE_DATA;
> UtSetParseOpName (BufferOp);
>
> return;
> diff --git a/src/acpica/source/compiler/aslresources.y b/src/acpica/source/compiler/aslresources.y
> index fc70940c..5b73ed87 100644
> --- a/src/acpica/source/compiler/aslresources.y
> +++ b/src/acpica/source/compiler/aslresources.y
> @@ -169,11 +169,11 @@ ResourceTemplateTerm
> : PARSEOP_RESOURCETEMPLATE {COMMENT_CAPTURE_OFF;}
> OptionalParentheses
> '{'
> - ResourceMacroList '}' {$$ = TrCreateNode (PARSEOP_RESOURCETEMPLATE,4,
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
> + ResourceMacroList '}' {$$ = TrCreateOp (PARSEOP_RESOURCETEMPLATE,4,
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
> $5,
> - TrCreateLeafNode (PARSEOP_ENDTAG));
> + TrCreateLeafOp (PARSEOP_ENDTAG));
> COMMENT_CAPTURE_ON;}
> ;
>
> @@ -186,7 +186,7 @@ OptionalParentheses
> ResourceMacroList
> : {$$ = NULL;}
> | ResourceMacroList
> - ResourceMacroTerm {$$ = TrLinkPeerNode ($1,$2);}
> + ResourceMacroTerm {$$ = TrLinkPeerOp ($1,$2);}
> ;
>
> ResourceMacroTerm
> @@ -235,13 +235,13 @@ ResourceMacroTerm
>
> DMATerm
> : PARSEOP_DMA
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DMA);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DMA);}
> DMATypeKeyword
> OptionalBusMasterKeyword
> ',' XferTypeKeyword
> OptionalNameString_Last
> PARSEOP_CLOSE_PAREN '{'
> - ByteList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$5,$7,$8,$11);}
> + ByteList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$7,$8,$11);}
> | PARSEOP_DMA
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -249,7 +249,7 @@ DMATerm
>
> DWordIOTerm
> : PARSEOP_DWORDIO
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDIO);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDIO);}
> OptionalResourceType_First
> OptionalMinType
> OptionalMaxType
> @@ -265,7 +265,7 @@ DWordIOTerm
> OptionalNameString
> OptionalType
> OptionalTranslationType_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
> $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
> | PARSEOP_DWORDIO
> PARSEOP_OPEN_PAREN
> @@ -274,7 +274,7 @@ DWordIOTerm
>
> DWordMemoryTerm
> : PARSEOP_DWORDMEMORY
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDMEMORY);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDMEMORY);}
> OptionalResourceType_First
> OptionalDecodeType
> OptionalMinType
> @@ -291,7 +291,7 @@ DWordMemoryTerm
> OptionalNameString
> OptionalAddressRange
> OptionalType_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,16,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,16,
> $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
> | PARSEOP_DWORDMEMORY
> PARSEOP_OPEN_PAREN
> @@ -300,7 +300,7 @@ DWordMemoryTerm
>
> DWordSpaceTerm
> : PARSEOP_DWORDSPACE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDSPACE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDSPACE);}
> ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
> OptionalResourceType
> OptionalDecodeType
> @@ -315,7 +315,7 @@ DWordSpaceTerm
> OptionalByteConstExpr
> OptionalStringData
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
> $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
> | PARSEOP_DWORDSPACE
> PARSEOP_OPEN_PAREN
> @@ -325,7 +325,7 @@ DWordSpaceTerm
> EndDependentFnTerm
> : PARSEOP_ENDDEPENDENTFN
> PARSEOP_OPEN_PAREN
> - PARSEOP_CLOSE_PAREN {$$ = TrCreateLeafNode (PARSEOP_ENDDEPENDENTFN);}
> + PARSEOP_CLOSE_PAREN {$$ = TrCreateLeafOp (PARSEOP_ENDDEPENDENTFN);}
> | PARSEOP_ENDDEPENDENTFN
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -333,7 +333,7 @@ EndDependentFnTerm
>
> ExtendedIOTerm
> : PARSEOP_EXTENDEDIO
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDIO);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDIO);}
> OptionalResourceType_First
> OptionalMinType
> OptionalMaxType
> @@ -348,7 +348,7 @@ ExtendedIOTerm
> OptionalNameString
> OptionalType
> OptionalTranslationType_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
> $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
> | PARSEOP_EXTENDEDIO
> PARSEOP_OPEN_PAREN
> @@ -357,7 +357,7 @@ ExtendedIOTerm
>
> ExtendedMemoryTerm
> : PARSEOP_EXTENDEDMEMORY
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDMEMORY);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDMEMORY);}
> OptionalResourceType_First
> OptionalDecodeType
> OptionalMinType
> @@ -373,7 +373,7 @@ ExtendedMemoryTerm
> OptionalNameString
> OptionalAddressRange
> OptionalType_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
> $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
> | PARSEOP_EXTENDEDMEMORY
> PARSEOP_OPEN_PAREN
> @@ -381,7 +381,7 @@ ExtendedMemoryTerm
> ;
>
> ExtendedSpaceTerm
> - : PARSEOP_EXTENDEDSPACE PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDSPACE);}
> + : PARSEOP_EXTENDEDSPACE PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDSPACE);}
> ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
> OptionalResourceType
> OptionalDecodeType
> @@ -395,7 +395,7 @@ ExtendedSpaceTerm
> ',' QWordConstExpr
> OptionalQWordConstExpr
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,13,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,13,
> $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
> | PARSEOP_EXTENDEDSPACE
> PARSEOP_OPEN_PAREN
> @@ -404,12 +404,12 @@ ExtendedSpaceTerm
>
> FixedDmaTerm
> : PARSEOP_FIXEDDMA
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDDMA);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDDMA);}
> WordConstExpr /* 04: DMA RequestLines */
> ',' WordConstExpr /* 06: DMA Channels */
> OptionalXferSize /* 07: DMA TransferSize */
> OptionalNameString /* 08: DescriptorName */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$6,$7,$8);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$7,$8);}
> | PARSEOP_FIXEDDMA
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -417,11 +417,11 @@ FixedDmaTerm
>
> FixedIOTerm
> : PARSEOP_FIXEDIO
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDIO);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDIO);}
> WordConstExpr
> ',' ByteConstExpr
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
> | PARSEOP_FIXEDIO
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -429,7 +429,7 @@ FixedIOTerm
>
> GpioIntTerm
> : PARSEOP_GPIO_INT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_GPIO_INT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_INT);}
> InterruptTypeKeyword /* 04: InterruptType */
> ',' InterruptLevel /* 06: InterruptLevel */
> OptionalShareType /* 07: SharedType */
> @@ -441,7 +441,7 @@ GpioIntTerm
> OptionalNameString /* 15: DescriptorName */
> OptionalBuffer_Last /* 16: VendorData */
> PARSEOP_CLOSE_PAREN '{'
> - DWordConstExpr '}' {$$ = TrLinkChildren ($<n>3,11,
> + DWordConstExpr '}' {$$ = TrLinkOpChildren ($<n>3,11,
> $4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
> | PARSEOP_GPIO_INT
> PARSEOP_OPEN_PAREN
> @@ -450,7 +450,7 @@ GpioIntTerm
>
> GpioIoTerm
> : PARSEOP_GPIO_IO
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_GPIO_IO);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_IO);}
> OptionalShareType_First /* 04: SharedType */
> ',' PinConfigByte /* 06: PinConfig */
> OptionalWordConstExpr /* 07: DebounceTimeout */
> @@ -462,7 +462,7 @@ GpioIoTerm
> OptionalNameString /* 14: DescriptorName */
> OptionalBuffer_Last /* 15: VendorData */
> PARSEOP_CLOSE_PAREN '{'
> - DWordList '}' {$$ = TrLinkChildren ($<n>3,11,
> + DWordList '}' {$$ = TrLinkOpChildren ($<n>3,11,
> $4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
> | PARSEOP_GPIO_IO
> PARSEOP_OPEN_PAREN
> @@ -471,7 +471,7 @@ GpioIoTerm
>
> I2cSerialBusTerm
> : PARSEOP_I2C_SERIALBUS
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS);}
> WordConstExpr /* 04: SlaveAddress */
> OptionalSlaveMode /* 05: SlaveMode */
> ',' DWordConstExpr /* 07: ConnectionSpeed */
> @@ -481,9 +481,9 @@ I2cSerialBusTerm
> OptionalResourceType /* 12: ResourceType */
> OptionalNameString /* 13: DescriptorName */
> OptionalBuffer_Last /* 14: VendorData */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,10,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,10,
> $4,$5,$7,$8,$10,$11,$12,$13,
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);}
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$14);}
> | PARSEOP_I2C_SERIALBUS
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -491,7 +491,7 @@ I2cSerialBusTerm
>
> I2cSerialBusTermV2
> : PARSEOP_I2C_SERIALBUS_V2
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS_V2);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS_V2);}
> WordConstExpr /* 04: SlaveAddress */
> OptionalSlaveMode /* 05: SlaveMode */
> ',' DWordConstExpr /* 07: ConnectionSpeed */
> @@ -502,7 +502,7 @@ I2cSerialBusTermV2
> OptionalNameString /* 13: DescriptorName */
> OptionalShareType /* 14: Share */
> OptionalBuffer_Last /* 15: VendorData */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,10,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,10,
> $4,$5,$7,$8,$10,$11,$12,$13,$14,$15);}
> | PARSEOP_I2C_SERIALBUS_V2
> PARSEOP_OPEN_PAREN
> @@ -511,7 +511,7 @@ I2cSerialBusTermV2
>
> InterruptTerm
> : PARSEOP_INTERRUPT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_INTERRUPT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INTERRUPT);}
> OptionalResourceType_First
> ',' InterruptTypeKeyword
> ',' InterruptLevel
> @@ -520,7 +520,7 @@ InterruptTerm
> OptionalStringData
> OptionalNameString_Last
> PARSEOP_CLOSE_PAREN '{'
> - DWordList '}' {$$ = TrLinkChildren ($<n>3,8,
> + DWordList '}' {$$ = TrLinkOpChildren ($<n>3,8,
> $4,$6,$8,$9,$10,$11,$12,$15);}
> | PARSEOP_INTERRUPT
> PARSEOP_OPEN_PAREN
> @@ -529,14 +529,14 @@ InterruptTerm
>
> IOTerm
> : PARSEOP_IO
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_IO);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IO);}
> IODecodeKeyword
> ',' WordConstExpr
> ',' WordConstExpr
> ',' ByteConstExpr
> ',' ByteConstExpr
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
> | PARSEOP_IO
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -544,10 +544,10 @@ IOTerm
>
> IRQNoFlagsTerm
> : PARSEOP_IRQNOFLAGS
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_IRQNOFLAGS);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IRQNOFLAGS);}
> OptionalNameString_First
> PARSEOP_CLOSE_PAREN '{'
> - ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
> + ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
> | PARSEOP_IRQNOFLAGS
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -555,13 +555,13 @@ IRQNoFlagsTerm
>
> IRQTerm
> : PARSEOP_IRQ
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_IRQ);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IRQ);}
> InterruptTypeKeyword
> ',' InterruptLevel
> OptionalShareType
> OptionalNameString_Last
> PARSEOP_CLOSE_PAREN '{'
> - ByteList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$7,$8,$11);}
> + ByteList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$6,$7,$8,$11);}
> | PARSEOP_IRQ
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -569,14 +569,14 @@ IRQTerm
>
> Memory24Term
> : PARSEOP_MEMORY24
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY24);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY24);}
> OptionalReadWriteKeyword
> ',' WordConstExpr
> ',' WordConstExpr
> ',' WordConstExpr
> ',' WordConstExpr
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
> | PARSEOP_MEMORY24
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -584,12 +584,12 @@ Memory24Term
>
> Memory32FixedTerm
> : PARSEOP_MEMORY32FIXED
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32FIXED);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32FIXED);}
> OptionalReadWriteKeyword
> ',' DWordConstExpr
> ',' DWordConstExpr
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$6,$8,$9);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$8,$9);}
> | PARSEOP_MEMORY32FIXED
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -597,14 +597,14 @@ Memory32FixedTerm
>
> Memory32Term
> : PARSEOP_MEMORY32
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32);}
> OptionalReadWriteKeyword
> ',' DWordConstExpr
> ',' DWordConstExpr
> ',' DWordConstExpr
> ',' DWordConstExpr
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
> | PARSEOP_MEMORY32
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -612,7 +612,7 @@ Memory32Term
>
> PinConfigTerm
> : PARSEOP_PINCONFIG
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINCONFIG);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINCONFIG);}
> OptionalShareType_First /* 04: SharedType */
> ',' ByteConstExpr /* 06: PinConfigType */
> ',' DWordConstExpr /* 08: PinConfigValue */
> @@ -622,7 +622,7 @@ PinConfigTerm
> OptionalNameString /* 13: DescriptorName */
> OptionalBuffer_Last /* 14: VendorData */
> PARSEOP_CLOSE_PAREN '{'
> - DWordList '}' {$$ = TrLinkChildren ($<n>3,9,
> + DWordList '}' {$$ = TrLinkOpChildren ($<n>3,9,
> $4,$6,$8,$10,$11,$12,$13,$14,$17);}
> | PARSEOP_PINCONFIG
> PARSEOP_OPEN_PAREN
> @@ -631,7 +631,7 @@ PinConfigTerm
>
> PinFunctionTerm
> : PARSEOP_PINFUNCTION
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINFUNCTION);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINFUNCTION);}
> OptionalShareType_First /* 04: SharedType */
> ',' PinConfigByte /* 06: PinConfig */
> ',' WordConstExpr /* 08: FunctionNumber */
> @@ -641,7 +641,7 @@ PinFunctionTerm
> OptionalNameString /* 13: DescriptorName */
> OptionalBuffer_Last /* 14: VendorData */
> PARSEOP_CLOSE_PAREN '{'
> - DWordList '}' {$$ = TrLinkChildren ($<n>3,9,
> + DWordList '}' {$$ = TrLinkOpChildren ($<n>3,9,
> $4,$6,$8,$10,$11,$12,$13,$14,$17);}
> | PARSEOP_PINFUNCTION
> PARSEOP_OPEN_PAREN
> @@ -650,13 +650,13 @@ PinFunctionTerm
>
> PinGroupTerm
> : PARSEOP_PINGROUP
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINGROUP);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUP);}
> StringData /* 04: ResourceLabel */
> OptionalProducerResourceType /* 05: ResourceType */
> OptionalNameString /* 06: DescriptorName */
> OptionalBuffer_Last /* 07: VendorData */
> PARSEOP_CLOSE_PAREN '{'
> - DWordList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$5,$6,$7,$10);}
> + DWordList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$6,$7,$10);}
> | PARSEOP_PINGROUP
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -664,7 +664,7 @@ PinGroupTerm
>
> PinGroupConfigTerm
> : PARSEOP_PINGROUPCONFIG
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINGROUPCONFIG);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPCONFIG);}
> OptionalShareType_First /* 04: SharedType */
> ',' ByteConstExpr /* 06: PinConfigType */
> ',' DWordConstExpr /* 08: PinConfigValue */
> @@ -674,7 +674,7 @@ PinGroupConfigTerm
> OptionalResourceType /* 14: ResourceType */
> OptionalNameString /* 15: DescriptorName */
> OptionalBuffer_Last /* 16: VendorData */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,9,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,9,
> $4,$6,$8,$10,$11,$13,$14,$15,$16);}
> | PARSEOP_PINGROUPCONFIG
> PARSEOP_OPEN_PAREN
> @@ -683,7 +683,7 @@ PinGroupConfigTerm
>
> PinGroupFunctionTerm
> : PARSEOP_PINGROUPFUNCTION
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINGROUPFUNCTION);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPFUNCTION);}
> OptionalShareType_First /* 04: SharedType */
> ',' WordConstExpr /* 06: FunctionNumber */
> ',' StringData /* 08: ResourceSource */
> @@ -692,7 +692,7 @@ PinGroupFunctionTerm
> OptionalResourceType /* 12: ResourceType */
> OptionalNameString /* 13: DescriptorName */
> OptionalBuffer_Last /* 14: VendorData */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,8,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,8,
> $4,$6,$8,$9,$11,$12,$13,$14);}
> | PARSEOP_PINGROUPFUNCTION
> PARSEOP_OPEN_PAREN
> @@ -701,7 +701,7 @@ PinGroupFunctionTerm
>
> QWordIOTerm
> : PARSEOP_QWORDIO
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDIO);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDIO);}
> OptionalResourceType_First
> OptionalMinType
> OptionalMaxType
> @@ -717,7 +717,7 @@ QWordIOTerm
> OptionalNameString
> OptionalType
> OptionalTranslationType_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
> $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
> | PARSEOP_QWORDIO
> PARSEOP_OPEN_PAREN
> @@ -726,7 +726,7 @@ QWordIOTerm
>
> QWordMemoryTerm
> : PARSEOP_QWORDMEMORY
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDMEMORY);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDMEMORY);}
> OptionalResourceType_First
> OptionalDecodeType
> OptionalMinType
> @@ -743,7 +743,7 @@ QWordMemoryTerm
> OptionalNameString
> OptionalAddressRange
> OptionalType_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,16,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,16,
> $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
> | PARSEOP_QWORDMEMORY
> PARSEOP_OPEN_PAREN
> @@ -752,7 +752,7 @@ QWordMemoryTerm
>
> QWordSpaceTerm
> : PARSEOP_QWORDSPACE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDSPACE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDSPACE);}
> ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
> OptionalResourceType
> OptionalDecodeType
> @@ -767,7 +767,7 @@ QWordSpaceTerm
> OptionalByteConstExpr
> OptionalStringData
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
> $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
> | PARSEOP_QWORDSPACE
> PARSEOP_OPEN_PAREN
> @@ -776,14 +776,14 @@ QWordSpaceTerm
>
> RegisterTerm
> : PARSEOP_REGISTER
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_REGISTER);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_REGISTER);}
> AddressSpaceKeyword
> ',' ByteConstExpr
> ',' ByteConstExpr
> ',' QWordConstExpr
> OptionalAccessSize
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
> | PARSEOP_REGISTER
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -791,7 +791,7 @@ RegisterTerm
>
> SpiSerialBusTerm
> : PARSEOP_SPI_SERIALBUS
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS);}
> WordConstExpr /* 04: DeviceSelection */
> OptionalDevicePolarity /* 05: DevicePolarity */
> OptionalWireMode /* 06: WireMode */
> @@ -805,9 +805,9 @@ SpiSerialBusTerm
> OptionalResourceType /* 19: ResourceType */
> OptionalNameString /* 20: DescriptorName */
> OptionalBuffer_Last /* 21: VendorData */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
> $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
> | PARSEOP_SPI_SERIALBUS
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -815,7 +815,7 @@ SpiSerialBusTerm
>
> SpiSerialBusTermV2
> : PARSEOP_SPI_SERIALBUS_V2
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS_V2);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS_V2);}
> WordConstExpr /* 04: DeviceSelection */
> OptionalDevicePolarity /* 05: DevicePolarity */
> OptionalWireMode /* 06: WireMode */
> @@ -830,7 +830,7 @@ SpiSerialBusTermV2
> OptionalNameString /* 20: DescriptorName */
> OptionalShareType /* 21: Share */
> OptionalBuffer_Last /* 22: VendorData */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
> $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
> | PARSEOP_SPI_SERIALBUS_V2
> PARSEOP_OPEN_PAREN
> @@ -839,9 +839,9 @@ SpiSerialBusTermV2
>
> StartDependentFnNoPriTerm
> : PARSEOP_STARTDEPENDENTFN_NOPRI
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN_NOPRI);}
> PARSEOP_CLOSE_PAREN '{'
> - ResourceMacroList '}' {$$ = TrLinkChildren ($<n>3,1,$6);}
> + ResourceMacroList '}' {$$ = TrLinkOpChildren ($<n>3,1,$6);}
> | PARSEOP_STARTDEPENDENTFN_NOPRI
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -849,11 +849,11 @@ StartDependentFnNoPriTerm
>
> StartDependentFnTerm
> : PARSEOP_STARTDEPENDENTFN
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN);}
> ByteConstExpr
> ',' ByteConstExpr
> PARSEOP_CLOSE_PAREN '{'
> - ResourceMacroList '}' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$9);}
> + ResourceMacroList '}' {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$9);}
> | PARSEOP_STARTDEPENDENTFN
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -861,7 +861,7 @@ StartDependentFnTerm
>
> UartSerialBusTerm
> : PARSEOP_UART_SERIALBUS
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS);}
> DWordConstExpr /* 04: ConnectionSpeed */
> OptionalBitsPerByte /* 05: BitsPerByte */
> OptionalStopBits /* 06: StopBits */
> @@ -876,9 +876,9 @@ UartSerialBusTerm
> OptionalResourceType /* 19: ResourceType */
> OptionalNameString /* 20: DescriptorName */
> OptionalBuffer_Last /* 21: VendorData */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
> $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
> | PARSEOP_UART_SERIALBUS
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -886,7 +886,7 @@ UartSerialBusTerm
>
> UartSerialBusTermV2
> : PARSEOP_UART_SERIALBUS_V2
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS_V2);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS_V2);}
> DWordConstExpr /* 04: ConnectionSpeed */
> OptionalBitsPerByte /* 05: BitsPerByte */
> OptionalStopBits /* 06: StopBits */
> @@ -902,7 +902,7 @@ UartSerialBusTermV2
> OptionalNameString /* 20: DescriptorName */
> OptionalShareType /* 21: Share */
> OptionalBuffer_Last /* 22: VendorData */
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
> $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
> | PARSEOP_UART_SERIALBUS_V2
> PARSEOP_OPEN_PAREN
> @@ -911,10 +911,10 @@ UartSerialBusTermV2
>
> VendorLongTerm
> : PARSEOP_VENDORLONG
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORLONG);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORLONG);}
> OptionalNameString_First
> PARSEOP_CLOSE_PAREN '{'
> - ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
> + ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
> | PARSEOP_VENDORLONG
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -922,10 +922,10 @@ VendorLongTerm
>
> VendorShortTerm
> : PARSEOP_VENDORSHORT
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORSHORT);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORSHORT);}
> OptionalNameString_First
> PARSEOP_CLOSE_PAREN '{'
> - ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
> + ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
> | PARSEOP_VENDORSHORT
> PARSEOP_OPEN_PAREN
> error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
> @@ -933,7 +933,7 @@ VendorShortTerm
>
> WordBusNumberTerm
> : PARSEOP_WORDBUSNUMBER
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WORDBUSNUMBER);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDBUSNUMBER);}
> OptionalResourceType_First
> OptionalMinType
> OptionalMaxType
> @@ -946,7 +946,7 @@ WordBusNumberTerm
> OptionalByteConstExpr
> OptionalStringData
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,12,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,12,
> $4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
> | PARSEOP_WORDBUSNUMBER
> PARSEOP_OPEN_PAREN
> @@ -955,7 +955,7 @@ WordBusNumberTerm
>
> WordIOTerm
> : PARSEOP_WORDIO
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WORDIO);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDIO);}
> OptionalResourceType_First
> OptionalMinType
> OptionalMaxType
> @@ -971,7 +971,7 @@ WordIOTerm
> OptionalNameString
> OptionalType
> OptionalTranslationType_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
> $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
> | PARSEOP_WORDIO
> PARSEOP_OPEN_PAREN
> @@ -980,7 +980,7 @@ WordIOTerm
>
> WordSpaceTerm
> : PARSEOP_WORDSPACE
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WORDSPACE);}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDSPACE);}
> ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
> OptionalResourceType
> OptionalDecodeType
> @@ -995,7 +995,7 @@ WordSpaceTerm
> OptionalByteConstExpr
> OptionalStringData
> OptionalNameString_Last
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
> $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
> | PARSEOP_WORDSPACE
> PARSEOP_OPEN_PAREN
> diff --git a/src/acpica/source/compiler/aslrules.y b/src/acpica/source/compiler/aslrules.y
> index d09852c7..eb785069 100644
> --- a/src/acpica/source/compiler/aslrules.y
> +++ b/src/acpica/source/compiler/aslrules.y
> @@ -165,8 +165,8 @@ NoEcho('
> * to handle output from preprocessors
> */
> AslCode
> - : DefinitionBlockList {$<n>$ = TrLinkChildren (
> - TrCreateLeafNode (PARSEOP_ASL_CODE),1, $1);}
> + : DefinitionBlockList {$<n>$ = TrLinkOpChildren (
> + TrCreateLeafOp (PARSEOP_ASL_CODE),1, $1);}
> | error {YYABORT; $$ = NULL;}
> ;
>
> @@ -192,22 +192,22 @@ AslCode
> */
> DefinitionBlockTerm
> : PARSEOP_DEFINITION_BLOCK
> - PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK); COMMENT_CAPTURE_OFF;}
> + PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEFINITION_BLOCK); COMMENT_CAPTURE_OFF;}
> String ','
> String ','
> ByteConst ','
> String ','
> String ','
> DWordConst
> - PARSEOP_CLOSE_PAREN {TrSetEndLineNumber ($<n>3); COMMENT_CAPTURE_ON;}
> - '{' TermList '}' {$$ = TrLinkChildren ($<n>3,7,
> + PARSEOP_CLOSE_PAREN {TrSetOpEndLineNumber ($<n>3); COMMENT_CAPTURE_ON;}
> + '{' TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
> $4,$6,$8,$10,$12,$14,$18);}
> ;
>
> DefinitionBlockList
> : DefinitionBlockTerm
> | DefinitionBlockTerm
> - DefinitionBlockList {$$ = TrLinkPeerNodes (2, $1,$2);}
> + DefinitionBlockList {$$ = TrLinkPeerOps (2, $1,$2);}
> ;
>
>
> @@ -217,21 +217,21 @@ DefinitionBlockList
>
> NameString
> : NameSeg {}
> - | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) $1);}
> - | PARSEOP_IO {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");}
> - | PARSEOP_DMA {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");}
> - | PARSEOP_IRQ {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");}
> - | PARSEOP_FOR {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "FOR");}
> + | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) $1);}
> + | PARSEOP_IO {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");}
> + | PARSEOP_DMA {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");}
> + | PARSEOP_IRQ {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");}
> + | PARSEOP_FOR {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "FOR");}
> ;
> /*
> NameSeg
> - : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT)
> + : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESEG, (ACPI_NATIVE_INT)
> TrNormalizeNameSeg ($1));}
> ;
> */
>
> NameSeg
> - : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
> + : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESEG,
> (ACPI_NATIVE_INT) AslCompilerlval.s);}
> ;
>
> @@ -242,8 +242,8 @@ Term
> : Object {}
> | Type1Opcode {}
> | Type2Opcode {}
> - | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> - | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> + | Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> | Type2BufferOpcode {}
> | Type2BufferOrStringOpcode {}
> | error {$$ = AslDoError(); yyclearin;}
> @@ -256,45 +256,45 @@ SuperName
> ;
>
> Target
> - : {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
> - | ',' {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
> - | ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
> + : {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */
> + | ',' {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */
> + | ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);}
> ;
>
> RequiredTarget
> - : ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
> + : ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);}
> ;
>
> TermArg
> - : SimpleName {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> - | Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> - | DataObject {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> + : SimpleName {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
> + | Type2Opcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
> + | DataObject {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
> | PARSEOP_OPEN_PAREN
> TermArg
> - PARSEOP_CLOSE_PAREN {$$ = TrSetNodeFlags ($2, NODE_IS_TERM_ARG);}
> + PARSEOP_CLOSE_PAREN {$$ = TrSetOpFlags ($2, OP_IS_TERM_ARG);}
> ;
>
> /*
> NOTE: Removed from TermArg due to reduce/reduce conflicts:
> - | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> - | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> - | Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> - | Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> + | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
> + | Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
> + | Type2BufferOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
> + | Type2BufferOrStringOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
>
> */
>
> MethodInvocationTerm
> : NameString
> - PARSEOP_OPEN_PAREN {TrUpdateNode (PARSEOP_METHODCALL, $1); COMMENT_CAPTURE_OFF;}
> + PARSEOP_OPEN_PAREN {TrSetOpIntegerValue (PARSEOP_METHODCALL, $1); COMMENT_CAPTURE_OFF;}
> ArgList
> - PARSEOP_CLOSE_PAREN {$$ = TrLinkChildNode ($1,$4); COMMENT_CAPTURE_ON;}
> + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildOp ($1,$4); COMMENT_CAPTURE_ON;}
> ;
>
> /* OptionalCount must appear before ByteList or an incorrect reduction will result */
>
> OptionalCount
> - : {$$ = TrCreateLeafNode (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
> - | ',' {$$ = TrCreateLeafNode (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
> + : {$$ = TrCreateLeafOp (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
> + | ',' {$$ = TrCreateLeafOp (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
> | ',' TermArg {$$ = $2;}
> ;
>
> @@ -334,14 +334,14 @@ OptionalDataCount
>
> TermList
> : {$$ = NULL;}
> - | TermList Term {$$ = TrLinkPeerNode (
> - TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$2);}
> - | TermList Term ';' {$$ = TrLinkPeerNode (
> - TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$2);}
> - | TermList ';' Term {$$ = TrLinkPeerNode (
> - TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$3);}
> - | TermList ';' Term ';' {$$ = TrLinkPeerNode (
> - TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$3);}
> + | TermList Term {$$ = TrLinkPeerOp (
> + TrSetOpFlags ($1, OP_RESULT_NOT_USED),$2);}
> + | TermList Term ';' {$$ = TrLinkPeerOp (
> + TrSetOpFlags ($1, OP_RESULT_NOT_USED),$2);}
> + | TermList ';' Term {$$ = TrLinkPeerOp (
> + TrSetOpFlags ($1, OP_RESULT_NOT_USED),$3);}
> + | TermList ';' Term ';' {$$ = TrLinkPeerOp (
> + TrSetOpFlags ($1, OP_RESULT_NOT_USED),$3);}
> ;
>
> ArgList
> @@ -349,7 +349,7 @@ ArgList
> | TermArg
> | ArgList ',' /* Allows a trailing comma at list end */
> | ArgList ','
> - TermArg {$$ = TrLinkPeerNode ($1,$3);}
> + TermArg {$$ = TrLinkPeerOp ($1,$3);}
> ;
>
> ByteList
> @@ -357,7 +357,7 @@ ByteList
> | ByteConstExpr
> | ByteList ',' /* Allows a trailing comma at list end */
> | ByteList ','
> - ByteConstExpr {$$ = TrLinkPeerNode ($1,$3);}
> + ByteConstExpr {$$ = TrLinkPeerOp ($1,$3);}
> ;
>
> DWordList
> @@ -365,7 +365,7 @@ DWordList
> | DWordConstExpr
> | DWordList ',' /* Allows a trailing comma at list end */
> | DWordList ','
> - DWordConstExpr {$$ = TrLinkPeerNode ($1,$3);}
> + DWordConstExpr {$$ = TrLinkPeerOp ($1,$3);}
> ;
>
> FieldUnitList
> @@ -373,7 +373,7 @@ FieldUnitList
> | FieldUnit
> | FieldUnitList ',' /* Allows a trailing comma at list end */
> | FieldUnitList ','
> - FieldUnit {$$ = TrLinkPeerNode ($1,$3);}
> + FieldUnit {$$ = TrLinkPeerOp ($1,$3);}
> ;
>
> FieldUnit
> @@ -384,9 +384,9 @@ FieldUnit
> ;
>
> FieldUnitEntry
> - : ',' AmlPackageLengthTerm {$$ = TrCreateNode (PARSEOP_RESERVED_BYTES,1,$2);}
> + : ',' AmlPackageLengthTerm {$$ = TrCreateOp (PARSEOP_RESERVED_BYTES,1,$2);}
> | NameSeg ','
> - AmlPackageLengthTerm {$$ = TrLinkChildNode ($1,$3);}
> + AmlPackageLengthTerm {$$ = TrLinkChildOp ($1,$3);}
> ;
>
> Object
> @@ -401,7 +401,7 @@ PackageList
> | PackageElement
> | PackageList ',' /* Allows a trailing comma at list end */
> | PackageList ','
> - PackageElement {$$ = TrLinkPeerNode ($1,$3);}
> + PackageElement {$$ = TrLinkPeerOp ($1,$3);}
> ;
>
> PackageElement
> @@ -415,7 +415,7 @@ ParameterTypePackage
> : {$$ = NULL;}
> | ObjectTypeKeyword {$$ = $1;}
> | ParameterTypePackage ','
> - ObjectTypeKeyword {$$ = TrLinkPeerNodes (2,$1,$3);}
> + ObjectTypeKeyword {$$ = TrLinkPeerOps (2,$1,$3);}
> ;
>
> ParameterTypePackageList
> @@ -425,9 +425,9 @@ ParameterTypePackageList
> ;
>
> OptionalParameterTypePackage
> - : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
> - | ',' ParameterTypePackageList {$$ = TrLinkChildren (
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
> + : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
> + | ',' ParameterTypePackageList {$$ = TrLinkOpChildren (
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
> ;
>
> /* Rules for specifying the types for method arguments */
> @@ -435,7 +435,7 @@ OptionalParameterTypePackage
> ParameterTypesPackage
> : ParameterTypePackageList {$$ = $1;}
> | ParameterTypesPackage ','
> - ParameterTypePackageList {$$ = TrLinkPeerNodes (2,$1,$3);}
> + ParameterTypePackageList {$$ = TrLinkPeerOps (2,$1,$3);}
> ;
>
> ParameterTypesPackageList
> @@ -445,9 +445,9 @@ ParameterTypesPackageList
> ;
>
> OptionalParameterTypesPackage
> - : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
> - | ',' ParameterTypesPackageList {$$ = TrLinkChildren (
> - TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
> + : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
> + | ',' ParameterTypesPackageList {$$ = TrLinkOpChildren (
> + TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
> ;
>
> /*
> @@ -458,9 +458,9 @@ CaseDefaultTermList
> | CaseTerm {}
> | DefaultTerm {}
> | CaseDefaultTermList
> - CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
> + CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
> | CaseDefaultTermList
> - DefaultTerm {$$ = TrLinkPeerNode ($1,$2);}
> + DefaultTerm {$$ = TrLinkPeerOp ($1,$2);}
>
> /* Original - attempts to force zero or one default term within the switch */
>
> @@ -469,16 +469,16 @@ CaseDefaultTermList
> : {$$ = NULL;}
> | CaseTermList
> DefaultTerm
> - CaseTermList {$$ = TrLinkPeerNode ($1,TrLinkPeerNode ($2, $3));}
> + CaseTermList {$$ = TrLinkPeerOp ($1,TrLinkPeerOp ($2, $3));}
> | CaseTermList
> - CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
> + CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
> ;
>
> CaseTermList
> : {$$ = NULL;}
> | CaseTerm {}
> | CaseTermList
> - CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
> + CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
> ;
> */
>
> @@ -497,9 +497,9 @@ DataObject
> ;
>
> BufferData
> - : Type5Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> - | Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> - | Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + : Type5Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> + | Type2BufferOrStringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> + | Type2BufferOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> | BufferTerm {}
> ;
>
> @@ -508,35 +508,35 @@ PackageData
> ;
>
> IntegerData
> - : Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> - | Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + : Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> + | Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> | Integer {}
> | ConstTerm {}
> ;
>
> StringData
> - : Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + : Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> | String {}
> ;
>
> ByteConst
> - : Integer {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
> + : Integer {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);}
> ;
>
> WordConst
> - : Integer {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
> + : Integer {$$ = TrSetOpIntegerValue (PARSEOP_WORDCONST, $1);}
> ;
>
> DWordConst
> - : Integer {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
> + : Integer {$$ = TrSetOpIntegerValue (PARSEOP_DWORDCONST, $1);}
> ;
>
> QWordConst
> - : Integer {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
> + : Integer {$$ = TrSetOpIntegerValue (PARSEOP_QWORDCONST, $1);}
> ;
>
> /*
> - * The NODE_COMPILE_TIME_CONST flag in the following constant expressions
> + * The OP_COMPILE_TIME_CONST flag in the following constant expressions
> * enables compile-time constant folding to reduce the Type3Opcodes/Type2IntegerOpcodes
> * to simple integers. It is an error if these types of expressions cannot be
> * reduced, since the AML grammar for ****ConstExpr requires a simple constant.
> @@ -544,63 +544,63 @@ QWordConst
> * constant folding code in the node AmlLength field.
> */
> ByteConstExpr
> - : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
> - TrSetNodeAmlLength ($1, 1);}
> - | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
> - TrSetNodeAmlLength ($1, 1);}
> - | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
> + : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
> + TrSetOpAmlLength ($1, 1);}
> + | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
> + TrSetOpAmlLength ($1, 1);}
> + | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);}
> | ByteConst {}
> ;
>
> WordConstExpr
> - : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
> - TrSetNodeAmlLength ($1, 2);}
> - | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
> - TrSetNodeAmlLength ($1, 2);}
> - | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
> + : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
> + TrSetOpAmlLength ($1, 2);}
> + | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
> + TrSetOpAmlLength ($1, 2);}
> + | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_WORDCONST, $1);}
> | WordConst {}
> ;
>
> DWordConstExpr
> - : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
> - TrSetNodeAmlLength ($1, 4);}
> - | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
> - TrSetNodeAmlLength ($1, 4);}
> - | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
> + : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
> + TrSetOpAmlLength ($1, 4);}
> + | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
> + TrSetOpAmlLength ($1, 4);}
> + | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_DWORDCONST, $1);}
> | DWordConst {}
> ;
>
> QWordConstExpr
> - : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
> - TrSetNodeAmlLength ($1, 8);}
> - | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
> - TrSetNodeAmlLength ($1, 8);}
> - | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
> + : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
> + TrSetOpAmlLength ($1, 8);}
> + | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
> + TrSetOpAmlLength ($1, 8);}
> + | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_QWORDCONST, $1);}
> | QWordConst {}
> ;
>
> ConstTerm
> : ConstExprTerm {}
> - | PARSEOP_REVISION {$$ = TrCreateLeafNode (PARSEOP_REVISION);}
> + | PARSEOP_REVISION {$$ = TrCreateLeafOp (PARSEOP_REVISION);}
> ;
>
> ConstExprTerm
> - : PARSEOP_ZERO {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);}
> - | PARSEOP_ONE {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);}
> - | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_UINT64_MAX);}
> - | PARSEOP___DATE__ {$$ = TrCreateConstantLeafNode (PARSEOP___DATE__);}
> - | PARSEOP___FILE__ {$$ = TrCreateConstantLeafNode (PARSEOP___FILE__);}
> - | PARSEOP___LINE__ {$$ = TrCreateConstantLeafNode (PARSEOP___LINE__);}
> - | PARSEOP___PATH__ {$$ = TrCreateConstantLeafNode (PARSEOP___PATH__);}
> + : PARSEOP_ZERO {$$ = TrCreateValuedLeafOp (PARSEOP_ZERO, 0);}
> + | PARSEOP_ONE {$$ = TrCreateValuedLeafOp (PARSEOP_ONE, 1);}
> + | PARSEOP_ONES {$$ = TrCreateValuedLeafOp (PARSEOP_ONES, ACPI_UINT64_MAX);}
> + | PARSEOP___DATE__ {$$ = TrCreateConstantLeafOp (PARSEOP___DATE__);}
> + | PARSEOP___FILE__ {$$ = TrCreateConstantLeafOp (PARSEOP___FILE__);}
> + | PARSEOP___LINE__ {$$ = TrCreateConstantLeafOp (PARSEOP___LINE__);}
> + | PARSEOP___PATH__ {$$ = TrCreateConstantLeafOp (PARSEOP___PATH__);}
> ;
>
> Integer
> - : PARSEOP_INTEGER {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER,
> + : PARSEOP_INTEGER {$$ = TrCreateValuedLeafOp (PARSEOP_INTEGER,
> AslCompilerlval.i);}
> ;
>
> String
> - : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
> + : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafOp (PARSEOP_STRING_LITERAL,
> (ACPI_NATIVE_INT) AslCompilerlval.s);}
> ;
>
> @@ -739,7 +739,7 @@ Type2Opcode
> * Type 3/4/5 opcodes
> */
> Type2IntegerOpcode /* "Type3" opcodes */
> - : Expression {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + : Expression {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> | AddTerm {}
> | AndTerm {}
> | DecTerm {}
> @@ -788,7 +788,7 @@ Type2BufferOpcode /* "Type5" Opcodes */
> ;
>
> Type2BufferOrStringOpcode
> - : ConcatTerm {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + : ConcatTerm {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
> | PrintfTerm {}
> | FprintfTerm {}
> | MidTerm {}
> @@ -838,7 +838,7 @@ Type6Opcode
> ******************************************************************************/
>
> AmlPackageLengthTerm
> - : Integer {$$ = TrUpdateNode (PARSEOP_PACKAGE_LENGTH,
> + : Integer {$$ = TrSetOpIntegerValue (PARSEOP_PACKAGE_LENGTH,
> (ACPI_PARSE_OBJECT *) $1);}
> ;
>
> @@ -853,14 +853,14 @@ TermArgItem
> ;
>
> OptionalReference
> - : {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
> - | ',' {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
> + : {$$ = TrCreateLeafOp (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
> + | ',' {$$ = TrCreateLeafOp (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
> | ',' TermArg {$$ = $2;}
> ;
>
> OptionalReturnArg
> - : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
> - NODE_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
> + : {$$ = TrSetOpFlags (TrCreateLeafOp (PARSEOP_ZERO),
> + OP_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
> | TermArg {$$ = $1;}
> ;
>
> @@ -871,7 +871,7 @@ OptionalSerializeRuleKeyword
> ;
>
> OptionalTermArg
> - : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
> + : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
> | TermArg {$$ = $1;}
> ;
>
> diff --git a/src/acpica/source/compiler/aslstartup.c b/src/acpica/source/compiler/aslstartup.c
> index 2f037bf8..72c0d641 100644
> --- a/src/acpica/source/compiler/aslstartup.c
> +++ b/src/acpica/source/compiler/aslstartup.c
> @@ -237,7 +237,7 @@ AslInitializeGlobals (
> {
> Gbl_CommentState.SpacesBefore = 0;
> Gbl_CommentState.CommentType = 1;
> - Gbl_CommentState.Latest_Parse_Node = NULL;
> + Gbl_CommentState.LatestParseOp = NULL;
> Gbl_CommentState.ParsingParenBraceNode = NULL;
> Gbl_CommentState.CaptureComments = TRUE;
> }
> diff --git a/src/acpica/source/compiler/aslsupport.y b/src/acpica/source/compiler/aslsupport.y
> index 0eefb7be..bcced923 100644
> --- a/src/acpica/source/compiler/aslsupport.y
> +++ b/src/acpica/source/compiler/aslsupport.y
> @@ -195,7 +195,7 @@ AslDoError (
> void)
> {
>
> - return (TrCreateLeafNode (PARSEOP_ERRORNODE));
> + return (TrCreateLeafOp (PARSEOP_ERRORNODE));
> }
>
>
> diff --git a/src/acpica/source/compiler/asltransform.c b/src/acpica/source/compiler/asltransform.c
> index 7dc1f72b..d3ed53a1 100644
> --- a/src/acpica/source/compiler/asltransform.c
> +++ b/src/acpica/source/compiler/asltransform.c
> @@ -602,7 +602,7 @@ TrDoSwitch (
> {
> /* Add an ELSE to complete the previous CASE */
>
> - NewOp = TrCreateLeafNode (PARSEOP_ELSE);
> + NewOp = TrCreateLeafOp (PARSEOP_ELSE);
> NewOp->Asl.Parent = Conditional->Asl.Parent;
> TrAmlInitLineNumbers (NewOp, NewOp->Asl.Parent);
>
> @@ -627,49 +627,49 @@ TrDoSwitch (
> * If (LNotEqual (Match (Package(<size>){<data>},
> * MEQ, _T_x, MTR, Zero, Zero), Ones))
> */
> - NewOp2 = TrCreateLeafNode (PARSEOP_MATCHTYPE_MEQ);
> + NewOp2 = TrCreateLeafOp (PARSEOP_MATCHTYPE_MEQ);
> Predicate->Asl.Next = NewOp2;
> TrAmlInitLineNumbers (NewOp2, Conditional);
>
> NewOp = NewOp2;
> - NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESTRING,
> + NewOp2 = TrCreateValuedLeafOp (PARSEOP_NAMESTRING,
> (UINT64) ACPI_TO_INTEGER (PredicateValueName));
> NewOp->Asl.Next = NewOp2;
> TrAmlInitLineNumbers (NewOp2, Predicate);
>
> NewOp = NewOp2;
> - NewOp2 = TrCreateLeafNode (PARSEOP_MATCHTYPE_MTR);
> + NewOp2 = TrCreateLeafOp (PARSEOP_MATCHTYPE_MTR);
> NewOp->Asl.Next = NewOp2;
> TrAmlInitLineNumbers (NewOp2, Predicate);
>
> NewOp = NewOp2;
> - NewOp2 = TrCreateLeafNode (PARSEOP_ZERO);
> + NewOp2 = TrCreateLeafOp (PARSEOP_ZERO);
> NewOp->Asl.Next = NewOp2;
> TrAmlInitLineNumbers (NewOp2, Predicate);
>
> NewOp = NewOp2;
> - NewOp2 = TrCreateLeafNode (PARSEOP_ZERO);
> + NewOp2 = TrCreateLeafOp (PARSEOP_ZERO);
> NewOp->Asl.Next = NewOp2;
> TrAmlInitLineNumbers (NewOp2, Predicate);
>
> - NewOp2 = TrCreateLeafNode (PARSEOP_MATCH);
> + NewOp2 = TrCreateLeafOp (PARSEOP_MATCH);
> NewOp2->Asl.Child = Predicate; /* PARSEOP_PACKAGE */
> TrAmlInitLineNumbers (NewOp2, Conditional);
> TrAmlSetSubtreeParent (Predicate, NewOp2);
>
> NewOp = NewOp2;
> - NewOp2 = TrCreateLeafNode (PARSEOP_ONES);
> + NewOp2 = TrCreateLeafOp (PARSEOP_ONES);
> NewOp->Asl.Next = NewOp2;
> TrAmlInitLineNumbers (NewOp2, Conditional);
>
> - NewOp2 = TrCreateLeafNode (PARSEOP_LEQUAL);
> + NewOp2 = TrCreateLeafOp (PARSEOP_LEQUAL);
> NewOp2->Asl.Child = NewOp;
> NewOp->Asl.Parent = NewOp2;
> TrAmlInitLineNumbers (NewOp2, Conditional);
> TrAmlSetSubtreeParent (NewOp, NewOp2);
>
> NewOp = NewOp2;
> - NewOp2 = TrCreateLeafNode (PARSEOP_LNOT);
> + NewOp2 = TrCreateLeafOp (PARSEOP_LNOT);
> NewOp2->Asl.Child = NewOp;
> NewOp2->Asl.Parent = Conditional;
> NewOp->Asl.Parent = NewOp2;
> @@ -690,12 +690,12 @@ TrDoSwitch (
> * CaseOp->Child is the case value
> * CaseOp->Child->Peer is the beginning of the case block
> */
> - NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESTRING,
> + NewOp = TrCreateValuedLeafOp (PARSEOP_NAMESTRING,
> (UINT64) ACPI_TO_INTEGER (PredicateValueName));
> NewOp->Asl.Next = Predicate;
> TrAmlInitLineNumbers (NewOp, Predicate);
>
> - NewOp2 = TrCreateLeafNode (PARSEOP_LEQUAL);
> + NewOp2 = TrCreateLeafOp (PARSEOP_LEQUAL);
> NewOp2->Asl.Parent = Conditional;
> NewOp2->Asl.Child = NewOp;
> TrAmlInitLineNumbers (NewOp2, Conditional);
> @@ -792,7 +792,7 @@ TrDoSwitch (
> /* Create the Name node */
>
> Predicate = StartNode->Asl.Child;
> - NewOp = TrCreateLeafNode (PARSEOP_NAME);
> + NewOp = TrCreateLeafOp (PARSEOP_NAME);
> TrAmlInitLineNumbers (NewOp, StartNode);
>
> /* Find the parent method */
> @@ -805,7 +805,7 @@ TrDoSwitch (
> }
> MethodOp = Next;
>
> - NewOp->Asl.CompileFlags |= NODE_COMPILER_EMITTED;
> + NewOp->Asl.CompileFlags |= OP_COMPILER_EMITTED;
> NewOp->Asl.Parent = Next;
>
> /* Insert name after the method name and arguments */
> @@ -836,10 +836,10 @@ TrDoSwitch (
>
> /* Create the NameSeg child for the Name node */
>
> - NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
> + NewOp2 = TrCreateValuedLeafOp (PARSEOP_NAMESEG,
> (UINT64) ACPI_TO_INTEGER (PredicateValueName));
> TrAmlInitLineNumbers (NewOp2, NewOp);
> - NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION;
> + NewOp2->Asl.CompileFlags |= OP_IS_NAME_DECLARATION;
> NewOp->Asl.Child = NewOp2;
>
> /* Create the initial value for the Name. Btype was already validated above */
> @@ -848,31 +848,32 @@ TrDoSwitch (
> {
> case ACPI_BTYPE_INTEGER:
>
> - NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO,
> + NewOp2->Asl.Next = TrCreateValuedLeafOp (PARSEOP_ZERO,
> (UINT64) 0);
> TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
> break;
>
> case ACPI_BTYPE_STRING:
>
> - NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
> + NewOp2->Asl.Next = TrCreateValuedLeafOp (PARSEOP_STRING_LITERAL,
> (UINT64) ACPI_TO_INTEGER (""));
> TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
> break;
>
> case ACPI_BTYPE_BUFFER:
>
> - (void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
> + (void) TrLinkPeerOp (NewOp2, TrCreateValuedLeafOp (PARSEOP_BUFFER,
> (UINT64) 0));
> Next = NewOp2->Asl.Next;
> TrAmlInitLineNumbers (Next, NewOp2);
> - (void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO,
> +
> + (void) TrLinkOpChildren (Next, 1, TrCreateValuedLeafOp (PARSEOP_ZERO,
> (UINT64) 1));
> TrAmlInitLineNumbers (Next->Asl.Child, Next);
>
> - BufferOp = TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0);
> + BufferOp = TrCreateValuedLeafOp (PARSEOP_DEFAULT_ARG, (UINT64) 0);
> TrAmlInitLineNumbers (BufferOp, Next->Asl.Child);
> - (void) TrLinkPeerNode (Next->Asl.Child, BufferOp);
> + (void) TrLinkPeerOp (Next->Asl.Child, BufferOp);
>
> TrAmlSetSubtreeParent (Next->Asl.Child, Next);
> break;
> @@ -891,7 +892,7 @@ TrDoSwitch (
> * where _T_x is the temp variable.
> */
> TrAmlInitNode (StartNode, PARSEOP_WHILE);
> - NewOp = TrCreateLeafNode (PARSEOP_ONE);
> + NewOp = TrCreateLeafOp (PARSEOP_ONE);
> TrAmlInitLineNumbers (NewOp, StartNode);
> NewOp->Asl.Next = Predicate->Asl.Next;
> NewOp->Asl.Parent = StartNode;
> @@ -899,7 +900,7 @@ TrDoSwitch (
>
> /* Create a Store() node */
>
> - StoreOp = TrCreateLeafNode (PARSEOP_STORE);
> + StoreOp = TrCreateLeafOp (PARSEOP_STORE);
> TrAmlInitLineNumbers (StoreOp, NewOp);
> StoreOp->Asl.Parent = StartNode;
> TrAmlInsertPeer (NewOp, StoreOp);
> @@ -909,7 +910,7 @@ TrDoSwitch (
> StoreOp->Asl.Child = Predicate;
> Predicate->Asl.Parent = StoreOp;
>
> - NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
> + NewOp = TrCreateValuedLeafOp (PARSEOP_NAMESEG,
> (UINT64) ACPI_TO_INTEGER (PredicateValueName));
> TrAmlInitLineNumbers (NewOp, StoreOp);
> NewOp->Asl.Parent = StoreOp;
> @@ -923,7 +924,7 @@ TrDoSwitch (
> Conditional = Conditional->Asl.Next;
> }
>
> - BreakOp = TrCreateLeafNode (PARSEOP_BREAK);
> + BreakOp = TrCreateLeafOp (PARSEOP_BREAK);
> TrAmlInitLineNumbers (BreakOp, NewOp);
> BreakOp->Asl.Parent = StartNode;
> TrAmlInsertPeer (Conditional, BreakOp);
> diff --git a/src/acpica/source/compiler/asltree.c b/src/acpica/source/compiler/asltree.c
> index b80a4226..8b709df7 100644
> --- a/src/acpica/source/compiler/asltree.c
> +++ b/src/acpica/source/compiler/asltree.c
> @@ -1,6 +1,6 @@
> /******************************************************************************
> *
> - * Module Name: asltree - parse tree management
> + * Module Name: asltree - Parse tree management
> *
> *****************************************************************************/
>
> @@ -152,253 +152,27 @@
> #include "aslcompiler.h"
> #include "aslcompiler.y.h"
> #include "acapps.h"
> -#include "acconvert.h"
> -#include <time.h>
>
> #define _COMPONENT ACPI_COMPILER
> ACPI_MODULE_NAME ("asltree")
>
> -/* Local prototypes */
> -
> -static ACPI_PARSE_OBJECT *
> -TrGetNextNode (
> - void);
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrSetParent
> - *
> - * PARAMETERS: Op - To be set to new parent
> - * ParentOp - The parent
> - *
> - * RETURN: None, sets Op parent directly
> - *
> - * DESCRIPTION: Change the parent of a parse op.
> - *
> - ******************************************************************************/
> -
> -void
> -TrSetParent (
> - ACPI_PARSE_OBJECT *Op,
> - ACPI_PARSE_OBJECT *ParentOp)
> -{
> -
> - Op->Asl.Parent = ParentOp;
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrGetNextNode
> - *
> - * PARAMETERS: None
> - *
> - * RETURN: New parse node. Aborts on allocation failure
> - *
> - * DESCRIPTION: Allocate a new parse node for the parse tree. Bypass the local
> - * dynamic memory manager for performance reasons (This has a
> - * major impact on the speed of the compiler.)
> - *
> - ******************************************************************************/
> -
> -static ACPI_PARSE_OBJECT *
> -TrGetNextNode (
> - void)
> -{
> - ASL_CACHE_INFO *Cache;
> -
> -
> - if (Gbl_ParseOpCacheNext >= Gbl_ParseOpCacheLast)
> - {
> - /* Allocate a new buffer */
> -
> - Cache = UtLocalCalloc (sizeof (Cache->Next) +
> - (sizeof (ACPI_PARSE_OBJECT) * ASL_PARSEOP_CACHE_SIZE));
> -
> - /* Link new cache buffer to head of list */
> -
> - Cache->Next = Gbl_ParseOpCacheList;
> - Gbl_ParseOpCacheList = Cache;
> -
> - /* Setup cache management pointers */
> -
> - Gbl_ParseOpCacheNext = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Cache->Buffer);
> - Gbl_ParseOpCacheLast = Gbl_ParseOpCacheNext + ASL_PARSEOP_CACHE_SIZE;
> - }
> -
> - Gbl_ParseOpCount++;
> - return (Gbl_ParseOpCacheNext++);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrAllocateNode
> - *
> - * PARAMETERS: ParseOpcode - Opcode to be assigned to the node
> - *
> - * RETURN: New parse node. Aborts on allocation failure
> - *
> - * DESCRIPTION: Allocate and initialize a new parse node for the parse tree
> - *
> - ******************************************************************************/
> -
> -ACPI_PARSE_OBJECT *
> -TrAllocateNode (
> - UINT32 ParseOpcode)
> -{
> - ACPI_PARSE_OBJECT *Op;
> - ACPI_PARSE_OBJECT *LatestNode;
> -
> -
> - Op = TrGetNextNode ();
> -
> - Op->Asl.ParseOpcode = (UINT16) ParseOpcode;
> - Op->Asl.Filename = Gbl_Files[ASL_FILE_INPUT].Filename;
> - Op->Asl.LineNumber = Gbl_CurrentLineNumber;
> - Op->Asl.LogicalLineNumber = Gbl_LogicalLineNumber;
> - Op->Asl.LogicalByteOffset = Gbl_CurrentLineOffset;
> - Op->Asl.Column = Gbl_CurrentColumn;
> -
> - UtSetParseOpName (Op);
> -
> - /* The following is for capturing comments */
> -
> - if(Gbl_CaptureComments)
> - {
> - LatestNode = Gbl_CommentState.Latest_Parse_Node;
> - Op->Asl.InlineComment = NULL;
> - Op->Asl.EndNodeComment = NULL;
> - Op->Asl.CommentList = NULL;
> - Op->Asl.FileChanged = FALSE;
> -
> - /*
> - * Check to see if the file name has changed before resetting the
> - * latest parse node.
> - */
> - if (LatestNode &&
> - (ParseOpcode != PARSEOP_INCLUDE) &&
> - (ParseOpcode != PARSEOP_INCLUDE_END) &&
> - strcmp (LatestNode->Asl.Filename, Op->Asl.Filename))
> - {
> - CvDbgPrint ("latest node: %s\n", LatestNode->Asl.ParseOpName);
> - Op->Asl.FileChanged = TRUE;
> - if (Gbl_IncludeFileStack)
> - {
> - Op->Asl.ParentFilename = Gbl_IncludeFileStack->Filename;
> - }
> - else
> - {
> - Op->Asl.ParentFilename = NULL;
> - }
> - }
> -
> - Gbl_CommentState.Latest_Parse_Node = Op;
> - CvDbgPrint ("trallocatenode=Set latest parse node to this node.\n");
> - CvDbgPrint (" Op->Asl.ParseOpName = %s\n",
> - Gbl_CommentState.Latest_Parse_Node->Asl.ParseOpName);
> - CvDbgPrint (" Op->Asl.ParseOpcode = 0x%x\n", ParseOpcode);
> -
> - if (Op->Asl.FileChanged)
> - {
> - CvDbgPrint(" file has been changed!\n");
> - }
> -
> - /*
> - * if this parse op's syntax uses () and {} (i.e. Package(1){0x00}) then
> - * set a flag in the comment state. This facilitates paring comments for
> - * these types of opcodes.
> - */
> - if ((CvParseOpBlockType(Op) == (BLOCK_PAREN | BLOCK_BRACE)) &&
> - (ParseOpcode != PARSEOP_DEFINITION_BLOCK))
> - {
> - CvDbgPrint ("Parsing paren/Brace node now!\n");
> - Gbl_CommentState.ParsingParenBraceNode = Op;
> - }
> -
> - if (Gbl_Comment_List_Head)
> - {
> - CvDbgPrint ("Transferring...\n");
> - Op->Asl.CommentList = Gbl_Comment_List_Head;
> - Gbl_Comment_List_Head = NULL;
> - Gbl_Comment_List_Tail = NULL;
> - CvDbgPrint (" Transferred current comment list to this node.\n");
> - CvDbgPrint (" %s\n", Op->Asl.CommentList->Comment);
> - }
> - if (Gbl_Inline_Comment_Buffer)
> - {
> - Op->Asl.InlineComment = Gbl_Inline_Comment_Buffer;
> - Gbl_Inline_Comment_Buffer = NULL;
> - CvDbgPrint ("Transferred current inline comment list to this node.\n");
> - }
> -
> - }
> -
> - return (Op);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrReleaseNode
> - *
> - * PARAMETERS: Op - Op to be released
> - *
> - * RETURN: None
> - *
> - * DESCRIPTION: "release" a node. In truth, nothing is done since the node
> - * is part of a larger buffer
> - *
> - ******************************************************************************/
> -
> -void
> -TrReleaseNode (
> - ACPI_PARSE_OBJECT *Op)
> -{
> -
> - return;
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrSetCurrentFilename
> - *
> - * PARAMETERS: Op - An existing parse node
> - *
> - * RETURN: None
> - *
> - * DESCRIPTION: Save the include file filename. Used for debug output only.
> - *
> - ******************************************************************************/
> -
> -void
> -TrSetCurrentFilename (
> - ACPI_PARSE_OBJECT *Op)
> -{
> - Op->Asl.Filename = Gbl_PreviousIncludeFilename;
> -}
> -
>
> /*******************************************************************************
> *
> - * FUNCTION: TrUpdateNode
> + * FUNCTION: TrSetOpIntegerValue
> *
> - * PARAMETERS: ParseOpcode - New opcode to be assigned to the node
> - * Op - An existing parse node
> + * PARAMETERS: ParseOpcode - New opcode to be assigned to the op
> + * Op - An existing parse op
> *
> - * RETURN: The updated node
> + * RETURN: The updated op
> *
> - * DESCRIPTION: Change the parse opcode assigned to a node. Usually used to
> - * change an opcode to DEFAULT_ARG so that the node is ignored
> - * during the code generation. Also used to set generic integers
> - * to a specific size (8, 16, 32, or 64 bits)
> + * DESCRIPTION: Used to set the integer value of a op,
> + * usually to a specific size (8, 16, 32, or 64 bits)
> *
> ******************************************************************************/
>
> ACPI_PARSE_OBJECT *
> -TrUpdateNode (
> +TrSetOpIntegerValue (
> UINT32 ParseOpcode,
> ACPI_PARSE_OBJECT *Op)
> {
> @@ -409,7 +183,7 @@ TrUpdateNode (
> }
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nUpdateNode: Old - %s, New - %s\n",
> + "\nUpdateOp: Old - %s, New - %s\n",
> UtGetOpName (Op->Asl.ParseOpcode),
> UtGetOpName (ParseOpcode));
>
> @@ -419,931 +193,236 @@ TrUpdateNode (
> {
> switch (ParseOpcode)
> {
> - case PARSEOP_BYTECONST:
> -
> - Op->Asl.Value.Integer = ACPI_UINT8_MAX;
> - break;
> -
> - case PARSEOP_WORDCONST:
> -
> - Op->Asl.Value.Integer = ACPI_UINT16_MAX;
> - break;
> -
> - case PARSEOP_DWORDCONST:
> -
> - Op->Asl.Value.Integer = ACPI_UINT32_MAX;
> - break;
> -
> - /* Don't need to do the QWORD case */
> -
> - default:
> -
> - /* Don't care about others */
> - break;
> - }
> - }
> -
> - Op->Asl.ParseOpcode = (UINT16) ParseOpcode;
> - UtSetParseOpName (Op);
> -
> - /*
> - * For the BYTE, WORD, and DWORD constants, make sure that the integer
> - * that was passed in will actually fit into the data type
> - */
> - switch (ParseOpcode)
> - {
> - case PARSEOP_BYTECONST:
> -
> - UtCheckIntegerRange (Op, 0x00, ACPI_UINT8_MAX);
> - Op->Asl.Value.Integer &= ACPI_UINT8_MAX;
> - break;
> -
> - case PARSEOP_WORDCONST:
> -
> - UtCheckIntegerRange (Op, 0x00, ACPI_UINT16_MAX);
> - Op->Asl.Value.Integer &= ACPI_UINT16_MAX;
> - break;
> -
> - case PARSEOP_DWORDCONST:
> -
> - UtCheckIntegerRange (Op, 0x00, ACPI_UINT32_MAX);
> - Op->Asl.Value.Integer &= ACPI_UINT32_MAX;
> - break;
> -
> - default:
> -
> - /* Don't care about others, don't need to check QWORD */
> -
> - break;
> - }
> -
> - /* Converter: if this is a method invocation, turn off capture comments. */
> - if (Gbl_CaptureComments &&
> - (ParseOpcode == PARSEOP_METHODCALL))
> - {
> - Gbl_CommentState.CaptureComments = FALSE;
> - }
> -
> - return (Op);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrPrintNodeCompileFlags
> - *
> - * PARAMETERS: Flags - Flags word to be decoded
> - *
> - * RETURN: None
> - *
> - * DESCRIPTION: Decode a flags word to text. Displays all flags that are set.
> - *
> - ******************************************************************************/
> -
> -void
> -TrPrintNodeCompileFlags (
> - UINT32 Flags)
> -{
> - UINT32 i;
> - UINT32 FlagBit = 1;
> - char *FlagName = NULL;
> -
> -
> - for (i = 0; i < 32; i++)
> - {
> - switch (Flags & FlagBit)
> - {
> - case NODE_VISITED:
> -
> - FlagName = "NODE_VISITED";
> - break;
> -
> - case NODE_AML_PACKAGE:
> -
> - FlagName = "NODE_AML_PACKAGE";
> - break;
> -
> - case NODE_IS_TARGET:
> -
> - FlagName = "NODE_IS_TARGET";
> - break;
> -
> - case NODE_IS_RESOURCE_DESC:
> -
> - FlagName = "NODE_IS_RESOURCE_DESC";
> - break;
> -
> - case NODE_IS_RESOURCE_FIELD:
> -
> - FlagName = "NODE_IS_RESOURCE_FIELD";
> - break;
> -
> - case NODE_HAS_NO_EXIT:
> -
> - FlagName = "NODE_HAS_NO_EXIT";
> - break;
> -
> - case NODE_IF_HAS_NO_EXIT:
> -
> - FlagName = "NODE_IF_HAS_NO_EXIT";
> - break;
> -
> - case NODE_NAME_INTERNALIZED:
> -
> - FlagName = "NODE_NAME_INTERNALIZED";
> - break;
> -
> - case NODE_METHOD_NO_RETVAL:
> -
> - FlagName = "NODE_METHOD_NO_RETVAL";
> - break;
> -
> - case NODE_METHOD_SOME_NO_RETVAL:
> -
> - FlagName = "NODE_METHOD_SOME_NO_RETVAL";
> - break;
> -
> - case NODE_RESULT_NOT_USED:
> -
> - FlagName = "NODE_RESULT_NOT_USED";
> - break;
> -
> - case NODE_METHOD_TYPED:
> -
> - FlagName = "NODE_METHOD_TYPED";
> - break;
> -
> - case NODE_COULD_NOT_REDUCE:
> -
> - FlagName = "NODE_COULD_NOT_REDUCE";
> - break;
> -
> - case NODE_COMPILE_TIME_CONST:
> -
> - FlagName = "NODE_COMPILE_TIME_CONST";
> - break;
> -
> - case NODE_IS_TERM_ARG:
> -
> - FlagName = "NODE_IS_TERM_ARG";
> - break;
> -
> - case NODE_WAS_ONES_OP:
> -
> - FlagName = "NODE_WAS_ONES_OP";
> - break;
> -
> - case NODE_IS_NAME_DECLARATION:
> -
> - FlagName = "NODE_IS_NAME_DECLARATION";
> - break;
> -
> - case NODE_COMPILER_EMITTED:
> -
> - FlagName = "NODE_COMPILER_EMITTED";
> - break;
> -
> - case NODE_IS_DUPLICATE:
> -
> - FlagName = "NODE_IS_DUPLICATE";
> - break;
> -
> - case NODE_IS_RESOURCE_DATA:
> -
> - FlagName = "NODE_IS_RESOURCE_DATA";
> - break;
> -
> - case NODE_IS_NULL_RETURN:
> -
> - FlagName = "NODE_IS_NULL_RETURN";
> - break;
> -
> - default:
> - break;
> - }
> -
> - if (FlagName)
> - {
> - DbgPrint (ASL_PARSE_OUTPUT, " %s", FlagName);
> - FlagName = NULL;
> - }
> -
> - FlagBit <<= 1;
> - }
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrSetNodeFlags
> - *
> - * PARAMETERS: Op - An existing parse node
> - * Flags - New flags word
> - *
> - * RETURN: The updated parser op
> - *
> - * DESCRIPTION: Set bits in the node flags word. Will not clear bits, only set
> - *
> - ******************************************************************************/
> -
> -ACPI_PARSE_OBJECT *
> -TrSetNodeFlags (
> - ACPI_PARSE_OBJECT *Op,
> - UINT32 Flags)
> -{
> -
> - if (!Op)
> - {
> - return (NULL);
> - }
> -
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "\nSetNodeFlags: %s Op %p, %8.8X", Op->Asl.ParseOpName, Op, Flags);
> -
> - TrPrintNodeCompileFlags (Flags);
> - DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
> -
> - Op->Asl.CompileFlags |= Flags;
> - return (Op);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrSetNodeAmlLength
> - *
> - * PARAMETERS: Op - An existing parse node
> - * Length - AML Length
> - *
> - * RETURN: The updated parser op
> - *
> - * DESCRIPTION: Set the AML Length in a node. Used by the parser to indicate
> - * the presence of a node that must be reduced to a fixed length
> - * constant.
> - *
> - ******************************************************************************/
> -
> -ACPI_PARSE_OBJECT *
> -TrSetNodeAmlLength (
> - ACPI_PARSE_OBJECT *Op,
> - UINT32 Length)
> -{
> -
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "\nSetNodeAmlLength: Op %p, %8.8X\n", Op, Length);
> -
> - if (!Op)
> - {
> - return (NULL);
> - }
> -
> - Op->Asl.AmlLength = Length;
> - return (Op);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrSetEndLineNumber
> - *
> - * PARAMETERS: Op - An existing parse node
> - *
> - * RETURN: None.
> - *
> - * DESCRIPTION: Set the ending line numbers (file line and logical line) of a
> - * parse node to the current line numbers.
> - *
> - ******************************************************************************/
> -
> -void
> -TrSetEndLineNumber (
> - ACPI_PARSE_OBJECT *Op)
> -{
> -
> - /* If the end line # is already set, just return */
> -
> - if (Op->Asl.EndLine)
> - {
> - return;
> - }
> -
> - Op->Asl.EndLine = Gbl_CurrentLineNumber;
> - Op->Asl.EndLogicalLine = Gbl_LogicalLineNumber;
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrCreateAssignmentNode
> - *
> - * PARAMETERS: Target - Assignment target
> - * Source - Assignment source
> - *
> - * RETURN: Pointer to the new node. Aborts on allocation failure
> - *
> - * DESCRIPTION: Implements the C-style '=' operator. It changes the parse
> - * tree if possible to utilize the last argument of the math
> - * operators which is a target operand -- thus saving invocation
> - * of and additional Store() operator. An optimization.
> - *
> - ******************************************************************************/
> -
> -ACPI_PARSE_OBJECT *
> -TrCreateAssignmentNode (
> - ACPI_PARSE_OBJECT *Target,
> - ACPI_PARSE_OBJECT *Source)
> -{
> - ACPI_PARSE_OBJECT *TargetOp;
> - ACPI_PARSE_OBJECT *SourceOp1;
> - ACPI_PARSE_OBJECT *SourceOp2;
> - ACPI_PARSE_OBJECT *Operator;
> -
> -
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "\nTrCreateAssignmentNode Line [%u to %u] Source %s Target %s\n",
> - Source->Asl.LineNumber, Source->Asl.EndLine,
> - UtGetOpName (Source->Asl.ParseOpcode),
> - UtGetOpName (Target->Asl.ParseOpcode));
> -
> - TrSetNodeFlags (Target, NODE_IS_TARGET);
> -
> - switch (Source->Asl.ParseOpcode)
> - {
> - /*
> - * Only these operators can be optimized because they have
> - * a target operand
> - */
> - case PARSEOP_ADD:
> - case PARSEOP_AND:
> - case PARSEOP_DIVIDE:
> - case PARSEOP_INDEX:
> - case PARSEOP_MOD:
> - case PARSEOP_MULTIPLY:
> - case PARSEOP_NOT:
> - case PARSEOP_OR:
> - case PARSEOP_SHIFTLEFT:
> - case PARSEOP_SHIFTRIGHT:
> - case PARSEOP_SUBTRACT:
> - case PARSEOP_XOR:
> -
> - break;
> -
> - /* Otherwise, just create a normal Store operator */
> -
> - default:
> -
> - goto CannotOptimize;
> - }
> -
> - /*
> - * Transform the parse tree such that the target is moved to the
> - * last operand of the operator
> - */
> - SourceOp1 = Source->Asl.Child;
> - SourceOp2 = SourceOp1->Asl.Next;
> -
> - /* NOT only has one operand, but has a target */
> -
> - if (Source->Asl.ParseOpcode == PARSEOP_NOT)
> - {
> - SourceOp2 = SourceOp1;
> - }
> -
> - /* DIVIDE has an extra target operand (remainder) */
> -
> - if (Source->Asl.ParseOpcode == PARSEOP_DIVIDE)
> - {
> - SourceOp2 = SourceOp2->Asl.Next;
> - }
> -
> - TargetOp = SourceOp2->Asl.Next;
> -
> - /*
> - * Can't perform this optimization if there already is a target
> - * for the operator (ZERO is a "no target" placeholder).
> - */
> - if (TargetOp->Asl.ParseOpcode != PARSEOP_ZERO)
> - {
> - goto CannotOptimize;
> - }
> -
> - /* Link in the target as the final operand */
> -
> - SourceOp2->Asl.Next = Target;
> - Target->Asl.Parent = Source;
> -
> - return (Source);
> -
> -
> -CannotOptimize:
> -
> - Operator = TrAllocateNode (PARSEOP_STORE);
> - TrLinkChildren (Operator, 2, Source, Target);
> -
> - /* Set the appropriate line numbers for the new node */
> -
> - Operator->Asl.LineNumber = Target->Asl.LineNumber;
> - Operator->Asl.LogicalLineNumber = Target->Asl.LogicalLineNumber;
> - Operator->Asl.LogicalByteOffset = Target->Asl.LogicalByteOffset;
> - Operator->Asl.Column = Target->Asl.Column;
> -
> - return (Operator);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrCreateLeafNode
> - *
> - * PARAMETERS: ParseOpcode - New opcode to be assigned to the node
> - *
> - * RETURN: Pointer to the new node. Aborts on allocation failure
> - *
> - * DESCRIPTION: Create a simple leaf node (no children or peers, and no value
> - * assigned to the node)
> - *
> - ******************************************************************************/
> -
> -ACPI_PARSE_OBJECT *
> -TrCreateLeafNode (
> - UINT32 ParseOpcode)
> -{
> - ACPI_PARSE_OBJECT *Op;
> -
> -
> - Op = TrAllocateNode (ParseOpcode);
> -
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "\nCreateLeafNode Ln/Col %u/%u NewNode %p Op %s\n\n",
> - Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode));
> -
> - return (Op);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: TrCreateNullTarget
> - *
> - * PARAMETERS: None
> - *
> - * RETURN: Pointer to the new node. Aborts on allocation failure
> - *
> - * DESCRIPTION: Create a "null" target node. This is defined by the ACPI
> - * specification to be a zero AML opcode, and indicates that
> - * no target has been specified for the parent operation
> - *
> - ******************************************************************************/
> + case PARSEOP_BYTECONST:
>
> -ACPI_PARSE_OBJECT *
> -TrCreateNullTarget (
> - void)
> -{
> - ACPI_PARSE_OBJECT *Op;
> + Op->Asl.Value.Integer = ACPI_UINT8_MAX;
> + break;
>
> + case PARSEOP_WORDCONST:
>
> - Op = TrAllocateNode (PARSEOP_ZERO);
> - Op->Asl.CompileFlags |= (NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);
> + Op->Asl.Value.Integer = ACPI_UINT16_MAX;
> + break;
>
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "\nCreateNullTarget Ln/Col %u/%u NewNode %p Op %s\n",
> - Op->Asl.LineNumber, Op->Asl.Column, Op,
> - UtGetOpName (Op->Asl.ParseOpcode));
> + case PARSEOP_DWORDCONST:
>
> - return (Op);
> -}
> + Op->Asl.Value.Integer = ACPI_UINT32_MAX;
> + break;
>
> + /* Don't need to do the QWORD case */
>
> -/*******************************************************************************
> - *
> - * FUNCTION: TrCreateConstantLeafNode
> - *
> - * PARAMETERS: ParseOpcode - The constant opcode
> - *
> - * RETURN: Pointer to the new node. Aborts on allocation failure
> - *
> - * DESCRIPTION: Create a leaf node (no children or peers) for one of the
> - * special constants - __LINE__, __FILE__, and __DATE__.
> - *
> - * Note: An implemenation of __FUNC__ cannot happen here because we don't
> - * have a full parse tree at this time and cannot find the parent control
> - * method. If it is ever needed, __FUNC__ must be implemented later, after
> - * the parse tree has been fully constructed.
> - *
> - ******************************************************************************/
> + default:
>
> -ACPI_PARSE_OBJECT *
> -TrCreateConstantLeafNode (
> - UINT32 ParseOpcode)
> -{
> - ACPI_PARSE_OBJECT *Op = NULL;
> - time_t CurrentTime;
> - char *StaticTimeString;
> - char *TimeString;
> - char *Filename;
> + /* Don't care about others */
> + break;
> + }
> + }
>
> + Op->Asl.ParseOpcode = (UINT16) ParseOpcode;
> + UtSetParseOpName (Op);
>
> + /*
> + * For the BYTE, WORD, and DWORD constants, make sure that the integer
> + * that was passed in will actually fit into the data type
> + */
> switch (ParseOpcode)
> {
> - case PARSEOP___LINE__:
> + case PARSEOP_BYTECONST:
>
> - Op = TrAllocateNode (PARSEOP_INTEGER);
> - Op->Asl.Value.Integer = Op->Asl.LineNumber;
> + UtCheckIntegerRange (Op, 0x00, ACPI_UINT8_MAX);
> + Op->Asl.Value.Integer &= ACPI_UINT8_MAX;
> break;
>
> - case PARSEOP___PATH__:
> -
> - Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
> -
> - /* Op.Asl.Filename contains the full pathname to the file */
> + case PARSEOP_WORDCONST:
>
> - Op->Asl.Value.String = Op->Asl.Filename;
> + UtCheckIntegerRange (Op, 0x00, ACPI_UINT16_MAX);
> + Op->Asl.Value.Integer &= ACPI_UINT16_MAX;
> break;
>
> - case PARSEOP___FILE__:
> -
> - Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
> -
> - /* Get the simple filename from the full path */
> + case PARSEOP_DWORDCONST:
>
> - FlSplitInputPathname (Op->Asl.Filename, NULL, &Filename);
> - Op->Asl.Value.String = Filename;
> + UtCheckIntegerRange (Op, 0x00, ACPI_UINT32_MAX);
> + Op->Asl.Value.Integer &= ACPI_UINT32_MAX;
> break;
>
> - case PARSEOP___DATE__:
> -
> - Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
> -
> - /* Get a copy of the current time */
> + default:
>
> - CurrentTime = time (NULL);
> - StaticTimeString = ctime (&CurrentTime);
> - TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
> - strcpy (TimeString, StaticTimeString);
> + /* Don't care about others, don't need to check QWORD */
>
> - TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
> - Op->Asl.Value.String = TimeString;
> break;
> + }
>
> - default: /* This would be an internal error */
> + /* Converter: if this is a method invocation, turn off capture comments */
>
> - return (NULL);
> + if (Gbl_CaptureComments &&
> + (ParseOpcode == PARSEOP_METHODCALL))
> + {
> + Gbl_CommentState.CaptureComments = FALSE;
> }
>
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "\nCreateConstantLeafNode Ln/Col %u/%u NewNode %p "
> - "Op %s Value %8.8X%8.8X \n",
> - Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode),
> - ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
> return (Op);
> }
>
>
> /*******************************************************************************
> *
> - * FUNCTION: TrCreateTargetOperand
> - *
> - * PARAMETERS: OriginalOp - Op to be copied
> - *
> - * RETURN: Pointer to the new node. Aborts on allocation failure
> - *
> - * DESCRIPTION: Copy an existing node (and subtree). Used in ASL+ (C-style)
> - * expressions where the target is the same as one of the
> - * operands. A new node and subtree must be created from the
> - * original so that the parse tree can be linked properly.
> - *
> - * NOTE: This code is specific to target operands that are the last
> - * operand in an ASL/AML operator. Meaning that the top-level
> - * parse Op in a possible subtree has a NULL Next pointer.
> - * This simplifies the recursion.
> + * FUNCTION: TrSetOpFlags
> *
> - * Subtree example:
> - * DeRefOf (Local1) += 32
> + * PARAMETERS: Op - An existing parse op
> + * Flags - New flags word
> *
> - * This gets converted to:
> - * Add (DeRefOf (Local1), 32, DeRefOf (Local1))
> + * RETURN: The updated parser op
> *
> - * Each DeRefOf has a single child, Local1. Even more complex
> - * subtrees can be created via the Index and DeRefOf operators.
> + * DESCRIPTION: Set bits in the op flags word. Will not clear bits, only set
> *
> ******************************************************************************/
>
> ACPI_PARSE_OBJECT *
> -TrCreateTargetOperand (
> - ACPI_PARSE_OBJECT *OriginalOp,
> - ACPI_PARSE_OBJECT *ParentOp)
> +TrSetOpFlags (
> + ACPI_PARSE_OBJECT *Op,
> + UINT32 Flags)
> {
> - ACPI_PARSE_OBJECT *Op;
> -
>
> - if (!OriginalOp)
> + if (!Op)
> {
> return (NULL);
> }
>
> - Op = TrGetNextNode ();
> -
> - /* Copy the pertinent values (omit link pointer fields) */
> -
> - Op->Asl.Value = OriginalOp->Asl.Value;
> - Op->Asl.Filename = OriginalOp->Asl.Filename;
> - Op->Asl.LineNumber = OriginalOp->Asl.LineNumber;
> - Op->Asl.LogicalLineNumber = OriginalOp->Asl.LogicalLineNumber;
> - Op->Asl.LogicalByteOffset = OriginalOp->Asl.LogicalByteOffset;
> - Op->Asl.Column = OriginalOp->Asl.Column;
> - Op->Asl.Flags = OriginalOp->Asl.Flags;
> - Op->Asl.CompileFlags = OriginalOp->Asl.CompileFlags;
> - Op->Asl.AmlOpcode = OriginalOp->Asl.AmlOpcode;
> - Op->Asl.ParseOpcode = OriginalOp->Asl.ParseOpcode;
> - Op->Asl.Parent = ParentOp;
> - UtSetParseOpName (Op);
> -
> - /* Copy a possible subtree below this node */
> -
> - if (OriginalOp->Asl.Child)
> - {
> - Op->Asl.Child = TrCreateTargetOperand (OriginalOp->Asl.Child, Op);
> - }
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nSetOpFlags: %s Op %p, %8.8X", Op->Asl.ParseOpName, Op, Flags);
>
> - if (OriginalOp->Asl.Next) /* Null for top-level node */
> - {
> - Op->Asl.Next = TrCreateTargetOperand (OriginalOp->Asl.Next, ParentOp);
> - }
> + TrPrintOpFlags (Flags, ASL_PARSE_OUTPUT);
> + DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
>
> + Op->Asl.CompileFlags |= Flags;
> return (Op);
> }
>
>
> /*******************************************************************************
> *
> - * FUNCTION: TrCreateValuedLeafNode
> + * FUNCTION: TrSetOpAmlLength
> *
> - * PARAMETERS: ParseOpcode - New opcode to be assigned to the node
> - * Value - Value to be assigned to the node
> + * PARAMETERS: Op - An existing parse op
> + * Length - AML Length
> *
> - * RETURN: Pointer to the new node. Aborts on allocation failure
> + * RETURN: The updated parser op
> *
> - * DESCRIPTION: Create a leaf node (no children or peers) with a value
> - * assigned to it
> + * DESCRIPTION: Set the AML Length in a op. Used by the parser to indicate
> + * the presence of a op that must be reduced to a fixed length
> + * constant.
> *
> ******************************************************************************/
>
> ACPI_PARSE_OBJECT *
> -TrCreateValuedLeafNode (
> - UINT32 ParseOpcode,
> - UINT64 Value)
> +TrSetOpAmlLength (
> + ACPI_PARSE_OBJECT *Op,
> + UINT32 Length)
> {
> - ACPI_PARSE_OBJECT *Op;
> -
> -
> - Op = TrAllocateNode (ParseOpcode);
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nCreateValuedLeafNode Ln/Col %u/%u NewNode %p "
> - "Op %s Value %8.8X%8.8X ",
> - Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode),
> - ACPI_FORMAT_UINT64 (Value));
> - Op->Asl.Value.Integer = Value;
> + "\nSetOpAmlLength: Op %p, %8.8X\n", Op, Length);
>
> - switch (ParseOpcode)
> + if (!Op)
> {
> - case PARSEOP_STRING_LITERAL:
> -
> - DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
> - break;
> -
> - case PARSEOP_NAMESEG:
> -
> - DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
> - break;
> -
> - case PARSEOP_NAMESTRING:
> -
> - DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
> - break;
> -
> - case PARSEOP_EISAID:
> -
> - DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
> - break;
> -
> - case PARSEOP_METHOD:
> -
> - DbgPrint (ASL_PARSE_OUTPUT, "METHOD");
> - break;
> -
> - case PARSEOP_INTEGER:
> -
> - DbgPrint (ASL_PARSE_OUTPUT, "INTEGER->%8.8X%8.8X",
> - ACPI_FORMAT_UINT64 (Value));
> - break;
> -
> - default:
> -
> - break;
> + return (NULL);
> }
>
> - DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
> + Op->Asl.AmlLength = Length;
> return (Op);
> }
>
>
> /*******************************************************************************
> *
> - * FUNCTION: TrCreateNode
> + * FUNCTION: TrSetOpParent
> *
> - * PARAMETERS: ParseOpcode - Opcode to be assigned to the node
> - * NumChildren - Number of children to follow
> - * ... - A list of child nodes to link to the new
> - * node. NumChildren long.
> + * PARAMETERS: Op - To be set to new parent
> + * ParentOp - The parent
> *
> - * RETURN: Pointer to the new node. Aborts on allocation failure
> + * RETURN: None, sets Op parent directly
> *
> - * DESCRIPTION: Create a new parse node and link together a list of child
> - * nodes underneath the new node.
> + * DESCRIPTION: Change the parent of a parse op.
> *
> ******************************************************************************/
>
> -ACPI_PARSE_OBJECT *
> -TrCreateNode (
> - UINT32 ParseOpcode,
> - UINT32 NumChildren,
> - ...)
> +void
> +TrSetOpParent (
> + ACPI_PARSE_OBJECT *Op,
> + ACPI_PARSE_OBJECT *ParentOp)
> {
> - ACPI_PARSE_OBJECT *Op;
> - ACPI_PARSE_OBJECT *Child;
> - ACPI_PARSE_OBJECT *PrevChild;
> - va_list ap;
> - UINT32 i;
> - BOOLEAN FirstChild;
> -
> -
> - va_start (ap, NumChildren);
> -
> - /* Allocate one new node */
> -
> - Op = TrAllocateNode (ParseOpcode);
> -
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "\nCreateNode Ln/Col %u/%u NewParent %p Child %u Op %s ",
> - Op->Asl.LineNumber, Op->Asl.Column, Op,
> - NumChildren, UtGetOpName(ParseOpcode));
> -
> - /* Some extra debug output based on the parse opcode */
> -
> - switch (ParseOpcode)
> - {
> - case PARSEOP_ASL_CODE:
> -
> - Gbl_ParseTreeRoot = Op;
> - Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
> - DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
> - break;
>
> - case PARSEOP_DEFINITION_BLOCK:
> -
> - DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
> - break;
> + Op->Asl.Parent = ParentOp;
> +}
>
> - case PARSEOP_OPERATIONREGION:
>
> - DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
> - break;
> +/*******************************************************************************
> + *
> + * FUNCTION: TrSetOpCurrentFilename
> + *
> + * PARAMETERS: Op - An existing parse op
> + *
> + * RETURN: None
> + *
> + * DESCRIPTION: Save the include file filename. Used for debug output only.
> + *
> + ******************************************************************************/
>
> - case PARSEOP_OR:
> +void
> +TrSetOpCurrentFilename (
> + ACPI_PARSE_OBJECT *Op)
> +{
>
> - DbgPrint (ASL_PARSE_OUTPUT, "OR->");
> - break;
> + Op->Asl.Filename = Gbl_PreviousIncludeFilename;
> +}
>
> - default:
>
> - /* Nothing to do for other opcodes */
> +/*******************************************************************************
> + *
> + * FUNCTION: TrSetOpEndLineNumber
> + *
> + * PARAMETERS: Op - An existing parse op
> + *
> + * RETURN: None.
> + *
> + * DESCRIPTION: Set the ending line numbers (file line and logical line) of a
> + * parse op to the current line numbers.
> + *
> + ******************************************************************************/
>
> - break;
> - }
> +void
> +TrSetOpEndLineNumber (
> + ACPI_PARSE_OBJECT *Op)
> +{
>
> - /* Link the new node to its children */
> + /* If the end line # is already set, just return */
>
> - PrevChild = NULL;
> - FirstChild = TRUE;
> - for (i = 0; i < NumChildren; i++)
> + if (Op->Asl.EndLine)
> {
> - /* Get the next child */
> -
> - Child = va_arg (ap, ACPI_PARSE_OBJECT *);
> - DbgPrint (ASL_PARSE_OUTPUT, "%p, ", Child);
> -
> - /*
> - * If child is NULL, this means that an optional argument
> - * was omitted. We must create a placeholder with a special
> - * opcode (DEFAULT_ARG) so that the code generator will know
> - * that it must emit the correct default for this argument
> - */
> - if (!Child)
> - {
> - Child = TrAllocateNode (PARSEOP_DEFAULT_ARG);
> - }
> -
> - /* Link first child to parent */
> -
> - if (FirstChild)
> - {
> - FirstChild = FALSE;
> - Op->Asl.Child = Child;
> -
> - /*
> - * For the ASL-/ASL+ converter: if the ParseOp is a connection,
> - * external, offset or accessAs, it means that the comments in the
> - * FirstChild belongs to their parent due to the parsing order in
> - * the .y files. To correct this, take the comments in the
> - * FirstChild place it in the parent. This also means that
> - * legitimate comments for the child gets put to the parent.
> - */
> - if (Gbl_CaptureComments &&
> - ((ParseOpcode == PARSEOP_CONNECTION) ||
> - (ParseOpcode == PARSEOP_EXTERNAL) ||
> - (ParseOpcode == PARSEOP_OFFSET) ||
> - (ParseOpcode == PARSEOP_ACCESSAS)))
> - {
> - Op->Asl.CommentList = Child->Asl.CommentList;
> - Op->Asl.EndBlkComment = Child->Asl.EndBlkComment;
> - Op->Asl.InlineComment = Child->Asl.InlineComment;
> - Op->Asl.FileChanged = Child->Asl.FileChanged;
> -
> - Child->Asl.CommentList = NULL;
> - Child->Asl.EndBlkComment = NULL;
> - Child->Asl.InlineComment = NULL;
> - Child->Asl.FileChanged = FALSE;
> -
> - /*
> - * These do not need to be "passed off". They can be copied
> - * because the code for these opcodes should be printed in the
> - * same file.
> - */
> - Op->Asl.Filename = Child->Asl.Filename;
> - Op->Asl.ParentFilename = Child->Asl.ParentFilename;
> - }
> - }
> -
> - /* Point all children to parent */
> -
> - Child->Asl.Parent = Op;
> -
> - /* Link children in a peer list */
> -
> - if (PrevChild)
> - {
> - PrevChild->Asl.Next = Child;
> - };
> -
> - /* Get the comment from last child in the resource template call */
> -
> - if (Gbl_CaptureComments &&
> - (Op->Asl.ParseOpcode == PARSEOP_RESOURCETEMPLATE))
> - {
> - CvDbgPrint ("Transferred current comment list to this node.\n");
> - Op->Asl.CommentList = Child->Asl.CommentList;
> - Child->Asl.CommentList = NULL;
> - Op->Asl.InlineComment = Child->Asl.InlineComment;
> - Child->Asl.InlineComment = NULL;
> - }
> -
> - /*
> - * This child might be a list, point all nodes in the list
> - * to the same parent
> - */
> - while (Child->Asl.Next)
> - {
> - Child = Child->Asl.Next;
> - Child->Asl.Parent = Op;
> - }
> -
> - PrevChild = Child;
> + return;
> }
> - va_end(ap);
>
> - DbgPrint (ASL_PARSE_OUTPUT, "\n");
> - return (Op);
> + Op->Asl.EndLine = Gbl_CurrentLineNumber;
> + Op->Asl.EndLogicalLine = Gbl_LogicalLineNumber;
> }
>
>
> /*******************************************************************************
> *
> - * FUNCTION: TrLinkChildren
> + * FUNCTION: TrLinkOpChildren
> *
> - * PARAMETERS: Op - An existing parse node
> + * PARAMETERS: Op - An existing parse op
> * NumChildren - Number of children to follow
> - * ... - A list of child nodes to link to the new
> - * node. NumChildren long.
> + * ... - A list of child ops to link to the new
> + * op. NumChildren long.
> *
> - * RETURN: The updated (linked) node
> + * RETURN: The updated (linked) op
> *
> - * DESCRIPTION: Link a group of nodes to an existing parse node
> + * DESCRIPTION: Link a group of ops to an existing parse op
> *
> ******************************************************************************/
>
> ACPI_PARSE_OBJECT *
> -TrLinkChildren (
> +TrLinkOpChildren (
> ACPI_PARSE_OBJECT *Op,
> UINT32 NumChildren,
> ...)
> @@ -1357,8 +436,7 @@ TrLinkChildren (
>
> va_start (ap, NumChildren);
>
> -
> - TrSetEndLineNumber (Op);
> + TrSetOpEndLineNumber (Op);
>
> DbgPrint (ASL_PARSE_OUTPUT,
> "\nLinkChildren Line [%u to %u] NewParent %p Child %u Op %s ",
> @@ -1403,19 +481,19 @@ TrLinkChildren (
> /*
> * If there are "regular comments" detected at this point,
> * then is an endBlk comment. Categorize it as so and distribute
> - * all regular comments to this parse node.
> + * all regular comments to this parse op.
> */
> - if (Gbl_Comment_List_Head)
> + if (Gbl_CommentListHead)
> {
> - Op->Asl.EndBlkComment = Gbl_Comment_List_Head;
> + Op->Asl.EndBlkComment = Gbl_CommentListHead;
> CvDbgPrint ("EndBlk Comment for %s: %s",
> - Op->Asl.ParseOpName, Gbl_Comment_List_Head->Comment);
> - Gbl_Comment_List_Head = NULL;
> - Gbl_Comment_List_Tail = NULL;
> + Op->Asl.ParseOpName, Gbl_CommentListHead->Comment);
> + Gbl_CommentListHead = NULL;
> + Gbl_CommentListTail = NULL;
> }
> }
>
> - /* Link the new node to it's children */
> + /* Link the new op to it's children */
>
> PrevChild = NULL;
> FirstChild = TRUE;
> @@ -1426,7 +504,7 @@ TrLinkChildren (
> if ((Child == PrevChild) && (Child != NULL))
> {
> AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Child,
> - "Child node list invalid");
> + "Child op list invalid");
> va_end(ap);
> return (Op);
> }
> @@ -1441,7 +519,7 @@ TrLinkChildren (
> */
> if (!Child)
> {
> - Child = TrAllocateNode (PARSEOP_DEFAULT_ARG);
> + Child = TrAllocateOp (PARSEOP_DEFAULT_ARG);
> }
>
> /* Link first child to parent */
> @@ -1461,10 +539,10 @@ TrLinkChildren (
> if (PrevChild)
> {
> PrevChild->Asl.Next = Child;
> - };
> + }
>
> /*
> - * This child might be a list, point all nodes in the list
> + * This child might be a list, point all ops in the list
> * to the same parent
> */
> while (Child->Asl.Next)
> @@ -1479,31 +557,31 @@ TrLinkChildren (
> va_end(ap);
> DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
>
> -
> if(Gbl_CaptureComments)
> {
> - Gbl_CommentState.Latest_Parse_Node = Op;
> - CvDbgPrint ("trlinkchildren=====Set latest parse node to this node.\n");
> + Gbl_CommentState.LatestParseOp = Op;
> + CvDbgPrint ("TrLinkOpChildren=====Set latest parse op to this op.\n");
> }
> +
> return (Op);
> }
>
>
> /*******************************************************************************
> *
> - * FUNCTION: TrLinkPeerNode
> + * FUNCTION: TrLinkPeerOp
> *
> * PARAMETERS: Op1 - First peer
> * Op2 - Second peer
> *
> - * RETURN: Op1 or the non-null node.
> + * RETURN: Op1 or the non-null op.
> *
> - * DESCRIPTION: Link two nodes as peers. Handles cases where one peer is null.
> + * DESCRIPTION: Link two ops as peers. Handles cases where one peer is null.
> *
> ******************************************************************************/
>
> ACPI_PARSE_OBJECT *
> -TrLinkPeerNode (
> +TrLinkPeerOp (
> ACPI_PARSE_OBJECT *Op1,
> ACPI_PARSE_OBJECT *Op2)
> {
> @@ -1511,18 +589,18 @@ TrLinkPeerNode (
>
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nLinkPeerNode: 1=%p (%s), 2=%p (%s)\n",
> + "\nLinkPeerOp: 1=%p (%s), 2=%p (%s)\n",
> Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode) : NULL,
> Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode) : NULL);
>
>
> if ((!Op1) && (!Op2))
> {
> - DbgPrint (ASL_PARSE_OUTPUT, "\nTwo Null nodes!\n");
> + DbgPrint (ASL_PARSE_OUTPUT, "\nTwo Null ops!\n");
> return (Op1);
> }
>
> - /* If one of the nodes is null, just return the non-null node */
> + /* If one of the ops is null, just return the non-null op */
>
> if (!Op2)
> {
> @@ -1537,10 +615,10 @@ TrLinkPeerNode (
> if (Op1 == Op2)
> {
> DbgPrint (ASL_DEBUG_OUTPUT,
> - "\n************* Internal error, linking node to itself %p\n",
> + "\n************* Internal error, linking op to itself %p\n",
> Op1);
> AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Op1,
> - "Linking node to itself");
> + "Linking op to itself");
> return (Op1);
> }
>
> @@ -1564,19 +642,19 @@ TrLinkPeerNode (
>
> /*******************************************************************************
> *
> - * FUNCTION: TrLinkPeerNodes
> + * FUNCTION: TrLinkPeerOps
> *
> - * PARAMETERS: NumPeers - The number of nodes in the list to follow
> - * ... - A list of nodes to link together as peers
> + * PARAMETERS: NumPeers - The number of ops in the list to follow
> + * ... - A list of ops to link together as peers
> *
> - * RETURN: The first node in the list (head of the peer list)
> + * RETURN: The first op in the list (head of the peer list)
> *
> - * DESCRIPTION: Link together an arbitrary number of peer nodes.
> + * DESCRIPTION: Link together an arbitrary number of peer ops.
> *
> ******************************************************************************/
>
> ACPI_PARSE_OBJECT *
> -TrLinkPeerNodes (
> +TrLinkPeerOps (
> UINT32 NumPeers,
> ...)
> {
> @@ -1588,7 +666,7 @@ TrLinkPeerNodes (
>
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nLinkPeerNodes: (%u) ", NumPeers);
> + "\nLinkPeerOps: (%u) ", NumPeers);
>
> va_start (ap, NumPeers);
> This = va_arg (ap, ACPI_PARSE_OBJECT *);
> @@ -1606,21 +684,21 @@ TrLinkPeerNodes (
> This = This->Asl.Next;
> }
>
> - /* Get another peer node */
> + /* Get another peer op */
>
> Next = va_arg (ap, ACPI_PARSE_OBJECT *);
> if (!Next)
> {
> - Next = TrAllocateNode (PARSEOP_DEFAULT_ARG);
> + Next = TrAllocateOp (PARSEOP_DEFAULT_ARG);
> }
>
> - /* link new node to the current node */
> + /* link new op to the current op */
>
> This->Asl.Next = Next;
> This = Next;
> }
> - va_end (ap);
>
> + va_end (ap);
> DbgPrint (ASL_PARSE_OUTPUT,"\n");
> return (Start);
> }
> @@ -1628,19 +706,19 @@ TrLinkPeerNodes (
>
> /*******************************************************************************
> *
> - * FUNCTION: TrLinkChildNode
> + * FUNCTION: TrLinkChildOp
> *
> - * PARAMETERS: Op1 - Parent node
> + * PARAMETERS: Op1 - Parent op
> * Op2 - Op to become a child
> *
> - * RETURN: The parent node
> + * RETURN: The parent op
> *
> - * DESCRIPTION: Link two nodes together as a parent and child
> + * DESCRIPTION: Link two ops together as a parent and child
> *
> ******************************************************************************/
>
> ACPI_PARSE_OBJECT *
> -TrLinkChildNode (
> +TrLinkChildOp (
> ACPI_PARSE_OBJECT *Op1,
> ACPI_PARSE_OBJECT *Op2)
> {
> @@ -1648,12 +726,12 @@ TrLinkChildNode (
>
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nLinkChildNode: Parent=%p (%s), Child=%p (%s)\n",
> + "\nLinkChildOp: Parent=%p (%s), Child=%p (%s)\n",
> Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode): NULL,
> Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode): NULL);
>
> /*
> - * Converter: if TrLinkChildNode is called to link a method call,
> + * Converter: if TrLinkChildOp is called to link a method call,
> * turn on capture comments as it signifies that we are done parsing
> * a method call.
> */
> @@ -1663,8 +741,9 @@ TrLinkChildNode (
> {
> Gbl_CommentState.CaptureComments = TRUE;
> }
> - Gbl_CommentState.Latest_Parse_Node = Op1;
> + Gbl_CommentState.LatestParseOp = Op1;
> }
> +
> if (!Op1 || !Op2)
> {
> return (Op1);
> @@ -1689,7 +768,8 @@ TrLinkChildNode (
> *
> * FUNCTION: TrWalkParseTree
> *
> - * PARAMETERS: Visitation - Type of walk
> + * PARAMETERS: Op - Walk starting point
> + * Visitation - Type of walk
> * DescendingCallback - Called during tree descent
> * AscendingCallback - Called during tree ascent
> * Context - To be passed to the callbacks
> @@ -1709,7 +789,7 @@ TrWalkParseTree (
> void *Context)
> {
> UINT32 Level;
> - BOOLEAN NodePreviouslyVisited;
> + BOOLEAN OpPreviouslyVisited;
> ACPI_PARSE_OBJECT *StartOp = Op;
> ACPI_STATUS Status;
>
> @@ -1720,7 +800,7 @@ TrWalkParseTree (
> }
>
> Level = 0;
> - NodePreviouslyVisited = FALSE;
> + OpPreviouslyVisited = FALSE;
>
> switch (Visitation)
> {
> @@ -1728,9 +808,9 @@ TrWalkParseTree (
>
> while (Op)
> {
> - if (!NodePreviouslyVisited)
> + if (!OpPreviouslyVisited)
> {
> - /* Let the callback process the node. */
> + /* Let the callback process the op. */
>
> Status = DescendingCallback (Op, Level, Context);
> if (ACPI_SUCCESS (Status))
> @@ -1764,7 +844,7 @@ TrWalkParseTree (
> if (Op->Asl.Next)
> {
> Op = Op->Asl.Next;
> - NodePreviouslyVisited = FALSE;
> + OpPreviouslyVisited = FALSE;
> }
> else
> {
> @@ -1775,7 +855,7 @@ TrWalkParseTree (
> Level--;
> }
> Op = Op->Asl.Parent;
> - NodePreviouslyVisited = TRUE;
> + OpPreviouslyVisited = TRUE;
> }
> }
> break;
> @@ -1784,12 +864,12 @@ TrWalkParseTree (
>
> while (Op)
> {
> - /* Visit leaf node (no children) or parent node on return trip */
> + /* Visit leaf op (no children) or parent op on return trip */
>
> if ((!Op->Asl.Child) ||
> - (NodePreviouslyVisited))
> + (OpPreviouslyVisited))
> {
> - /* Let the callback process the node. */
> + /* Let the callback process the op. */
>
> Status = AscendingCallback (Op, Level, Context);
> if (ACPI_FAILURE (Status))
> @@ -1818,7 +898,7 @@ TrWalkParseTree (
> if (Op->Asl.Next)
> {
> Op = Op->Asl.Next;
> - NodePreviouslyVisited = FALSE;
> + OpPreviouslyVisited = FALSE;
> }
> else
> {
> @@ -1829,7 +909,7 @@ TrWalkParseTree (
> Level--;
> }
> Op = Op->Asl.Parent;
> - NodePreviouslyVisited = TRUE;
> + OpPreviouslyVisited = TRUE;
> }
> }
> break;
> @@ -1838,7 +918,7 @@ TrWalkParseTree (
>
> while (Op)
> {
> - if (NodePreviouslyVisited)
> + if (OpPreviouslyVisited)
> {
> Status = AscendingCallback (Op, Level, Context);
> if (ACPI_FAILURE (Status))
> @@ -1848,7 +928,7 @@ TrWalkParseTree (
> }
> else
> {
> - /* Let the callback process the node. */
> + /* Let the callback process the op. */
>
> Status = DescendingCallback (Op, Level, Context);
> if (ACPI_SUCCESS (Status))
> @@ -1882,7 +962,7 @@ TrWalkParseTree (
> if (Op->Asl.Next)
> {
> Op = Op->Asl.Next;
> - NodePreviouslyVisited = FALSE;
> + OpPreviouslyVisited = FALSE;
> }
> else
> {
> @@ -1893,7 +973,7 @@ TrWalkParseTree (
> Level--;
> }
> Op = Op->Asl.Parent;
> - NodePreviouslyVisited = TRUE;
> + OpPreviouslyVisited = TRUE;
> }
> }
> break;
> diff --git a/src/acpica/source/compiler/asltypes.h b/src/acpica/source/compiler/asltypes.h
> index d8fafe0d..4c2a2772 100644
> --- a/src/acpica/source/compiler/asltypes.h
> +++ b/src/acpica/source/compiler/asltypes.h
> @@ -162,27 +162,29 @@
>
> /* Op flags for the ACPI_PARSE_OBJECT */
>
> -#define NODE_VISITED 0x00000001
> -#define NODE_AML_PACKAGE 0x00000002
> -#define NODE_IS_TARGET 0x00000004
> -#define NODE_IS_RESOURCE_DESC 0x00000008
> -#define NODE_IS_RESOURCE_FIELD 0x00000010
> -#define NODE_HAS_NO_EXIT 0x00000020
> -#define NODE_IF_HAS_NO_EXIT 0x00000040
> -#define NODE_NAME_INTERNALIZED 0x00000080
> -#define NODE_METHOD_NO_RETVAL 0x00000100
> -#define NODE_METHOD_SOME_NO_RETVAL 0x00000200
> -#define NODE_RESULT_NOT_USED 0x00000400
> -#define NODE_METHOD_TYPED 0x00000800
> -#define NODE_COULD_NOT_REDUCE 0x00001000
> -#define NODE_COMPILE_TIME_CONST 0x00002000
> -#define NODE_IS_TERM_ARG 0x00004000
> -#define NODE_WAS_ONES_OP 0x00008000
> -#define NODE_IS_NAME_DECLARATION 0x00010000
> -#define NODE_COMPILER_EMITTED 0x00020000
> -#define NODE_IS_DUPLICATE 0x00040000
> -#define NODE_IS_RESOURCE_DATA 0x00080000
> -#define NODE_IS_NULL_RETURN 0x00100000
> +#define OP_VISITED 0x00000001
> +#define OP_AML_PACKAGE 0x00000002
> +#define OP_IS_TARGET 0x00000004
> +#define OP_IS_RESOURCE_DESC 0x00000008
> +#define OP_IS_RESOURCE_FIELD 0x00000010
> +#define OP_HAS_NO_EXIT 0x00000020
> +#define OP_IF_HAS_NO_EXIT 0x00000040
> +#define OP_NAME_INTERNALIZED 0x00000080
> +#define OP_METHOD_NO_RETVAL 0x00000100
> +#define OP_METHOD_SOME_NO_RETVAL 0x00000200
> +#define OP_RESULT_NOT_USED 0x00000400
> +#define OP_METHOD_TYPED 0x00000800
> +#define OP_COULD_NOT_REDUCE 0x00001000
> +#define OP_COMPILE_TIME_CONST 0x00002000
> +#define OP_IS_TERM_ARG 0x00004000
> +#define OP_WAS_ONES_OP 0x00008000
> +#define OP_IS_NAME_DECLARATION 0x00010000
> +#define OP_COMPILER_EMITTED 0x00020000
> +#define OP_IS_DUPLICATE 0x00040000
> +#define OP_IS_RESOURCE_DATA 0x00080000
> +#define OP_IS_NULL_RETURN 0x00100000
> +
> +#define ACPI_NUM_OP_FLAGS 0x21
>
> /* Keeps information about individual control methods */
>
> diff --git a/src/acpica/source/compiler/aslwalks.c b/src/acpica/source/compiler/aslwalks.c
> index b35261f8..811e2039 100644
> --- a/src/acpica/source/compiler/aslwalks.c
> +++ b/src/acpica/source/compiler/aslwalks.c
> @@ -195,7 +195,7 @@ AnMethodTypingWalkEnd (
> {
> case PARSEOP_METHOD:
>
> - Op->Asl.CompileFlags |= NODE_METHOD_TYPED;
> + Op->Asl.CompileFlags |= OP_METHOD_TYPED;
> break;
>
> case PARSEOP_RETURN:
> diff --git a/src/acpica/source/compiler/aslxref.c b/src/acpica/source/compiler/aslxref.c
> index 62933ec1..ebd356e6 100644
> --- a/src/acpica/source/compiler/aslxref.c
> +++ b/src/acpica/source/compiler/aslxref.c
> @@ -533,7 +533,7 @@ XfNamespaceLocateBegin (
> * references to other objects within the namespace and the parent objects
> * of name declarations
> */
> - if (Op->Asl.CompileFlags & NODE_IS_NAME_DECLARATION)
> + if (Op->Asl.CompileFlags & OP_IS_NAME_DECLARATION)
> {
> return_ACPI_STATUS (AE_OK);
> }
> @@ -559,7 +559,7 @@ XfNamespaceLocateBegin (
> RegisterNumber = Op->Asl.AmlOpcode & 0x0007; /* 0x60 through 0x67 */
> MethodLocals = Node->MethodLocals;
>
> - if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> + if (Op->Asl.CompileFlags & OP_IS_TARGET)
> {
> /* Local is being initialized */
>
> @@ -603,7 +603,7 @@ XfNamespaceLocateBegin (
> MethodArgs[RegisterNumber].Flags |= ASL_ARG_REFERENCED;
> MethodArgs[RegisterNumber].Op = Op;
>
> - if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> + if (Op->Asl.CompileFlags & OP_IS_TARGET)
> {
> /* Arg is being initialized */
>
> @@ -676,7 +676,7 @@ XfNamespaceLocateBegin (
> /* Name must appear as the last parameter */
>
> NextOp = Op->Asl.Child;
> - while (!(NextOp->Asl.CompileFlags & NODE_IS_NAME_DECLARATION))
> + while (!(NextOp->Asl.CompileFlags & OP_IS_NAME_DECLARATION))
> {
> NextOp = NextOp->Asl.Next;
> }
> @@ -916,7 +916,7 @@ XfNamespaceLocateBegin (
> Op->Asl.AmlLength = 0;
> Op->Asl.ParseOpcode = PARSEOP_INTEGER;
> Op->Asl.Value.Integer = (UINT64) Offset;
> - Op->Asl.CompileFlags |= NODE_IS_RESOURCE_FIELD;
> + Op->Asl.CompileFlags |= OP_IS_RESOURCE_FIELD;
>
> OpcGenerateAmlOpcode (Op);
> }
> diff --git a/src/acpica/source/compiler/cvcompiler.c b/src/acpica/source/compiler/cvcompiler.c
> index fab9fb94..afb6ea1b 100644
> --- a/src/acpica/source/compiler/cvcompiler.c
> +++ b/src/acpica/source/compiler/cvcompiler.c
> @@ -164,7 +164,7 @@
> * StringBuffer Buffer containing the comment being processed
> * c1 Current input
> *
> - * RETURN: none
> + * RETURN: None
> *
> * DESCRIPTION: Process a single line comment of a c Style comment. This
> * function captures a line of a c style comment in a char* and
> @@ -217,14 +217,15 @@ CvProcessComment (
> {
> FinalLineToken[strlen(FinalLineToken)-1] = 0;
> }
> +
> CvAddToCommentList (FinalLineToken);
> LineToken = strtok (NULL, "\n");
> while (LineToken != NULL)
> {
> /*
> * It is assumed that each line has some sort of indentation.
> - * This means that we need to find the first character that is not
> - * a white space within each line.
> + * This means that we need to find the first character that
> + * is not a white space within each line.
> */
> CharStart = FALSE;
> for (i = 0; (i < (strlen (LineToken) + 1)) && !CharStart; i++)
> @@ -236,6 +237,7 @@ CvProcessComment (
> LineToken [0] = ' '; /* Pad for Formatting */
> }
> }
> +
> FinalLineToken = UtStringCacheCalloc (strlen (LineToken) + 1);
> strcat (FinalLineToken, LineToken);
>
> @@ -245,32 +247,36 @@ CvProcessComment (
> {
> FinalLineToken[strlen(FinalLineToken) - 1] = 0;
> }
> +
> CvAddToCommentList (FinalLineToken);
> LineToken = strtok (NULL,"\n");
> }
> }
>
> /*
> - * If this only spans a single line, check to see whether if this comment
> - * appears on the same line as a line of code. If does, retain it's
> - * position for stylistic reasons. If it doesn't, add it to the comment
> - * List so that it can be associated with the next node that's created.
> + * If this only spans a single line, check to see whether if this
> + * comment appears on the same line as a line of code. If does,
> + * retain it's position for stylistic reasons. If it doesn't,
> + * add it to the comment list so that it can be associated with
> + * the next node that's created.
> */
> else
> {
> /*
> - * if this is not a regular comment, pad with extra spaces that appeared
> - * in the original source input to retain the original spacing.
> + * If this is not a regular comment, pad with extra spaces that
> + * appeared in the original source input to retain the original
> + * spacing.
> */
> FinalCommentString =
> UtStringCacheCalloc (strlen (CommentString) +
> CurrentState.SpacesBefore + 1);
>
> - for (i=0; (CurrentState.CommentType != ASL_COMMENT_STANDARD) &&
> - (i < CurrentState.SpacesBefore); ++i)
> + for (i = 0; (CurrentState.CommentType != ASL_COMMENT_STANDARD) &&
> + (i < CurrentState.SpacesBefore); i++)
> {
> FinalCommentString[i] = ' ';
> }
> +
> strcat (FinalCommentString, CommentString);
> CvPlaceComment (CurrentState.CommentType, FinalCommentString);
> }
> @@ -310,10 +316,10 @@ CvProcessCommentType2 (
> CommentString = UtStringCacheCalloc (strlen (MsgBuffer) + 1);
> strcpy (CommentString, MsgBuffer);
>
> - /* If this comment lies on the same line as the latest parse node,
> - * assign it to that node's CommentAfter field. Saving in this field
> - * will allow us to support comments that come after code on the same
> - * line as the code itself. For example,
> + /* If this comment lies on the same line as the latest parse op,
> + * assign it to that op's CommentAfter field. Saving in this field
> + * will allow us to support comments that come after code on the
> + * same line as the code itself. For example,
> * Name(A,"") //comment
> *
> * will be retained rather than transformed into
> @@ -330,7 +336,8 @@ CvProcessCommentType2 (
> * Create a new string with the approperiate spaces. Since we need
> * to account for the proper spacing, the actual comment,
> * extra 2 spaces so that this comment can be converted to the "/ *"
> - * style and the null terminator, the string would look something like
> + * style and the null terminator, the string would look something
> + * like:
> *
> * [ (spaces) (comment) ( * /) ('\0') ]
> *
> @@ -338,23 +345,27 @@ CvProcessCommentType2 (
> FinalCommentString = UtStringCacheCalloc (CurrentState.SpacesBefore +
> strlen (CommentString) + 3 + 1);
>
> - for (i=0; (CurrentState.CommentType!=1) && (i<CurrentState.SpacesBefore); ++i)
> + for (i = 0; (CurrentState.CommentType != 1) &&
> + (i < CurrentState.SpacesBefore); i++)
> {
> FinalCommentString[i] = ' ';
> }
> +
> strcat (FinalCommentString, CommentString);
>
> /* convert to a "/ *" style comment */
>
> strcat (FinalCommentString, " */");
> - FinalCommentString [CurrentState.SpacesBefore + strlen (CommentString) + 3] = 0;
> + FinalCommentString [CurrentState.SpacesBefore +
> + strlen (CommentString) + 3] = 0;
>
> /* get rid of the carriage return */
>
> if (FinalCommentString[strlen (FinalCommentString) - 1] == 0x0D)
> {
> - FinalCommentString[strlen(FinalCommentString)-1] = 0;
> + FinalCommentString[strlen(FinalCommentString) - 1] = 0;
> }
> +
> CvPlaceComment (CurrentState.CommentType, FinalCommentString);
> }
> }
> @@ -366,9 +377,9 @@ CvProcessCommentType2 (
> *
> * PARAMETERS: Op - Calculate all comments of this Op
> *
> - * RETURN: TotalCommentLength - Length of all comments within this node.
> + * RETURN: TotalCommentLength - Length of all comments within this op.
> *
> - * DESCRIPTION: calculate the length that the each comment takes up within Op.
> + * DESCRIPTION: Calculate the length that the each comment takes up within Op.
> * Comments look like the follwoing: [0xA9 OptionBtye comment 0x00]
> * therefore, we add 1 + 1 + strlen (comment) + 1 to get the actual
> * length of this comment.
> @@ -389,7 +400,9 @@ CvCalculateCommentLengths(
> return (0);
> }
>
> - CvDbgPrint ("==Calculating comment lengths for %s\n", Op->Asl.ParseOpName);
> + CvDbgPrint ("==Calculating comment lengths for %s\n",
> + Op->Asl.ParseOpName);
> +
> if (Op->Asl.FileChanged)
> {
> TotalCommentLength += strlen (Op->Asl.Filename) + 3;
> @@ -400,6 +413,7 @@ CvCalculateCommentLengths(
> TotalCommentLength += strlen (Op->Asl.ParentFilename) + 3;
> }
> }
> +
> if (Op->Asl.CommentList)
> {
> Current = Op->Asl.CommentList;
> @@ -412,6 +426,7 @@ CvCalculateCommentLengths(
> Current = Current->Next;
> }
> }
> +
> if (Op->Asl.EndBlkComment)
> {
> Current = Op->Asl.EndBlkComment;
> @@ -424,6 +439,7 @@ CvCalculateCommentLengths(
> Current = Current->Next;
> }
> }
> +
> if (Op->Asl.InlineComment)
> {
> CommentLength = strlen (Op->Asl.InlineComment)+3;
> @@ -431,6 +447,7 @@ CvCalculateCommentLengths(
> CvDbgPrint (" Comment string: %s\n\n", Op->Asl.InlineComment);
> TotalCommentLength += CommentLength;
> }
> +
> if (Op->Asl.EndNodeComment)
> {
> CommentLength = strlen(Op->Asl.EndNodeComment)+3;
> @@ -448,9 +465,7 @@ CvCalculateCommentLengths(
> }
>
> CvDbgPrint("\n\n");
> -
> - return TotalCommentLength;
> -
> + return (TotalCommentLength);
> }
>
>
> @@ -490,7 +505,7 @@ CgWriteAmlDefBlockComment(
>
> CvDbgPrint ("Printing comments for a definition block..\n");
>
> - /* first, print the file name comment after changing .asl to .dsl */
> + /* First, print the file name comment after changing .asl to .dsl */
>
> NewFilename = UtStringCacheCalloc (strlen (Op->Asl.Filename));
> strcpy (NewFilename, Op->Asl.Filename);
> @@ -518,15 +533,17 @@ CgWriteAmlDefBlockComment(
>
> Current = Op->Asl.CommentList;
> CommentOption = STD_DEFBLK_COMMENT;
> +
> while (Current)
> {
> CgWriteOneAmlComment(Op, Current->Comment, CommentOption);
> CvDbgPrint ("Printing comment: %s\n", Current->Comment);
> Current = Current->Next;
> }
> +
> Op->Asl.CommentList = NULL;
>
> - /* print any Inline comments associated with this node */
> + /* Print any Inline comments associated with this node */
>
> if (Op->Asl.CloseBraceComment)
> {
> @@ -557,8 +574,8 @@ CgWriteOneAmlComment(
> char* CommentToPrint,
> UINT8 InputOption)
> {
> - UINT8 CommentOption = InputOption;
> - UINT8 CommentOpcode = (UINT8)AML_COMMENT_OP;
> + UINT8 CommentOption = InputOption;
> + UINT8 CommentOpcode = (UINT8) AML_COMMENT_OP;
>
>
> if (!CommentToPrint)
> @@ -583,8 +600,7 @@ CgWriteOneAmlComment(
> *
> * RETURN: None
> *
> - * DESCRIPTION: write all comments pertaining to the
> - * current parse op
> + * DESCRIPTION: Write all comments pertaining to the current parse op
> *
> ******************************************************************************/
>
> @@ -609,7 +625,7 @@ CgWriteAmlComment(
> if (Op->Asl.FileChanged)
> {
>
> - /* first, print the file name comment after changing .asl to .dsl */
> + /* First, print the file name comment after changing .asl to .dsl */
>
> NewFilename =
> FlGenerateFilename (Op->Asl.Filename, FILE_SUFFIX_DISASSEMBLY);
> @@ -629,7 +645,7 @@ CgWriteAmlComment(
> CgWriteOneAmlComment(Op, ParentFilename, PARENTFILENAME_COMMENT);
> }
>
> - /* prevent multiple writes of the same comment */
> + /* Prevent multiple writes of the same comment */
>
> Op->Asl.FileChanged = FALSE;
> }
> @@ -654,6 +670,7 @@ CgWriteAmlComment(
> CgWriteOneAmlComment(Op, Current->Comment, CommentOption);
> Current = Current->Next;
> }
> +
> Op->Asl.CommentList = NULL;
>
> Current = Op->Asl.EndBlkComment;
> @@ -663,9 +680,10 @@ CgWriteAmlComment(
> CgWriteOneAmlComment(Op, Current->Comment, CommentOption);
> Current = Current->Next;
> }
> +
> Op->Asl.EndBlkComment = NULL;
>
> - /* print any Inline comments associated with this node */
> + /* Print any Inline comments associated with this node */
>
> if (Op->Asl.InlineComment)
> {
> @@ -694,7 +712,7 @@ CgWriteAmlComment(
> *
> * FUNCTION: CvCommentNodeCalloc
> *
> - * PARAMETERS: none
> + * PARAMETERS: None
> *
> * RETURN: Pointer to the comment node. Aborts on allocation failure
> *
> @@ -733,6 +751,7 @@ UINT32
> CvParseOpBlockType (
> ACPI_PARSE_OBJECT *Op)
> {
> +
> if (!Op)
> {
> return (BLOCK_NONE);
> @@ -740,8 +759,7 @@ CvParseOpBlockType (
>
> switch (Op->Asl.ParseOpcode)
> {
> -
> - /* from aslprimaries.y */
> + /* From aslprimaries.y */
>
> case PARSEOP_VAR_PACKAGE:
> case PARSEOP_BANKFIELD:
> @@ -763,7 +781,7 @@ CvParseOpBlockType (
> case PARSEOP_THERMALZONE:
> case PARSEOP_WHILE:
>
> - /* from aslresources.y */
> + /* From aslresources.y */
>
> case PARSEOP_RESOURCETEMPLATE: /* optional parens */
> case PARSEOP_VENDORLONG:
> @@ -775,13 +793,12 @@ CvParseOpBlockType (
> case PARSEOP_GPIO_IO:
> case PARSEOP_DMA:
>
> - /*from aslrules.y */
> + /* From aslrules.y */
>
> case PARSEOP_DEFINITION_BLOCK:
> return (BLOCK_PAREN | BLOCK_BRACE);
>
> default:
> -
> return (BLOCK_NONE);
> }
> }
> @@ -791,7 +808,7 @@ CvParseOpBlockType (
> *
> * FUNCTION: CvProcessCommentState
> *
> - * PARAMETERS: char
> + * PARAMETERS: Input - Input character
> *
> * RETURN: None
> *
> @@ -803,15 +820,15 @@ CvParseOpBlockType (
>
> void
> CvProcessCommentState (
> - char input)
> + char Input)
> {
>
> - if (input != ' ')
> + if (Input != ' ')
> {
> Gbl_CommentState.SpacesBefore = 0;
> }
>
> - switch (input)
> + switch (Input)
> {
> case '\n':
>
> @@ -856,7 +873,6 @@ CvProcessCommentState (
>
> Gbl_CommentState.CommentType = ASLCOMMENT_INLINE;
> break;
> -
> }
> }
>
> @@ -865,7 +881,7 @@ CvProcessCommentState (
> *
> * FUNCTION: CvAddToCommentList
> *
> - * PARAMETERS: toAdd - Contains the comment to be inserted
> + * PARAMETERS: ToAdd - Contains the comment to be inserted
> *
> * RETURN: None
> *
> @@ -876,24 +892,24 @@ CvProcessCommentState (
>
> void
> CvAddToCommentList (
> - char* ToAdd)
> + char *ToAdd)
> {
> - if (Gbl_Comment_List_Head)
> +
> + if (Gbl_CommentListHead)
> {
> - Gbl_Comment_List_Tail->Next = CvCommentNodeCalloc ();
> - Gbl_Comment_List_Tail = Gbl_Comment_List_Tail->Next;
> + Gbl_CommentListTail->Next = CvCommentNodeCalloc ();
> + Gbl_CommentListTail = Gbl_CommentListTail->Next;
> }
> else
> {
> - Gbl_Comment_List_Head = CvCommentNodeCalloc ();
> - Gbl_Comment_List_Tail = Gbl_Comment_List_Head;
> + Gbl_CommentListHead = CvCommentNodeCalloc ();
> + Gbl_CommentListTail = Gbl_CommentListHead;
> }
>
> - Gbl_Comment_List_Tail->Comment = ToAdd;
> -
> - return;
> + Gbl_CommentListTail->Comment = ToAdd;
> }
>
> +
> /*******************************************************************************
> *
> * FUNCTION: CvAppendInlineComment
> @@ -907,7 +923,7 @@ CvAddToCommentList (
> *
> ******************************************************************************/
>
> -char*
> +char *
> CvAppendInlineComment (
> char *InlineComment,
> char *ToAdd)
> @@ -918,21 +934,22 @@ CvAppendInlineComment (
>
> if (!InlineComment)
> {
> - return ToAdd;
> + return (ToAdd);
> }
> +
> if (!ToAdd)
> {
> - return InlineComment;
> + return (InlineComment);
> }
>
> Size = strlen (ToAdd);
> Size += strlen (InlineComment);
> - Str = UtStringCacheCalloc (Size+1);
> + Str = UtStringCacheCalloc (Size + 1);
> +
> strcpy (Str, InlineComment);
> strcat (Str, ToAdd);
> - Str[Size+1] = 0;
> -
> - return Str;
> + Str[Size +1] = 0;
> + return (Str);
> }
>
>
> @@ -940,8 +957,8 @@ CvAppendInlineComment (
> *
> * FUNCTION: CvPlaceComment
> *
> - * PARAMETERS: Int - Type
> - * char* - CommentString
> + * PARAMETERS: UINT8 - Type
> + * char * - CommentString
> *
> * RETURN: None
> *
> @@ -959,7 +976,7 @@ CvPlaceComment(
> ACPI_PARSE_OBJECT *ParenBraceNode;
>
>
> - LatestParseNode = Gbl_CommentState.Latest_Parse_Node;
> + LatestParseNode = Gbl_CommentState.LatestParseOp;
> ParenBraceNode = Gbl_CommentState.ParsingParenBraceNode;
> CvDbgPrint ("Placing comment %s for type %d\n", CommentString, Type);
>
> @@ -979,8 +996,8 @@ CvPlaceComment(
>
> case ASL_COMMENT_OPEN_PAREN:
>
> - Gbl_Inline_Comment_Buffer =
> - CvAppendInlineComment(Gbl_Inline_Comment_Buffer,
> + Gbl_InlineCommentBuffer =
> + CvAppendInlineComment(Gbl_InlineCommentBuffer,
> CommentString);
> break;
>
> @@ -1008,6 +1025,5 @@ CvPlaceComment(
> default:
>
> break;
> -
> }
> }
> diff --git a/src/acpica/source/compiler/cvdisasm.c b/src/acpica/source/compiler/cvdisasm.c
> index 6e9b73f0..8682f04e 100644
> --- a/src/acpica/source/compiler/cvdisasm.c
> +++ b/src/acpica/source/compiler/cvdisasm.c
> @@ -156,6 +156,8 @@
> #include "acconvert.h"
>
>
> +/* Local prototypes */
> +
> static void
> CvPrintInclude(
> ACPI_FILE_NODE *FNode,
> @@ -198,6 +200,7 @@ CvPrintOneCommentList (
> AcpiOsPrintf("%s\n", Current->Comment);
> Current->Comment = NULL;
> }
> +
> Current = Current->Next;
> AcpiOsReleaseObject(AcpiGbl_RegCommentCache, Previous);
> }
> @@ -208,7 +211,7 @@ CvPrintOneCommentList (
> *
> * FUNCTION: CvListIsSingleton
> *
> - * PARAMETERS: CommentList -- check to see if this is a single item list.
> + * PARAMETERS: CommentList - check to see if this is a single item list.
> *
> * RETURN: BOOLEAN
> *
> @@ -221,16 +224,17 @@ CvListIsSingleton (
> ACPI_COMMENT_NODE *CommentList)
>
> {
> +
> if (!CommentList)
> {
> - return FALSE;
> + return (FALSE);
> }
> else if (CommentList->Next)
> {
> - return FALSE;
> + return (FALSE);
> }
>
> - return TRUE;
> + return (TRUE);
> }
>
>
> @@ -275,6 +279,7 @@ CvPrintOneCommentType (
> {
> CvPrintOneCommentList (Op->Common.CommentList, Level);
> }
> +
> Op->Common.CommentList = NULL;
> return;
>
> @@ -333,7 +338,7 @@ CvPrintOneCommentType (
> * PARAMETERS: Op
> * Level
> *
> - * RETURN: none
> + * RETURN: None
> *
> * DESCRIPTION: Print a close brace } and any open brace comments associated
> * with this parse object.
> @@ -346,6 +351,7 @@ CvCloseBraceWriteComment(
> ACPI_PARSE_OBJECT *Op,
> UINT32 Level)
> {
> +
> if (!Gbl_CaptureComments)
> {
> AcpiOsPrintf ("}");
> @@ -365,7 +371,7 @@ CvCloseBraceWriteComment(
> * PARAMETERS: Op
> * Level
> *
> - * RETURN: none
> + * RETURN: None
> *
> * DESCRIPTION: Print a closing paren ) and any end node comments associated
> * with this parse object.
> @@ -378,6 +384,7 @@ CvCloseParenWriteComment(
> ACPI_PARSE_OBJECT *Op,
> UINT32 Level)
> {
> +
> if (!Gbl_CaptureComments)
> {
> AcpiOsPrintf (")");
> @@ -427,13 +434,15 @@ BOOLEAN
> CvFileHasSwitched(
> ACPI_PARSE_OBJECT *Op)
> {
> +
> if (Op->Common.CvFilename &&
> AcpiGbl_CurrentFilename &&
> AcpiUtStricmp(Op->Common.CvFilename, AcpiGbl_CurrentFilename))
> {
> - return TRUE;
> + return (TRUE);
> }
> - return FALSE;
> +
> + return (FALSE);
> }
>
>
> @@ -459,17 +468,21 @@ CvPrintInclude(
> ACPI_FILE_NODE *FNode,
> UINT32 Level)
> {
> +
> if (!FNode || FNode->IncludeWritten)
> {
> return;
> }
>
> - CvDbgPrint ("Writing include for %s within %s\n", FNode->Filename, FNode->Parent->Filename);
> + CvDbgPrint ("Writing include for %s within %s\n",
> + FNode->Filename, FNode->Parent->Filename);
> AcpiOsRedirectOutput (FNode->Parent->File);
> CvPrintOneCommentList (FNode->IncludeComment, Level);
> +
> AcpiDmIndent (Level);
> AcpiOsPrintf ("Include (\"%s\")\n", FNode->Filename);
> - CvDbgPrint ("emitted the following: Include (\"%s\")\n", FNode->Filename);
> + CvDbgPrint ("emitted the following: Include (\"%s\")\n",
> + FNode->Filename);
> FNode->IncludeWritten = TRUE;
> }
>
> @@ -478,7 +491,7 @@ CvPrintInclude(
> *
> * FUNCTION: CvSwitchFiles
> *
> - * PARAMETERS: Level - indentation level
> + * PARAMETERS: Level - indentation level
> * Op
> *
> * RETURN: None
> @@ -498,7 +511,9 @@ CvSwitchFiles(
> ACPI_FILE_NODE *FNode;
> ACPI_FILE_NODE *Current;
>
> - CvDbgPrint ("Switching from %s to %s\n", AcpiGbl_CurrentFilename, Filename);
> +
> + CvDbgPrint ("Switching from %s to %s\n", AcpiGbl_CurrentFilename,
> + Filename);
> FNode = CvFilenameExists (Filename, AcpiGbl_FileTreeRoot);
> if (!FNode)
> {
> @@ -507,10 +522,13 @@ CvSwitchFiles(
> * if it does not exist, then abort.
> */
> FlDeleteFile (ASL_FILE_AML_OUTPUT);
> - sprintf (MsgBuffer, "\"Cannot find %s\" - %s", Filename, strerror (errno));
> - AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0, NULL, MsgBuffer);
> + sprintf (MsgBuffer, "\"Cannot find %s\" - %s",
> + Filename, strerror (errno));
> + AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0,
> + NULL, MsgBuffer);
> AslAbort ();
> }
> +
> Current = FNode;
>
> /*
> diff --git a/src/acpica/source/compiler/cvparser.c b/src/acpica/source/compiler/cvparser.c
> index 060e8aed..9941582a 100644
> --- a/src/acpica/source/compiler/cvparser.c
> +++ b/src/acpica/source/compiler/cvparser.c
> @@ -204,23 +204,24 @@ CvIsFilename (
> char *Filename)
> {
> UINT64 Length = strlen(Filename);
> - UINT64 i;
> char *FileExt = Filename + Length - 4;
> + UINT64 i;
>
>
> if ((Length > 4) && AcpiUtStricmp (FileExt, ".dsl"))
> {
> - return FALSE;
> + return (FALSE);
> }
>
> for(i = 0; i<Length; ++i)
> {
> if (!isprint ((int) Filename[i]))
> {
> - return FALSE;
> + return (FALSE);
> }
> }
> - return TRUE;
> +
> + return (TRUE);
> }
>
>
> @@ -232,7 +233,7 @@ CvIsFilename (
> * AmlStart - Address of the starting point of the AML.
> * AmlLength - Length of the AML file.
> *
> - * RETURN: none
> + * RETURN: None
> *
> * DESCRIPTION: Initialize the file dependency tree by scanning the AML.
> * This is referred as ASL_CV_INIT_FILETREE.
> @@ -263,6 +264,7 @@ CvInitFileTree (
> CvDbgPrint ("AmlEnd?: %p\n", AmlStart+AmlLength);
>
> AcpiGbl_FileTreeRoot = AcpiOsAcquireObject (AcpiGbl_FileCache);
> +
> AcpiGbl_FileTreeRoot->FileStart = (char *)(AmlStart);
> AcpiGbl_FileTreeRoot->FileEnd = (char *)(AmlStart + Table->Length);
> AcpiGbl_FileTreeRoot->Next = NULL;
> @@ -293,25 +295,27 @@ CvInitFileTree (
> * raw data that doesn't outline a filename.
> */
> if ((*TreeAml == AML_COMMENT_OP) &&
> - (*(TreeAml+1) == FILENAME_COMMENT) &&
> - (CvIsFilename ((char *)(TreeAml+2))))
> + (*(TreeAml +1) == FILENAME_COMMENT) &&
> + (CvIsFilename ((char *)(TreeAml +2))))
> {
> CvDbgPrint ("A9 and a 08 file\n");
> PreviousFilename = Filename;
> - Filename = (char *) (TreeAml+2);
> + Filename = (char *) (TreeAml +2);
> +
> CvAddToFileTree (Filename, PreviousFilename);
> ChildFilename = Filename;
> CvDbgPrint ("%s\n", Filename);
> }
> else if ((*TreeAml == AML_COMMENT_OP) &&
> - (*(TreeAml+1) == PARENTFILENAME_COMMENT) &&
> - (CvIsFilename ((char *)(TreeAml+2))))
> + (*(TreeAml +1) == PARENTFILENAME_COMMENT) &&
> + (CvIsFilename ((char *)(TreeAml +2))))
> {
> CvDbgPrint ("A9 and a 09 file\n");
> - ParentFilename = (char *)(TreeAml+2);
> + ParentFilename = (char *)(TreeAml +2);
> CvSetFileParent (ChildFilename, ParentFilename);
> CvDbgPrint ("%s\n", ParentFilename);
> }
> +
> ++TreeAml;
> }
> }
> @@ -323,7 +327,7 @@ CvInitFileTree (
> *
> * PARAMETERS: Op -- clear all comments within this Op
> *
> - * RETURN: none
> + * RETURN: None
> *
> * DESCRIPTION: Clear all converter-related fields of the given Op.
> * This is referred as ASL_CV_CLEAR_OP_COMMENTS.
> @@ -334,6 +338,7 @@ void
> CvClearOpComments (
> ACPI_PARSE_OBJECT *Op)
> {
> +
> Op->Common.InlineComment = NULL;
> Op->Common.EndNodeComment = NULL;
> Op->Common.NameComment = NULL;
> @@ -349,12 +354,12 @@ CvClearOpComments (
> *
> * FUNCTION: CvCommentExists
> *
> - * PARAMETERS: address - check if this address appears in the list
> + * PARAMETERS: Address - check if this address appears in the list
> *
> * RETURN: BOOLEAN - TRUE if the address exists.
> *
> - * DESCRIPTION: look at the pointer address and check if this appears in the
> - * list of all addresses. If it exitsts in the list, return TRUE
> + * DESCRIPTION: Look at the pointer address and check if this appears in the
> + * list of all addresses. If it exists in the list, return TRUE
> * if it exists. Otherwise add to the list and return FALSE.
> *
> ******************************************************************************/
> @@ -371,13 +376,15 @@ CvCommentExists (
> {
> return (FALSE);
> }
> +
> Option = *(Address + 1);
>
> /*
> - * FILENAME_COMMENT and PARENTFILENAME_COMMENT are not treated as comments.
> - * They serve as markers for where the file starts and ends.
> + * FILENAME_COMMENT and PARENTFILENAME_COMMENT are not treated as
> + * comments. They serve as markers for where the file starts and ends.
> */
> - if ((Option == FILENAME_COMMENT) || (Option == PARENTFILENAME_COMMENT))
> + if ((Option == FILENAME_COMMENT) ||
> + (Option == PARENTFILENAME_COMMENT))
> {
> return (FALSE);
> }
> @@ -405,13 +412,14 @@ CvCommentExists (
> }
>
> /*
> - * If the execution gets to this point, it means that this address
> - * does not exists in the list. Add this address to the
> + * If the execution gets to this point, it means that this
> + * address does not exists in the list. Add this address to the
> * beginning of the list.
> */
> Current = AcpiGbl_CommentAddrListHead;
> AcpiGbl_CommentAddrListHead =
> AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
> +
> AcpiGbl_CommentAddrListHead->Addr = Address;
> AcpiGbl_CommentAddrListHead->Next = Current;
> return (FALSE);
> @@ -451,6 +459,7 @@ CvFilenameExists(
> {
> return (Current);
> }
> +
> Current = Current->Next;
> }
> return (NULL);
> @@ -464,7 +473,7 @@ CvFilenameExists(
> * PARAMETERS: Address - address to look up
> * Head - file dependency tree
> *
> - * RETURN: ACPI_FLE_NODE - pointer to a file node containing the address
> + * RETURN: ACPI_FILE_NODE - pointer to a file node containing the address
> *
> * DESCRIPTION: Look for the given address in the file dependency tree.
> * Returns the first file node where the given address is within
> @@ -472,7 +481,7 @@ CvFilenameExists(
> *
> ******************************************************************************/
>
> -static ACPI_FILE_NODE*
> +static ACPI_FILE_NODE *
> CvFileAddressLookup(
> char *Address,
> ACPI_FILE_NODE *Head)
> @@ -488,6 +497,7 @@ CvFileAddressLookup(
> {
> return (Current);
> }
> +
> Current = Current->Next;
> }
>
> @@ -522,7 +532,8 @@ CvLabelFileNode(
> return;
> }
>
> - Node = CvFileAddressLookup ((char *)Op->Common.Aml, AcpiGbl_FileTreeRoot);
> + Node = CvFileAddressLookup ((char *)
> + Op->Common.Aml, AcpiGbl_FileTreeRoot);
> if (!Node)
> {
> return;
> @@ -549,7 +560,7 @@ CvLabelFileNode(
> * PreviousFilename - Address containing the name of the previous
> * filename
> *
> - * RETURN: void
> + * RETURN: None
> *
> * DESCRIPTION: Add this filename to the AcpiGbl_FileTree if it does not exist.
> *
> @@ -586,9 +597,9 @@ CvAddToFileTree (
> if (Node && PreviousFilename)
> {
> /*
> - * Update the end of the previous file and all of their parents' ending
> - * Addresses. This is done to ensure that parent file ranges extend to
> - * the end of their childrens' files.
> + * Update the end of the previous file and all of their parents'
> + * ending addresses. This is done to ensure that parent file
> + * ranges extend to the end of their childrens' files.
> */
> Node = CvFilenameExists (PreviousFilename, AcpiGbl_FileTreeRoot);
> if (Node && (Node->FileEnd < Filename))
> @@ -601,6 +612,7 @@ CvAddToFileTree (
> {
> Node->FileEnd = Filename;
> }
> +
> Node = Node->Parent;
> }
> }
> @@ -609,6 +621,7 @@ CvAddToFileTree (
> {
> Node = AcpiGbl_FileTreeRoot;
> AcpiGbl_FileTreeRoot = AcpiOsAcquireObject (AcpiGbl_FileCache);
> +
> AcpiGbl_FileTreeRoot->Next = Node;
> AcpiGbl_FileTreeRoot->Parent = NULL;
> AcpiGbl_FileTreeRoot->Filename = Filename;
> @@ -626,7 +639,8 @@ CvAddToFileTree (
>
> FlDeleteFile (ASL_FILE_AML_OUTPUT);
> sprintf (MsgBuffer, "\"%s\" - %s", Filename, strerror (errno));
> - AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0, NULL, MsgBuffer);
> + AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0,
> + NULL, MsgBuffer);
> AslAbort ();
> }
> }
> @@ -640,9 +654,9 @@ CvAddToFileTree (
> * PARAMETERS: ChildFile - contains the filename of the child file
> * ParentFile - contains the filename of the parent file.
> *
> - * RETURN: none
> + * RETURN: None
> *
> - * DESCRIPTION: point the parent pointer of the Child to the node that
> + * DESCRIPTION: Point the parent pointer of the Child to the node that
> * corresponds with the parent file node.
> *
> ******************************************************************************/
> @@ -658,6 +672,7 @@ CvSetFileParent (
>
> Child = CvFilenameExists (ChildFile, AcpiGbl_FileTreeRoot);
> Parent = CvFilenameExists (ParentFile, AcpiGbl_FileTreeRoot);
> +
> if (Child && Parent)
> {
> Child->Parent = Parent;
> @@ -668,6 +683,7 @@ CvSetFileParent (
> {
> Child->Parent->FileEnd = Child->FileStart;
> }
> +
> Child = Child->Parent;
> }
> }
> @@ -680,9 +696,9 @@ CvSetFileParent (
> *
> * PARAMETERS: ParserState - A parser state object
> *
> - * RETURN: none
> + * RETURN: None
> *
> - * DESCRIPTION: look at the aml that the parser state is pointing to,
> + * DESCRIPTION: Look at the aml that the parser state is pointing to,
> * capture any AML_COMMENT_OP and it's arguments and increment the
> * aml pointer past the comment. Comments are transferred to parse
> * nodes through CvTransferComments() as well as
> @@ -720,13 +736,15 @@ CvCaptureCommentsOnly (
> }
> else
> {
> - CommentOption = *(Aml+1);
> -
> - /* Increment past the comment option and point the approperiate char pointers.*/
> + CommentOption = *(Aml +1);
>
> + /*
> + * Increment past the comment option and point the
> + * appropriate char pointers
> + */
> Aml += 2;
>
> - /* found a comment. Now, set pointers to these comments. */
> + /* Found a comment. Now, set pointers to these comments. */
>
> switch (CommentOption)
> {
> @@ -734,9 +752,12 @@ CvCaptureCommentsOnly (
>
> StdDefBlockFlag = TRUE;
>
> - /* add to a linked list of nodes. This list will be taken by the parse node created next. */
> -
> - CommentNode = AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
> + /*
> + * Add to a linked list of nodes. This list will be
> + * taken by the parse node created next.
> + */
> + CommentNode = AcpiOsAcquireObject (
> + AcpiGbl_RegCommentCache);
> CommentNode->Comment = ACPI_CAST_PTR (char, Aml);
> CommentNode->Next = NULL;
>
> @@ -748,7 +769,8 @@ CvCaptureCommentsOnly (
> else
> {
> AcpiGbl_DefBlkCommentListTail->Next = CommentNode;
> - AcpiGbl_DefBlkCommentListTail = AcpiGbl_DefBlkCommentListTail->Next;
> + AcpiGbl_DefBlkCommentListTail =
> + AcpiGbl_DefBlkCommentListTail->Next;
> }
> break;
>
> @@ -756,9 +778,12 @@ CvCaptureCommentsOnly (
>
> CvDbgPrint ("found regular comment.\n");
>
> - /* add to a linked list of nodes. This list will be taken by the parse node created next. */
> -
> - CommentNode = AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
> + /*
> + * Add to a linked list of nodes. This list will be
> + * taken by the parse node created next.
> + */
> + CommentNode = AcpiOsAcquireObject (
> + AcpiGbl_RegCommentCache);
> CommentNode->Comment = ACPI_CAST_PTR (char, Aml);
> CommentNode->Next = NULL;
>
> @@ -770,7 +795,8 @@ CvCaptureCommentsOnly (
> else
> {
> AcpiGbl_RegCommentListTail->Next = CommentNode;
> - AcpiGbl_RegCommentListTail = AcpiGbl_RegCommentListTail->Next;
> + AcpiGbl_RegCommentListTail =
> + AcpiGbl_RegCommentListTail->Next;
> }
> break;
>
> @@ -778,9 +804,11 @@ CvCaptureCommentsOnly (
>
> CvDbgPrint ("found endblk comment.\n");
>
> - /* add to a linked list of nodes. This will be taken by the next created parse node. */
> -
> - CommentNode = AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
> + /* Add to a linked list of nodes. This will be
> + * taken by the next created parse node.
> + */
> + CommentNode = AcpiOsAcquireObject (
> + AcpiGbl_RegCommentCache);
> CommentNode->Comment = ACPI_CAST_PTR (char, Aml);
> CommentNode->Next = NULL;
>
> @@ -792,38 +820,46 @@ CvCaptureCommentsOnly (
> else
> {
> AcpiGbl_EndBlkCommentListTail->Next = CommentNode;
> - AcpiGbl_EndBlkCommentListTail = AcpiGbl_EndBlkCommentListTail->Next;
> + AcpiGbl_EndBlkCommentListTail =
> + AcpiGbl_EndBlkCommentListTail->Next;
> }
> break;
>
> case INLINE_COMMENT:
>
> CvDbgPrint ("found inline comment.\n");
> - AcpiGbl_CurrentInlineComment = ACPI_CAST_PTR (char, Aml);
> + AcpiGbl_CurrentInlineComment =
> + ACPI_CAST_PTR (char, Aml);
> break;
>
> case ENDNODE_COMMENT:
>
> CvDbgPrint ("found EndNode comment.\n");
> - AcpiGbl_CurrentEndNodeComment = ACPI_CAST_PTR (char, Aml);
> + AcpiGbl_CurrentEndNodeComment =
> + ACPI_CAST_PTR (char, Aml);
> break;
>
> case CLOSE_BRACE_COMMENT:
>
> CvDbgPrint ("found close brace comment.\n");
> - AcpiGbl_CurrentCloseBraceComment = ACPI_CAST_PTR (char, Aml);
> + AcpiGbl_CurrentCloseBraceComment =
> + ACPI_CAST_PTR (char, Aml);
> break;
>
> case END_DEFBLK_COMMENT:
>
> - CvDbgPrint ("Found comment that belongs after the } for a definition block.\n");
> - AcpiGbl_CurrentScope->Common.CloseBraceComment = ACPI_CAST_PTR (char, Aml);
> + CvDbgPrint ("Found comment that belongs after"
> + " the } for a definition block.\n");
> + AcpiGbl_CurrentScope->Common.CloseBraceComment =
> + ACPI_CAST_PTR (char, Aml);
> break;
>
> case FILENAME_COMMENT:
>
> - CvDbgPrint ("Found a filename: %s\n", ACPI_CAST_PTR (char, Aml));
> - FileNode = CvFilenameExists (ACPI_CAST_PTR (char, Aml), AcpiGbl_FileTreeRoot);
> + CvDbgPrint ("Found a filename: %s\n",
> + ACPI_CAST_PTR (char, Aml));
> + FileNode = CvFilenameExists (
> + ACPI_CAST_PTR (char, Aml), AcpiGbl_FileTreeRoot);
>
> /*
> * If there is an INCLUDE_COMMENT followed by a
> @@ -851,7 +887,8 @@ CvCaptureCommentsOnly (
> * parse node created next. See the FILENAME_COMMENT case
> * for more details
> */
> - CommentNode = AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
> + CommentNode = AcpiOsAcquireObject (
> + AcpiGbl_RegCommentCache);
> CommentNode->Comment = ACPI_CAST_PTR (char, Aml);
> CommentNode->Next = NULL;
>
> @@ -863,10 +900,12 @@ CvCaptureCommentsOnly (
> else
> {
> AcpiGbl_IncCommentListTail->Next = CommentNode;
> - AcpiGbl_IncCommentListTail = AcpiGbl_IncCommentListTail->Next;
> + AcpiGbl_IncCommentListTail =
> + AcpiGbl_IncCommentListTail->Next;
> }
>
> - CvDbgPrint ("Found a include comment: %s\n", CommentNode->Comment);
> + CvDbgPrint ("Found a include comment: %s\n",
> + CommentNode->Comment);
> break;
>
> default:
> @@ -875,13 +914,12 @@ CvCaptureCommentsOnly (
>
> Aml -= 2;
> goto DefBlock;
> - break;
>
> - } /* end switch statement */
> + } /* End switch statement */
>
> - } /* end else */
> + } /* End else */
>
> - /* determine the length and move forward that amount */
> + /* Determine the length and move forward that amount */
>
> Length = 0;
> while (ParserState->Aml[Length])
> @@ -891,12 +929,10 @@ CvCaptureCommentsOnly (
>
> ParserState->Aml += Length + 1;
>
> -
> /* Peek at the next Opcode. */
>
> Aml = ParserState->Aml;
> Opcode = (UINT16) ACPI_GET8 (Aml);
> -
> }
>
> DefBlock:
> @@ -921,7 +957,7 @@ DefBlock:
> *
> * PARAMETERS: ParserState - A parser state object
> *
> - * RETURN: none
> + * RETURN: None
> *
> * DESCRIPTION: Wrapper function for CvCaptureCommentsOnly
> * This is referred as ASL_CV_CAPTURE_COMMENTS.
> @@ -943,8 +979,8 @@ CvCaptureComments (
> }
>
> /*
> - * Before parsing, check to see that comments that come directly after
> - * deferred opcodes aren't being processed.
> + * Before parsing, check to see that comments that come directly
> + * after deferred opcodes aren't being processed.
> */
> Aml = WalkState->ParserState.Aml;
> Opcode = (UINT16) ACPI_GET8 (Aml);
> @@ -965,9 +1001,9 @@ CvCaptureComments (
> *
> * FUNCTION: CvTransferComments
> *
> - * PARAMETERS: Op - Transfer comments to this Op
> + * PARAMETERS: Op - Transfer comments to this Op
> *
> - * RETURN: none
> + * RETURN: None
> *
> * DESCRIPTION: Transfer all of the commments stored in global containers to the
> * given Op. This will be invoked shortly after the parser creates
> @@ -980,6 +1016,7 @@ void
> CvTransferComments (
> ACPI_PARSE_OBJECT *Op)
> {
> +
> Op->Common.InlineComment = AcpiGbl_CurrentInlineComment;
> AcpiGbl_CurrentInlineComment = NULL;
>
> @@ -996,5 +1033,4 @@ CvTransferComments (
> Op->Common.EndBlkComment = AcpiGbl_EndBlkCommentListHead;
> AcpiGbl_EndBlkCommentListHead = NULL;
> AcpiGbl_EndBlkCommentListTail = NULL;
> -
> }
> diff --git a/src/acpica/source/components/disassembler/dmopcode.c b/src/acpica/source/components/disassembler/dmopcode.c
> index 8d9b532a..8e4a0d5f 100644
> --- a/src/acpica/source/components/disassembler/dmopcode.c
> +++ b/src/acpica/source/components/disassembler/dmopcode.c
> @@ -528,25 +528,30 @@ AcpiDmFieldPredefinedDescription (
> /* Major cheat: We previously put the Tag ptr in the Node field */
>
> Tag = ACPI_CAST_PTR (char, IndexOp->Common.Node);
> - if (!Tag)
> + if (!Tag || (*Tag == 0))
> {
> return;
> }
>
> - /* Match the name in the info table */
> + /* Is the tag a predefined name? */
>
> Info = AcpiAhMatchPredefinedName (Tag);
> - if (Info)
> + if (!Info)
> {
> - AcpiOsPrintf (" // %4.4s: %s", Tag,
> - ACPI_CAST_PTR (char, Info->Description));
> + /* Not a predefined name (does not start with underscore) */
> +
> + return;
> }
>
> - /* AML buffer (String) was allocated in AcpiGetTagPathname */
> + AcpiOsPrintf (" // %4.4s: %s", Tag,
> + ACPI_CAST_PTR (char, Info->Description));
>
> - ACPI_FREE (IndexOp->Common.Value.String);
> + /* String contains the prefix path, free it */
>
> + ACPI_FREE (IndexOp->Common.Value.String);
> + IndexOp->Common.Value.String = NULL;
> #endif
> +
> return;
> }
>
> diff --git a/src/acpica/source/components/executer/excreate.c b/src/acpica/source/components/executer/excreate.c
> index a5148dbb..15b38574 100644
> --- a/src/acpica/source/components/executer/excreate.c
> +++ b/src/acpica/source/components/executer/excreate.c
> @@ -203,6 +203,12 @@ AcpiExCreateAlias (
> TargetNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, TargetNode->Object);
> }
>
> + /* Ensure that the target node is valid */
> + if (!TargetNode)
> + {
> + return_ACPI_STATUS (AE_NULL_OBJECT);
> + }
> +
> /*
> * For objects that can never change (i.e., the NS node will
> * permanently point to the same object), we can simply attach
> diff --git a/src/acpica/source/components/hardware/hwxfsleep.c b/src/acpica/source/components/hardware/hwxfsleep.c
> index 4b858b42..c9d445fd 100644
> --- a/src/acpica/source/components/hardware/hwxfsleep.c
> +++ b/src/acpica/source/components/hardware/hwxfsleep.c
> @@ -184,9 +184,18 @@ AcpiHwSleepDispatch (
>
> static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] =
> {
> - {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacySleep), AcpiHwExtendedSleep},
> - {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep), AcpiHwExtendedWakePrep},
> - {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake), AcpiHwExtendedWake}
> + {ACPI_STRUCT_INIT (legacy_function,
> + ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacySleep)),
> + ACPI_STRUCT_INIT (extended_function,
> + AcpiHwExtendedSleep) },
> + {ACPI_STRUCT_INIT (legacy_function,
> + ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep)),
> + ACPI_STRUCT_INIT (extended_function,
> + AcpiHwExtendedWakePrep) },
> + {ACPI_STRUCT_INIT (legacy_function,
> + ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake)),
> + ACPI_STRUCT_INIT (extended_function,
> + AcpiHwExtendedWake) }
> };
>
>
> diff --git a/src/acpica/source/components/namespace/nsaccess.c b/src/acpica/source/components/namespace/nsaccess.c
> index 1404eabf..89d766b4 100644
> --- a/src/acpica/source/components/namespace/nsaccess.c
> +++ b/src/acpica/source/components/namespace/nsaccess.c
> @@ -764,6 +764,13 @@ AcpiNsLookup (
> ThisNode = (ACPI_NAMESPACE_NODE *) ThisNode->Object;
> }
> }
> +#ifdef ACPI_ASL_COMPILER
> + if (!AcpiGbl_DisasmFlag &&
> + (ThisNode->Flags & ANOBJ_IS_EXTERNAL))
> + {
> + ThisNode->Flags |= IMPLICIT_EXTERNAL;
> + }
> +#endif
> }
>
> /* Special handling for the last segment (NumSegments == 0) */
> diff --git a/src/acpica/source/components/parser/psobject.c b/src/acpica/source/components/parser/psobject.c
> index 5d59492a..8f31750c 100644
> --- a/src/acpica/source/components/parser/psobject.c
> +++ b/src/acpica/source/components/parser/psobject.c
> @@ -487,6 +487,31 @@ AcpiPsCreateOp (
> {
> Status = AcpiPsBuildNamedOp (WalkState, AmlOpStart, Op, &NamedOp);
> AcpiPsFreeOp (Op);
> +
> +#ifdef ACPI_ASL_COMPILER
> + if (AcpiGbl_DisasmFlag && WalkState->Opcode == AML_EXTERNAL_OP &&
> + Status == AE_NOT_FOUND)
> + {
> + /*
> + * If parsing of AML_EXTERNAL_OP's name path fails, then skip
> + * past this opcode and keep parsing. This is a much better
> + * alternative than to abort the entire disassembler. At this
> + * point, the ParserState is at the end of the namepath of the
> + * external declaration opcode. Setting WalkState->Aml to
> + * WalkState->ParserState.Aml + 2 moves increments the
> + * WalkState->Aml past the object type and the paramcount of the
> + * external opcode. For the error message, only print the AML
> + * offset. We could attempt to print the name but this may cause
> + * a segmentation fault when printing the namepath because the
> + * AML may be incorrect.
> + */
> + AcpiOsPrintf (
> + "// Invalid external declaration at AML offset 0x%x.\n",
> + WalkState->Aml - WalkState->ParserState.AmlStart);
> + WalkState->Aml = WalkState->ParserState.Aml + 2;
> + return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE);
> + }
> +#endif
> if (ACPI_FAILURE (Status))
> {
> return_ACPI_STATUS (Status);
> diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c
> index 55713a8e..47096186 100644
> --- a/src/acpica/source/components/tables/tbdata.c
> +++ b/src/acpica/source/components/tables/tbdata.c
> @@ -158,6 +158,66 @@
> #define _COMPONENT ACPI_TABLES
> ACPI_MODULE_NAME ("tbdata")
>
> +/* Local prototypes */
> +
> +static ACPI_STATUS
> +AcpiTbCheckDuplication (
> + ACPI_TABLE_DESC *TableDesc,
> + UINT32 *TableIndex);
> +
> +static BOOLEAN
> +AcpiTbCompareTables (
> + ACPI_TABLE_DESC *TableDesc,
> + UINT32 TableIndex);
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: AcpiTbCompareTables
> + *
> + * PARAMETERS: TableDesc - Table 1 descriptor to be compared
> + * TableIndex - Index of table 2 to be compared
> + *
> + * RETURN: TRUE if both tables are identical.
> + *
> + * DESCRIPTION: This function compares a table with another table that has
> + * already been installed in the root table list.
> + *
> + ******************************************************************************/
> +
> +static BOOLEAN
> +AcpiTbCompareTables (
> + ACPI_TABLE_DESC *TableDesc,
> + UINT32 TableIndex)
> +{
> + ACPI_STATUS Status = AE_OK;
> + BOOLEAN IsIdentical;
> + ACPI_TABLE_HEADER *Table;
> + UINT32 TableLength;
> + UINT8 TableFlags;
> +
> +
> + Status = AcpiTbAcquireTable (&AcpiGbl_RootTableList.Tables[TableIndex],
> + &Table, &TableLength, &TableFlags);
> + if (ACPI_FAILURE (Status))
> + {
> + return (FALSE);
> + }
> +
> + /*
> + * Check for a table match on the entire table length,
> + * not just the header.
> + */
> + IsIdentical = (BOOLEAN)((TableDesc->Length != TableLength ||
> + memcmp (TableDesc->Pointer, Table, TableLength)) ?
> + FALSE : TRUE);
> +
> + /* Release the acquired table */
> +
> + AcpiTbReleaseTable (Table, TableLength, TableFlags);
> + return (IsIdentical);
> +}
> +
>
> /*******************************************************************************
> *
> @@ -477,7 +537,7 @@ AcpiTbValidateTempTable (
> ACPI_TABLE_DESC *TableDesc)
> {
>
> - if (!TableDesc->Pointer && !AcpiGbl_VerifyTableChecksum)
> + if (!TableDesc->Pointer && !AcpiGbl_EnableTableValidation)
> {
> /*
> * Only validates the header of the table.
> @@ -495,12 +555,94 @@ AcpiTbValidateTempTable (
> }
>
>
> +/*******************************************************************************
> + *
> + * FUNCTION: AcpiTbCheckDuplication
> + *
> + * PARAMETERS: TableDesc - Table descriptor
> + * TableIndex - Where the table index is returned
> + *
> + * RETURN: Status
> + *
> + * DESCRIPTION: Avoid installing duplicated tables. However table override and
> + * user aided dynamic table load is allowed, thus comparing the
> + * address of the table is not sufficient, and checking the entire
> + * table content is required.
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +AcpiTbCheckDuplication (
> + ACPI_TABLE_DESC *TableDesc,
> + UINT32 *TableIndex)
> +{
> + UINT32 i;
> +
> +
> + ACPI_FUNCTION_TRACE (TbCheckDuplication);
> +
> +
> + /* Check if table is already registered */
> +
> + for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
> + {
> + /* Do not compare with unverified tables */
> +
> + if (!(AcpiGbl_RootTableList.Tables[i].Flags & ACPI_TABLE_IS_VERIFIED))
> + {
> + continue;
> + }
> +
> + /*
> + * Check for a table match on the entire table length,
> + * not just the header.
> + */
> + if (!AcpiTbCompareTables (TableDesc, i))
> + {
> + continue;
> + }
> +
> + /*
> + * Note: the current mechanism does not unregister a table if it is
> + * dynamically unloaded. The related namespace entries are deleted,
> + * but the table remains in the root table list.
> + *
> + * The assumption here is that the number of different tables that
> + * will be loaded is actually small, and there is minimal overhead
> + * in just keeping the table in case it is needed again.
> + *
> + * If this assumption changes in the future (perhaps on large
> + * machines with many table load/unload operations), tables will
> + * need to be unregistered when they are unloaded, and slots in the
> + * root table list should be reused when empty.
> + */
> + if (AcpiGbl_RootTableList.Tables[i].Flags &
> + ACPI_TABLE_IS_LOADED)
> + {
> + /* Table is still loaded, this is an error */
> +
> + return_ACPI_STATUS (AE_ALREADY_EXISTS);
> + }
> + else
> + {
> + *TableIndex = i;
> + return_ACPI_STATUS (AE_CTRL_TERMINATE);
> + }
> + }
> +
> + /* Indicate no duplication to the caller */
> +
> + return_ACPI_STATUS (AE_OK);
> +}
> +
> +
> /******************************************************************************
> *
> * FUNCTION: AcpiTbVerifyTempTable
> *
> * PARAMETERS: TableDesc - Table descriptor
> * Signature - Table signature to verify
> + * TableIndex - Where the table index is returned
> *
> * RETURN: Status
> *
> @@ -512,7 +654,8 @@ AcpiTbValidateTempTable (
> ACPI_STATUS
> AcpiTbVerifyTempTable (
> ACPI_TABLE_DESC *TableDesc,
> - char *Signature)
> + char *Signature,
> + UINT32 *TableIndex)
> {
> ACPI_STATUS Status = AE_OK;
>
> @@ -540,10 +683,10 @@ AcpiTbVerifyTempTable (
> goto InvalidateAndExit;
> }
>
> - /* Verify the checksum */
> -
> - if (AcpiGbl_VerifyTableChecksum)
> + if (AcpiGbl_EnableTableValidation)
> {
> + /* Verify the checksum */
> +
> Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length);
> if (ACPI_FAILURE (Status))
> {
> @@ -556,9 +699,32 @@ AcpiTbVerifyTempTable (
>
> goto InvalidateAndExit;
> }
> +
> + /* Avoid duplications */
> +
> + if (TableIndex)
> + {
> + Status = AcpiTbCheckDuplication (TableDesc, TableIndex);
> + if (ACPI_FAILURE (Status))
> + {
> + if (Status != AE_CTRL_TERMINATE)
> + {
> + ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
> + "%4.4s 0x%8.8X%8.8X"
> + " Table is duplicated",
> + AcpiUtValidNameseg (TableDesc->Signature.Ascii) ?
> + TableDesc->Signature.Ascii : "????",
> + ACPI_FORMAT_UINT64 (TableDesc->Address)));
> + }
> +
> + goto InvalidateAndExit;
> + }
> + }
> +
> + TableDesc->Flags |= ACPI_TABLE_IS_VERIFIED;
> }
>
> - return_ACPI_STATUS (AE_OK);
> + return_ACPI_STATUS (Status);
>
> InvalidateAndExit:
> AcpiTbInvalidateTable (TableDesc);
> @@ -584,6 +750,8 @@ AcpiTbResizeRootTableList (
> {
> ACPI_TABLE_DESC *Tables;
> UINT32 TableCount;
> + UINT32 CurrentTableCount, MaxTableCount;
> + UINT32 i;
>
>
> ACPI_FUNCTION_TRACE (TbResizeRootTableList);
> @@ -608,9 +776,9 @@ AcpiTbResizeRootTableList (
> TableCount = AcpiGbl_RootTableList.CurrentTableCount;
> }
>
> + MaxTableCount = TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT;
> Tables = ACPI_ALLOCATE_ZEROED (
> - ((ACPI_SIZE) TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT) *
> - sizeof (ACPI_TABLE_DESC));
> + ((ACPI_SIZE) MaxTableCount) * sizeof (ACPI_TABLE_DESC));
> if (!Tables)
> {
> ACPI_ERROR ((AE_INFO, "Could not allocate new root table array"));
> @@ -619,10 +787,19 @@ AcpiTbResizeRootTableList (
>
> /* Copy and free the previous table array */
>
> + CurrentTableCount = 0;
> if (AcpiGbl_RootTableList.Tables)
> {
> - memcpy (Tables, AcpiGbl_RootTableList.Tables,
> - (ACPI_SIZE) TableCount * sizeof (ACPI_TABLE_DESC));
> + for (i = 0; i < TableCount; i++)
> + {
> + if (AcpiGbl_RootTableList.Tables[i].Address)
> + {
> + memcpy (Tables + CurrentTableCount,
> + AcpiGbl_RootTableList.Tables + i,
> + sizeof (ACPI_TABLE_DESC));
> + CurrentTableCount++;
> + }
> + }
>
> if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED)
> {
> @@ -631,8 +808,8 @@ AcpiTbResizeRootTableList (
> }
>
> AcpiGbl_RootTableList.Tables = Tables;
> - AcpiGbl_RootTableList.MaxTableCount =
> - TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT;
> + AcpiGbl_RootTableList.MaxTableCount = MaxTableCount;
> + AcpiGbl_RootTableList.CurrentTableCount = CurrentTableCount;
> AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ORIGIN_ALLOCATED;
>
> return_ACPI_STATUS (AE_OK);
> @@ -1029,14 +1206,9 @@ AcpiTbLoadTable (
> AcpiEvUpdateGpes (OwnerId);
> }
>
> - /* Invoke table handler if present */
> -
> - if (AcpiGbl_TableHandler)
> - {
> - (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table,
> - AcpiGbl_TableHandlerContext);
> - }
> + /* Invoke table handler */
>
> + AcpiTbNotifyTable (ACPI_TABLE_EVENT_LOAD, Table);
> return_ACPI_STATUS (Status);
> }
>
> @@ -1070,24 +1242,19 @@ AcpiTbInstallAndLoadTable (
> ACPI_FUNCTION_TRACE (TbInstallAndLoadTable);
>
>
> - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> -
> /* Install the table and load it into the namespace */
>
> Status = AcpiTbInstallStandardTable (Address, Flags, TRUE,
> Override, &i);
> if (ACPI_FAILURE (Status))
> {
> - goto UnlockAndExit;
> + goto Exit;
> }
>
> - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> Status = AcpiTbLoadTable (i, AcpiGbl_RootNode);
> - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
>
> -UnlockAndExit:
> +Exit:
> *TableIndex = i;
> - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> return_ACPI_STATUS (Status);
> }
>
> @@ -1122,16 +1289,12 @@ AcpiTbUnloadTable (
> return_ACPI_STATUS (AE_NOT_EXIST);
> }
>
> - /* Invoke table handler if present */
> + /* Invoke table handler */
>
> - if (AcpiGbl_TableHandler)
> + Status = AcpiGetTableByIndex (TableIndex, &Table);
> + if (ACPI_SUCCESS (Status))
> {
> - Status = AcpiGetTableByIndex (TableIndex, &Table);
> - if (ACPI_SUCCESS (Status))
> - {
> - (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD, Table,
> - AcpiGbl_TableHandlerContext);
> - }
> + AcpiTbNotifyTable (ACPI_TABLE_EVENT_UNLOAD, Table);
> }
>
> /* Delete the portion of the namespace owned by this table */
> @@ -1146,3 +1309,31 @@ AcpiTbUnloadTable (
> AcpiTbSetTableLoadedFlag (TableIndex, FALSE);
> return_ACPI_STATUS (Status);
> }
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: AcpiTbNotifyTable
> + *
> + * PARAMETERS: Event - Table event
> + * Table - Validated table pointer
> + *
> + * RETURN: None
> + *
> + * DESCRIPTION: Notify a table event to the users.
> + *
> + ******************************************************************************/
> +
> +void
> +AcpiTbNotifyTable (
> + UINT32 Event,
> + void *Table)
> +{
> + /* Invoke table handler if present */
> +
> + if (AcpiGbl_TableHandler)
> + {
> + (void) AcpiGbl_TableHandler (Event, Table,
> + AcpiGbl_TableHandlerContext);
> + }
> +}
> diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c
> index d012f38a..54ea58d0 100644
> --- a/src/acpica/source/components/tables/tbinstal.c
> +++ b/src/acpica/source/components/tables/tbinstal.c
> @@ -156,61 +156,6 @@
> #define _COMPONENT ACPI_TABLES
> ACPI_MODULE_NAME ("tbinstal")
>
> -/* Local prototypes */
> -
> -static BOOLEAN
> -AcpiTbCompareTables (
> - ACPI_TABLE_DESC *TableDesc,
> - UINT32 TableIndex);
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: AcpiTbCompareTables
> - *
> - * PARAMETERS: TableDesc - Table 1 descriptor to be compared
> - * TableIndex - Index of table 2 to be compared
> - *
> - * RETURN: TRUE if both tables are identical.
> - *
> - * DESCRIPTION: This function compares a table with another table that has
> - * already been installed in the root table list.
> - *
> - ******************************************************************************/
> -
> -static BOOLEAN
> -AcpiTbCompareTables (
> - ACPI_TABLE_DESC *TableDesc,
> - UINT32 TableIndex)
> -{
> - ACPI_STATUS Status = AE_OK;
> - BOOLEAN IsIdentical;
> - ACPI_TABLE_HEADER *Table;
> - UINT32 TableLength;
> - UINT8 TableFlags;
> -
> -
> - Status = AcpiTbAcquireTable (&AcpiGbl_RootTableList.Tables[TableIndex],
> - &Table, &TableLength, &TableFlags);
> - if (ACPI_FAILURE (Status))
> - {
> - return (FALSE);
> - }
> -
> - /*
> - * Check for a table match on the entire table length,
> - * not just the header.
> - */
> - IsIdentical = (BOOLEAN)((TableDesc->Length != TableLength ||
> - memcmp (TableDesc->Pointer, Table, TableLength)) ?
> - FALSE : TRUE);
> -
> - /* Release the acquired table */
> -
> - AcpiTbReleaseTable (Table, TableLength, TableFlags);
> - return (IsIdentical);
> -}
> -
>
> /*******************************************************************************
> *
> @@ -337,105 +282,48 @@ AcpiTbInstallStandardTable (
> goto ReleaseAndExit;
> }
>
> + /* Acquire the table lock */
> +
> + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> +
> /* Validate and verify a table before installation */
>
> - Status = AcpiTbVerifyTempTable (&NewTableDesc, NULL);
> + Status = AcpiTbVerifyTempTable (&NewTableDesc, NULL, &i);
> if (ACPI_FAILURE (Status))
> {
> - goto ReleaseAndExit;
> - }
> -
> - if (Reload)
> - {
> - /*
> - * Validate the incoming table signature.
> - *
> - * 1) Originally, we checked the table signature for "SSDT" or "PSDT".
> - * 2) We added support for OEMx tables, signature "OEM".
> - * 3) Valid tables were encountered with a null signature, so we just
> - * gave up on validating the signature, (05/2008).
> - * 4) We encountered non-AML tables such as the MADT, which caused
> - * interpreter errors and kernel faults. So now, we once again allow
> - * only "SSDT", "OEMx", and now, also a null signature. (05/2011).
> - */
> - if ((NewTableDesc.Signature.Ascii[0] != 0x00) &&
> - (!ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) &&
> - (strncmp (NewTableDesc.Signature.Ascii, "OEM", 3)))
> - {
> - ACPI_BIOS_ERROR ((AE_INFO,
> - "Table has invalid signature [%4.4s] (0x%8.8X), "
> - "must be SSDT or OEMx",
> - AcpiUtValidNameseg (NewTableDesc.Signature.Ascii) ?
> - NewTableDesc.Signature.Ascii : "????",
> - NewTableDesc.Signature.Integer));
> -
> - Status = AE_BAD_SIGNATURE;
> - goto ReleaseAndExit;
> - }
> -
> - /* Check if table is already registered */
> -
> - for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
> + if (Status == AE_CTRL_TERMINATE)
> {
> /*
> - * Check for a table match on the entire table length,
> - * not just the header.
> + * Table was unloaded, allow it to be reloaded.
> + * As we are going to return AE_OK to the caller, we should
> + * take the responsibility of freeing the input descriptor.
> + * Refill the input descriptor to ensure
> + * AcpiTbInstallTableWithOverride() can be called again to
> + * indicate the re-installation.
> */
> - if (!AcpiTbCompareTables (&NewTableDesc, i))
> - {
> - continue;
> - }
> -
> - /*
> - * Note: the current mechanism does not unregister a table if it is
> - * dynamically unloaded. The related namespace entries are deleted,
> - * but the table remains in the root table list.
> - *
> - * The assumption here is that the number of different tables that
> - * will be loaded is actually small, and there is minimal overhead
> - * in just keeping the table in case it is needed again.
> - *
> - * If this assumption changes in the future (perhaps on large
> - * machines with many table load/unload operations), tables will
> - * need to be unregistered when they are unloaded, and slots in the
> - * root table list should be reused when empty.
> - */
> - if (AcpiGbl_RootTableList.Tables[i].Flags &
> - ACPI_TABLE_IS_LOADED)
> - {
> - /* Table is still loaded, this is an error */
> -
> - Status = AE_ALREADY_EXISTS;
> - goto ReleaseAndExit;
> - }
> - else
> - {
> - /*
> - * Table was unloaded, allow it to be reloaded.
> - * As we are going to return AE_OK to the caller, we should
> - * take the responsibility of freeing the input descriptor.
> - * Refill the input descriptor to ensure
> - * AcpiTbInstallTableWithOverride() can be called again to
> - * indicate the re-installation.
> - */
> - AcpiTbUninstallTable (&NewTableDesc);
> - *TableIndex = i;
> - return_ACPI_STATUS (AE_OK);
> - }
> + AcpiTbUninstallTable (&NewTableDesc);
> + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> + *TableIndex = i;
> + return_ACPI_STATUS (AE_OK);
> }
> + goto UnlockAndExit;
> }
>
> /* Add the table to the global root table list */
>
> AcpiTbInstallTableWithOverride (&NewTableDesc, Override, TableIndex);
>
> - /* Invoke table handler if present */
> + /* Invoke table handler */
>
> - if (AcpiGbl_TableHandler)
> - {
> - (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_INSTALL,
> - NewTableDesc.Pointer, AcpiGbl_TableHandlerContext);
> - }
> + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> + AcpiTbNotifyTable (ACPI_TABLE_EVENT_INSTALL, NewTableDesc.Pointer);
> + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> +
> +UnlockAndExit:
> +
> + /* Release the table lock */
> +
> + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
>
> ReleaseAndExit:
>
> @@ -503,9 +391,11 @@ AcpiTbOverrideTable (
>
> FinishOverride:
>
> - /* Validate and verify a table before overriding */
> -
> - Status = AcpiTbVerifyTempTable (&NewTableDesc, NULL);
> + /*
> + * Validate and verify a table before overriding, no nested table
> + * duplication check as it's too complicated and unnecessary.
> + */
> + Status = AcpiTbVerifyTempTable (&NewTableDesc, NULL, NULL);
> if (ACPI_FAILURE (Status))
> {
> return;
> diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c
> index c7e0ee75..db3fe56d 100644
> --- a/src/acpica/source/components/tables/tbutils.c
> +++ b/src/acpica/source/components/tables/tbutils.c
> @@ -559,14 +559,19 @@ AcpiTbGetTable (
> }
> }
>
> - TableDesc->ValidationCount++;
> - if (TableDesc->ValidationCount == 0)
> + if (TableDesc->ValidationCount < ACPI_MAX_TABLE_VALIDATIONS)
> {
> - ACPI_ERROR ((AE_INFO,
> - "Table %p, Validation count is zero after increment\n",
> - TableDesc));
> - TableDesc->ValidationCount--;
> - return_ACPI_STATUS (AE_LIMIT);
> + TableDesc->ValidationCount++;
> +
> + /*
> + * Detect ValidationCount overflows to ensure that the warning
> + * message will only be printed once.
> + */
> + if (TableDesc->ValidationCount >= ACPI_MAX_TABLE_VALIDATIONS)
> + {
> + ACPI_WARNING((AE_INFO,
> + "Table %p, Validation count overflows\n", TableDesc));
> + }
> }
>
> *OutTable = TableDesc->Pointer;
> @@ -597,14 +602,21 @@ AcpiTbPutTable (
> ACPI_FUNCTION_TRACE (AcpiTbPutTable);
>
>
> - if (TableDesc->ValidationCount == 0)
> + if (TableDesc->ValidationCount < ACPI_MAX_TABLE_VALIDATIONS)
> {
> - ACPI_WARNING ((AE_INFO,
> - "Table %p, Validation count is zero before decrement\n",
> - TableDesc));
> - return_VOID;
> + TableDesc->ValidationCount--;
> +
> + /*
> + * Detect ValidationCount underflows to ensure that the warning
> + * message will only be printed once.
> + */
> + if (TableDesc->ValidationCount >= ACPI_MAX_TABLE_VALIDATIONS)
> + {
> + ACPI_WARNING ((AE_INFO,
> + "Table %p, Validation count underflows\n", TableDesc));
> + return_VOID;
> + }
> }
> - TableDesc->ValidationCount--;
>
> if (TableDesc->ValidationCount == 0)
> {
> diff --git a/src/acpica/source/components/tables/tbxface.c b/src/acpica/source/components/tables/tbxface.c
> index 3f499288..5fd178f5 100644
> --- a/src/acpica/source/components/tables/tbxface.c
> +++ b/src/acpica/source/components/tables/tbxface.c
> @@ -292,6 +292,7 @@ AcpiReallocateRootTable (
> void)
> {
> ACPI_STATUS Status;
> + ACPI_TABLE_DESC *TableDesc;
> UINT32 i;
>
>
> @@ -307,6 +308,8 @@ AcpiReallocateRootTable (
> return_ACPI_STATUS (AE_SUPPORT);
> }
>
> + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> +
> /*
> * Ensure OS early boot logic, which is required by some hosts. If the
> * table state is reported to be wrong, developers should fix the
> @@ -315,17 +318,41 @@ AcpiReallocateRootTable (
> */
> for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
> {
> - if (AcpiGbl_RootTableList.Tables[i].Pointer)
> + TableDesc = &AcpiGbl_RootTableList.Tables[i];
> + if (TableDesc->Pointer)
> {
> ACPI_ERROR ((AE_INFO,
> "Table [%4.4s] is not invalidated during early boot stage",
> - AcpiGbl_RootTableList.Tables[i].Signature.Ascii));
> + TableDesc->Signature.Ascii));
> }
> }
>
> - AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ALLOW_RESIZE;
> + if (!AcpiGbl_EnableTableValidation)
> + {
> + /*
> + * Now it's safe to do full table validation. We can do deferred
> + * table initilization here once the flag is set.
> + */
> + AcpiGbl_EnableTableValidation = TRUE;
> + for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
> + {
> + TableDesc = &AcpiGbl_RootTableList.Tables[i];
> + if (!(TableDesc->Flags & ACPI_TABLE_IS_VERIFIED))
> + {
> + Status = AcpiTbVerifyTempTable (TableDesc, NULL, NULL);
> + if (ACPI_FAILURE (Status))
> + {
> + AcpiTbUninstallTable (TableDesc);
> + }
> + }
> + }
> + }
>
> + AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ALLOW_RESIZE;
> Status = AcpiTbResizeRootTableList ();
> + AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ORIGIN_ALLOCATED;
> +
> + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> return_ACPI_STATUS (Status);
> }
>
> @@ -522,6 +549,11 @@ AcpiPutTable (
> ACPI_FUNCTION_TRACE (AcpiPutTable);
>
>
> + if (!Table)
> + {
> + return_VOID;
> + }
> +
> (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
>
> /* Walk the root table list */
> diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c
> index 6b797934..57720067 100644
> --- a/src/acpica/source/components/tables/tbxfload.c
> +++ b/src/acpica/source/components/tables/tbxfload.c
> @@ -336,11 +336,11 @@ AcpiTbLoadNamespace (
> {
> Table = &AcpiGbl_RootTableList.Tables[i];
>
> - if (!AcpiGbl_RootTableList.Tables[i].Address ||
> + if (!Table->Address ||
> (!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) &&
> !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) &&
> !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) ||
> - ACPI_FAILURE (AcpiTbValidateTable (Table)))
> + ACPI_FAILURE (AcpiTbValidateTable (Table)))
> {
> continue;
> }
> diff --git a/src/acpica/source/components/utilities/utresrc.c b/src/acpica/source/components/utilities/utresrc.c
> index 8131cde2..e34662c8 100644
> --- a/src/acpica/source/components/utilities/utresrc.c
> +++ b/src/acpica/source/components/utilities/utresrc.c
> @@ -303,11 +303,9 @@ AcpiUtWalkAmlResources (
> ACPI_FUNCTION_TRACE (UtWalkAmlResources);
>
>
> - /*
> - * The absolute minimum resource template is one EndTag descriptor.
> - * However, we will treat a lone EndTag as just a simple buffer.
> - */
> - if (AmlLength <= sizeof (AML_RESOURCE_END_TAG))
> + /* The absolute minimum resource template is one EndTag descriptor */
> +
> + if (AmlLength < sizeof (AML_RESOURCE_END_TAG))
> {
> return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG);
> }
> @@ -378,10 +376,8 @@ AcpiUtWalkAmlResources (
> *Context = Aml;
> }
>
> - /*
> - * Normal exit. Note: We allow the buffer to be larger than
> - * the resource template, as long as the END_TAG exists.
> - */
> + /* Normal exit */
> +
> return_ACPI_STATUS (AE_OK);
> }
>
> diff --git a/src/acpica/source/include/acapps.h b/src/acpica/source/include/acapps.h
> index 6ef98550..4ca3e80f 100644
> --- a/src/acpica/source/include/acapps.h
> +++ b/src/acpica/source/include/acapps.h
> @@ -226,6 +226,10 @@ AcGetAllTablesFromFile (
> UINT8 GetOnlyAmlTables,
> ACPI_NEW_TABLE_DESC **ReturnListHead);
>
> +void
> +AcDeleteTableList (
> + ACPI_NEW_TABLE_DESC *ListHead);
> +
> BOOLEAN
> AcIsFileBinary (
> FILE *File);
> diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
> index 1d94a591..399e4c06 100644
> --- a/src/acpica/source/include/aclocal.h
> +++ b/src/acpica/source/include/aclocal.h
> @@ -328,6 +328,7 @@ typedef struct acpi_namespace_node
> #define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
> #define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (InstallMethod) */
>
> +#define IMPLICIT_EXTERNAL 0x02 /* iASL only: This object created implicitly via External */
> #define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */
> #define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */
> #define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */
> @@ -1146,7 +1147,7 @@ typedef struct acpi_parse_obj_named
>
> /* This version is used by the iASL compiler only */
>
> -#define ACPI_MAX_PARSEOP_NAME 20
> +#define ACPI_MAX_PARSEOP_NAME 20
>
> typedef struct acpi_parse_obj_asl
> {
> @@ -1190,11 +1191,12 @@ typedef union acpi_parse_object
>
> typedef struct asl_comment_state
> {
> - UINT8 CommentType;
> - UINT32 SpacesBefore;
> - ACPI_PARSE_OBJECT *Latest_Parse_Node;
> - ACPI_PARSE_OBJECT *ParsingParenBraceNode;
> - BOOLEAN CaptureComments;
> + UINT8 CommentType;
> + UINT32 SpacesBefore;
> + ACPI_PARSE_OBJECT *LatestParseOp;
> + ACPI_PARSE_OBJECT *ParsingParenBraceNode;
> + BOOLEAN CaptureComments;
> +
> } ASL_COMMENT_STATE;
>
>
> diff --git a/src/acpica/source/include/acobject.h b/src/acpica/source/include/acobject.h
> index 25d74963..f0376097 100644
> --- a/src/acpica/source/include/acobject.h
> +++ b/src/acpica/source/include/acobject.h
> @@ -241,7 +241,9 @@ typedef struct acpi_object_integer
> UINT32 Length;
>
>
> -typedef struct acpi_object_string /* Null terminated, ASCII characters only */
> +/* Null terminated, ASCII characters only */
> +
> +typedef struct acpi_object_string
> {
> ACPI_OBJECT_COMMON_HEADER
> ACPI_COMMON_BUFFER_INFO (char) /* String in AML stream or allocated string */
> @@ -359,8 +361,9 @@ typedef struct acpi_object_method
> union acpi_operand_object *NotifyList[2]; /* Handlers for system/device notifies */\
> union acpi_operand_object *Handler; /* Handler for Address space */
>
> +/* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
>
> -typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
> +typedef struct acpi_object_notify_common
> {
> ACPI_OBJECT_COMMON_HEADER
> ACPI_COMMON_NOTIFY_INFO
> @@ -431,8 +434,9 @@ typedef struct acpi_object_thermal_zone
> UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
> UINT8 AccessLength; /* For serial regions/fields */
>
> +/* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
>
> -typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
> +typedef struct acpi_object_field_common
> {
> ACPI_OBJECT_COMMON_HEADER
> ACPI_COMMON_FIELD_INFO
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index 934e6683..7aad8386 100644
> --- a/src/acpica/source/include/acpixf.h
> +++ b/src/acpica/source/include/acpixf.h
> @@ -154,7 +154,7 @@
>
> /* Current ACPICA subsystem version in YYYYMMDD format */
>
> -#define ACPI_CA_VERSION 0x20170531
> +#define ACPI_CA_VERSION 0x20170629
>
> #include "acconfig.h"
> #include "actypes.h"
> @@ -270,13 +270,14 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE);
> ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE);
>
> /*
> - * Whether or not to verify the table checksum before installation. Set
> - * this to TRUE to verify the table checksum before install it to the table
> - * manager. Note that enabling this option causes errors to happen in some
> - * OSPMs during early initialization stages. Default behavior is to do such
> - * verification.
> + * Whether or not to validate (map) an entire table to verify
> + * checksum/duplication in early stage before install. Set this to TRUE to
> + * allow early table validation before install it to the table manager.
> + * Note that enabling this option causes errors to happen in some OSPMs
> + * during early initialization stages. Default behavior is to allow such
> + * validation.
> */
> -ACPI_INIT_GLOBAL (UINT8, AcpiGbl_VerifyTableChecksum, TRUE);
> +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableTableValidation, TRUE);
>
> /*
> * Optionally enable output from the AML Debug Object.
> diff --git a/src/acpica/source/include/actables.h b/src/acpica/source/include/actables.h
> index 8f5a3948..05a69ffe 100644
> --- a/src/acpica/source/include/actables.h
> +++ b/src/acpica/source/include/actables.h
> @@ -206,7 +206,8 @@ AcpiTbValidateTempTable (
> ACPI_STATUS
> AcpiTbVerifyTempTable (
> ACPI_TABLE_DESC *TableDesc,
> - char *Signature);
> + char *Signature,
> + UINT32 *TableIndex);
>
> BOOLEAN
> AcpiTbIsTableLoaded (
> @@ -303,6 +304,11 @@ AcpiTbUnloadTable (
> UINT32 TableIndex);
>
> void
> +AcpiTbNotifyTable (
> + UINT32 Event,
> + void *Table);
> +
> +void
> AcpiTbTerminate (
> void);
>
> diff --git a/src/acpica/source/include/actbl.h b/src/acpica/source/include/actbl.h
> index ea522cf9..b72c3bfb 100644
> --- a/src/acpica/source/include/actbl.h
> +++ b/src/acpica/source/include/actbl.h
> @@ -517,12 +517,27 @@ typedef struct acpi_table_desc
>
> } ACPI_TABLE_DESC;
>
> +/*
> + * Maximum value of the ValidationCount field in ACPI_TABLE_DESC.
> + * When reached, ValidationCount cannot be changed any more and the table will
> + * be permanently regarded as validated.
> + *
> + * This is to prevent situations in which unbalanced table get/put operations
> + * may cause premature table unmapping in the OS to happen.
> + *
> + * The maximum validation count can be defined to any value, but should be
> + * greater than the maximum number of OS early stage mapping slots to avoid
> + * leaking early stage table mappings to the late stage.
> + */
> +#define ACPI_MAX_TABLE_VALIDATIONS ACPI_UINT16_MAX
> +
> /* Masks for Flags field above */
>
> #define ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL (0) /* Virtual address, external maintained */
> #define ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL (1) /* Physical address, internally mapped */
> #define ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL (2) /* Virtual address, internallly allocated */
> #define ACPI_TABLE_ORIGIN_MASK (3)
> +#define ACPI_TABLE_IS_VERIFIED (4)
> #define ACPI_TABLE_IS_LOADED (8)
>
>
> diff --git a/src/acpica/source/include/actbl2.h b/src/acpica/source/include/actbl2.h
> index 80495d8f..1e91ffc5 100644
> --- a/src/acpica/source/include/actbl2.h
> +++ b/src/acpica/source/include/actbl2.h
> @@ -874,7 +874,7 @@ typedef struct acpi_ibft_target
> * IORT - IO Remapping Table
> *
> * Conforms to "IO Remapping Table System Software on ARM Platforms",
> - * Document number: ARM DEN 0049B, October 2015
> + * Document number: ARM DEN 0049C, May 2017
> *
> ******************************************************************************/
>
> @@ -1013,6 +1013,8 @@ typedef struct acpi_iort_smmu
> #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
> #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
> #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
> +#define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */
> +#define ACPI_IORT_SMMU_CAVIUM_THUNDERX 0x00000005 /* Cavium ThunderX SMMUv2 */
>
> /* Masks for Flags field above */
>
> @@ -1036,18 +1038,28 @@ typedef struct acpi_iort_smmu_v3
> UINT32 Flags;
> UINT32 Reserved;
> UINT64 VatosAddress;
> - UINT32 Model; /* O: generic SMMUv3 */
> + UINT32 Model;
> UINT32 EventGsiv;
> UINT32 PriGsiv;
> UINT32 GerrGsiv;
> UINT32 SyncGsiv;
> + UINT8 Pxm;
> + UINT8 Reserved1;
> + UINT16 Reserved2;
>
> } ACPI_IORT_SMMU_V3;
>
> +/* Values for Model field above */
> +
> +#define ACPI_IORT_SMMU_V3_GENERIC 0x00000000 /* Generic SMMUv3 */
> +#define ACPI_IORT_SMMU_V3_HISILICON_HI161X 0x00000001 /* HiSilicon Hi161x SMMUv3 */
> +#define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */
> +
> /* Masks for Flags field above */
>
> #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
> #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1)
> +#define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
>
>
> /*******************************************************************************
> diff --git a/src/acpica/source/include/platform/acenv.h b/src/acpica/source/include/platform/acenv.h
> index 5bec576b..df4048e0 100644
> --- a/src/acpica/source/include/platform/acenv.h
> +++ b/src/acpica/source/include/platform/acenv.h
> @@ -398,6 +398,11 @@
> #define ACPI_INLINE
> #endif
>
> +/* Use ordered initialization if compiler doesn't support designated. */
> +#ifndef ACPI_STRUCT_INIT
> +#define ACPI_STRUCT_INIT(field, value) value
> +#endif
> +
> /*
> * Configurable calling conventions:
> *
> diff --git a/src/acpica/source/include/platform/aclinux.h b/src/acpica/source/include/platform/aclinux.h
> index 2c520ee1..b287e4d9 100644
> --- a/src/acpica/source/include/platform/aclinux.h
> +++ b/src/acpica/source/include/platform/aclinux.h
> @@ -287,6 +287,11 @@
> #define ACPI_MSG_BIOS_ERROR KERN_ERR "ACPI BIOS Error (bug): "
> #define ACPI_MSG_BIOS_WARNING KERN_WARNING "ACPI BIOS Warning (bug): "
>
> +/*
> + * Linux wants to use designated initializers for function pointer structs.
> + */
> +#define ACPI_STRUCT_INIT(field, value) .field = value
> +
> #else /* !__KERNEL__ */
>
> #define ACPI_USE_STANDARD_HEADERS
> diff --git a/src/acpica/source/tools/acpiexec/aeexception.c b/src/acpica/source/tools/acpiexec/aeexception.c
> index a5a3293a..62e9db0a 100644
> --- a/src/acpica/source/tools/acpiexec/aeexception.c
> +++ b/src/acpica/source/tools/acpiexec/aeexception.c
> @@ -259,21 +259,16 @@ AeExceptionHandler (
>
> Cleanup:
>
> - /* Global overrides */
> -
> if (AcpiGbl_IgnoreErrors)
> {
> + /* Global option to ignore all method errors, just return OK */
> +
> NewAmlStatus = AE_OK;
> }
> - else if (AmlStatus == AE_AML_INTERNAL)
> - {
> - NewAmlStatus = AE_AML_INTERNAL;
> - AcpiOsPrintf (AE_PREFIX
> - "Cannot override status %s\n\n",
> - AcpiFormatException (NewAmlStatus));
> - }
> - else if (NewAmlStatus != AmlStatus)
> + if (NewAmlStatus != AmlStatus)
> {
> + /* Request to override actual status with a different status */
> +
> AcpiOsPrintf (AE_PREFIX
> "Exception override, new status %s\n\n",
> AcpiFormatException (NewAmlStatus));
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list