--- a/CompiledCode.st Fri Dec 09 13:57:23 2016 +0100
+++ b/CompiledCode.st Fri Dec 09 13:57:59 2016 +0100
@@ -201,6 +201,32 @@
"
! !
+!CompiledCode methodsFor:'Compatibility-ANSI'!
+
+argumentCount
+ "ANSI alias for numArgs: return the number of arguments, the method expects."
+
+%{ /* NOCONTEXT */
+#ifdef __SCHTEAM__
+ return __c__._RETURN( self.getNumberOfArguments() );
+#else
+ /* made this a primitive to get define in stc.h */
+
+ RETURN (__mkSmallInteger((__intVal(__INST(flags)) & F_NARGS) >> F_NARGSHIFT));
+#endif
+%}.
+ "
+ The old implementation simply counted the arguments from
+ the methods source - new versions include this information
+ in the flag instVar, for more security in #perform:
+ "
+
+ "
+ (Method compiledMethodAt:#source) numArgs
+ (Method compiledMethodAt:#source:) numArgs
+ "
+! !
+
!CompiledCode methodsFor:'Compatibility-ST80'!
getSource
@@ -1692,30 +1718,6 @@
!CompiledCode methodsFor:'queries'!
-argumentCount
- "ANSI alias for numArgs: return the number of arguments, the method expects."
-
-%{ /* NOCONTEXT */
-#ifdef __SCHTEAM__
- return __c__._RETURN( self.getNumberOfArguments() );
-#else
- /* made this a primitive to get define in stc.h */
-
- RETURN (__mkSmallInteger((__intVal(__INST(flags)) & F_NARGS) >> F_NARGSHIFT));
-#endif
-%}.
- "
- The old implementation simply counted the arguments from
- the methods source - new versions include this information
- in the flag instVar, for more security in #perform:
- "
-
- "
- (Method compiledMethodAt:#source) numArgs
- (Method compiledMethodAt:#source:) numArgs
- "
-!
-
decompileTo:aStream
|decompilerClass decompiler|
@@ -1849,7 +1851,8 @@
!
numArgs
- "return the number of arguments, the method expects."
+ "return the number of arguments, the method expects.
+ Please use argumentCount for ANSI compatibility."
%{ /* NOCONTEXT */
#ifdef __SCHTEAM__