12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright 2013 the V8 project authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Redistribution and use in source and binary forms, with or without 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// modification, are permitted provided that the following conditions 6a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// are met: 7a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// 1. Redistributions of source code must retain the above copyright 8a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// notice, this list of conditions and the following disclaimer. 9a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// 2. Redistributions in binary form must reproduce the above copyright 10a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// notice, this list of conditions and the following disclaimer in the 11a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// documentation and/or other materials provided with the distribution. 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)description( 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)"This tests that an OSR exit inside of an intrinsic that was not loaded with a method check works correctly." 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)); 27a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)function foo(a,b) { 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) return a[0](b.f); 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)for (var i = 0; i < 100; ++i) 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) foo([Math.abs], {f:5}); 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)shouldBe("foo([Math.abs], {f:5})", "5"); 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)for (var i = 0; i < 10; ++i) 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) shouldBe("foo([Math.abs], {f:5.5})", "5.5"); 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)var successfullyParsed = true; 412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)