author | phh |
Sat, 30 Nov 2019 14:33:05 -0800 | |
changeset 59330 | 5b96c12f909d |
parent 48407 | fcb5b835bf32 |
permissions | -rw-r--r-- |
48407
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
1 |
/* |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
2 |
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
4 |
* |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
10 |
* |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
15 |
* accompanied this code). |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
16 |
* |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
20 |
* |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
23 |
* questions. |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
24 |
*/ |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
25 |
|
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
26 |
/** |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
27 |
* JDK-8193491 : JavaImporter fails to resolve method elements within functions, that contain too many statements |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
28 |
* |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
29 |
* @test |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
30 |
* @run |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
31 |
* @option -Dnashorn.compiler.splitter.threshold=200 |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
32 |
* @fork |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
33 |
*/ |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
34 |
|
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
35 |
var imports = new JavaImporter(java.lang, java.util, java.io); |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
36 |
with (imports) { |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
37 |
function func() { |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
38 |
var m = new HashMap(); |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
39 |
var f = new File("."); |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
40 |
var i = new Integer(2); |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
41 |
System.out.println(i); |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
42 |
System.out.println('a'); |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
43 |
}; |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
44 |
func(); |
fcb5b835bf32
8193491: JavaImporter fails to resolve method elements within functions, that contain too many statements
hannesw
parents:
diff
changeset
|
45 |
} |