Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#277): Remove Code Duplication Between References #386

Merged
merged 13 commits into from
Aug 14, 2024

Conversation

volodya-lombrozo
Copy link
Member

@volodya-lombrozo volodya-lombrozo commented Aug 13, 2024

In this PR I combined Linked, Reference and Duplicate classes into a single well-tested class.

Closes: #277.


PR-Codex overview

The focus of this PR is to refactor code in the opeo package.

Detailed summary

  • Removed Linked.java and Reference.java
  • Modified StoreArray to handle opcodes differently
  • Updated Invocation to handle arguments
  • Refactored Constructor to handle different nodes
  • Implemented Root to return opcodes
  • Updated NewArrayAgent to handle array construction
  • Updated tests for ArrayConstructor
  • Refactored InvokespecialAgent to handle different nodes
  • Updated XmirParser to handle references
  • Added tests for Duplicate
  • Updated StoreToArrayAgent to handle array storage

The following files were skipped due to too many changes: src/main/java/org/eolang/opeo/ast/Duplicate.java, src/test/java/org/eolang/opeo/decompilation/DecompilerMachineTest.java

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@volodya-lombrozo volodya-lombrozo marked this pull request as ready for review August 14, 2024 14:29
@volodya-lombrozo
Copy link
Member Author

@rultor merge

@rultor
Copy link
Contributor

rultor commented Aug 14, 2024

@rultor merge

@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 206aade into objectionary:master Aug 14, 2024
11 checks passed
@rultor
Copy link
Contributor

rultor commented Aug 14, 2024

@rultor merge

@volodya-lombrozo Done! FYI, the full log is here (took me 7min)

@0crat
Copy link

0crat commented Aug 14, 2024

@volodya-lombrozo Thank you for your contribution! We appreciate your effort, but there are a few areas for improvement. You've earned +5 points: +20 base, -7 for excessive hits-of-code (566 ≥ 200), -15 for missing code review, and -5 for insufficient comments (only 2). We encourage you to focus on quality and ensure proper code review in future submissions. Keep up the good work, and don't hesitate to ask for guidance. Your current balance is +201.

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.

Duplicate.java:41-45: Do we need {@link Duplicate} class?...
4 participants