--- a/Block.st Fri Jun 23 11:48:13 2017 +0200
+++ b/Block.st Fri Jun 23 16:21:34 2017 +0200
@@ -17,7 +17,7 @@
CompiledCode variableSubclass:#Block
instanceVariableNames:'home nargs sourcePos initialPC'
- classVariableNames:'InvalidNewSignal'
+ classVariableNames:''
poolDictionaries:''
category:'Kernel-Methods'
!
@@ -335,20 +335,6 @@
"
! !
-!Block class methodsFor:'initialization'!
-
-initialize
- "create signals raised by various errors"
-
- InvalidNewSignal isNil ifTrue:[
- InvalidNewSignal := Error newSignalMayProceed:false.
- InvalidNewSignal nameClass:self message:#invalidNewSignal.
- InvalidNewSignal notifierString:'blocks are only created by the system'.
- ]
-
- "Modified: 22.4.1996 / 16:34:20 / cg"
-! !
-
!Block class methodsFor:'instance creation'!
byteCode:bCode numArgs:numArgs numStack:nStack sourcePosition:sourcePos initialPC:initialPC literals:literals
@@ -363,17 +349,15 @@
"create a new cheap (homeless) block.
Not for public use - this is a special hook for the compiler."
- |newBlock|
-
- newBlock := (super basicNew:(literals size))
- byteCode:bCode
- numArgs:numArgs
- numVars:numVars
- numStack:nStack
- sourcePosition:sourcePos
- initialPC:initialPC
- literals:literals.
- ^ newBlock
+ ^ (self basicNew:literals size)
+ byteCode:bCode
+ numArgs:numArgs
+ numVars:numVars
+ numStack:nStack
+ sourcePosition:sourcePos
+ initialPC:initialPC
+ literals:literals;
+ yourself.
"Modified: 24.6.1996 / 12:36:48 / stefan"
"Created: 13.4.1997 / 00:04:09 / cg"
@@ -384,13 +368,13 @@
If you really need a block (assuming, you are some compiler),
use basicNew and setup the instance carefully"
- ^ InvalidNewSignal raise.
+ ^ MethodNotAppropriateError raiseErrorString:'blocks are only created by the system'.
!
new:size
"catch creation of blocks - only the system creates blocks"
- ^ InvalidNewSignal raise.
+ ^ MethodNotAppropriateError raiseErrorString:'blocks are only created by the system'.
! !
!Block class methodsFor:'queries'!
@@ -405,7 +389,6 @@
! !
-
!Block methodsFor:'Compatibility-ANSI'!
argumentCount
@@ -685,8 +668,6 @@
"Created: / 28-08-2010 / 14:41:15 / cg"
! !
-
-
!Block methodsFor:'accessing'!
home
@@ -3388,5 +3369,3 @@
^ '$Header$'
! !
-
-Block initialize!