Skip to content

Commit

Permalink
Make it work for Pharo11
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep committed Aug 9, 2023
1 parent 038fff6 commit 9fdeb95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Instrumentation/InstrumentationDeactivator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Class {
InstrumentationDeactivator >> value [

<noInstrumentation>
thisProcess shiftLevelDown
Processor activeProcess shiftLevelDown
]
2 changes: 1 addition & 1 deletion src/MethodProxies/MpInstrumentationUnwinder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ MpInstrumentationUnwinder >> receiver: anObject [
MpInstrumentationUnwinder >> value [

<methodProxyCannotWrap>
thisProcess runInMetaLevel: [
Processor activeProcess runInMetaLevel: [
^ handler aboutToReturnWithReceiver: receiver arguments: arguments ]
]
8 changes: 4 additions & 4 deletions src/MethodProxies/MpMethodProxy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ MpMethodProxy >> run: aSelector with: anArrayOfObjects in: aReceiver [
"Do not intercept"

<methodProxyCannotWrap>
(isDisabled or: [ thisProcess isMeta ]) ifTrue: [
(isDisabled or: [ Processor activeProcess isMeta ]) ifTrue: [
^ self
receiver: aReceiver
withArgs: anArrayOfObjects
Expand Down Expand Up @@ -267,7 +267,7 @@ MpMethodProxy >> shouldWrap: aMethod [
MpMethodProxy >> uninstall [

| installedMethod |
thisProcess runInMetaLevel: [
Processor activeProcess runInMetaLevel: [
installedMethod := methodClass
compiledMethodAt: selector
ifAbsent: [ ^ self ].
Expand Down Expand Up @@ -298,7 +298,7 @@ MpMethodProxy >> valueWithReceiver: receiver arguments: arguments [
| result |
"Hooking into user methods to define before actions.
Before actions are not instrumented."
thisProcess runInMetaLevel: [
Processor activeProcess runInMetaLevel: [
handler beforeExecutionWithReceiver: receiver arguments: arguments ].

"Purposely do not use a non-local return.
Expand All @@ -313,7 +313,7 @@ MpMethodProxy >> valueWithReceiver: receiver arguments: arguments [
receiver: receiver
arguments: arguments).

thisProcess runInMetaLevel: [^ handler
Processor activeProcess runInMetaLevel: [^ handler
afterExecutionWithReceiver: receiver
arguments: arguments
returnValue: result]
Expand Down

0 comments on commit 9fdeb95

Please sign in to comment.