Skip to content

Conversation

OCHyams
Copy link
Contributor

@OCHyams OCHyams commented Aug 8, 2025

No description provided.

Copy link

github-actions bot commented Aug 8, 2025

✅ With the latest revision this PR passed the Python code formatter.

@OCHyams OCHyams requested review from jmorse and SLTozer August 8, 2025 13:38
@OCHyams OCHyams marked this pull request as ready for review August 8, 2025 13:38
Copy link
Contributor

@SLTozer SLTozer left a comment

Choose a reason for hiding this comment

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

Many small comments, but generally looks good.

def __init__(self, *args, **kwargs):
if len(args) < 1:
raise TypeError("expected 1 positional argument")
self.expression = str(args[0]) # Function name.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe name this self.function instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there was a reason I used self.expression. But I don't recall why (it was a while ago, while I was making the stepping-graphs for key instructions. It could just have easily been a mistaken assumption). I'm happy to change it to self.function and if we run into issues (perhaps with printing?) we can reassess, rather than have unnecessarily cryptic code.

Comment on lines 28 to 39
self.from_line = kwargs.pop("from_line", 1)
self.to_line = kwargs.pop("to_line", 999999)
Copy link
Contributor

Choose a reason for hiding this comment

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

How do the arguments to this work? I would assume that this function would be willing to accept a on_line argument, and I'd also assume that in the absence of any line argument ("on" or "from/to") this command is essentially meaningless, so it should be necessary to pass at least one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you feel strongly that on_line is better than from_line when to_line is omitted? My preference is to keep it to just from_line as it still makes sense to me and keeps things simpler, but I don't mind changing it if you'd prefer.

I agree that we need at least one line arg - done.

super(DexContinue, self).__init__()

def eval(self):
raise NotImplementedError("DexContinue commands cannot be evaled.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, I don't know how I feel about this particular adjectivalisation, maybe we could avoid it by changing it to "Cannot eval DexContinue commands" or similar, or maybe you can just ignore this comment as being a matter of taste!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you, but I copied this from other existing commands, so I'm inclined to keep it for uniformity.

Comment on lines +420 to +421
FIXME: hit_count should probably be inverted, like `DexLimitSteps`, to trigger
AFTER that many hits?
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest creating two separate words for it. In debugger parlance, I think "hit_count=n" means after n hits, maybe we could replace the alternative form with "repeat_count"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DexFinishTest works in the hit_count sense, but other commands work in the repeat_count sense. Could we land this as-is and separately fix this inconsistency across all the commands?

@OCHyams OCHyams force-pushed the users/OCHyams/get_pc branch from 47f3267 to 6fe4940 Compare August 12, 2025 11:13
@OCHyams OCHyams force-pushed the users/OCHyams/dex-skeletons branch from f42e8d1 to 3c16976 Compare August 12, 2025 11:14
@OCHyams OCHyams force-pushed the users/OCHyams/get_pc branch from 6fe4940 to d35acc5 Compare August 27, 2025 13:35
@OCHyams OCHyams force-pushed the users/OCHyams/dex-skeletons branch from 3c16976 to 83608ac Compare August 27, 2025 13:41
@OCHyams OCHyams changed the base branch from users/OCHyams/get_pc to main August 27, 2025 13:41
@OCHyams OCHyams merged commit e2dcb8b into main Aug 27, 2025
9 checks passed
@OCHyams OCHyams deleted the users/OCHyams/dex-skeletons branch August 27, 2025 17:03
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