Skip to content

Adds stubs for BytecodeGenerators and BytecodeIonReader and core pieces for their interactions - #1100

Merged
popematt merged 2 commits into
amazon-ion:ion11from
popematt:bytecodeutils
Oct 3, 2025
Merged

popematt merged 2 commits into
amazon-ion:ion11from
popematt:bytecodeutils

Conversation

@popematt

@popematt popematt commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Issue #, if available:

None

Description of changes:

  • Key Changes
    • Adds BytecodeGenerator interface
    • Adds BytecodeBuffer, based on IntList, this is specialized for building up bytecode as efficiently as possible
    • Adds ConstantPool, a specialized List-like collection for use as the bytcode's constant pool
    • Adds OpCodes, which has constants for reading Ion 1.1 binary data
    • Adds ByteSlice for representing lobs in the constant pool
  • Stubs
    • BytecodeIonReader
    • ByteArrayBytecodeGenerator10
    • ByteArrayBytecodeGenerator11
    • InputStreamBytecodeGenerator10
    • InputStreamBytecodeGenerator11
  • Incidental Changes
    • Replaces our @SuppressFBWarnings lookalike with a compileOnly dependency on the annotation vended by SpotBugs.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@popematt
popematt requested a review from tgregg October 2, 2025 15:29
@codecov

codecov Bot commented Oct 2, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 29 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (ion11@e94f00f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ain/java/com/amazon/ion/bytecode/util/ByteSlice.kt 0.00% 7 Missing ⚠️
...ion/bytecode/bin10/ByteArrayBytecodeGenerator10.kt 0.00% 4 Missing ⚠️
...n/bytecode/bin10/InputStreamBytecodeGenerator10.kt 0.00% 4 Missing ⚠️
...ion/bytecode/bin11/ByteArrayBytecodeGenerator11.kt 0.00% 4 Missing ⚠️
...n/bytecode/bin11/InputStreamBytecodeGenerator11.kt 0.00% 4 Missing ⚠️
.../java/com/amazon/ion/bytecode/BytecodeIonReader.kt 0.00% 3 Missing ⚠️
.../java/com/amazon/ion/bytecode/BytecodeGenerator.kt 0.00% 1 Missing ⚠️
...ava/com/amazon/ion/bytecode/util/BytecodeBuffer.kt 98.87% 1 Missing ⚠️
.../java/com/amazon/ion/bytecode/util/ConstantPool.kt 98.27% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             ion11    #1100   +/-   ##
========================================
  Coverage         ?   68.12%           
  Complexity       ?     5703           
========================================
  Files            ?      176           
  Lines            ?    23656           
  Branches         ?     4201           
========================================
  Hits             ?    16115           
  Misses           ?     6244           
  Partials         ?     1297           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/main/java/com/amazon/ion/bytecode/util/ConstantPool.kt
Comment thread src/main/java/com/amazon/ion/bytecode/util/BytecodeBuffer.kt
Comment thread src/test/java/com/amazon/ion/bytecode/util/BytecodeBufferTest.kt
Comment thread src/test/java/com/amazon/ion/bytecode/util/ConstantPoolTest.kt
Comment thread src/test/java/com/amazon/ion/bytecode/util/ConstantPoolTest.kt Outdated
@popematt
popematt merged commit 2e80a92 into amazon-ion:ion11 Oct 3, 2025
27 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants