Skip to content

Cleaned dead/debug code in X86BinaryAssembler, all tests pass#427

Open
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/issue417-20260517151501
Open

Cleaned dead/debug code in X86BinaryAssembler, all tests pass#427
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/issue417-20260517151501

Conversation

@opencode-agent
Copy link
Copy Markdown

The review of X86BinaryAssembler.java has been completed with the following fixes applied:

Changes Made:

  1. Line 627 - Removed debug System.out.println statement in getUnresolvedObjectRefs()

  2. Lines 2271-2276 - Simplified redundant exception handling in writeJECXZ():

    • The original code threw IllegalArgumentException but caught UnresolvedObjectRefException (which was never thrown), resulting in unreachable catch block
    • Now directly throws IllegalArgumentException
  3. Lines 2458-2517 - Cleaned up dead code in writeLEA() method:

    • Removed if (true) block with internal comments indicating incomplete refactoring
    • Removed dead code paths with && false conditions
    • Removed duplicate ModRM encoding logic that was never executed
    • The method now correctly uses the proper helper methods (writeModRMRREXPrefix, write8)

Build Status: BUILD SUCCESSFUL - All tests pass after changes.

Closes #417

New%20session%20-%202026-05-17T15%3A15%3A00.450Z
opencode session  |  github run

Co-authored-by: LSantha <LSantha@users.noreply.github.com>
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.

Review X86BinaryAssembler.java

0 participants