-
Enhancement
-
Resolution: Fixed
-
P4
-
9
-
b46
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085581 | emb-9 | Attila Szegedi | P4 | Resolved | Fixed | team |
JDK-8087016 | 8u65 | Attila Szegedi | P4 | Resolved | Fixed | b01 |
JDK-8068800 | 8u60 | Attila Szegedi | P4 | Resolved | Fixed | b01 |
JDK-8138445 | emb-8u65 | Unassigned | P4 | Resolved | Fixed | b01 |
JDK-8076930 | emb-8u60 | Attila Szegedi | P4 | Resolved | Fixed | team |
Currently we need 16 bytes to create a ScriptFunction in bytecode:
new ScriptFunctionImpl
dup
getstatic Script$f.constants : [Object;
iconst_1
aaload
checkcast RecompilableScriptFunctionData
aload_2
invokespecial ScriptFunctionImpl.<init>(RecompilableScriptFunctionData;ScriptObject;)V
This can be reduced to 8 by introducing a factory method ScriptFunctionImpl.create(Object[] constants, int index, ScriptObject scope):
getstatic Script$f.constants : [Object;
iconst_1
aload 2
invokestatic ScriptFunctionImpl.create([Object;IScriptObject;)ScriptFunction;
For methods containing lots of function declarations (e.g. typically the top-level program) this is a significant reduction in bytecode size.
new ScriptFunctionImpl
dup
getstatic Script$f.constants : [Object;
iconst_1
aaload
checkcast RecompilableScriptFunctionData
aload_2
invokespecial ScriptFunctionImpl.<init>(RecompilableScriptFunctionData;ScriptObject;)V
This can be reduced to 8 by introducing a factory method ScriptFunctionImpl.create(Object[] constants, int index, ScriptObject scope):
getstatic Script$f.constants : [Object;
iconst_1
aload 2
invokestatic ScriptFunctionImpl.create([Object;IScriptObject;)ScriptFunction;
For methods containing lots of function declarations (e.g. typically the top-level program) this is a significant reduction in bytecode size.
- backported by
-
JDK-8068800 Halve the function object creation code size
-
- Resolved
-
-
JDK-8076930 Halve the function object creation code size
-
- Resolved
-
-
JDK-8085581 Halve the function object creation code size
-
- Resolved
-
-
JDK-8087016 Halve the function object creation code size
-
- Resolved
-
-
JDK-8138445 Halve the function object creation code size
-
- Resolved
-