Closed
Bug 281247
Opened 20 years ago
Closed 20 years ago
JDK compatibility via special class
Categories
(Rhino Graveyard :: Core, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
Details
Attachments
(1 file, 2 obsolete files)
|
32.58 KB,
patch
|
Details | Diff | Splinter Review |
Rhino core supports JDK 1.1 compatibility to be able to run under MS JVM. To
take advantage of more recent JDK Rhino uses reflection. That introduce overhead
in the vast majority of Rhino embeddings and clutter code with verbose
preparations for reflection calls.
I suggest to replace that by a special compatibility interfaces and use
reflection only once to initialize it.
| Assignee | ||
Comment 1•20 years ago
|
||
The patch introduces the new abstract class, omj.VMBridge, with methods to
implement the following functionality:
1. Context.(enter|exit|call)
2. Access to thread-local classloader
3. Access to java.lang.reflect.AccessibleObject API to mark method as
accessible.
There are 2 implementations, omj.jdk11.VMBridge_jdk11 and
omj.jdk13.VMBridge_jdk13. The code for jdk13 case can run under JDK 1.2 but
since support for JDK 1.2 is not on the agenda and in future features like
java.lang.reflect.Proxy could be used by Rhino I explicitly referred to JDK 1.3
in the class name.
During initialization Rhino loads jdk11 case only if it failed to create an
instance of omj.jdk13.VMBridge_jdk13. In addition for additional Rhino also
tries to load initially omj.VMBridge_custom class which Rhino embedding can
provide if necessary.
| Assignee | ||
Comment 2•20 years ago
|
||
Changes from the previous version:
1. Comments including reference to the recent changes by Attila Szegedi in bug
281067.
2. VMBridge instance variable is moved from Context to the class itself since
it is not only Context that uses it.
Attachment #173524 -
Attachment is obsolete: true
| Assignee | ||
Comment 3•20 years ago
|
||
In this version I removed no longer used Class constants in ScriptRuntime.
Attachment #173550 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•20 years ago
|
||
I committed the last version of the patch
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•