-
Notifications
You must be signed in to change notification settings - Fork 64
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
Frame unification #602
base: pharo-12
Are you sure you want to change the base?
Frame unification #602
Conversation
This reverts commit 73c5165.
Now instVarAt: can be called both from within and outside the interpreter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is big thus very hard to read, but the work is impressive. I tried my best to review it even if lot of things are still mysterious to me.
'jitCodeZoneWriteEnabled' | ||
'jitCodeZoneWriteEnabled', | ||
'cePrimReturnEnterCogCode', | ||
'cePrimReturnEnterCogCodeProfiling' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why those two ivars were moved around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea :)
|
||
"In cog the base frames are married, in non cog they are not" | ||
self isCog ifTrue: [ | ||
theContext := self ensureFrameIsMarried: theFP SP: (self frameReceiverLocation: theFP). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isCog
here feels inconsistent with the rest of the PR
What about a method that returns nil in the StackInterpretor and possibly perform matrimonial work in the CoInterpretor?
moreover, the method moveFramesIn...
is very similar that the one overridden in CoInterpretor, so I'm not even sure that the isCog is meaningful in neither. Could it be possible to have a single method moveFramesIn...
for both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I refactored so they look very similar (and the repetition could eventually be removed). But at some point I put my time on fixing issue and making the PR pass ^^
Slight differences in the shape of frames between the pure interpreter and the VM with JIT make a lot of code duplication and make it difficult to change and debug.
This PR unifies both. The main idea that the JIT VM keeps the same frame organisation, it is the non-JIT VM (used to debug mainly nowadays) that accommodates slightly.
The core differences dealt with are:
Other minor details include the refactoring in the management of instruction pointers which in the JITt'ed VM can have a mixture of machine code and interpreter instruction pointers. The code should do the same but just avoid repetition.
Also, several minor cleanups of dead code observed on the way