InstrumentingCompiler.st
changeset 2570 f0b8fc6cdabb
parent 2569 e9fcb54ac3d4
child 2571 b441a3fc0ce6
equal deleted inserted replaced
2569:e9fcb54ac3d4 2570:f0b8fc6cdabb
   380 
   380 
   381 !InstrumentingCompiler::StatementExecutionInfo methodsFor:'cleanup'!
   381 !InstrumentingCompiler::StatementExecutionInfo methodsFor:'cleanup'!
   382 
   382 
   383 cleanInfo
   383 cleanInfo
   384     count := 0.
   384     count := 0.
   385     Smalltalk changed:#methodTrap with:owningMethod.
   385     Smalltalk changed:#methodCoverageInfo with:owningMethod.
   386 
   386 
   387     "Modified: / 20-07-2011 / 17:54:27 / cg"
   387     "Modified: / 20-07-2011 / 17:55:49 / cg"
   388 ! !
   388 ! !
   389 
   389 
   390 !InstrumentingCompiler::StatementExecutionInfo methodsFor:'instrumentation calls'!
   390 !InstrumentingCompiler::StatementExecutionInfo methodsFor:'instrumentation calls'!
   391 
   391 
   392 entry:callingContext
   392 entry:callingContext
   399     count == 1 ifTrue:[
   399     count == 1 ifTrue:[
   400         "/ the very first time, send a change notification
   400         "/ the very first time, send a change notification
   401         p := Processor activeProcess.
   401         p := Processor activeProcess.
   402         (p environmentAt:#inInstrument ifAbsent:false) ifFalse:[
   402         (p environmentAt:#inInstrument ifAbsent:false) ifFalse:[
   403             p withThreadVariable:#inInstrument boundTo:true do:[
   403             p withThreadVariable:#inInstrument boundTo:true do:[
   404                 Smalltalk changed:#methodTrap with:owningMethod.
   404                 Smalltalk changed:#methodCoverageInfo with:owningMethod.
   405             ].
   405             ].
   406         ]
   406         ]
   407     ].
   407     ].
   408 
   408 
   409     "Created: / 23-06-2006 / 13:31:16 / cg"
   409     "Created: / 23-06-2006 / 13:31:16 / cg"
   410     "Modified: / 20-07-2011 / 17:53:40 / cg"
   410     "Modified: / 20-07-2011 / 17:56:06 / cg"
   411 ! !
   411 ! !
   412 
   412 
   413 !InstrumentingCompiler::StatementExecutionInfo methodsFor:'queries'!
   413 !InstrumentingCompiler::StatementExecutionInfo methodsFor:'queries'!
   414 
   414 
   415 hasBeenExecuted
   415 hasBeenExecuted
   484 
   484 
   485 !InstrumentingCompiler::MethodInvocationInfo methodsFor:'cleanup'!
   485 !InstrumentingCompiler::MethodInvocationInfo methodsFor:'cleanup'!
   486 
   486 
   487 cleanInfo
   487 cleanInfo
   488     infoPerReceiverClass := nil.
   488     infoPerReceiverClass := nil.
   489     Smalltalk changed:#methodTrap with:owningMethod.
   489     Smalltalk changed:#methodCoverageInfo with:owningMethod.
   490 
   490 
   491     "Modified: / 20-07-2011 / 17:54:34 / cg"
   491     "Modified: / 20-07-2011 / 17:55:35 / cg"
   492 ! !
   492 ! !
   493 
   493 
   494 !InstrumentingCompiler::MethodInvocationInfo methodsFor:'instrumentation probe calls'!
   494 !InstrumentingCompiler::MethodInvocationInfo methodsFor:'instrumentation probe calls'!
   495 
   495 
   496 entry:aContext
   496 entry:aContext
   513                                           MethodInvocationInfoPerReceiverClass new ].
   513                                           MethodInvocationInfoPerReceiverClass new ].
   514         infoPerReceiver entry:aContext.
   514         infoPerReceiver entry:aContext.
   515 
   515 
   516         "/ the very first time, send a change notification
   516         "/ the very first time, send a change notification
   517         firstEntry ifTrue:[
   517         firstEntry ifTrue:[
   518             Smalltalk changed:#methodTrap with:owningMethod.
   518             Smalltalk changed:#methodCoverageInfo with:owningMethod.
   519         ]
   519         ]
   520     ]
   520     ]
   521 
   521 
   522     "Modified: / 20-07-2011 / 17:54:08 / cg"
   522     "Modified: / 20-07-2011 / 17:55:56 / cg"
   523 ! !
   523 ! !
   524 
   524 
   525 !InstrumentingCompiler::MethodInvocationInfo::MethodInvocationInfoPerReceiverClass methodsFor:'accessing'!
   525 !InstrumentingCompiler::MethodInvocationInfo::MethodInvocationInfoPerReceiverClass methodsFor:'accessing'!
   526 
   526 
   527 callingMethodsDo:aBlock
   527 callingMethodsDo:aBlock
   672     "Created: / 28-04-2010 / 15:54:47 / cg"
   672     "Created: / 28-04-2010 / 15:54:47 / cg"
   673 ! !
   673 ! !
   674 
   674 
   675 !InstrumentingCompiler class methodsFor:'documentation'!
   675 !InstrumentingCompiler class methodsFor:'documentation'!
   676 
   676 
       
   677 version
       
   678     ^ '$Header: /cvs/stx/stx/libcomp/InstrumentingCompiler.st,v 1.9 2011-07-20 15:56:29 cg Exp $'
       
   679 !
       
   680 
   677 version_CVS
   681 version_CVS
   678     ^ '$Header: /cvs/stx/stx/libcomp/InstrumentingCompiler.st,v 1.8 2011-07-20 15:55:15 cg Exp $'
   682     ^ '$Header: /cvs/stx/stx/libcomp/InstrumentingCompiler.st,v 1.9 2011-07-20 15:56:29 cg Exp $'
   679 ! !
   683 ! !