-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fix/speed regression #705
Fix/speed regression #705
Changes from all commits
f6bf6f3
dc71f76
c091c12
1e786c0
cd65df0
aaec6ed
6d49a27
b59d8f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -560,15 +560,17 @@ CoInterpreter >> activateNewMethod [ | |
|
||
"Eagerly compile it if appropriate so that doits are fast." | ||
methodHeader := self rawHeaderOf: newMethod. | ||
(self isCogMethodReference: methodHeader) ifFalse: [ | ||
(self methodWithHeaderShouldBeCogged: methodHeader) | ||
ifTrue: [ | ||
cogit cog: newMethod selector: objectMemory nilObject. | ||
methodHeader := self rawHeaderOf: newMethod ] | ||
ifFalse: [ self maybeFlagMethodAsInterpreted: newMethod ] ]. | ||
|
||
inInterpreter := self isInstructionPointerInInterpreter: | ||
instructionPointer. | ||
|
||
(self isCogMethodReference: methodHeader) | ||
ifTrue: | ||
[inInterpreter ifTrue: | ||
[self iframeSavedIP: framePointer put: instructionPointer asInteger. | ||
instructionPointer := cogit ceReturnToInterpreterPC]. | ||
^ self activateCoggedNewMethod: inInterpreter]. | ||
|
||
"We are in the interpreter" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, activate compiled method if already compiled |
||
methodHeader := self justActivateNewMethod: true. | ||
|
||
"Now check for stack overflow or an event (interrupt, must scavenge, etc)." | ||
|
@@ -2604,6 +2606,28 @@ CoInterpreter >> executeFullCogBlock: cogMethod closure: closure mayContextSwitc | |
"NOTREACHED" | ||
] | ||
|
||
{ #category : #'message sending' } | ||
CoInterpreter >> executeNewMethod: eagerlyCompile [ | ||
"if not primitive, or primitive failed, activate the method" | ||
<inline: true> | ||
| inInterpreter | | ||
inInterpreter := self isInstructionPointerInInterpreter: | ||
instructionPointer. | ||
self executePrimitiveFromInterpreter: inInterpreter ifFail: [ | ||
| methodHeader | | ||
eagerlyCompile ifTrue: [ | ||
"Eagerly compile it if appropriate so that doits are fast." | ||
methodHeader := self rawHeaderOf: newMethod. | ||
(self isCogMethodReference: methodHeader) ifFalse: [ | ||
(self methodWithHeaderShouldBeCogged: methodHeader) | ||
ifTrue: [ | ||
cogit cog: newMethod selector: objectMemory nilObject. | ||
methodHeader := self rawHeaderOf: newMethod ] | ||
ifFalse: [ self maybeFlagMethodAsInterpreted: newMethod ] ]]. | ||
"if not primitive, or primitive failed, activate the method" | ||
self activateNewMethod ] | ||
] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the major change in here, now this method can be parametrised to eagerly compile methods (or not). By default the interpreter will not do it. |
||
{ #category : #'return bytecodes' } | ||
CoInterpreter >> externalAboutToReturn: resultOop through: aContext [ | ||
| ourContext | | ||
|
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.
Good, do not compile on method activation