Merge

Sat, 04 Aug 2018 12:55:50 +0100

author
aefimov
date
Sat, 04 Aug 2018 12:55:50 +0100
changeset 2404
0db74627bade
parent 2403
bba4a022ab02
parent 2361
0d65cee90409
child 2405
bab27d12d61c

Merge

.hgtags file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Fri Jul 27 11:51:20 2018 +0100
     1.2 +++ b/.hgtags	Sat Aug 04 12:55:50 2018 +0100
     1.3 @@ -958,3 +958,10 @@
     1.4  9bae2c31c00bb6081026f7cb61aa50c726239a7a jdk8u201-b00
     1.5  9bae2c31c00bb6081026f7cb61aa50c726239a7a jdk8u191-b02
     1.6  1d23567f6ea387f9e047dd0d81f303b6371a27fb jdk8u191-b03
     1.7 +c374c805e6fb531f05ffd5070a148633c6f0626a jdk8u191-b04
     1.8 +5b549167a92971d6793079c702fa2fd79a987cbc jdk8u182-b00
     1.9 +a57083d7fe9ac674c0841db6849140424bb16eef jdk8u192-b00
    1.10 +bc4618963547efc17931174f57bea387f89cd5e9 jdk8u192-b01
    1.11 +1087a0aaf6a1e7f4c7708a7829b62c8a70b53782 jdk8u192-b02
    1.12 +ab21284e5eaa5d6e521f679603efb56237f2286e jdk8u192-b03
    1.13 +2056d0c035e847b13083d4cf63d1003174e6b0d9 jdk8u192-b04
     2.1 --- a/src/jdk/nashorn/internal/runtime/CompiledFunction.java	Fri Jul 27 11:51:20 2018 +0100
     2.2 +++ b/src/jdk/nashorn/internal/runtime/CompiledFunction.java	Sat Aug 04 12:55:50 2018 +0100
     2.3 @@ -525,6 +525,9 @@
     2.4  
     2.5          final int csParamCount = getParamCount(other);
     2.6          final boolean csIsVarArg = csParamCount == Integer.MAX_VALUE;
     2.7 +        if (csIsVarArg && isApplyToCall()) {
     2.8 +            return false; // apply2call function must be called with exact number of parameters
     2.9 +        }
    2.10          final int thisThisIndex = needsCallee() ? 1 : 0; // Index of "this" parameter in this function's type
    2.11  
    2.12          final int fnParamCountNoCallee = fnParamCount - thisThisIndex;
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/test/script/basic/JDK-8186646.js	Sat Aug 04 12:55:50 2018 +0100
     3.3 @@ -0,0 +1,39 @@
     3.4 +/*
     3.5 + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     3.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.7 + * 
     3.8 + * This code is free software; you can redistribute it and/or modify it
     3.9 + * under the terms of the GNU General Public License version 2 only, as
    3.10 + * published by the Free Software Foundation.
    3.11 + * 
    3.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    3.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    3.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    3.15 + * version 2 for more details (a copy is included in the LICENSE file that
    3.16 + * accompanied this code).
    3.17 + * 
    3.18 + * You should have received a copy of the GNU General Public License version
    3.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    3.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    3.21 + * 
    3.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    3.23 + * or visit www.oracle.com if you need additional information or have any
    3.24 + * questions.
    3.25 + */
    3.26 +
    3.27 +/**
    3.28 + * JDK-8186646: Nashorn: "duplicate code" assertion when binding a vararg function that just passes arguments along
    3.29 + *
    3.30 + * @test
    3.31 + * @run
    3.32 + */
    3.33 +
    3.34 +var fn2 = function () {};
    3.35 +
    3.36 +var fn = function () {
    3.37 +    fn2.apply(null, arguments);
    3.38 +};
    3.39 +
    3.40 +fn();
    3.41 +fn.bind();
    3.42 +

mercurial