From 1134505ce7030abcb4051cb3a7b17447641aea17 Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 15:40:22 +0000 Subject: [PATCH] Fixed missing resource descriptor field names. Check for inappropriate use of such names. date 2001.06.05.16.01.00; author rmoore1; state Exp; --- source/compiler/aslanalyze.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/source/compiler/aslanalyze.c b/source/compiler/aslanalyze.c index 0988a6896..0a4b1eee7 100644 --- a/source/compiler/aslanalyze.c +++ b/source/compiler/aslanalyze.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: aslanalyze.c - check for semantic errors - * $Revision: 1.34 $ + * $Revision: 1.35 $ * *****************************************************************************/ @@ -1207,6 +1207,26 @@ AnSemanticAnalysisWalkEnd ( break; } + if (ArgNode->ParseOpcode == INTEGER) + { + /* + * This is the case where an original reference to a resource + * descriptor field has been replaced by an (Integer) offset. + * These named fields are supported at compile-time only; + * the names are not passed to the interpreter (via the AML). + */ + if (ArgNode->NsNode->Type == INTERNAL_TYPE_RESOURCE) + { + AslError (ASL_ERROR, ASL_MSG_RESOURCE_FIELD, ArgNode, NULL); + } + + else + { + AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgNode, NULL); + } + break; + } + if ((ArgNode->ParseOpcode == METHODCALL) || (ArgNode->ParseOpcode == DEREFOF)) { @@ -1234,7 +1254,6 @@ AnSemanticAnalysisWalkEnd ( case LOCAL7: /* TBD: implement analysis of current value (type) of the local */ - /* For now, just treat any local as a typematch */ //ThisNodeBtype = RequiredBtypes;