mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8337225: Demote maxStack and maxLocals from CodeModel to CodeAttribute
Reviewed-by: asotona
This commit is contained in:
parent
bd36b6ae5d
commit
ab27090aa0
13 changed files with 166 additions and 88 deletions
|
@ -43,17 +43,7 @@ import jdk.internal.javac.PreviewFeature;
|
|||
@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API)
|
||||
public sealed interface CodeModel
|
||||
extends CompoundElement<CodeElement>, AttributedElement, MethodElement
|
||||
permits CodeAttribute, BufferedCodeBuilder.Model, CodeImpl {
|
||||
|
||||
/**
|
||||
* {@return the maximum size of the local variable table}
|
||||
*/
|
||||
int maxLocals();
|
||||
|
||||
/**
|
||||
* {@return the maximum size of the operand stack}
|
||||
*/
|
||||
int maxStack();
|
||||
permits CodeAttribute, BufferedCodeBuilder.Model {
|
||||
|
||||
/**
|
||||
* {@return the enclosing method, if known}
|
||||
|
|
|
@ -47,6 +47,16 @@ import jdk.internal.javac.PreviewFeature;
|
|||
public sealed interface CodeAttribute extends Attribute<CodeAttribute>, CodeModel
|
||||
permits BoundAttribute.BoundCodeAttribute {
|
||||
|
||||
/**
|
||||
* {@return the maximum size of the local variable table}
|
||||
*/
|
||||
int maxLocals();
|
||||
|
||||
/**
|
||||
* {@return the maximum size of the operand stack}
|
||||
*/
|
||||
int maxStack();
|
||||
|
||||
/**
|
||||
* {@return The length of the code array in bytes}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue