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 if you alias the arguments in a very small function, arguments simplification still works. 25 26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29PASS foo(i, i + 1) is 1 30PASS foo(i, i + 1) is 3 31PASS foo(i, i + 1) is 5 32PASS foo(i, i + 1) is 7 33PASS foo(i, i + 1) is 9 34PASS foo(i, i + 1) is 11 35PASS foo(i, i + 1) is 13 36PASS foo(i, i + 1) is 15 37PASS foo(i, i + 1) is 17 38PASS foo(i, i + 1) is 19 39PASS foo(i, i + 1) is 21 40PASS foo(i, i + 1) is 23 41PASS foo(i, i + 1) is 25 42PASS foo(i, i + 1) is 27 43PASS foo(i, i + 1) is 29 44PASS foo(i, i + 1) is 31 45PASS foo(i, i + 1) is 33 46PASS foo(i, i + 1) is 35 47PASS foo(i, i + 1) is 37 48PASS foo(i, i + 1) is 39 49PASS foo(i, i + 1) is 41 50PASS foo(i, i + 1) is 43 51PASS foo(i, i + 1) is 45 52PASS foo(i, i + 1) is 47 53PASS foo(i, i + 1) is 49 54PASS foo(i, i + 1) is 51 55PASS foo(i, i + 1) is 53 56PASS foo(i, i + 1) is 55 57PASS foo(i, i + 1) is 57 58PASS foo(i, i + 1) is 59 59PASS foo(i, i + 1) is 61 60PASS foo(i, i + 1) is 63 61PASS foo(i, i + 1) is 65 62PASS foo(i, i + 1) is 67 63PASS foo(i, i + 1) is 69 64PASS foo(i, i + 1) is 71 65PASS foo(i, i + 1) is 73 66PASS foo(i, i + 1) is 75 67PASS foo(i, i + 1) is 77 68PASS foo(i, i + 1) is 79 69PASS foo(i, i + 1) is 81 70PASS foo(i, i + 1) is 83 71PASS foo(i, i + 1) is 85 72PASS foo(i, i + 1) is 87 73PASS foo(i, i + 1) is 89 74PASS foo(i, i + 1) is 91 75PASS foo(i, i + 1) is 93 76PASS foo(i, i + 1) is 95 77PASS foo(i, i + 1) is 97 78PASS foo(i, i + 1) is 99 79PASS foo(i, i + 1) is 101 80PASS foo(i, i + 1) is 103 81PASS foo(i, i + 1) is 105 82PASS foo(i, i + 1) is 107 83PASS foo(i, i + 1) is 109 84PASS foo(i, i + 1) is 111 85PASS foo(i, i + 1) is 113 86PASS foo(i, i + 1) is 115 87PASS foo(i, i + 1) is 117 88PASS foo(i, i + 1) is 119 89PASS foo(i, i + 1) is 121 90PASS foo(i, i + 1) is 123 91PASS foo(i, i + 1) is 125 92PASS foo(i, i + 1) is 127 93PASS foo(i, i + 1) is 129 94PASS foo(i, i + 1) is 131 95PASS foo(i, i + 1) is 133 96PASS foo(i, i + 1) is 135 97PASS foo(i, i + 1) is 137 98PASS foo(i, i + 1) is 139 99PASS foo(i, i + 1) is 141 100PASS foo(i, i + 1) is 143 101PASS foo(i, i + 1) is 145 102PASS foo(i, i + 1) is 147 103PASS foo(i, i + 1) is 149 104PASS foo(i, i + 1) is 151 105PASS foo(i, i + 1) is 153 106PASS foo(i, i + 1) is 155 107PASS foo(i, i + 1) is 157 108PASS foo(i, i + 1) is 159 109PASS foo(i, i + 1) is 161 110PASS foo(i, i + 1) is 163 111PASS foo(i, i + 1) is 165 112PASS foo(i, i + 1) is 167 113PASS foo(i, i + 1) is 169 114PASS foo(i, i + 1) is 171 115PASS foo(i, i + 1) is 173 116PASS foo(i, i + 1) is 175 117PASS foo(i, i + 1) is 177 118PASS foo(i, i + 1) is 179 119PASS foo(i, i + 1) is 181 120PASS foo(i, i + 1) is 183 121PASS foo(i, i + 1) is 185 122PASS foo(i, i + 1) is 187 123PASS foo(i, i + 1) is 189 124PASS foo(i, i + 1) is 191 125PASS foo(i, i + 1) is 193 126PASS foo(i, i + 1) is 195 127PASS foo(i, i + 1) is 197 128PASS foo(i, i + 1) is 199 129PASS foo(i, i + 1) is 201 130PASS foo(i, i + 1) is 203 131PASS foo(i, i + 1) is 205 132PASS foo(i, i + 1) is 207 133PASS foo(i, i + 1) is 209 134PASS foo(i, i + 1) is 211 135PASS foo(i, i + 1) is 213 136PASS foo(i, i + 1) is 215 137PASS foo(i, i + 1) is 217 138PASS foo(i, i + 1) is 219 139PASS foo(i, i + 1) is 221 140PASS foo(i, i + 1) is 223 141PASS foo(i, i + 1) is 225 142PASS foo(i, i + 1) is 227 143PASS foo(i, i + 1) is 229 144PASS foo(i, i + 1) is 231 145PASS foo(i, i + 1) is 233 146PASS foo(i, i + 1) is 235 147PASS foo(i, i + 1) is 237 148PASS foo(i, i + 1) is 239 149PASS foo(i, i + 1) is 241 150PASS foo(i, i + 1) is 243 151PASS foo(i, i + 1) is 245 152PASS foo(i, i + 1) is 247 153PASS foo(i, i + 1) is 249 154PASS foo(i, i + 1) is 251 155PASS foo(i, i + 1) is 253 156PASS foo(i, i + 1) is 255 157PASS foo(i, i + 1) is 257 158PASS foo(i, i + 1) is 259 159PASS foo(i, i + 1) is 261 160PASS foo(i, i + 1) is 263 161PASS foo(i, i + 1) is 265 162PASS foo(i, i + 1) is 267 163PASS foo(i, i + 1) is 269 164PASS foo(i, i + 1) is 271 165PASS foo(i, i + 1) is 273 166PASS foo(i, i + 1) is 275 167PASS foo(i, i + 1) is 277 168PASS foo(i, i + 1) is 279 169PASS foo(i, i + 1) is 281 170PASS foo(i, i + 1) is 283 171PASS foo(i, i + 1) is 285 172PASS foo(i, i + 1) is 287 173PASS foo(i, i + 1) is 289 174PASS foo(i, i + 1) is 291 175PASS foo(i, i + 1) is 293 176PASS foo(i, i + 1) is 295 177PASS foo(i, i + 1) is 297 178PASS foo(i, i + 1) is 299 179PASS foo(i, i + 1) is 301 180PASS foo(i, i + 1) is 303 181PASS foo(i, i + 1) is 305 182PASS foo(i, i + 1) is 307 183PASS foo(i, i + 1) is 309 184PASS foo(i, i + 1) is 311 185PASS foo(i, i + 1) is 313 186PASS foo(i, i + 1) is 315 187PASS foo(i, i + 1) is 317 188PASS foo(i, i + 1) is 319 189PASS foo(i, i + 1) is 321 190PASS foo(i, i + 1) is 323 191PASS foo(i, i + 1) is 325 192PASS foo(i, i + 1) is 327 193PASS foo(i, i + 1) is 329 194PASS foo(i, i + 1) is 331 195PASS foo(i, i + 1) is 333 196PASS foo(i, i + 1) is 335 197PASS foo(i, i + 1) is 337 198PASS foo(i, i + 1) is 339 199PASS foo(i, i + 1) is 341 200PASS foo(i, i + 1) is 343 201PASS foo(i, i + 1) is 345 202PASS foo(i, i + 1) is 347 203PASS foo(i, i + 1) is 349 204PASS foo(i, i + 1) is 351 205PASS foo(i, i + 1) is 353 206PASS foo(i, i + 1) is 355 207PASS foo(i, i + 1) is 357 208PASS foo(i, i + 1) is 359 209PASS foo(i, i + 1) is 361 210PASS foo(i, i + 1) is 363 211PASS foo(i, i + 1) is 365 212PASS foo(i, i + 1) is 367 213PASS foo(i, i + 1) is 369 214PASS foo(i, i + 1) is 371 215PASS foo(i, i + 1) is 373 216PASS foo(i, i + 1) is 375 217PASS foo(i, i + 1) is 377 218PASS foo(i, i + 1) is 379 219PASS foo(i, i + 1) is 381 220PASS foo(i, i + 1) is 383 221PASS foo(i, i + 1) is 385 222PASS foo(i, i + 1) is 387 223PASS foo(i, i + 1) is 389 224PASS foo(i, i + 1) is 391 225PASS foo(i, i + 1) is 393 226PASS foo(i, i + 1) is 395 227PASS foo(i, i + 1) is 397 228PASS foo(i, i + 1) is 399 229PASS successfullyParsed is true 230 231TEST COMPLETE 232 233