Debian Codegraph @

tests/aslts/src/compilation/collection/misc.asl

raw
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 // Miscellaneous tests which are difficult to bring
30 // into correlation with the particular known group
31
32 Method(me00)
33 {
34 Store("\x00", Debug)
35 Store("\x000123", Debug)
36 Store("\x00123", Debug)
37 Store("\x00xyz", Debug)
38 Store("1\x00", Debug)
39 Store("z\x00", Debug)
40 Store("2\x000123", Debug)
41 Store("x\x000123", Debug)
42 Store("3\x00xyz", Debug)
43 Store("w\x00xyz", Debug)
44 }
45
46 // Strings originally exceeding the maximal size, 200 symbols
47 Method(me01)
48 {
49 Store("012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", Local0)
50 Store(Local0, Debug)
51 }
52
53 /*
54 * Locally Created Data Objects are used before they
55 * are actually created though they are dynamic objects
56 * which appears only after execution of the relevant
57 * operator (Name in our example).
58 *
59 * 5.5.2.4 Local Variables and Locally Created Data Objects:
60 * NameSpace objects created within the scope of a method
61 * are dynamic. They exist only for the duration of the
62 * method execution. They are created when specified by
63 * the code...
64 */
65 Method(me02)
66 {
67 Store(0x12345678, n000)
68 Name(n000, 0)
69 }
70
71 // Commented, because it stops translation.
72 // // From Bug 62.
73 // Method(me02)
74 // {
75 // // Name(s001, "\\sq\"v")
76 // Name(s002, "\sq"v")
77 // }
78
79 Method(me03)
80 {
81 Store("me03", Debug)
82 }
83
84 // Method(me03)
85 // Errorb1034 - ^ Name already exists in scope (ME03)
86 Method(me03)
87 {
88 Store("me03", Debug)
89 }
90
91 // Name(n000, 0)
92 // Error 1034 - ^ Name already exists in scope (N000)
93 Method(me04)
94 {
95 Name(n000, 0)
96 Name(n000, 0)
97
98 Store(n000, Debug)
99 }
100
101 // Name(n000, 0)
102 // Error 1034 - ^ Name already exists in scope (N000)
103 Method(me05)
104 {
105 Name (VV, 0x1234)
106 Store (32, Local0)
107
108 Name (VV, 0xBBBBAAAA)
109 Store (12, Local2)
110 }