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