1# Copyright 2013 the V8 project authors. All rights reserved.
2# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# 1.  Redistributions of source code must retain the above copyright
8#     notice, this list of conditions and the following disclaimer.
9# 2.  Redistributions in binary form must reproduce the above copyright
10#     notice, this list of conditions and the following disclaimer in the
11#     documentation and/or other materials provided with the distribution.
12#
13# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24Tests that our attempts to do peephole Branch(LogicalNot) optimization doesn't break OSR exit's ability to recover the value of LogicalNot.
25
26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
27
28
29PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 6
30PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 7
31PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 8
32PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 9
33PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 10
34PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 9
35PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 12
36PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 13
37PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 14
38PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 15
39PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 16
40PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 17
41PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 18
42PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 19
43PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 20
44PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 21
45PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 22
46PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 23
47PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 24
48PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 25
49PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 26
50PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 27
51PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 28
52PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 29
53PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 30
54PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 31
55PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 32
56PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 33
57PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 34
58PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 35
59PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 36
60PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 37
61PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 38
62PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 39
63PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 40
64PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 41
65PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 42
66PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 43
67PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 44
68PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 45
69PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 46
70PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 47
71PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 48
72PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 49
73PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 50
74PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 51
75PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 52
76PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 53
77PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 54
78PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 55
79PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 56
80PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 57
81PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 58
82PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 59
83PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 60
84PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 61
85PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 62
86PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 63
87PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 64
88PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 65
89PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 66
90PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 67
91PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 68
92PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 69
93PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 70
94PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 71
95PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 72
96PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 73
97PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 74
98PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 75
99PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 76
100PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 77
101PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 78
102PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 79
103PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 80
104PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 81
105PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 82
106PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 83
107PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 84
108PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 85
109PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 86
110PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 87
111PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 88
112PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 89
113PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 90
114PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 91
115PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 92
116PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 93
117PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 94
118PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 95
119PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 96
120PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 97
121PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 98
122PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 99
123PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 100
124PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 101
125PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 102
126PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 103
127PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 104
128PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 105
129PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 106
130PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 107
131PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 108
132PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 109
133PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 110
134PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 111
135PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 112
136PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 113
137PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 114
138PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 115
139PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 116
140PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 117
141PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 118
142PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 119
143PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 120
144PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 121
145PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 122
146PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 123
147PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 124
148PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 125
149PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 126
150PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 127
151PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 128
152PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 129
153PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 130
154PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 131
155PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 132
156PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 133
157PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 134
158PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 135
159PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 136
160PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 137
161PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 138
162PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 139
163PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 140
164PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 141
165PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 142
166PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 143
167PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 144
168PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 145
169PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 146
170PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 147
171PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 148
172PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 149
173PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 150
174PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 151
175PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 152
176PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 153
177PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 154
178PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 155
179PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 156
180PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 157
181PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 158
182PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 159
183PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 160
184PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 161
185PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 162
186PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 163
187PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 164
188PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 165
189PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 166
190PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 167
191PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 168
192PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 169
193PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 170
194PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 171
195PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 172
196PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 173
197PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 174
198PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 175
199PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 176
200PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 177
201PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 178
202PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 179
203PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 180
204PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 181
205PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 182
206PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 183
207PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 184
208PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 185
209PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 186
210PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 187
211PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 188
212PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 189
213PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 190
214PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 191
215PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 192
216PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 193
217PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 194
218PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 195
219PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 196
220PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 197
221PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 198
222PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 199
223PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 200
224PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 201
225PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 202
226PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 203
227PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 204
228PASS foo(i, 5, i == 199 ? 2147483647 : 5) is 2147483847
229PASS successfullyParsed is true
230
231TEST COMPLETE
232
233