Skip to content

Conversation

@Sneharaj7645653
Copy link

Hello @guillep!

Here is the implementation of uint8At:
Screenshot 2025-04-25 at 10 47 27 PM

Comment on lines +570 to +575
VMStackPages >> uint8At: pointer [
<doNotGenerate>
"Read an unsigned 8-bit value from memory."
self assert: (pointer >= minStackAddress and: [pointer < maxStackAddress]).
^objectMemory byteAt: pointer
]
Copy link
Member

Choose a reason for hiding this comment

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

@Sneharaj7645653 thanks for start working on this!

There is some work needed here yet.

  • The method should be defined in VMClass and not in VMStackPages. Changing the Stack API access should be a separate issue, that I advice we attack later :)
  • we should rewrite some users to use it instead of the old version byteAt:. Check the senders of byteAt: within the VMMaker package (you can use the filter in the bottom of the list). I see at least 72 of them ;).
  • Also, we should probably remove the redefinitions of byteAt: in all the simulator subclasses classes. (Check subclasses of SpurMemoryManager)
  • Finally, you should run some tests to check if you missed some code.

Copy link
Author

Choose a reason for hiding this comment

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

Sure, I will get the changes done.

@guillep
Copy link
Member

guillep commented Apr 28, 2025

@Sneharaj7645653, after taking into account my comments, we should probably go and modify some C files in the repository to use your new method instead of the old one too ;)

@Sneharaj7645653 Sneharaj7645653 closed this by deleting the head repository Apr 30, 2025
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