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 the DFG knows that a function that appears like Math.max could potentially use value in arbitrary ways, and not just in a context that converts values to numbers.
25
26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
27
28
29PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
30PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
31PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
32PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
33PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
34PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
35PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
36PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
37PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
38PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
39PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
40PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
41PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
42PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
43PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
44PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
45PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
46PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
47PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
48PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
49PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
50PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
51PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
52PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
53PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
54PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
55PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
56PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
57PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
58PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
59PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
60PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
61PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
62PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
63PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
64PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
65PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
66PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
67PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
68PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
69PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
70PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
71PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
72PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
73PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
74PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
75PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
76PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
77PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
78PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
79PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
80PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
81PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
82PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
83PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
84PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
85PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
86PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
87PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
88PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
89PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
90PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
91PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
92PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
93PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
94PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
95PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
96PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
97PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
98PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
99PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
100PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
101PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
102PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
103PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
104PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
105PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
106PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
107PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
108PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
109PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
110PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
111PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
112PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
113PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
114PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
115PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
116PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
117PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
118PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
119PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
120PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
121PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
122PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
123PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
124PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
125PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
126PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
127PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
128PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
129PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
130PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
131PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
132PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
133PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
134PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
135PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
136PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
137PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
138PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
139PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
140PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
141PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
142PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
143PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
144PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
145PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
146PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
147PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
148PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
149PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
150PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
151PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
152PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
153PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
154PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
155PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
156PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
157PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
158PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
159PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
160PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
161PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
162PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
163PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
164PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
165PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
166PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
167PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
168PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
169PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
170PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
171PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
172PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
173PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
174PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
175PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
176PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
177PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
178PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
179PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
180PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
181PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
182PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
183PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
184PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
185PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
186PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
187PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
188PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
189PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
190PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
191PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
192PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
193PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
194PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
195PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
196PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
197PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
198PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
199PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
200PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
201PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
202PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
203PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
204PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
205PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
206PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
207PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
208PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
209PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
210PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
211PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
212PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
213PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
214PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
215PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
216PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
217PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
218PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
219PASS foo(bar, [, 1.5], 0) is void 0
220PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
221PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
222PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
223PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
224PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
225PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
226PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
227PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
228PASS foo(Math.max, [1.5], 0) is Math.max(1.5, 2.5)
229PASS successfullyParsed is true
230
231TEST COMPLETE
232
233