CompCode.st
changeset 159 514c749165c3
parent 131 39599c151f30
child 225 7c8e57cc5b13
--- a/CompCode.st	Mon Oct 10 01:29:01 1994 +0100
+++ b/CompCode.st	Mon Oct 10 01:29:28 1994 +0100
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -13,18 +13,17 @@
 ExecutableFunction subclass:#ExecutableCodeObject
        instanceVariableNames:'byteCode literals'
        classVariableNames:'NoByteCodeSignal InvalidByteCodeSignal
-                           InvalidInstructionSignal BadLiteralsSignal
-                           NonBooleanReceiverSignal ArgumentSignal
-                           AnyExecutionErrorSignal'
+			   InvalidInstructionSignal BadLiteralsSignal
+			   NonBooleanReceiverSignal ArgumentSignal'
        poolDictionaries:''
        category:'Kernel-Methods'
 !
 
 ExecutableCodeObject comment:'
 COPYRIGHT (c) 1994 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/CompCode.st,v 1.5 1994-08-22 12:20:34 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/CompCode.st,v 1.6 1994-10-10 00:25:41 claus Exp $
 '!
 
 !ExecutableCodeObject class methodsFor:'documentation'!
@@ -32,7 +31,7 @@
 copyright
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -45,7 +44,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/CompCode.st,v 1.5 1994-08-22 12:20:34 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/CompCode.st,v 1.6 1994-10-10 00:25:41 claus Exp $
 "
 !
 
@@ -56,8 +55,8 @@
 
     Instance variables:
 
-    byteCode    <ByteArray>       bytecode of home method if its an interpreted codeobject
-    literals    <Array>           the blocks literal array
+    byteCode    <ByteArray>       bytecode if its an interpreted codeobject
+    literals    <Array>           the block/methods literal array
 
     NOTICE: layout known by runtime system and compiler - do not change
 "
@@ -67,39 +66,40 @@
 
 initialize
     NoByteCodeSignal isNil ifTrue:[
-        NoByteCodeSignal := (Signal new) mayProceed:true.
-        NoByteCodeSignal notifierString:'nil byteCode in code-object - not executable'.
-        InvalidByteCodeSignal := (Signal new) mayProceed:true.
-        InvalidByteCodeSignal notifierString:'invalid byteCode in code-object - not executable'.
-        InvalidInstructionSignal := (Signal new) mayProceed:true.
-        InvalidInstructionSignal notifierString:'invalid instruction in code-object - not executable'.
-        BadLiteralsSignal := (Signal new) mayProceed:true.
-        BadLiteralsSignal notifierString:'bad literal table in code-object - should not happen'.
-        NonBooleanReceiverSignal := (Signal new) mayProceed:true.
-        NonBooleanReceiverSignal notifierString:'if/while on non-boolean receiver'.
-        ArgumentSignal := (Signal new) mayProceed:true.
-        ArgumentSignal notifierString:'bad argument(s)'.
+	ExecutableFunction initialize.
+
+	NoByteCodeSignal := ExecutionErrorSignal newSignalMayProceed:true.
+	NoByteCodeSignal nameClass:self message:#noByteCodeSignal.
+	NoByteCodeSignal notifierString:'nil byteCode in code-object - not executable'.
+
+	InvalidByteCodeSignal := ExecutionErrorSignal newSignalMayProceed:true.
+	InvalidByteCodeSignal nameClass:self message:#invalidByteCodeSignal.
+	InvalidByteCodeSignal notifierString:'invalid byteCode in code-object - not executable'.
+
+	InvalidInstructionSignal := ExecutionErrorSignal newSignalMayProceed:true.
+	InvalidInstructionSignal nameClass:self message:#invalidInstructionSignal.
+	InvalidInstructionSignal notifierString:'invalid instruction in code-object - not executable'.
+
+	BadLiteralsSignal := ExecutionErrorSignal newSignalMayProceed:true.
+	BadLiteralsSignal nameClass:self message:#badLiteralsSignal.
+	BadLiteralsSignal notifierString:'bad literal table in code-object - should not happen'.
+
+	NonBooleanReceiverSignal := ExecutionErrorSignal newSignalMayProceed:true.
+	NonBooleanReceiverSignal nameClass:self message:#nonBooleanReceiverSignal.
+	NonBooleanReceiverSignal notifierString:'if/while on non-boolean receiver'.
+
+	ArgumentSignal := ExecutionErrorSignal newSignalMayProceed:true.
+	ArgumentSignal nameClass:self message:#argumentSignal.
+	ArgumentSignal notifierString:'bad argument(s)'.
     ]
 ! !
 
 !ExecutableCodeObject class methodsFor:'signal access'!
 
-anyExecutionErrorSignal
-    "return a signalSet with any execution signal.
-     This allows easy handling (catching) of execution errors
-     in end-user applications."
+executionErrorSignal
+    "return the parent-signal of all execution errors"
 
-    AnyExecutionErrorSignal isNil ifTrue:[
-        AnyExecutionErrorSignal := SignalSet new.
-        AnyExecutionErrorSignal add:ArgumentSignal;
-                                add:NonBooleanReceiverSignal;
-                                add:BadLiteralsSignal;
-                                add:InvalidInstructionSignal;
-                                add:InvalidByteCodeSignal;
-                                add:NoByteCodeSignal;
-                                add:InvalidCodeSignal.
-    ].
-    ^ AnyExecutionErrorSignal
+    ^ ExecutionErrorSignal
 !
 
 argumentSignal
@@ -197,8 +197,8 @@
      if the compiler has been changed without updating the VM."
 
     ^ ArgumentSignal
-        raiseRequestWith:self
-        errorString:'too many args in send'
+	raiseRequestWith:self
+	errorString:'too many args in send'
 !
 
 badArgumentArray
@@ -206,6 +206,6 @@
      or #value:with:."
 
     ^ ArgumentSignal
-        raiseRequestWith:self
-        errorString:'argumentArray must be an Array'
+	raiseRequestWith:self
+	errorString:'argumentArray must be an Array'
 ! !