comments
authorClaus Gittinger <cg@exept.de>
Fri, 30 Sep 2011 12:29:09 +0200
changeset 2715 10a744f8ce68
parent 2714 8137c609a40e
child 2716 03d18ad629e6
comments
InstrumentingCompiler.st
--- a/InstrumentingCompiler.st	Fri Sep 30 12:28:51 2011 +0200
+++ b/InstrumentingCompiler.st	Fri Sep 30 12:29:09 2011 +0200
@@ -42,6 +42,13 @@
 	privateIn:InstrumentingCompiler
 !
 
+InstrumentingCompiler::StatementExecutionInfo subclass:#VariableAccessExecutionInfo
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:InstrumentingCompiler
+!
+
 InstrumentingCompiler::StatementExecutionInfo subclass:#BlockExecutionInfo
 	instanceVariableNames:'endPosition'
 	classVariableNames:''
@@ -49,6 +56,20 @@
 	privateIn:InstrumentingCompiler
 !
 
+InstrumentingCompiler::VariableAccessExecutionInfo subclass:#ReadAccessExecutionInfo
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:InstrumentingCompiler
+!
+
+InstrumentingCompiler::VariableAccessExecutionInfo subclass:#WriteAccessExecutionInfo
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:InstrumentingCompiler
+!
+
 !InstrumentingCompiler class methodsFor:'documentation'!
 
 documentation
@@ -237,9 +258,19 @@
     "Modified: / 07-08-2011 / 15:32:45 / cg"
 ! !
 
-!InstrumentingCompiler methodsFor:'code generation-hooks'!
+!InstrumentingCompiler methodsFor:'code generation hooks'!
+
+assignmentRewriteHookFor:anAssignmentNode
+    "invoked whenever an assignment node has been generated"
+
+    ^ anAssignmentNode
+
+    "Created: / 30-09-2011 / 12:28:09 / cg"
+!
 
 blockNodeRewriteHookFor:aBlockNode
+    "invoked whenever a block node has been generated"
+
     "/ add a counter for the block
     self addBlockCounterTo:aBlockNode.
     ^ aBlockNode
@@ -248,6 +279,8 @@
 !
 
 messageNodeRewriteHookFor:aMessageNode
+    "invoked whenever a message send node has been generated"
+
 "/ see blockNodeRewriter...
 
 "/    "/ argument could be a constantNode (due to contant-folding optimization)
@@ -268,9 +301,12 @@
 
     "Created: / 27-04-2010 / 11:43:22 / cg"
     "Modified: / 28-04-2010 / 14:22:05 / cg"
+    "Modified (comment): / 30-09-2011 / 12:16:56 / cg"
 !
 
 startCodeGenerationHookOn:codeStream
+    "invoked before code is generated"
+
     methodEntryInfo := self methodInvocationInfoInstance.
 
     (StatementNode 
@@ -281,9 +317,12 @@
             codeForSideEffectOn:codeStream inBlock:nil for:self.
 
     "Modified: / 07-08-2011 / 15:34:09 / cg"
+    "Modified (comment): / 30-09-2011 / 12:16:05 / cg"
 !
 
 statementListRewriteHookFor:firstStatement
+    "invoked whenever a statement list node has been generated"
+
     "/ care for blocks which return...
     |thisStatement prevStatement countStatement mustInsertExecutionInfo|
 
@@ -314,6 +353,16 @@
         prevStatement := thisStatement.
         thisStatement := thisStatement nextStatement.
     ].
+
+    "Modified (comment): / 30-09-2011 / 12:15:52 / cg"
+!
+
+variableReadRewriteHookFor:aVariableNode
+    "invoked whenever a variable access node has been generated"
+
+    ^ aVariableNode
+
+    "Created: / 30-09-2011 / 12:27:47 / cg"
 ! !
 
 !InstrumentingCompiler methodsFor:'redefinable'!
@@ -345,6 +394,14 @@
     "Created: / 07-08-2011 / 15:32:36 / cg"
 ! !
 
+!InstrumentingCompiler::StatementExecutionInfo class methodsFor:'documentation'!
+
+documentation
+"
+    (sub)instances of me are updated by instrumented code when statements are executed.
+"
+! !
+
 !InstrumentingCompiler::StatementExecutionInfo methodsFor:'accessing'!
 
 callCount
@@ -708,6 +765,22 @@
     "Created: / 24-08-2011 / 11:10:29 / cg"
 ! !
 
+!InstrumentingCompiler::VariableAccessExecutionInfo class methodsFor:'documentation'!
+
+documentation
+"
+    (sub)instances of me are updated by instrumented code when a variable is accessed
+"
+! !
+
+!InstrumentingCompiler::BlockExecutionInfo class methodsFor:'documentation'!
+
+documentation
+"
+    (sub)instances of me are updated by instrumented code when a block is executed.
+"
+! !
+
 !InstrumentingCompiler::BlockExecutionInfo methodsFor:'accessing'!
 
 endPosition
@@ -743,12 +816,28 @@
     "Created: / 07-08-2011 / 17:06:39 / cg"
 ! !
 
+!InstrumentingCompiler::ReadAccessExecutionInfo class methodsFor:'documentation'!
+
+documentation
+"
+    (sub)instances of me are updated by instrumented code when a variable is read
+"
+! !
+
+!InstrumentingCompiler::WriteAccessExecutionInfo class methodsFor:'documentation'!
+
+documentation
+"
+    (sub)instances of me are updated by instrumented code when a variable is written
+"
+! !
+
 !InstrumentingCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/InstrumentingCompiler.st,v 1.16 2011-09-30 09:59:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/InstrumentingCompiler.st,v 1.17 2011-09-30 10:29:09 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/InstrumentingCompiler.st,v 1.16 2011-09-30 09:59:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/InstrumentingCompiler.st,v 1.17 2011-09-30 10:29:09 cg Exp $'
 ! !