diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2020-05-28 21:01:08 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2020-05-28 21:01:08 +0000 |
commit | 93207c1c89bcf8c2291abed617712292c27920f3 (patch) | |
tree | 2d4226b65137f1b2ee6fc8f4273a1afd53462393 /source/compiler/aslxref.c | |
parent | a95d9dd0e22ace9a8f960e939af923c79e7a271e (diff) |
Notes
Diffstat (limited to 'source/compiler/aslxref.c')
-rw-r--r-- | source/compiler/aslxref.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c index 0df33e3117ff..4bbbe2bd91ec 100644 --- a/source/compiler/aslxref.c +++ b/source/compiler/aslxref.c @@ -821,9 +821,24 @@ XfNamespaceLocateBegin ( Node->Flags |= ANOBJ_IS_REFERENCED; } - /* Attempt to optimize the NamePath */ - - OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node); + /* + * Attempt to optimize the NamePath + * + * One special case: CondRefOf operator - not all AML interpreter + * implementations expect optimized namepaths as a parameter to this + * operator. They require relative name paths with prefix operators or + * namepaths starting with the root scope. + * + * Other AML interpreter implementations do not perform the namespace + * search that starts at the current scope and recursively searching the + * parent scope until the root scope. The lack of search is only known to + * occur for the namestring parameter for the CondRefOf operator. + */ + if ((Op->Asl.Parent) && + (Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_CONDREFOF)) + { + OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node); + } /* * 1) Dereference an alias (A name reference that is an alias) |