summaryrefslogtreecommitdiff
path: root/source/compiler/asltransform.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/asltransform.c')
-rw-r--r--source/compiler/asltransform.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/compiler/asltransform.c b/source/compiler/asltransform.c
index d3ed53a14dcd..daaca947ff45 100644
--- a/source/compiler/asltransform.c
+++ b/source/compiler/asltransform.c
@@ -430,6 +430,8 @@ static void
TrTransformSubtree (
ACPI_PARSE_OBJECT *Op)
{
+ ACPI_PARSE_OBJECT *MethodOp;
+
if (Op->Asl.AmlOpcode == AML_RAW_DATA_BYTE)
{
@@ -465,6 +467,35 @@ TrTransformSubtree (
break;
+ case PARSEOP___METHOD__:
+
+ /* Transform to a string op containing the parent method name */
+
+ Op->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
+ UtSetParseOpName (Op);
+
+ /* Find the parent control method op */
+
+ MethodOp = Op;
+ while (MethodOp)
+ {
+ if (MethodOp->Asl.ParseOpcode == PARSEOP_METHOD)
+ {
+ /* First child contains the method name */
+
+ MethodOp = MethodOp->Asl.Child;
+ Op->Asl.Value.String = MethodOp->Asl.Value.String;
+ return;
+ }
+
+ MethodOp = MethodOp->Asl.Parent;
+ }
+
+ /* At the root, invocation not within a control method */
+
+ Op->Asl.Value.String = "\\";
+ break;
+
default:
/* Nothing to do here for other opcodes */