Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8256506: Create a standalone version of Nashorn for Java 15+ #3

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
49da3d1
Revert "8204492: Add deprecation annotation to Nashorn APIs and warni…
szegedi Oct 4, 2020
1f5b6e6
Move all files under the new module and package names
szegedi Oct 4, 2020
784c14e
Module name: s/jdk.scripting.nashorn/org.openjdk.nashorn
szegedi Oct 4, 2020
f79f783
Package name: s/jdk.nashorn/org.openjdk.nashorn
szegedi Oct 4, 2020
9c80023
Package path: jdk/nashorn to org/openjdk/nashorn
szegedi Oct 4, 2020
7cd00fe
Update Maven Central URLs
szegedi Oct 4, 2020
74e6d36
Don't deal with Dynalink (except in tests)
szegedi Oct 4, 2020
982b567
Use vanilla ASM
szegedi Oct 4, 2020
1dfad1b
These are probably unneeded
szegedi Oct 4, 2020
76daca4
Remove dependency on jdk.internal.reflect.* package
szegedi Oct 4, 2020
b0ef8a2
Adjust to the way our dependencies work now
szegedi Oct 19, 2020
3f31753
Use sun.misc.Unsafe instead of jdk.internal.misc.Unsafe
szegedi Oct 19, 2020
1ad01be
Compile shell after nashorn jar, so it uses it as a module
szegedi Oct 5, 2020
1e95530
Move test files to new directory structure
szegedi Oct 5, 2020
1838339
Rename Dynalink test packages
szegedi Oct 5, 2020
9d446d4
Get to the point where "ant test" starts up
szegedi Oct 11, 2020
039d39b
Fix the parser test now that positions have changed due to the packag…
szegedi Oct 11, 2020
23d6b05
Mark jjs tests as currently-failing
szegedi Oct 11, 2020
e19790a
Shell shouldn't use internal JDK API
szegedi Oct 11, 2020
9b2d922
only limit access to that one test package
szegedi Oct 12, 2020
435153c
Fix test; since we don't limit access to internals in tests
szegedi Oct 18, 2020
c863e96
Can get module from a publicly accessible class, too.
szegedi Oct 18, 2020
d86e438
We no longer prohibit access to internals in the tests
szegedi Oct 18, 2020
f86d6ba
This is now OpenJDK Nashorn 15.0
szegedi Oct 25, 2020
61f7398
Use Ivy for dependency management and preparation of pom.xml
szegedi Oct 25, 2020
e55e4c9
Don't presume Nashorn is in the boot layer.
szegedi Nov 15, 2020
1b32647
Ivy is more trouble than it's worth; don't use it.
szegedi Nov 16, 2020
c0f0577
Remove extra whitespace
szegedi Nov 17, 2020
53b2ac2
Fix all cases where git apply complained about "new blank line at EOF".
szegedi Nov 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion bin/nashorn/runopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ $PRINT_ASM_FLAGS \
-Xms2G -Xmx2G \
-XX:TypeProfileLevel=222 \
-cp $CLASSPATH:../build/test/classes/ \
jdk.nashorn.tools.Shell $ENABLE_TIME_FLAGS ${@}
org.openjdk.nashorn.tools.Shell $ENABLE_TIME_FLAGS ${@}


2 changes: 1 addition & 1 deletion doc/nashorn/DEVELOPER_README
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ For example: --log=codegen,fields:finest is equivalent to

The following is an incomplete list of subsystems that currently
support logging. Look for classes implementing
jdk.nashorn.internal.runtime.logging.Loggable for more loggers.
org.openjdk.nashorn.internal.runtime.logging.Loggable for more loggers.


* compiler
Expand Down
12 changes: 6 additions & 6 deletions make/CompileJavaModulesNashorn.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#

NASGEN_SRC := $(TOPDIR)/make/nashorn/buildtools/nasgen/src
ASM_SRC := $(TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm
ASM_SRC := $(TOPDIR)/src/java.base/share/classes/org/objectweb/asm

# Build nasgen
$(eval $(call SetupJavaCompilation, BUILD_NASGEN, \
Expand All @@ -39,16 +39,16 @@ NASGEN_RUN_FILE := $(NASHORN_CLASSES_DIR)/_the.nasgen.run
NASGEN_OPTIONS := \
-cp $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
--add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
--add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED \
--add-exports java.base/org.objectweb.asm=ALL-UNNAMED \
--add-exports java.base/org.objectweb.asm.util=ALL-UNNAMED \
#

# Run nasgen to modify classes in jdk.nashorn.internal.objects package
# Run nasgen to modify classes in org.openjdk.nashorn.internal.objects package
$(NASGEN_RUN_FILE): $(BUILD_NASGEN) $($(MODULE))
$(ECHO) Running nasgen
$(JAVA_SMALL) $(NASGEN_OPTIONS) \
jdk.nashorn.internal.tools.nasgen.Main $(@D) \
jdk.nashorn.internal.objects $(@D)
org.openjdk.nashorn.internal.tools.nasgen.Main $(@D) \
org.openjdk.nashorn.internal.objects $(@D)
$(TOUCH) $@

TARGETS += $(NASGEN_RUN_FILE)
18 changes: 9 additions & 9 deletions make/data/symbols/jdk.scripting.nashorn-7.sym.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
-class name jdk/nashorn/api/scripting/AbstractJSObject
-class name org/openjdk/nashorn/api/scripting/AbstractJSObject

-class name jdk/nashorn/api/scripting/ClassFilter
-class name org/openjdk/nashorn/api/scripting/ClassFilter

-class name jdk/nashorn/api/scripting/JSObject
-class name org/openjdk/nashorn/api/scripting/JSObject

-class name jdk/nashorn/api/scripting/NashornException
-class name org/openjdk/nashorn/api/scripting/NashornException

-class name jdk/nashorn/api/scripting/NashornScriptEngine
-class name org/openjdk/nashorn/api/scripting/NashornScriptEngine

-class name jdk/nashorn/api/scripting/NashornScriptEngineFactory
-class name org/openjdk/nashorn/api/scripting/NashornScriptEngineFactory

-class name jdk/nashorn/api/scripting/ScriptObjectMirror
-class name org/openjdk/nashorn/api/scripting/ScriptObjectMirror

-class name jdk/nashorn/api/scripting/ScriptUtils
-class name org/openjdk/nashorn/api/scripting/ScriptUtils

-class name jdk/nashorn/api/scripting/URLReader
-class name org/openjdk/nashorn/api/scripting/URLReader

38 changes: 19 additions & 19 deletions make/data/symbols/jdk.scripting.nashorn-8.sym.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name jdk/nashorn/api/scripting/AbstractJSObject
header extends java/lang/Object implements jdk/nashorn/api/scripting/JSObject flags 421 runtimeAnnotations @Ljdk/Exported;
class name org/openjdk/nashorn/api/scripting/AbstractJSObject
header extends java/lang/Object implements org/openjdk/nashorn/api/scripting/JSObject flags 421 runtimeAnnotations @Ljdk/Exported;
method name <init> descriptor ()V flags 1
method name call descriptor (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; flags 81
method name newObject descriptor ([Ljava/lang/Object;)Ljava/lang/Object; flags 81
Expand All @@ -49,13 +49,13 @@ method name isStrictFunction descriptor ()Z flags 1
method name isArray descriptor ()Z flags 1
method name toNumber descriptor ()D flags 1 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
method name getDefaultValue descriptor (Ljava/lang/Class;)Ljava/lang/Object; flags 1 signature (Ljava/lang/Class<*>;)Ljava/lang/Object;
method name getDefaultValue descriptor (Ljdk/nashorn/api/scripting/JSObject;Ljava/lang/Class;)Ljava/lang/Object; flags 9 signature (Ljdk/nashorn/api/scripting/JSObject;Ljava/lang/Class<*>;)Ljava/lang/Object;
method name getDefaultValue descriptor (Lorg/openjdk/nashorn/api/scripting/JSObject;Ljava/lang/Class;)Ljava/lang/Object; flags 9 signature (Lorg/openjdk/nashorn/api/scripting/JSObject;Ljava/lang/Class<*>;)Ljava/lang/Object;

class name jdk/nashorn/api/scripting/ClassFilter
class name org/openjdk/nashorn/api/scripting/ClassFilter
header extends java/lang/Object flags 601 runtimeAnnotations @Ljdk/Exported;
method name exposeToScripts descriptor (Ljava/lang/String;)Z flags 401

class name jdk/nashorn/api/scripting/JSObject
class name org/openjdk/nashorn/api/scripting/JSObject
header extends java/lang/Object flags 601 runtimeAnnotations @Ljdk/Exported;
method name call descriptor (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; flags 481
method name newObject descriptor ([Ljava/lang/Object;)Ljava/lang/Object; flags 481
Expand All @@ -77,7 +77,7 @@ method name isStrictFunction descriptor ()Z flags 401
method name isArray descriptor ()Z flags 401
method name toNumber descriptor ()D flags 401 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;

class name jdk/nashorn/api/scripting/NashornException
class name org/openjdk/nashorn/api/scripting/NashornException
header extends java/lang/RuntimeException flags 421 runtimeAnnotations @Ljdk/Exported;
method name <init> descriptor (Ljava/lang/String;Ljava/lang/String;II)V flags 4
method name <init> descriptor (Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/String;II)V flags 4
Expand All @@ -91,11 +91,11 @@ method name setColumnNumber descriptor (I)V flags 11
method name getScriptFrames descriptor (Ljava/lang/Throwable;)[Ljava/lang/StackTraceElement; flags 9
method name getScriptStackString descriptor (Ljava/lang/Throwable;)Ljava/lang/String; flags 9
method name getThrown descriptor ()Ljava/lang/Object; flags 4
method name initEcmaError descriptor (Ljdk/nashorn/internal/runtime/ScriptObject;)Ljdk/nashorn/api/scripting/NashornException; flags 4
method name initEcmaError descriptor (Lorg/openjdk/nashorn/internal/runtime/ScriptObject;)Lorg/openjdk/nashorn/api/scripting/NashornException; flags 4
method name getEcmaError descriptor ()Ljava/lang/Object; flags 1
method name setEcmaError descriptor (Ljava/lang/Object;)V flags 1

class name jdk/nashorn/api/scripting/NashornScriptEngine
class name org/openjdk/nashorn/api/scripting/NashornScriptEngine
header extends javax/script/AbstractScriptEngine implements javax/script/Compilable,javax/script/Invocable flags 31 runtimeAnnotations @Ljdk/Exported;
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
field name NASHORN_GLOBAL descriptor Ljava/lang/String; constantValue nashorn.global flags 19
Expand All @@ -110,7 +110,7 @@ method name invokeMethod descriptor (Ljava/lang/Object;Ljava/lang/String;[Ljava/
method name getInterface descriptor (Ljava/lang/Class;)Ljava/lang/Object; flags 1 signature <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;)TT;
method name getInterface descriptor (Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object; flags 1 signature <T:Ljava/lang/Object;>(Ljava/lang/Object;Ljava/lang/Class<TT;>;)TT;

class name jdk/nashorn/api/scripting/NashornScriptEngineFactory
class name org/openjdk/nashorn/api/scripting/NashornScriptEngineFactory
header extends java/lang/Object implements javax/script/ScriptEngineFactory flags 31 runtimeAnnotations @Ljdk/Exported;
method name <init> descriptor ()V flags 1
method name getEngineName descriptor ()Ljava/lang/String; flags 1
Expand All @@ -126,13 +126,13 @@ method name getParameter descriptor (Ljava/lang/String;)Ljava/lang/Object; flags
method name getProgram descriptor ([Ljava/lang/String;)Ljava/lang/String; flags 81
method name getScriptEngine descriptor ()Ljavax/script/ScriptEngine; flags 1
method name getScriptEngine descriptor (Ljava/lang/ClassLoader;)Ljavax/script/ScriptEngine; flags 1
method name getScriptEngine descriptor (Ljdk/nashorn/api/scripting/ClassFilter;)Ljavax/script/ScriptEngine; flags 1
method name getScriptEngine descriptor (Lorg/openjdk/nashorn/api/scripting/ClassFilter;)Ljavax/script/ScriptEngine; flags 1
method name getScriptEngine descriptor ([Ljava/lang/String;)Ljavax/script/ScriptEngine; flags 81
method name getScriptEngine descriptor ([Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/script/ScriptEngine; flags 1
method name getScriptEngine descriptor ([Ljava/lang/String;Ljava/lang/ClassLoader;Ljdk/nashorn/api/scripting/ClassFilter;)Ljavax/script/ScriptEngine; flags 1
method name getScriptEngine descriptor ([Ljava/lang/String;Ljava/lang/ClassLoader;Lorg/openjdk/nashorn/api/scripting/ClassFilter;)Ljavax/script/ScriptEngine; flags 1

class name jdk/nashorn/api/scripting/ScriptObjectMirror
header extends jdk/nashorn/api/scripting/AbstractJSObject implements javax/script/Bindings flags 31 runtimeAnnotations @Ljdk/Exported;
class name org/openjdk/nashorn/api/scripting/ScriptObjectMirror
header extends org/openjdk/nashorn/api/scripting/AbstractJSObject implements javax/script/Bindings flags 31 runtimeAnnotations @Ljdk/Exported;
innerclass innerClass java/util/Map$Entry outerClass java/util/Map innerClassName Entry flags 609
method name equals descriptor (Ljava/lang/Object;)Z flags 1
method name hashCode descriptor ()I flags 1
Expand Down Expand Up @@ -171,11 +171,11 @@ method name getProto descriptor ()Ljava/lang/Object; flags 1
method name setProto descriptor (Ljava/lang/Object;)V flags 1
method name getOwnPropertyDescriptor descriptor (Ljava/lang/String;)Ljava/lang/Object; flags 1
method name getOwnKeys descriptor (Z)[Ljava/lang/String; flags 1
method name preventExtensions descriptor ()Ljdk/nashorn/api/scripting/ScriptObjectMirror; flags 1
method name preventExtensions descriptor ()Lorg/openjdk/nashorn/api/scripting/ScriptObjectMirror; flags 1
method name isExtensible descriptor ()Z flags 1
method name seal descriptor ()Ljdk/nashorn/api/scripting/ScriptObjectMirror; flags 1
method name seal descriptor ()Lorg/openjdk/nashorn/api/scripting/ScriptObjectMirror; flags 1
method name isSealed descriptor ()Z flags 1
method name freeze descriptor ()Ljdk/nashorn/api/scripting/ScriptObjectMirror; flags 1
method name freeze descriptor ()Lorg/openjdk/nashorn/api/scripting/ScriptObjectMirror; flags 1
method name isFrozen descriptor ()Z flags 1
method name isUndefined descriptor (Ljava/lang/Object;)Z flags 9
method name to descriptor (Ljava/lang/Class;)Ljava/lang/Object; flags 1 signature <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;)TT;
Expand All @@ -189,18 +189,18 @@ method name toNumber descriptor ()D flags 1 deprecated true runtimeAnnotations @
method name getDefaultValue descriptor (Ljava/lang/Class;)Ljava/lang/Object; flags 1 signature (Ljava/lang/Class<*>;)Ljava/lang/Object;
method name put descriptor (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; flags 1041

class name jdk/nashorn/api/scripting/ScriptUtils
class name org/openjdk/nashorn/api/scripting/ScriptUtils
header extends java/lang/Object flags 31 runtimeAnnotations @Ljdk/Exported;
method name parse descriptor (Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String; flags 9
method name format descriptor (Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; flags 9
method name makeSynchronizedFunction descriptor (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; flags 9
method name wrap descriptor (Ljava/lang/Object;)Ljdk/nashorn/api/scripting/ScriptObjectMirror; flags 9
method name wrap descriptor (Ljava/lang/Object;)Lorg/openjdk/nashorn/api/scripting/ScriptObjectMirror; flags 9
method name unwrap descriptor (Ljava/lang/Object;)Ljava/lang/Object; flags 9
method name wrapArray descriptor ([Ljava/lang/Object;)[Ljava/lang/Object; flags 9
method name unwrapArray descriptor ([Ljava/lang/Object;)[Ljava/lang/Object; flags 9
method name convert descriptor (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; flags 9

class name jdk/nashorn/api/scripting/URLReader
class name org/openjdk/nashorn/api/scripting/URLReader
header extends java/io/Reader flags 31 runtimeAnnotations @Ljdk/Exported;
method name <init> descriptor (Ljava/net/URL;)V flags 1
method name <init> descriptor (Ljava/net/URL;Ljava/lang/String;)V flags 1
Expand Down
Loading