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