Skip to content

Commit 45e9354

Browse files
committed
Adds an extension method very high up that ensures that methods that are not bpinstrumented are also not layered anymore
1 parent 73344f3 commit 45e9354

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*Babylonian-Compiler
2+
noteCompilationOf: aSelector meta: isMeta
3+
4+
| theClass method methodHasInstalledInstrumentation sourceIsNotInstrumented |
5+
theClass := isMeta ifTrue: [self class] ifFalse: [self].
6+
method := self>>aSelector.
7+
8+
sourceIsNotInstrumented := (BPCompiler new methodSourceRequiresBPLayers: method getSource) not.
9+
methodHasInstalledInstrumentation := method isContextSMethod and: [method isLayered and: [method allInvolvedLayers = #(bpInstrumented)]].
10+
11+
(sourceIsNotInstrumented and: [methodHasInstalledInstrumentation]) ifTrue: [
12+
method removePartialMethod: (method partialMethodFor: #bpInstrumented)]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"class" : {
3+
},
4+
"instance" : {
5+
"noteCompilationOf:meta:" : "pre 10/8/2020 09:47" } }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
"name" : "ClassDescription" }

0 commit comments

Comments
 (0)