Skip to content

Commit

Permalink
Wip instr
Browse files Browse the repository at this point in the history
  • Loading branch information
liach committed Oct 21, 2024
1 parent 7133d1b commit 02d8412
Show file tree
Hide file tree
Showing 28 changed files with 1,372 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@

package java.lang.classfile;

import java.lang.classfile.attribute.CodeAttribute;
import java.lang.classfile.instruction.*;

import jdk.internal.classfile.impl.AbstractInstruction;
import jdk.internal.javac.PreviewFeature;

/**
* Models an executable instruction in a method body.
* Models an executable instruction in the {@code code} array of the {@link CodeAttribute Code}
* attribute of a method.
*
* @sealedGraph
* @since 22
*/
@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API)
Expand All @@ -54,6 +57,8 @@ public sealed interface Instruction extends CodeElement

/**
* {@return the size in bytes of this instruction}
* This value is equal to {@link Opcode#sizeIfFixed()
* opcode().sizeIfFixed()} if it is not {@code -1}.
*/
int sizeInBytes();
}
Loading

0 comments on commit 02d8412

Please sign in to comment.