test/script/basic/JDK-8131340.js

Wed, 05 Sep 2018 01:21:35 -0700

author
diazhou
date
Wed, 05 Sep 2018 01:21:35 -0700
changeset 2374
037913b52507
parent 1506
89c8dd086d7b
permissions
-rw-r--r--

Added tag jdk8u192-b09 for changeset 456c0d45c43b

hannesw@1506 1 /*
hannesw@1506 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
hannesw@1506 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
hannesw@1506 4 *
hannesw@1506 5 * This code is free software; you can redistribute it and/or modify it
hannesw@1506 6 * under the terms of the GNU General Public License version 2 only, as
hannesw@1506 7 * published by the Free Software Foundation.
hannesw@1506 8 *
hannesw@1506 9 * This code is distributed in the hope that it will be useful, but WITHOUT
hannesw@1506 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
hannesw@1506 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
hannesw@1506 12 * version 2 for more details (a copy is included in the LICENSE file that
hannesw@1506 13 * accompanied this code).
hannesw@1506 14 *
hannesw@1506 15 * You should have received a copy of the GNU General Public License version
hannesw@1506 16 * 2 along with this work; if not, write to the Free Software Foundation,
hannesw@1506 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
hannesw@1506 18 *
hannesw@1506 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
hannesw@1506 20 * or visit www.oracle.com if you need additional information or have any
hannesw@1506 21 * questions.
hannesw@1506 22 */
hannesw@1506 23
hannesw@1506 24 /**
hannesw@1506 25 * JDK-8131340: Varargs function is recompiled each time it is linked
hannesw@1506 26 *
hannesw@1506 27 * @test
hannesw@1506 28 * @run
hannesw@1506 29 */
hannesw@1506 30
hannesw@1506 31 // This is an indirect test. If repeated calls were to cause recompilation
hannesw@1506 32 // this would trigger an assertion in RecompilableScriptFunctionData.
hannesw@1506 33
hannesw@1506 34 function varargs() {
hannesw@1506 35 return arguments;
hannesw@1506 36 }
hannesw@1506 37
hannesw@1506 38 varargs(1);
hannesw@1506 39 varargs(2);
hannesw@1506 40 varargs(3);
hannesw@1506 41 varargs(4);
hannesw@1506 42 varargs(5);
hannesw@1506 43 varargs(6);

mercurial