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 constant folding an access to an uncaptured variable that is captured later in the same basic block doesn't lead to assertion failures. 25 26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29PASS foo(true, 5)[0] is 462 30PASS foo(true, 5)[0] is 462 31PASS foo(true, 5)[0] is 462 32PASS foo(true, 5)[0] is 462 33PASS foo(true, 5)[0] is 462 34PASS foo(true, 5)[0] is 462 35PASS foo(true, 5)[0] is 462 36PASS foo(true, 5)[0] is 462 37PASS foo(true, 5)[0] is 462 38PASS foo(true, 5)[0] is 462 39PASS foo(true, 5)[0] is 462 40PASS foo(true, 5)[0] is 462 41PASS foo(true, 5)[0] is 462 42PASS foo(true, 5)[0] is 462 43PASS foo(true, 5)[0] is 462 44PASS foo(true, 5)[0] is 462 45PASS foo(true, 5)[0] is 462 46PASS foo(true, 5)[0] is 462 47PASS foo(true, 5)[0] is 462 48PASS foo(true, 5)[0] is 462 49PASS foo(true, 5)[0] is 462 50PASS foo(true, 5)[0] is 462 51PASS foo(true, 5)[0] is 462 52PASS foo(true, 5)[0] is 462 53PASS foo(true, 5)[0] is 462 54PASS foo(true, 5)[0] is 462 55PASS foo(true, 5)[0] is 462 56PASS foo(true, 5)[0] is 462 57PASS foo(true, 5)[0] is 462 58PASS foo(true, 5)[0] is 462 59PASS foo(true, 5)[0] is 462 60PASS foo(true, 5)[0] is 462 61PASS foo(true, 5)[0] is 462 62PASS foo(true, 5)[0] is 462 63PASS foo(true, 5)[0] is 462 64PASS foo(true, 5)[0] is 462 65PASS foo(true, 5)[0] is 462 66PASS foo(true, 5)[0] is 462 67PASS foo(true, 5)[0] is 462 68PASS foo(true, 5)[0] is 462 69PASS foo(true, 5)[0] is 462 70PASS foo(true, 5)[0] is 462 71PASS foo(true, 5)[0] is 462 72PASS foo(true, 5)[0] is 462 73PASS foo(true, 5)[0] is 462 74PASS foo(true, 5)[0] is 462 75PASS foo(true, 5)[0] is 462 76PASS foo(true, 5)[0] is 462 77PASS foo(true, 5)[0] is 462 78PASS foo(true, 5)[0] is 462 79PASS foo(true, 5)[0] is 462 80PASS foo(true, 5)[0] is 462 81PASS foo(true, 5)[0] is 462 82PASS foo(true, 5)[0] is 462 83PASS foo(true, 5)[0] is 462 84PASS foo(true, 5)[0] is 462 85PASS foo(true, 5)[0] is 462 86PASS foo(true, 5)[0] is 462 87PASS foo(true, 5)[0] is 462 88PASS foo(true, 5)[0] is 462 89PASS foo(true, 5)[0] is 462 90PASS foo(true, 5)[0] is 462 91PASS foo(true, 5)[0] is 462 92PASS foo(true, 5)[0] is 462 93PASS foo(true, 5)[0] is 462 94PASS foo(true, 5)[0] is 462 95PASS foo(true, 5)[0] is 462 96PASS foo(true, 5)[0] is 462 97PASS foo(true, 5)[0] is 462 98PASS foo(true, 5)[0] is 462 99PASS foo(true, 5)[0] is 462 100PASS foo(true, 5)[0] is 462 101PASS foo(true, 5)[0] is 462 102PASS foo(true, 5)[0] is 462 103PASS foo(true, 5)[0] is 462 104PASS foo(true, 5)[0] is 462 105PASS foo(true, 5)[0] is 462 106PASS foo(true, 5)[0] is 462 107PASS foo(true, 5)[0] is 462 108PASS foo(true, 5)[0] is 462 109PASS foo(true, 5)[0] is 462 110PASS foo(true, 5)[0] is 462 111PASS foo(true, 5)[0] is 462 112PASS foo(true, 5)[0] is 462 113PASS foo(true, 5)[0] is 462 114PASS foo(true, 5)[0] is 462 115PASS foo(true, 5)[0] is 462 116PASS foo(true, 5)[0] is 462 117PASS foo(true, 5)[0] is 462 118PASS foo(true, 5)[0] is 462 119PASS foo(true, 5)[0] is 462 120PASS foo(true, 5)[0] is 462 121PASS foo(true, 5)[0] is 462 122PASS foo(true, 5)[0] is 462 123PASS foo(true, 5)[0] is 462 124PASS foo(true, 5)[0] is 462 125PASS foo(true, 5)[0] is 462 126PASS foo(true, 5)[0] is 462 127PASS foo(true, 5)[0] is 462 128PASS foo(true, 5)[0] is 462 129PASS successfullyParsed is true 130 131TEST COMPLETE 132 133