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