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