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

Support Jump Indicators on OAT View #26

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

alonalbert
Copy link
Contributor

Notes:

  • DexTextArea & OatTextArea are trivial, but I think it results in a cleaner project.
  • The oat package currently contains only OatTextArea, but it would make sense to move the oat parsing there too.

Notes:
* DexTextArea & OatTextArea are trivial, but I think it results in a cleaner project.
* The `oat` package currently contains only OatTextArea, but it would make sense to move the `oat` parsing there too.
Copy link
Owner

@romainguy romainguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I didn't add support for jumps in the OAT text area initially because a lot of jumps need to be computed, which is a pita, but I guess this is better than not having them at all.

Another thing I wanted to do was what you started doing: parsing should produce a list of class/methods/instructions. This way computing the jumps in the text area wouldn't require to re-parse the document line by line every time, instead we could just lookup the instruction directly in a data structure and get its matching line in the text area document. O(n) to O(1) effectively.

@romainguy romainguy merged commit 35aae2a into romainguy:main May 3, 2024
1 check passed
@alonalbert
Copy link
Contributor Author

Yeah, we should have something like:

sealed CodetextViewContent {
    class CodeContent(classes: List<CodeClass>): CodetextViewContent
    class ErrorContent(error: String) : CodetextViewContent
}

@alonalbert
Copy link
Contributor Author

Can you share an example of a OAT jump that needs to be computed?

I'm not sure I understand.

@alonalbert alonalbert deleted the oat branch May 5, 2024 16:36
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