Skip to content

Commit

Permalink
feat(#217): save hardcoded value about jump label
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Nov 1, 2023
1 parent e046526 commit 6cf17ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,15 @@ public void visitIntInsn(final int opcode, final int operand) {

@Override
public void visitJumpInsn(final int opcode, final Label label) {
this.opcode(opcode, label);
// @checkstyle MethodBodyCommentsCheck (10 lines)
// @todo #217:90min Save correct label value into XMIR.
// Currently we just save hardcoded value about label to the XMIR, which is wrong,
// of course. The problem here is that we can't directly use Label#getOffset() method
// since label offset will be set later (not here). So we have to handle that problem
// somehow and save correct Label value. Don't forget to write integration tests
// for if/else and loops control-flow statements. The tests should check correct
// transformation bytecode -> XMIR -> bytecode.
this.opcode(opcode, 0);
super.visitJumpInsn(opcode, label);
}

Expand Down
5 changes: 2 additions & 3 deletions src/test/java/org/eolang/jeo/representation/HexDataTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/**
* Test cases for {@link org.eolang.jeo.representation.HexData}.
* @since 0.1.
* @since 0.1
*/
class HexDataTest {

Expand Down Expand Up @@ -94,5 +94,4 @@ static Stream<Arguments> values() {
Arguments.of(0.1d, "3F B9 99 99 99 99 99 9A")
);
}

}
}

0 comments on commit 6cf17ec

Please sign in to comment.