Skip to content

Commit

Permalink
Compile errors; now tests are all green.
Browse files Browse the repository at this point in the history
  • Loading branch information
liach committed Aug 29, 2024
1 parent 96c0207 commit 254c6d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,11 @@ private void processDeferredLabels() {
// Instruction writing

public void writeBytecode(Opcode opcode) {
if (opcode.isWide())
bytecodesBufWriter.writeU1(ClassFile.WIDE);
bytecodesBufWriter.writeU1(opcode.bytecode() & 0xFF);
if (opcode.isWide()) {
bytecodesBufWriter.writeU2(opcode.bytecode());
} else {
bytecodesBufWriter.writeU1(opcode.bytecode());
}
}

public void writeLocalVar(Opcode opcode, int localVar) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@
package jdk.internal.classfile.impl;

import java.nio.ByteBuffer;
import static java.lang.classfile.ClassFile.ASTORE_3;
import static java.lang.classfile.ClassFile.ISTORE;
import static java.lang.classfile.ClassFile.LOOKUPSWITCH;
import static java.lang.classfile.ClassFile.TABLESWITCH;
import static java.lang.classfile.ClassFile.WIDE;
import static java.lang.classfile.Opcode.OpcodeValues.*;

public final class RawBytecodeHelper {

Expand Down

0 comments on commit 254c6d2

Please sign in to comment.