changeset 2438:88ceae600dc8 icedtea-3.11.0pre02

Merge jdk8u192-b12
author andrew
date Wed, 16 Jan 2019 01:02:46 +0000
parents 1184d9780746 (current diff) 854c8339d414 (diff)
children 3aa1896554b2
files .hgtags
diffstat 3 files changed, 56 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Jan 09 07:30:56 2019 +0000
+++ b/.hgtags	Wed Jan 16 01:02:46 2019 +0000
@@ -1016,3 +1016,17 @@
 6cf21321f3674c4806cd2c911255f976f024db0d icedtea-3.10.0
 6cf21321f3674c4806cd2c911255f976f024db0d icedtea-3.11.0pre00
 287a6c783833005c9db86b7a7dfc85b52bfc36e1 icedtea-3.11.0pre01
+5b549167a92971d6793079c702fa2fd79a987cbc jdk8u182-b00
+a57083d7fe9ac674c0841db6849140424bb16eef jdk8u192-b00
+bc4618963547efc17931174f57bea387f89cd5e9 jdk8u192-b01
+1087a0aaf6a1e7f4c7708a7829b62c8a70b53782 jdk8u192-b02
+ab21284e5eaa5d6e521f679603efb56237f2286e jdk8u192-b03
+2056d0c035e847b13083d4cf63d1003174e6b0d9 jdk8u192-b04
+0d65cee9040926c0625b34e00450551f37042dc5 jdk8u192-b05
+b1dfea491c0571cd5ffb21b3b0778ff90b9efafe jdk8u192-b06
+d42d488fd8dcbe13c05958fd2b98696572157ee1 jdk8u192-b07
+9d1371fc0987c02d1321d7263d88a782e5e5cdfa jdk8u192-b08
+456c0d45c43bfbb5414b9ae0ca68227132b4af7b jdk8u192-b09
+e58a7b05e786554d3447c3b04b11873314b549cd jdk8u192-b10
+aa385e2ce23240f1466dbfcda5fd96ad325b109d jdk8u192-b25
+9d6b5362a75ddef6ed30fe9892e95d7cfdff0ed8 jdk8u192-b11
--- a/src/jdk/nashorn/internal/runtime/CompiledFunction.java	Wed Jan 09 07:30:56 2019 +0000
+++ b/src/jdk/nashorn/internal/runtime/CompiledFunction.java	Wed Jan 16 01:02:46 2019 +0000
@@ -525,6 +525,9 @@
 
         final int csParamCount = getParamCount(other);
         final boolean csIsVarArg = csParamCount == Integer.MAX_VALUE;
+        if (csIsVarArg && isApplyToCall()) {
+            return false; // apply2call function must be called with exact number of parameters
+        }
         final int thisThisIndex = needsCallee() ? 1 : 0; // Index of "this" parameter in this function's type
 
         final int fnParamCountNoCallee = fnParamCount - thisThisIndex;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8186646.js	Wed Jan 16 01:02:46 2019 +0000
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8186646: Nashorn: "duplicate code" assertion when binding a vararg function that just passes arguments along
+ *
+ * @test
+ * @run
+ */
+
+var fn2 = function () {};
+
+var fn = function () {
+    fn2.apply(null, arguments);
+};
+
+fn();
+fn.bind();
+