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

Writing of transformed class files #8

Open
2 of 7 tasks
kylestev opened this issue Nov 1, 2015 · 4 comments
Open
2 of 7 tasks

Writing of transformed class files #8

kylestev opened this issue Nov 1, 2015 · 4 comments

Comments

@kylestev
Copy link
Owner

kylestev commented Nov 1, 2015

  • Methods for writing general class file. Possible refactoring options include the following:
    • NodeBuffer needs a way to write bytes to a buffer
    • Clean-up ClassFile to have methods like read/write that accept a buffer and read/write to them accordingly
    • Some sort of FieldNode/FieldInfo class which can handle the writing of its data
    • Some sort of MethodNode/MethodInfo class which can handle the writing of its data (including writing of bytecode, though that can be handed off to the instruction classes themselves)
    • Some sort of AttributeNode/AttributeInfo class which can handle the writing of its data
  • Specific methods for writing bytecode back to a buffer. This should be made easier by @TSedlar's inheritance model for bytecode instructions.
@kylestev
Copy link
Owner Author

kylestev commented Nov 1, 2015

@TSedlar for now, just use the buffer class for writing data back to a buffer. in the future we might fork binary-parser to allow for code generated binary writers. if you feel like creating some PRs for the refactoring/implementation of (Field|Method)(Node|Info) go for it.

@kylestev
Copy link
Owner Author

kylestev commented Nov 1, 2015

@TSedlar if you want to reference this issue in your commits put refs #8 inside of your commit body (not the commit header/title) as I don't expect this to be done in a single commit. I'll contribute to this issue as well if you want to get started with implementing the write method on the children of AbstractInstruction

See here under Issue references within a repository

@kylestev
Copy link
Owner Author

kylestev commented Nov 1, 2015

related to #1

TSedlar added a commit that referenced this issue Nov 2, 2015
* AbstractInstruction#write is filled out and all classes extending it.
* I also fixed the class names for FieldInstruction/MethodInstruction, as both were named 'BranchInstruction.'

refs #8
TSedlar added a commit that referenced this issue Nov 2, 2015
* `AbstractInstruction#write` is filled out in all classes extending it
* fixed the class names for `FieldInstruction`/`MethodInstruction`,
  as both were named `BranchInstruction`

refs #8
TSedlar added a commit that referenced this issue Nov 3, 2015
* introduced `InstructionMajorVersionVerifier` for verifying instructions
  before writing in `ClassWriter#verify`

refs #8
TSedlar added a commit that referenced this issue Nov 3, 2015
* introduced `InstructionMajorVersionVerifier` for verifying instructions
  before writing in `ClassWriter#verify`

refs #8
@kylestev kylestev modified the milestone: v0.1 Release Nov 4, 2015
@kylestev
Copy link
Owner Author

kylestev commented Nov 7, 2015

Marking this for a future milestone. Probably v0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant