VM Maker: VMMaker.oscog-eem.2966.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-eem.2966.mcz

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2966.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.2966
Author: eem
Time: 11 June 2021, 3:26:45.101641 pm
UUID: c2e6bf46-4639-4017-a394-7ffcda07a985
Ancestors: VMMaker.oscog-eem.2965

Add PrimErrInternalError as error #25

=============== Diff against VMMaker.oscog-eem.2965 ===============

Item was changed:
  SharedPool subclass: #VMBasicConstants
  instanceVariableNames: ''
+ classVariableNames: 'BaseHeaderSize BytecodeSetHasExtensions BytesPerOop BytesPerWord COGMTVM COGVM CloneOnGC CloneOnScavenge DisownVMForFFICall DisownVMForThreading DoAssertionChecks DoExpensiveAssertionChecks GCCheckPrimCall GCModeBecome GCModeFreeSpace GCModeFull GCModeImageSegment GCModeIncremental GCModeNewSpace HashMultiplyConstant HashMultiplyMask IMMUTABILITY LowcodeVM MULTIPLEBYTECODESETS NewspeakVM PharoVM PrimErrBadArgument PrimErrBadIndex PrimErrBadMethod PrimErrBadNumArgs PrimErrBadReceiver PrimErrCallbackError PrimErrFFIException PrimErrGenericFailure PrimErrInappropriate PrimErrInternalError PrimErrLimitExceeded PrimErrNamedInternal PrimErrNeedCompaction PrimErrNoCMemory PrimErrNoMemory PrimErrNoModification PrimErrNotFound PrimErrOSError PrimErrObjectIsPinned PrimErrObjectMayMove PrimErrObjectMoved PrimErrObjectNotPinned PrimErrOperationFailed PrimErrUnsupported PrimErrWritePastObject PrimNoErr PrimNumberHandlerMarker PrimNumberNoContextSwitchMarker PrimNumberUnwin
 dMarker SPURVM STACKVM SistaVM TempVectReadBarrier VMBIGENDIAN'
- classVariableNames: 'BaseHeaderSize BytecodeSetHasExtensions BytesPerOop BytesPerWord COGMTVM COGVM CloneOnGC CloneOnScavenge DisownVMForFFICall DisownVMForThreading DoAssertionChecks DoExpensiveAssertionChecks GCCheckPrimCall GCModeBecome GCModeFreeSpace GCModeFull GCModeImageSegment GCModeIncremental GCModeNewSpace HashMultiplyConstant HashMultiplyMask IMMUTABILITY LowcodeVM MULTIPLEBYTECODESETS NewspeakVM PharoVM PrimErrBadArgument PrimErrBadIndex PrimErrBadMethod PrimErrBadNumArgs PrimErrBadReceiver PrimErrCallbackError PrimErrFFIException PrimErrGenericFailure PrimErrInappropriate PrimErrLimitExceeded PrimErrNamedInternal PrimErrNeedCompaction PrimErrNoCMemory PrimErrNoMemory PrimErrNoModification PrimErrNotFound PrimErrOSError PrimErrObjectIsPinned PrimErrObjectMayMove PrimErrObjectMoved PrimErrObjectNotPinned PrimErrOperationFailed PrimErrUnsupported PrimErrWritePastObject PrimNoErr PrimNumberHandlerMarker PrimNumberNoContextSwitchMarker PrimNumberUnwindMarker SPURVM STACKV
 M SistaVM TempVectReadBarrier VMBIGENDIAN'
  poolDictionaries: ''
  category: 'VMMaker-Interpreter'!
 
  !VMBasicConstants commentStamp: '<historical>' prior: 0!
  I am a shared pool for basic constants upon which the VM as a whole depends.
 
  self ensureClassPool.
  self classPool declare: #BytesPerWord from: VMSqueakV3ObjectRepresentationConstants classPool.
  self classPool declare: #BaseHeaderSize from: VMSqueakV3ObjectRepresentationConstants classPool
  (ObjectMemory classPool keys select: [:k| k beginsWith: 'Byte']) do:
  [:k| self classPool declare: k from: ObjectMemory classPool]!

Item was changed:
  ----- Method: VMClass class>>initializePrimitiveErrorCodes (in category 'initialization') -----
  initializePrimitiveErrorCodes
  "Define the VM's primitive error codes.  N.B. these are
  replicated in platforms/Cross/vm/sqVirtualMachine.h."
  "VMClass initializePrimitiveErrorCodes"
  | pet |
  PrimErrTableIndex := 51. "Zero-relative"
  "See SmalltalkImage>>recreateSpecialObjectsArray for the table definition.
  If the table exists and is large enough the corresponding entry is returned as
  the primitive error, otherwise the error is answered numerically."
  pet := Smalltalk specialObjectsArray at: PrimErrTableIndex + 1 ifAbsent: [#()].
  pet isArray ifFalse: [pet := #()].
  PrimNoErr := 0. "for helper methods that need to answer success or an error code."
  PrimErrGenericFailure := pet indexOf: nil ifAbsent: 1.
  PrimErrBadReceiver := pet indexOf: #'bad receiver' ifAbsent: 2.
  PrimErrBadArgument := pet indexOf: #'bad argument' ifAbsent: 3.
  PrimErrBadIndex := pet indexOf: #'bad index' ifAbsent: 4.
  PrimErrBadNumArgs := pet indexOf: #'bad number of arguments' ifAbsent: 5.
  PrimErrInappropriate := pet indexOf: #'inappropriate operation' ifAbsent: 6.
  PrimErrUnsupported := pet indexOf: #'unsupported operation' ifAbsent: 7.
  PrimErrNoModification := pet indexOf: #'no modification' ifAbsent: 8.
  PrimErrNoMemory := pet indexOf: #'insufficient object memory' ifAbsent: 9.
  PrimErrNoCMemory := pet indexOf: #'insufficient C memory' ifAbsent: 10.
  PrimErrNotFound := pet indexOf: #'not found' ifAbsent: 11.
  PrimErrBadMethod := pet indexOf: #'bad method' ifAbsent: 12.
  PrimErrNamedInternal := pet indexOf: #'internal error in named primitive machinery' ifAbsent: 13.
  PrimErrObjectMayMove := pet indexOf: #'object may move' ifAbsent: 14.
  PrimErrLimitExceeded := pet indexOf: #'resource limit exceeded' ifAbsent: 15.
  PrimErrObjectIsPinned := pet indexOf: #'object is pinned' ifAbsent: 16.
  PrimErrWritePastObject := pet indexOf: #'primitive write beyond end of object' ifAbsent: 17.
  PrimErrObjectMoved := pet indexOf: #'object moved' ifAbsent: 18.
  PrimErrObjectNotPinned := pet indexOf: #'object not pinned' ifAbsent: 19.
  PrimErrCallbackError := pet indexOf: #'error in callback' ifAbsent: 20.
  PrimErrOSError := pet indexOf: #'operating system error' ifAbsent: 21.
  PrimErrFFIException := pet indexOf: #'ffi call exception' ifAbsent: 22.
  PrimErrNeedCompaction := pet indexOf: #'heap compaction needed' ifAbsent: 23. "N.B. This is currently an internal error in Spur image segment saving."
+ PrimErrOperationFailed := pet indexOf: #'operation failed' ifAbsent: 24.
+ PrimErrInternalError := pet indexOf: #'internal error' ifAbsent: 25!
- PrimErrOperationFailed := pet indexOf: #'operation failed' ifAbsent: 24!