aboutsummaryrefslogtreecommitdiffstats
path: root/source/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler')
-rw-r--r--source/compiler/aslerror.c2
-rw-r--r--source/compiler/aslexternal.c8
-rw-r--r--source/compiler/aslload.c10
-rw-r--r--source/compiler/aslmethod.c12
-rw-r--r--source/compiler/aslxref.c4
5 files changed, 29 insertions, 7 deletions
diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c
index 8fae779d639e..150983429b3b 100644
--- a/source/compiler/aslerror.c
+++ b/source/compiler/aslerror.c
@@ -1056,7 +1056,7 @@ GetModifiedLevel (
UINT8 Level,
UINT16 MessageId)
{
- UINT16 i;
+ UINT32 i;
UINT16 ExceptionCode;
diff --git a/source/compiler/aslexternal.c b/source/compiler/aslexternal.c
index 315247be60f1..a05ba118df0d 100644
--- a/source/compiler/aslexternal.c
+++ b/source/compiler/aslexternal.c
@@ -200,6 +200,14 @@ ExDoExternal (
ExternType = AnMapObjTypeToBtype (ExternTypeOp);
+ if (ExternType != ACPI_BTYPE_METHOD)
+ {
+ /*
+ * If this is not a method, it has zero parameters this local variable
+ * is used only for methods
+ */
+ ParamCount = 0;
+ }
/*
* The parser allows optional parameter return types regardless of the
diff --git a/source/compiler/aslload.c b/source/compiler/aslload.c
index bdc0d805e678..454fa8f5f0db 100644
--- a/source/compiler/aslload.c
+++ b/source/compiler/aslload.c
@@ -1177,13 +1177,13 @@ LdAnalyzeExternals (
* previously declared External
*/
Node->Flags &= ~ANOBJ_IS_EXTERNAL;
- Node->Type = (UINT8) ExternalOpType;
+ Node->Type = (UINT8) ActualOpType;
/* Just retyped a node, probably will need to open a scope */
- if (AcpiNsOpensScope (ExternalOpType))
+ if (AcpiNsOpensScope (ActualOpType))
{
- Status = AcpiDsScopeStackPush (Node, ExternalOpType, WalkState);
+ Status = AcpiDsScopeStackPush (Node, ActualOpType, WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -1204,11 +1204,11 @@ LdAnalyzeExternals (
}
else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
- (ExternalOpType == ACPI_TYPE_ANY))
+ (ActualOpType == ACPI_TYPE_ANY))
{
/* Allow update of externals of unknown type. */
- Node->Type = (UINT8) ExternalOpType;
+ Node->Type = (UINT8) ActualExternalOpType;
Status = AE_OK;
}
diff --git a/source/compiler/aslmethod.c b/source/compiler/aslmethod.c
index ff6fd474193d..32b4b123f02e 100644
--- a/source/compiler/aslmethod.c
+++ b/source/compiler/aslmethod.c
@@ -306,6 +306,8 @@ MtMethodAnalysisWalkBegin (
{
ActualArgs = MtProcessParameterTypeList (NextType,
MethodInfo->ValidArgTypes);
+ MethodInfo->NumArguments = ActualArgs;
+ ArgNode->Asl.Value.Integer |= ActualArgs;
}
if ((MethodInfo->NumArguments) &&
@@ -671,6 +673,16 @@ MtProcessParameterTypeList (
UINT8 ParameterCount = 0;
+ if (ParamTypeOp && ParamTypeOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
+ {
+ /* Special case for a single parameter without braces */
+
+ TypeList[ParameterCount] =
+ MtProcessTypeOp (ParamTypeOp);
+
+ return (1);
+ }
+
while (ParamTypeOp)
{
TypeList[ParameterCount] =
diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c
index 4bbbe2bd91ec..9306af200f50 100644
--- a/source/compiler/aslxref.c
+++ b/source/compiler/aslxref.c
@@ -994,12 +994,14 @@ XfNamespaceLocateBegin (
* invocation of the method, it is simply a reference to the method.
*
* September 2016: Removed DeRefOf from this list
+ * July 2020: Added Alias to this list
*/
if ((Op->Asl.Parent) &&
((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF) ||
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_PACKAGE) ||
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)||
- (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE)))
+ (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE) ||
+ (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_ALIAS)))
{
return_ACPI_STATUS (AE_OK);
}