| 1 |
/* |
| 2 |
* Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp. |
| 3 |
* All rights reserved. |
| 4 |
* |
| 5 |
* Redistribution and use in source and binary forms, with or without modification, |
| 6 |
* are permitted provided that the following conditions are met: |
| 7 |
* |
| 8 |
* Redistributions of source code must retain the above copyright notice, |
| 9 |
* this list of conditions and the following disclaimer. |
| 10 |
* Redistributions in binary form must reproduce the above copyright notice, |
| 11 |
* this list of conditions and the following disclaimer in the documentation |
| 12 |
* and/or other materials provided with the distribution. |
| 13 |
* Neither the name of Intel Corporation nor the names of its contributors |
| 14 |
* may be used to endorse or promote products derived from this software |
| 15 |
* without specific prior written permission. |
| 16 |
* |
| 17 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 |
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 20 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 21 |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 22 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 23 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 25 |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 26 |
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 |
*/ |
| 28 |
|
| 29 |
/* |
| 30 |
* Bug 148: |
| 31 |
* |
| 32 |
* SUMMARY: Additional errors to be reported by iASL for Control Method Declaration |
| 33 |
* |
| 34 |
* Compiler should return error... |
| 35 |
*/ |
| 36 |
|
| 37 |
Method(mf3e) |
| 38 |
{ |
| 39 |
// Some different from UnknownObj ObjectType Keyword specified in the |
| 40 |
// ReturnType position but no any actual Object specified to be returned. |
| 41 |
Method(mm1b, , , , IntObj) {Store(1, Debug)} |
| 42 |
|
| 43 |
// The same specific keyword in the ReturnType list twice |
| 44 |
Method(mm1c, , , , {IntObj, IntObj}) {Store(1, Debug)} |
| 45 |
Method(mm1d, , , , {UnknownObj, UnknownObj}) {Store(1, Debug)} |
| 46 |
|
| 47 |
// Simulteneously UnknownObj and a specific keyword in the ReturnType list |
| 48 |
Method(mm1e, , , , {UnknownObj, IntObj}) {Store(1, Debug)} |
| 49 |
|
| 50 |
// NumArgs 0 but non-empty list of parameters |
| 51 |
Method(mm1f, 0, , , , IntObj) {Return ("mm1f")} |
| 52 |
Method(mm20, 0, , , , {IntObj}) {Return ("mm20")} |
| 53 |
Method(mm21, , , , , {IntObj}) {Return ("mm21")} |
| 54 |
|
| 55 |
// NumArgs 1 but 2-element list of parameters |
| 56 |
Method(mm22, 1, , , , {IntObj, IntObj}) {Return ("mm22")} |
| 57 |
|
| 58 |
// NumArgs 2 but 1-element list of parameters |
| 59 |
Method(mm23, 2, , , , {IntObj}) {Return ("mm23")} |
| 60 |
|
| 61 |
// The same specific keyword in the ParameterType list twice |
| 62 |
Method(mm24, 1, , , , {{IntObj, IntObj}}) {Store(1, Debug)} |
| 63 |
Method(mm25, 1, , , , {{UnknownObj, UnknownObj}}) {Store(1, Debug)} |
| 64 |
|
| 65 |
// Simulteneously UnknownObj and a specific keyword in the ParameterType list |
| 66 |
Method(mm26, 1, , , , {{UnknownObj, IntObj}}) {Store(1, Debug)} |
| 67 |
|
| 68 |
// NumArgs 6 but 5-element list of parameters |
| 69 |
Method(mm27, 6, , , , {IntObj, IntObj, IntObj, IntObj, |
| 70 |
IntObj}) {Return ("mm27")} |
| 71 |
|
| 72 |
// NumArgs 6 but 7-element list of parameters |
| 73 |
Method(mm28, 7, , , , {IntObj, IntObj, IntObj, IntObj, |
| 74 |
IntObj, IntObj, IntObj}) {Return ("mm28")} |
| 75 |
|
| 76 |
// NumArgs 7 but 8-element list of parameters |
| 77 |
Method(mm29, 7, , , , {IntObj, IntObj, IntObj, IntObj, |
| 78 |
IntObj, IntObj, IntObj, IntObj}) {Return ("mm29")} |
| 79 |
} |