Commits

Ryan Macnak committed e4faac7

Add asserts for number of arguments.

Comments (0)

Files changed (1)

LowLevelMirrorsForSqueak.ns3

 )
 instantiateMethodV3 ^ <CompiledMethod> = (
 
+	assert: [argCount between: 0 and: 15] message: 'Too many arguments'.
+
 	^CompiledMethod
 		newBytes: bytes size
 		trailerBytes: emptyTrailer
 instantiateMethodV4 ^<CompiledMethod> = (
 	| header cmethod |
 	(* Note the header is different in V4 to accommodate larger literal frames. *)
+	assert: [argCount between: 0 and: 15] message: 'Too many arguments'.
+
 	header:: (Smalltalk at: #EncoderForNewsqueakV4) basicNew
 		computeMethodHeaderForNumArgs: argCount
 		numTemps: maxLocals