added numVars & numTemps;
authorClaus Gittinger <cg@exept.de>
Wed, 23 Oct 1996 17:21:45 +0200
changeset 1810 fc151ad836ef
parent 1809 d5f8d427904b
child 1811 8afb43250471
added numVars & numTemps; the old stuff is left for (ST-80) compatibility.
Context.st
--- a/Context.st	Wed Oct 23 15:57:58 1996 +0200
+++ b/Context.st	Wed Oct 23 17:21:45 1996 +0200
@@ -18,7 +18,7 @@
 	category:'Kernel-Methods'
 !
 
-!Context  class methodsFor:'documentation'!
+!Context class methodsFor:'documentation'!
 
 copyright
 "
@@ -157,7 +157,7 @@
 "
 ! !
 
-!Context  class methodsFor:'initialization'!
+!Context class methodsFor:'initialization'!
 
 initialize
     InvalidReturnSignal isNil ifTrue:[
@@ -173,7 +173,7 @@
     "Modified: 6.5.1996 / 16:46:03 / cg"
 ! !
 
-!Context  class methodsFor:'Signal constants'!
+!Context class methodsFor:'Signal constants'!
 
 invalidReturnSignal
     "return the signal used when a method is tried to be returned twice
@@ -190,7 +190,7 @@
     "Created: 6.5.1996 / 16:46:32 / cg"
 ! !
 
-!Context  class methodsFor:'queries'!
+!Context class methodsFor:'queries'!
 
 isBuiltInClass
     "return true if this class is known by the run-time-system.
@@ -239,8 +239,10 @@
 
     |n|
 
-    n := self numArgs + self nvars.
+    n := self numArgs + self numVars.
     ^ (Array new:n) replaceFrom:1 to:n with:self.
+
+    "Modified: 23.10.1996 / 16:19:41 / cg"
 !
 
 home
@@ -348,9 +350,12 @@
 
 ntemp
     "return the number of temporary variables of the Block/Method.
-     (for debugging only)"
+     (for debugging only).
+     I dont like the name of this method; its here for compatibility."
 
-    ^ self size - self numArgs - self nvars
+    ^ self numTemps
+
+    "Modified: 23.10.1996 / 16:19:06 / cg"
 !
 
 numArgs
@@ -362,7 +367,17 @@
 %}
 !
 
-nvars
+numTemps
+    "return the number of temporary variables of the Block/Method.
+     (for debugging only)"
+
+    ^ self size - self numArgs - self numVars
+
+    "Created: 23.10.1996 / 16:19:10 / cg"
+    "Modified: 23.10.1996 / 16:19:48 / cg"
+!
+
+numVars
     "return the number of local variables of the Block/Method"
 
 %{  /* NOCONTEXT */
@@ -371,6 +386,15 @@
 %}
 !
 
+nvars
+    "return the number of local variables of the Block/Method.
+     I dont like the name of this method; its here for compatibility."
+
+    ^ self numVars
+
+    "Modified: 23.10.1996 / 16:18:44 / cg"
+!
+
 receiver
     "return the receiver of the context"
 
@@ -435,9 +459,11 @@
 
     |nonTemps mySize|
 
-    nonTemps := self numArgs + self nvars.
-    mySize := self ntemp.
+    nonTemps := self numArgs + self numVars.
+    mySize := self numTemps.
     ^ (Array new:mySize) replaceFrom:1 to:mySize with:self startingAt:nonTemps+1
+
+    "Modified: 23.10.1996 / 16:20:00 / cg"
 !
 
 unsafeSender
@@ -465,8 +491,10 @@
     |nonVars mySize|
 
     nonVars := self numArgs.
-    mySize := self nvars.
+    mySize := self numVars.
     ^ (Array new:mySize) replaceFrom:1 to:mySize with:self startingAt:nonVars+1
+
+    "Modified: 23.10.1996 / 16:20:06 / cg"
 ! !
 
 !Context methodsFor:'copying'!
@@ -1223,9 +1251,9 @@
     "Modified: 22.6.1996 / 16:31:12 / cg"
 ! !
 
-!Context  class methodsFor:'documentation'!
+!Context class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.65 1996-10-14 10:11:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.66 1996-10-23 15:21:45 cg Exp $'
 ! !
 Context initialize!