diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2011-04-13 18:18:52 +0000 | 
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2011-04-13 18:18:52 +0000 | 
| commit | 997de4e17cf02a81027df8d01a4fcefe25da3796 (patch) | |
| tree | f5abd67cc9e3ada1ae289fe7cf2e23d9abf07fcc /compiler/aslwalks.c | |
| parent | 4d8fe534b7309d798d941e14e51985eed6b511bc (diff) | |
Notes
Diffstat (limited to 'compiler/aslwalks.c')
| -rw-r--r-- | compiler/aslwalks.c | 30 | 
1 files changed, 23 insertions, 7 deletions
| diff --git a/compiler/aslwalks.c b/compiler/aslwalks.c index 82ea1ec6c250..388b653ab40d 100644 --- a/compiler/aslwalks.c +++ b/compiler/aslwalks.c @@ -302,10 +302,17 @@ AnMethodAnalysisWalkBegin (              return (AE_ERROR);          } -        /* Child indicates a return value */ - +        /* +         * A child indicates a possible return value. A simple Return or +         * Return() is marked with NODE_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 +         * forced to convert a null return to Return(0). +         */          if ((Op->Asl.Child) && -            (Op->Asl.Child->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)) +            (Op->Asl.Child->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG) && +            (!(Op->Asl.Child->Asl.CompileFlags & NODE_IS_NULL_RETURN)))          {              MethodInfo->NumReturnWithValue++;          } @@ -510,13 +517,22 @@ AnMethodAnalysisWalkEnd (          /*           * Check predefined method names for correct return behavior -         * and correct number of arguments +         * and correct number of arguments. Also, some special checks +         * For GPE and _REG methods.           */ -        ApCheckForPredefinedMethod (Op, MethodInfo); +        if (ApCheckForPredefinedMethod (Op, MethodInfo)) +        { +            /* Special check for two names like _L01 and _E01 in same scope */ -        /* Special check for two names like _L01 and _E01 in same scope */ +            ApCheckForGpeNameConflict (Op); + +            /* +             * Special check for _REG: Must have an operation region definition +             * within the same scope! +             */ +            ApCheckRegMethod (Op); +        } -        ApCheckForGpeNameConflict (Op);          ACPI_FREE (MethodInfo);          break; | 
