1b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// Copyright 2013 the V8 project authors. All rights reserved.
2b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// Redistribution and use in source and binary forms, with or without
3b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// modification, are permitted provided that the following conditions are
4b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// met:
5b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//
6b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//     * Redistributions of source code must retain the above copyright
7b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//       notice, this list of conditions and the following disclaimer.
8b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//     * Redistributions in binary form must reproduce the above
9b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//       copyright notice, this list of conditions and the following
10b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//       disclaimer in the documentation and/or other materials provided
11b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//       with the distribution.
12b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//     * Neither the name of Google Inc. nor the names of its
13b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//       contributors may be used to endorse or promote products derived
14b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//       from this software without specific prior written permission.
15b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org//
16b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org
28b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org// Flags: --allow-natives-syntax
29b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org
30b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.orgfunction add(x, y) { return x + y; }
31b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org
32b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.orgprint(add({ a: 1 }, "a"));
33b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.orgprint(add({ b: 1 }, "b"));
34b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.orgprint(add({ c: 1 }, "c"));
35b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org
36b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org%OptimizeFunctionOnNextCall(add);
37b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.org
38b5be0a91a2e75da55653dd3583b7f3c1c54f7309machenbach@chromium.orgprint(add("a", 1));
39