--- a/compiler/PPCProfilingContext.st Tue May 12 01:24:03 2015 +0100
+++ b/compiler/PPCProfilingContext.st Thu May 21 14:12:22 2015 +0100
@@ -3,7 +3,8 @@
"{ NameSpace: Smalltalk }"
PPCContext subclass:#PPCProfilingContext
- instanceVariableNames:'invocations remembers restores lwRemembers lwRestores totalSize'
+ instanceVariableNames:'invocations remembers restores lwRemembers lwRestores totalSize
+ tokenReads'
classVariableNames:''
poolDictionaries:''
category:'PetitCompiler-Context'
@@ -36,6 +37,8 @@
lwRemembers := OrderedCollection new.
lwRestores := OrderedCollection new.
+ tokenReads := OrderedCollection new.
+
totalSize := 0.
! !
@@ -101,6 +104,18 @@
stream: aStream
totalSize := totalSize + aStream size.
^ super stream: aStream
+!
+
+tokenRead: tokenName
+ tokenReads add: tokenName
+!
+
+tokenReadCount
+ ^ tokenReads size
+!
+
+tokenReads
+ ^ tokenReads
! !
!PPCProfilingContext methodsFor:'reporting'!
@@ -116,6 +131,7 @@
#'lwRestore count' -> self lwRestoreCount.
#'remember count' -> self rememberCount.
#'restore count' -> self restoreCount.
+ #'token read count' -> self tokenReadCount.
}
!