[Vm-dev] [commit][3561] CogVM source as per VMMaker.oscog-eem.1646

commits at squeakvm.org commits at squeakvm.org
Sun Jan 17 03:12:10 UTC 2016


Revision: 3561
Author:   eliot
Date:     2016-01-16 19:12:08 -0800 (Sat, 16 Jan 2016)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1646

Add a 64-bit Newspeak Cog Spur configuration.


Fix the Unix vm makefile for 64 bits.  It must not specify the
processor-specific cogit files because they differ on 64-bit and
32-bit platforms.  instead it can only specify cogit.c, the umbrella
that includes the relevant cogitFOO.c.

Modified Paths:
--------------
    branches/Cog/platforms/unix/vm/Makefile.in

Added Paths:
-----------
    branches/Cog/nsspur64src/
    branches/Cog/nsspur64src/examplePlugins.ext
    branches/Cog/nsspur64src/examplePlugins.int
    branches/Cog/nsspur64src/vm/
    branches/Cog/nsspur64src/vm/cogit.c
    branches/Cog/nsspur64src/vm/cogit.h
    branches/Cog/nsspur64src/vm/cogitX64.c
    branches/Cog/nsspur64src/vm/cogmethod.h
    branches/Cog/nsspur64src/vm/cointerp.c
    branches/Cog/nsspur64src/vm/cointerp.h
    branches/Cog/nsspur64src/vm/exampleSqNamedPrims.h
    branches/Cog/nsspur64src/vm/gcc3x-cointerp.c
    branches/Cog/nsspur64src/vm/interp.h
    branches/Cog/nsspur64src/vm/nssendcache.h
    branches/Cog/nsspur64src/vm/vmCallback.h

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Added: branches/Cog/nsspur64src/examplePlugins.ext
===================================================================
--- branches/Cog/nsspur64src/examplePlugins.ext	                        (rev 0)
+++ branches/Cog/nsspur64src/examplePlugins.ext	2016-01-17 03:12:08 UTC (rev 3561)
@@ -0,0 +1,4 @@
+# This is an example external plugin list.
+# Edit plugins.ext in vm build dir to specify the external plugins to be built.
+EXTERNAL_PLUGINS = \
+SqueakSSL

Added: branches/Cog/nsspur64src/examplePlugins.int
===================================================================
--- branches/Cog/nsspur64src/examplePlugins.int	                        (rev 0)
+++ branches/Cog/nsspur64src/examplePlugins.int	2016-01-17 03:12:08 UTC (rev 3561)
@@ -0,0 +1,28 @@
+# This is an example internal plugin list.
+# Edit plugins.int in vm build dir to specify internal plugins to be built and
+# linked into the vm.
+INTERNAL_PLUGINS = \
+AsynchFilePlugin \
+BMPReadWriterPlugin \
+B2DPlugin \
+BitBltPlugin \
+DSAPrims \
+DropPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+ZipPlugin \
+JPEGReadWriter2Plugin \
+JPEGReaderPlugin \
+LargeIntegers \
+Matrix2x3Plugin \
+MiscPrimitivePlugin \
+IA32ABI \
+RePlugin \
+SecurityPlugin \
+SocketPlugin \
+SurfacePlugin \
+UUIDPlugin \
+UnixOSProcessPlugin \
+VMProfileMacSupportPlugin

Added: branches/Cog/nsspur64src/vm/cogit.c
===================================================================
--- branches/Cog/nsspur64src/vm/cogit.c	                        (rev 0)
+++ branches/Cog/nsspur64src/vm/cogit.c	2016-01-17 03:12:08 UTC (rev 3561)
@@ -0,0 +1,12 @@
+/* Automatically generated by
+	Cogit VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026
+ */
+
+#if defined(x86_64) || defined(__amd64) || defined(__x86_64) || defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
+
+#	include "cogitX64.c"
+
+#else
+#	error As yet no Cogit implementation appears to exist for your platform.
+#	error Consider implementing it, starting by adding a subclass of CogAbstractInstruction.
+#endif

Added: branches/Cog/nsspur64src/vm/cogit.h
===================================================================
--- branches/Cog/nsspur64src/vm/cogit.h	                        (rev 0)
+++ branches/Cog/nsspur64src/vm/cogit.h	2016-01-17 03:12:08 UTC (rev 3561)
@@ -0,0 +1,154 @@
+/* Automatically generated by
+	CCodeGenerator VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026
+ */
+
+
+/*** Function Prototypes ***/
+
+
+#if !PRODUCTION && defined(PlatformNoDbgRegParms)
+# define NoDbgRegParms PlatformNoDbgRegParms
+#endif
+
+#if !defined(NoDbgRegParms)
+# define NoDbgRegParms /*empty*/
+#endif
+
+
+
+#if !defined(NeverInline)
+# define NeverInline /*empty*/
+#endif
+
+extern sqInt abortOffset(void);
+extern void addCogMethodsToHeapMap(void);
+extern sqInt bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
+extern void callCogCodePopReceiver(void);
+extern void callCogCodePopReceiverAndClassRegs(void);
+extern sqInt ceCPICMissreceiver(CogMethod *cPIC, sqInt receiver);
+extern sqInt ceSICMiss(sqInt receiver);
+extern void checkAssertsEnabledInCogit(void);
+extern sqInt checkIntegrityOfObjectReferencesInCode(sqInt gcModes);
+extern char * codeEntryFor(char *address);
+extern char * codeEntryNameFor(char *address);
+extern sqInt cogCodeBase(void);
+extern sqInt cogCodeConstituents(void);
+extern void cogitPostGCAction(sqInt gcMode);
+extern sqInt cogMethodDoesntLookKosher(CogMethod *cogMethod);
+extern CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs);
+extern CogMethod * cogselector(sqInt aMethodObj, sqInt aSelectorOop);
+extern void compactCogCompiledCode(void);
+extern sqInt defaultCogCodeSize(void);
+extern void enterCogCodePopReceiver(void);
+extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod);
+extern void followForwardedLiteralsIn(CogMethod *cogMethod);
+extern void followForwardedMethods(void);
+extern void freeUnmarkedMachineCode(void);
+extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress);
+extern sqInt isPCWithinMethodZone(void *address);
+extern sqInt isSendReturnPC(sqInt retpc);
+extern void linkNSSendCacheclassTagenclosingObjecttargetcaller(NSSendCache *nsSendCache, sqInt classTag, sqInt enclosingObject, CogMethod *targetMethod, CogMethod *callingMethod);
+extern void linkSendAtintooffsetreceiver(sqInt callSiteReturnAddress, CogMethod *sendingMethod, CogMethod *targetMethod, sqInt theEntryOffset, sqInt receiver);
+extern void mapObjectReferencesInMachineCode(sqInt gcMode);
+extern void markAndTraceMachineCodeOfMarkedMethods(void);
+extern void markMethodAndReferents(CogBlockMethod *aCogMethod);
+extern usqInt maxCogMethodAddress(void);
+extern usqInt mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
+extern sqInt minCogMethodAddress(void);
+extern sqInt mnuOffset(void);
+extern sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
+extern void printCogMethodFor(void *address);
+extern void printTrampolineTable(void);
+extern sqInt recordPrimTraceFunc(void);
+extern void setBreakMethod(sqInt anObj);
+extern void setPostCompileHook(void (*aFunction)(CogMethod *));
+extern void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);
+extern sqInt traceLinkedSendOffset(void);
+extern void unlinkAllSends(void);
+extern void unlinkSendsLinkedForInvalidClasses(void);
+extern void unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector);
+extern void unlinkSendsToFree(void);
+extern void unlinkSendsToandFreeIf(sqInt targetMethodObject, sqInt freeIfTrue);
+extern void addAllToYoungReferrers(void);
+extern void freeMethod(CogMethod *cogMethod);
+extern CogMethod * methodFor(void *address);
+extern sqInt numMethodsOfType(sqInt cogMethodType);
+extern void printCogMethods(void);
+extern void printCogMethodsOfType(sqInt cmType);
+extern void printCogMethodsWithMethod(sqInt methodOop);
+extern void printCogMethodsWithPrimitive(sqInt primIdx);
+extern void printCogMethodsWithSelector(sqInt selectorOop);
+extern void printCogYoungReferrers(void);
+extern void printOpenPICList(void);
+extern char * whereIsMaybeCodeThing(sqInt anOop);
+extern sqInt numRegArgs(void);
+extern sqInt genQuickReturnConst(void);
+extern sqInt genQuickReturnInstVar(void);
+extern sqInt genQuickReturnSelf(void);
+extern void recordCallOffsetIn(CogMethod *cogMethod);
+extern void rewritePrimInvocationInto(CogMethod *cogMethod, void (*primFunctionPointer)(void));
+extern void voidCogCompiledCode(void);
+extern void callCogCodePopReceiverArg0Regs(void);
+extern void callCogCodePopReceiverArg1Arg0Regs(void);
+
+
+/*** Global Variables ***/
+VM_EXPORT sqInt blockNoContextSwitchOffset;
+VM_EXPORT sqInt breakPC;
+VM_EXPORT void * CFramePointer;
+VM_EXPORT void * CStackPointer;
+VM_EXPORT sqInt ceBaseFrameReturnTrampoline;
+VM_EXPORT void (*ceCall0ArgsPIC)(void);
+VM_EXPORT void (*ceCall1ArgsPIC)(void);
+VM_EXPORT void (*ceCall2ArgsPIC)(void);
+VM_EXPORT void (*ceCallCogCodePopReceiverAndClassRegs)(void);
+VM_EXPORT void (*ceCallCogCodePopReceiverArg0Regs)(void);
+VM_EXPORT void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void);
+VM_EXPORT void (*ceCallCogCodePopReceiverReg)(void);
+VM_EXPORT sqInt ceCannotResumeTrampoline;
+VM_EXPORT void (*ceCaptureCStackPointers)(void);
+VM_EXPORT sqInt ceCheckForInterruptTrampoline;
+VM_EXPORT void (*ceEnterCogCodePopReceiverReg)(void);
+VM_EXPORT unsigned long (*ceGetFP)(void);
+VM_EXPORT unsigned long (*ceGetSP)(void);
+VM_EXPORT sqInt ceReturnToInterpreterTrampoline;
+VM_EXPORT unsigned long (*ceTryLockVMOwner)(void);
+VM_EXPORT void (*ceUnlockVMOwner)(void);
+VM_EXPORT sqInt cFramePointerInUse;
+VM_EXPORT sqInt cmEntryOffset;
+VM_EXPORT sqInt cmNoCheckEntryOffset;
+VM_EXPORT unsigned long debugPrimCallStackOffset;
+VM_EXPORT sqInt missOffset;
+VM_EXPORT void (*realCECallCogCodePopReceiverAndClassRegs)(void);
+VM_EXPORT void (*realCECallCogCodePopReceiverArg0Regs)(void);
+VM_EXPORT void (*realCECallCogCodePopReceiverArg1Arg0Regs)(void);
+VM_EXPORT void (*realCECallCogCodePopReceiverReg)(void);
+VM_EXPORT void (*realCEEnterCogCodePopReceiverReg)(void);
+VM_EXPORT int traceFlags ;
+VM_EXPORT sqInt traceStores;
+
+
+/*** Macros ***/
+#define blockAlignment(self) 8
+#define breakOnImplicitReceiver() (traceFlags & 64)
+#define ceBaseFrameReturnPC() ceBaseFrameReturnTrampoline
+#define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline)
+#define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline)
+#define compileSendTrace() (traceFlags & 2)
+#define entryOffset() cmEntryOffset
+#define getCFramePointer() CFramePointer
+#define getCStackPointer() CStackPointer
+#define interpretOffset() missOffset
+#define noCheckEntryOffset() cmNoCheckEntryOffset
+#define noContextSwitchBlockEntryOffset() blockNoContextSwitchOffset
+#define printOnTrace() (traceFlags & 1)
+#define recordBlockTrace() (traceFlags & 4)
+#define recordEventTrace() (traceFlags & 16)
+#define recordOverflowTrace() (traceFlags & 32)
+#define recordPrimTrace() (traceFlags & 8)
+#define recordSendTrace() (traceFlags & 2)
+#define setCFramePointer(theFP) (CFramePointer = (void *)(theFP))
+#define setCStackPointer(theSP) (CStackPointer = (void *)(theSP))
+#define tryLockVMOwner() (ceTryLockVMOwner() != 0)
+#define unlockVMOwner() ceUnlockVMOwner()
+

Added: branches/Cog/nsspur64src/vm/cogitX64.c
===================================================================
--- branches/Cog/nsspur64src/vm/cogitX64.c	                        (rev 0)
+++ branches/Cog/nsspur64src/vm/cogitX64.c	2016-01-17 03:12:08 UTC (rev 3561)
@@ -0,0 +1,27342 @@
+/* Automatically generated by
+	CCodeGenerator VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026
+   from
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026
+ */
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026 " __DATE__ ;
+char *__cogitBuildInfo = __buildInfo;
+
+
+
+#include <stddef.h>
+#include "sq.h"
+#include "sqCogStackAlignment.h"
+#include "dispdbg.h"
+#include "cogmethod.h"
+#include "nssendcache.h"
+#if COGMTVM
+#include "cointerpmt.h"
+#else
+#include "cointerp.h"
+#endif
+#include "cogit.h"
+
+typedef struct _AbstractInstruction {
+	unsigned char	opcode;
+	unsigned char	machineCodeSize;
+	unsigned char	maxSize;
+	unsigned char	annotation;
+	unsigned long		operands [3];
+	unsigned long	address;
+	struct _AbstractInstruction *dependent;
+	unsigned char		machineCode [14];
+ } AbstractInstruction;
+
+#define CogInLineLiteralsX64Compiler AbstractInstruction
+#define CogX64Compiler AbstractInstruction
+#define CogAbstractInstruction AbstractInstruction
+
+
+typedef struct {
+	AbstractInstruction *fakeHeader;
+	AbstractInstruction *fillInstruction;
+	sqInt	numArgs;
+	sqInt	numCopied;
+	sqInt	numInitialNils;
+	sqInt	startpc;
+	AbstractInstruction *entryLabel;
+	AbstractInstruction *stackCheckLabel;
+	sqInt	span;
+	sqInt	hasInstVarRef;
+ } BlockStart;
+
+#define CogBlockStart BlockStart
+
+
+typedef struct _BytecodeDescriptor {
+	sqInt (*generator )(void);
+	sqInt (*spanFunction )(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt);
+	sqInt (*needsFrameFunction )(sqInt);
+	signed char	stackDelta;
+	unsigned char	opcode;
+	unsigned char	numBytes;
+	unsigned		isBranchTrue : 1;
+	unsigned		isBranchFalse : 1;
+	unsigned		isReturn : 1;
+	unsigned		isBlockCreation : 1;
+	unsigned		isMapped : 1;
+	unsigned		isMappedInBlock : 1;
+	unsigned		isExtension : 1;
+	unsigned		isInstVarRef : 1;
+	unsigned		hasIRC : 1;
+ } BytecodeDescriptor;
+
+#define CogBytecodeDescriptor BytecodeDescriptor
+
+
+typedef struct {
+	sqInt (*primitiveGenerator )(void);
+	sqInt	primNumArgs;
+ } PrimitiveDescriptor;
+
+#define CogPrimitiveDescriptor PrimitiveDescriptor
+
+
+typedef struct {
+	AbstractInstruction *targetInstruction;
+	sqInt	instructionIndex;
+	sqInt	simStackPtr;
+ } BytecodeFixup;
+
+#define CogSSBytecodeFixup BytecodeFixup
+#define CogBytecodeFixup BytecodeFixup
+
+
+typedef struct {
+	char	type;
+	char	spilled;
+	char	annotateUse;
+	sqInt	registerr;
+	sqInt	offset;
+	sqInt	constant;
+	sqInt	bcptr;
+ } CogSimStackEntry;
+
+
+typedef struct {
+	sqInt	isReceiverResultRegLive;
+	CogSimStackEntry *ssEntry;
+ } CogSSOptStatus;
+
+
+
+/*** Constants ***/
+#define ABI SysV
+#define AddCqR 95
+#define AddCwR 103
+#define AddRdRd 110
+#define AddRR 89
+#define AlignmentNops 3
+#define AltBlockCreationBytecodeSize 3
+#define AltFirstSpecialSelector 80
+#define AltNumSpecialSelectors 32
+#define AndCqR 97
+#define AndCqRR 108
+#define AndCwR 105
+#define AndRR 91
+#define AnnotationShift 5
+#define Arg0Reg 7
+#define Arg1Reg 6
+#define ArithmeticShiftRightCqR 80
+#define ArithmeticShiftRightRR 81
+#define BadRegisterSet 1
+#define BlockCreationBytecodeSize 4
+#define BytecodeSetHasDirectedSuperSend 0
+#define Call 6
+#define CallFull 7
+#define CDQ 116
+#define ClassArrayCompactIndex 51
+#define ClassBlockClosureCompactIndex 37
+#define ClassFloatCompactIndex 34
+#define ClassMethodContextCompactIndex 36
+#define ClassReg 1
+#define ClosureFirstCopiedValueIndex 3
+#define ClosureIndex 4
+#define ClosureNumArgsIndex 2
+#define ClosureOuterContextIndex 0
+#define ClosureStartPCIndex 1
+#define CMBlock 3
+#define CMClosedPIC 4
+#define CMFree 1
+#define CMMaxUsageCount 7
+#define CMMethod 2
+#define CMOpenPIC 5
+#define CmpC32R 102
+#define CmpCqR 94
+#define CmpCwR 101
+#define CmpRdRd 109
+#define CmpRR 88
+#define CompletePrimitive 4
+#define ConstZero 1
+#define ConvertRRd 115
+#define Debug DEBUGVM
+#define DisplacementMask 0x1F
+#define DisplacementX2N 0
+#define DivRdRd 113
+#define DPFPReg0 0
+#define DPFPReg1 1
+#define DPFPReg2 2
+#define EncounteredUnknownBytecode -6
+#define Fill32 4
+#define FirstAnnotation 64
+#define FirstJump 11
+#define FirstShortJump 15
+#define FirstSpecialSelector 176
+#define FoxCallerSavedIP 8
+#define FoxMethod -8
+#define FoxMFReceiver -24
+#define FoxSavedFP 0
+#define FoxThisContext -16
+#define FPReg 5
+#define GCModeBecome 8
+#define GCModeFull 1
+#define GCModeNewSpace 2
+#define HasBytecodePC 4
+#define HeaderIndex 0
+#define IDIVR 117
+#define IMMUTABILITY 0
+#define IMULRR 118
+#define InstanceSpecificationIndex 2
+#define InstructionPointerIndex 1
+#define InsufficientCodeSpace -2
+#define IsAbsPCReference 3
+#define IsAnnotationExtension 1
+#define IsDirectedSuperSend 9
+#define IsDisplacementX2N 0
+#define IsNSDynamicSuperSend 11
+#define IsNSSelfSend 10
+#define IsNSSendCall 6
+#define IsObjectReference 2
+#define IsRelativeCall 5
+#define IsSendCall 7
+#define IsSuperSend 8
+#define Jump 15
+#define JumpAbove 30
+#define JumpAboveOrEqual 29
+#define JumpBelow 28
+#define JumpBelowOrEqual 31
+#define JumpCarry 22
+#define JumpFPEqual 32
+#define JumpFPGreater 36
+#define JumpFPGreaterOrEqual 37
+#define JumpFPLess 34
+#define JumpFPLessOrEqual 35
+#define JumpFPNotEqual 33
+#define JumpFPOrdered 38
+#define JumpFPUnordered 39
+#define JumpFull 11
+#define JumpGreater 26
+#define JumpGreaterOrEqual 25
+#define JumpLess 24
+#define JumpLessOrEqual 27
+#define JumpLong 12
+#define JumpLongNonZero 14
+#define JumpLongZero 13
+#define JumpNegative 18
+#define JumpNoCarry 23
+#define JumpNonNegative 19
+#define JumpNonZero 17
+#define JumpNoOverflow 21
+#define JumpOverflow 20
+#define JumpR 9
+#define JumpZero 16
+#define Label 1
+#define LargeContextSlots 62
+#define LastJump 39
+#undef LinkReg
+#define Literal 2
+#define LiteralStart 1
+#define LoadEffectiveAddressMwrR 77
+#define LogicalShiftLeftCqR 84
+#define LogicalShiftLeftRR 85
+#define LogicalShiftRightCqR 82
+#define LogicalShiftRightRR 83
+#define LookupRuleDynamicSuper 0x101
+#define LookupRuleImplicit 0x100
+#define LookupRuleSelf 0
+#define MapEnd 0
+#define MaxCompiledPrimitiveIndex 555
+#define MaxMethodSize 65535
+#define MaxNegativeErrorCode -8
+#define MaxNumArgs 15
+#define MaxStackAllocSize 1572864
+#define MaxStackCheckOffset 0xFFF
+#define MaxX2NDisplacement 992
+#define MethodCacheClass 2
+#define MethodCacheMask 0x7FC
+#define MethodCacheMethod 3
+#define MethodCacheSelector 1
+#define MethodIndex 3
+#define MethodTooBig -4
+#define MFMethodFlagHasContextFlag 1
+#define MFMethodFlagIsBlockFlag 2
+#define ModReg 3
+#define ModRegInd 0
+#define ModRegRegDisp32 2
+#define ModRegRegDisp8 1
+#define MoveAbR 43
+#define MoveAwR 41
+#define MoveC32R 65
+#define MoveCqR 63
+#define MoveCwR 64
+#define MoveM16rR 51
+#define MoveM64rRd 70
+#define MoveMbrR 59
+#define MoveMwrR 45
+#define MoveRAb 44
+#define MoveRAw 42
+#define MoveRdM64r 71
+#define MoveRdR 68
+#define MoveRdRd 69
+#define MoveRM16r 52
+#define MoveRMbr 60
+#define MoveRMwr 46
+#define MoveRR 40
+#define MoveRRd 67
+#define MoveRX32rR 58
+#define MoveRXbrR 62
+#define MoveRXwrR 48
+#define MoveX32rRR 57
+#define MoveXbrRR 61
+#define MoveXwrRR 47
+#define MULTIPLEBYTECODESETS 1
+#define MulRdRd 112
+#define NegateR 79
+#define NewspeakVM 1
+#define Nop 5
+#define NoReg -1
+#define NotFullyInitialized -1
+#define NSCClassTagIndex 0
+#define NSCEnclosingObjectIndex 1
+#define NSCNumArgsIndex 4
+#define NSCTargetIndex 2
+#define NumObjRefsInRuntime 0
+#define NumOopsPerNSC 6
+#define NumSendTrampolines 4
+#define NumSpecialSelectors 32
+#define NumTrampolines 72
+#define OrCqR 98
+#define OrCwR 106
+#define OrRR 92
+#undef PCReg
+#define PopR 72
+#define PrefetchAw 76
+#define PrimCallCollectsProfileSamples 8
+#define PrimCallDoNotJIT 32
+#define PrimCallMayCallBack 4
+#define PrimCallNeedsNewMethod 1
+#define PrimCallNeedsPrimitiveFunction 2
+#define PrimErrWritePastObject 17
+#define PushCq 74
+#define PushCw 75
+#define PushR 73
+#define R10 10
+#define R11 11
+#define R12 12
+#define R13 13
+#define R15 15
+#define R8 8
+#define R9 9
+#define RAX 0
+#define RBP 5
+#define RBX 3
+#define RCX 1
+#define RDI 7
+#define RDX 2
+#define ReceiverIndex 5
+#define ReceiverResultReg 2
+#define RetN 8
+#define RISCTempReg 8
+#define RotateLeftCqR 86
+#define RotateRightCqR 87
+#define RSI 6
+#define RSP 4
+#define Scratch0Reg 10
+#define Scratch1Reg 11
+#define SelectorCannotInterpret 34
+#define SelectorDoesNotUnderstand 20
+#define SenderIndex 0
+#define SendNumArgsReg 9
+#define ShouldNotJIT -8
+#define SIB1 0
+#define SIB4 2
+#define SIB8 3
+#define SistaVM 0
+#define SmallContextSlots 22
+#define SPReg 4
+#define SpecialSelectors 23
+#define SqrtRd 114
+#define SSBaseOffset 1
+#define SSConstant 2
+#define SSRegister 3
+#define SSSpill 4
+#define StackPointerIndex 2
+#define Stop 10
+#define SubCqR 96
+#define SubCwR 104
+#define SubRdRd 111
+#define SubRR 90
+#define TempReg 0
+#define TstCqR 99
+#define UnfailingPrimitive 3
+#define UnimplementedPrimitive -7
+#define ValueIndex 1
+#define VarBaseReg 3
+#define XCHGRR 128
+#define XorCwR 107
+#define XorRR 93
+#define YoungSelectorInPIC -5
+
+
+/*** Function Prototypes ***/
+
+
+#if !PRODUCTION && defined(PlatformNoDbgRegParms)
+# define NoDbgRegParms PlatformNoDbgRegParms
+#endif
+
+#if !defined(NoDbgRegParms)
+# define NoDbgRegParms /*empty*/
+#endif
+
+
+
+#if !defined(NeverInline)
+# define NeverInline /*empty*/
+#endif
+
+static AbstractInstruction * NoDbgRegParms addDependent(AbstractInstruction * self_in_addDependent, AbstractInstruction *anInstruction);
+static sqInt NoDbgRegParms availableRegisterOrNoneFor(AbstractInstruction * self_in_availableRegisterOrNoneFor, sqInt liveRegsMask);
+static AbstractInstruction * NoDbgRegParms cloneLiteralFrom(AbstractInstruction * self_in_cloneLiteralFrom, AbstractInstruction *existingLiteral);
+static sqInt NoDbgRegParms concretizeAt(AbstractInstruction * self_in_concretizeAt, sqInt actualAddress);
+static sqInt NoDbgRegParms genAlignCStackSavingRegistersnumArgswordAlignment(AbstractInstruction * self_in_genAlignCStackSavingRegistersnumArgswordAlignment, sqInt saveRegs, sqInt numArgs, sqInt alignment);
+static AbstractInstruction * NoDbgRegParms genWriteCResultIntoReg(AbstractInstruction * self_in_genWriteCResultIntoReg, sqInt abstractRegister);
+static AbstractInstruction * NoDbgRegParms getJmpTarget(AbstractInstruction * self_in_getJmpTarget);
+static sqInt NoDbgRegParms inCurrentCompilation(AbstractInstruction * self_in_inCurrentCompilation, sqInt operand);
+static AbstractInstruction * NoDbgRegParms initializeSharableLiteral(AbstractInstruction * self_in_initializeSharableLiteral, sqInt literal);
+static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstruction * self_in_initializeUniqueLiteral, sqInt literal);
+static sqInt NoDbgRegParms isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress);
+static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump);
+static usqInt NoDbgRegParms labelOffset(AbstractInstruction * self_in_labelOffset);
+static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta);
+static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta);
+static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget);
+static sqInt NoDbgRegParms rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditionalJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress);
+static sqInt NoDbgRegParms setLabelOffset(AbstractInstruction * self_in_setLabelOffset, sqInt aValue);
+static AbstractInstruction * NoDbgRegParms updateLabel(AbstractInstruction * self_in_updateLabel, AbstractInstruction *labelInstruction);
+static CogMethod * NoDbgRegParms cmHomeMethod(CogBlockMethod * self_in_cmHomeMethod);
+static sqInt NoDbgRegParms isBranch(BytecodeDescriptor * self_in_isBranch);
+static sqInt NoDbgRegParms isUnconditionalBranch(BytecodeDescriptor * self_in_isUnconditionalBranch);
+static sqInt NoDbgRegParms computeSizeOfArithCqR(AbstractInstruction * self_in_computeSizeOfArithCqR);
+static sqInt NoDbgRegParms computeSizeOfArithCwR(AbstractInstruction * self_in_computeSizeOfArithCwR);
+static usqInt NoDbgRegParms concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64opcode);
+static usqInt NoDbgRegParms concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR);
+static sqInt NoDbgRegParms inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress);
+static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent);
+static sqInt NoDbgRegParms literal32BeforeFollowingAddress(AbstractInstruction * self_in_literal32BeforeFollowingAddress, sqInt followingAddress);
+static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress);
+static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize);
+static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress);
+static AbstractInstruction * NoDbgRegParms storeLiteralbeforeFollowingAddress(AbstractInstruction * self_in_storeLiteralbeforeFollowingAddress, sqInt literal, sqInt followingAddress);
+static AbstractInstruction * NoDbgRegParms gAddCqR(sqInt quickConstant, sqInt reg);
+static AbstractInstruction * NoDbgRegParms gAddRR(sqInt reg1, sqInt reg2);
+static AbstractInstruction * NoDbgRegParms gAndCqR(sqInt quickConstant, sqInt reg);
+static AbstractInstruction * NoDbgRegParms gAndCqRR(sqInt quickConstant, sqInt srcReg, sqInt destReg);
+static AbstractInstruction * NoDbgRegParms gArithmeticShiftRightRR(sqInt reg1, sqInt reg2);
+extern sqInt abortOffset(void);
+static sqInt NoDbgRegParms abstractInstructionfollows(AbstractInstruction *theAbstractInstruction, AbstractInstruction *anAbstractInstruction);
+static void addCleanBlockStarts(void);
+extern void addCogMethodsToHeapMap(void);
+static sqInt NoDbgRegParms addressIsInCurrentCompilation(sqInt address);
+static sqInt NoDbgRegParms addressIsInFixups(AbstractInstruction *address);
+static sqInt NoDbgRegParms addressIsInInstructions(AbstractInstruction *address);
+static sqInt NoDbgRegParms addressOfEndOfCaseinCPIC(sqInt n, CogMethod *cPIC);
+static sqInt NoDbgRegParms alignUptoRoutineBoundary(sqInt anAddress);
+static sqInt allMachineCodeObjectReferencesValid(void);
+static sqInt allMethodsHaveCorrectHeader(void);
+static AbstractInstruction * NoDbgRegParms annotateAbsolutePCRef(AbstractInstruction *abstractInstruction);
+static AbstractInstruction * NoDbgRegParms annotateBytecode(AbstractInstruction *abstractInstruction);
+static AbstractInstruction * NoDbgRegParms annotateobjRef(AbstractInstruction *abstractInstruction, sqInt anOop);
+static void NoDbgRegParms assertSaneJumpTarget(AbstractInstruction *jumpTarget);
+static sqInt NoDbgRegParms blockCreationBytecodeSizeForHeader(sqInt aMethodHeader);
+static sqInt NoDbgRegParms blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg);
+extern sqInt bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
+static AbstractInstruction * NoDbgRegParms CallNewspeakSend(sqInt callTarget);
+static AbstractInstruction * NoDbgRegParms CallRTregistersToBeSavedMask(sqInt callTarget, sqInt registersToBeSaved);
+static AbstractInstruction * NoDbgRegParms gCall(sqInt callTarget);
+static AbstractInstruction * NoDbgRegParms gCmpCqR(sqInt quickConstant, sqInt reg);
+static AbstractInstruction * NoDbgRegParms gCmpCwR(sqInt wordConstant, sqInt reg);
+static AbstractInstruction * NoDbgRegParms gCmpRR(sqInt reg1, sqInt reg2);
+extern void callCogCodePopReceiver(void);
+extern void callCogCodePopReceiverAndClassRegs(void);
+extern sqInt ceCPICMissreceiver(CogMethod *cPIC, sqInt receiver);
+extern sqInt ceSICMiss(sqInt receiver);
+extern void checkAssertsEnabledInCogit(void);
+static sqInt NoDbgRegParms checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod);
+static sqInt NoDbgRegParms checkIfValidOopRefpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod);
+extern sqInt checkIntegrityOfObjectReferencesInCode(sqInt gcModes);
+static sqInt NoDbgRegParms checkMaybeObjRefInClosedPIC(sqInt maybeObject);
+static sqInt NoDbgRegParms checkValidObjectReferencesInClosedPIC(CogMethod *cPIC);
+static sqInt NoDbgRegParms closedPICRefersToUnmarkedObject(CogMethod *cPIC);
+extern char * codeEntryFor(char *address);
+extern char * codeEntryNameFor(char *address);
+extern sqInt cogCodeBase(void);
+extern sqInt cogCodeConstituents(void);
+static sqInt NoDbgRegParms cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt caseNTag, sqInt isMNUCase);
+extern void cogitPostGCAction(sqInt gcMode);
+extern sqInt cogMethodDoesntLookKosher(CogMethod *cogMethod);
+extern CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs);
+static CogMethod * NoDbgRegParms cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs);
+static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase);
+extern CogMethod * cogselector(sqInt aMethodObj, sqInt aSelectorOop);
+extern void compactCogCompiledCode(void);
+static AbstractInstruction * compileAbort(void);
+static sqInt NoDbgRegParms compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex);
+static void NoDbgRegParms compileBlockEntry(BlockStart *blockStart);
+static void NoDbgRegParms compileCallFornumArgsargargargargresultRegsaveRegs(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt resultRegOrNone, sqInt saveRegs);
+static AbstractInstruction * compileCPICEntry(void);
+static void compileEntry(void);
+static sqInt compileMethodBody(void);
+static sqInt NoDbgRegParms compilePICAbort(sqInt numArgs);
+static void NoDbgRegParms compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNone);
+static void computeEntryOffsets(void);
+static void computeMaximumSizes(void);
+static sqInt NoDbgRegParms configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs, sqInt addrDelta);
+static sqInt NoDbgRegParms configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs, sqInt addrDelta);
+static sqInt NoDbgRegParms cPICHasForwardedClass(CogMethod *cPIC);
+static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC);
+static sqInt cPICPrototypeCaseOffset(void);
+static sqInt NoDbgRegParms cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod);
+static AbstractInstruction * NoDbgRegParms gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder);
+extern sqInt defaultCogCodeSize(void);
+static sqInt NoDbgRegParms endPCOf(sqInt aMethod);
+extern void enterCogCodePopReceiver(void);
+static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC);
+static sqInt extABytecode(void);
+static sqInt extBBytecode(void);
+static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress);
+static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector);
+static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc);
+static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod);
+extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod);
+static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranch, char *mcpc, sqInt bcpc, void *targetMcpc);
+extern void followForwardedLiteralsIn(CogMethod *cogMethod);
+extern void followForwardedMethods(void);
+static sqInt NoDbgRegParms followMaybeObjRefInClosedPICAt(sqInt mcpc);
+static sqInt NoDbgRegParms followMethodReferencesInClosedPIC(CogMethod *cPIC);
+static void freePICsWithFreedTargets(void);
+extern void freeUnmarkedMachineCode(void);
+static sqInt genCheckForInterruptsTrampoline(void);
+static AbstractInstruction * NoDbgRegParms genConditionalBranchoperand(sqInt opcode, sqInt operandOne);
+static void (*genEnilopmartForandandforCallcalled(sqInt regArg1, sqInt regArg2OrNone, sqInt regArg3OrNone, sqInt forCall, char *trampolineName))(void) ;
+static void NoDbgRegParms genEnilopmartReturn(sqInt forCall);
+static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointer);
+static void generateClosedPICPrototype(void);
+static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector);
+static sqInt NoDbgRegParms generateInstructionsAt(sqInt eventualAbsoluteAddress);
+static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress);
+static void generateNewspeakRuntime(void);
+static void generateNewspeakSendTrampolines(void);
+static void generateOpenPICPrototype(void);
+static void generateRunTimeTrampolines(void);
+static void generateStackPointerCapture(void);
+static void generateTrampolines(void);
+static void genGetLeafCallStackPointer(void);
+static sqInt NoDbgRegParms genInnerPICAbortTrampoline(char *name);
+static sqInt genLoadCStackPointersForPrimCall(void);
+static void NoDbgRegParms genLoadInlineCacheWithSelector(sqInt selectorIndex);
+static sqInt genNonLocalReturnTrampoline(void);
+static sqInt NoDbgRegParms genNSSendTrampolineFornumArgsenclosingObjectCheckcalled(void *aRoutine, sqInt numArgs, sqInt eoCheckFlag, char *aString);
+static sqInt NoDbgRegParms genReturnTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0);
+static sqInt NoDbgRegParms genSafeTrampolineForcalled(void *aRoutine, char *aString);
+static sqInt NoDbgRegParms genSafeTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0);
+static sqInt NoDbgRegParms genSafeTrampolineForcalledargarg(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1);
+static sqInt NoDbgRegParms genSmalltalkToCStackSwitch(sqInt pushLinkReg);
+static sqInt NoDbgRegParms genTrampolineForcalled(void *aRoutine, char *aString);
+static sqInt NoDbgRegParms genTrampolineForcalledargargarg(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2);
+static sqInt NoDbgRegParms genTrampolineForcalledargargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt resultReg);
+static sqInt NoDbgRegParms genTrampolineForcalledargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt resultReg);
+static sqInt NoDbgRegParms genTrampolineForcalledargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt resultReg);
+static sqInt NoDbgRegParms genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNone, sqInt appendBoolean);
+static AbstractInstruction * NoDbgRegParms gen(sqInt opcode);
+static AbstractInstruction * NoDbgRegParms genoperand(sqInt opcode, sqInt operand);
+static AbstractInstruction * NoDbgRegParms genoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo);
+static AbstractInstruction * NoDbgRegParms genoperandoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo, sqInt operandThree);
+static sqInt NoDbgRegParms getLiteral(sqInt litIndex);
+static sqInt NoDbgRegParms incrementUsageOfTargetIfLinkedSendmcpcignored(sqInt annotation, char *mcpc, sqInt superfluity);
+static sqInt NoDbgRegParms indexForSelectorinat(sqInt selector, CogMethod *cogMethod, sqInt mcpc);
+static sqInt initialClosedPICUsageCount(void);
+static void initializeBackend(void);
+extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress);
+static sqInt initialMethodUsageCount(void);
+static sqInt initialOpenPICUsageCount(void);
+static sqInt NoDbgRegParms inlineCacheValueForSelectorinat(sqInt selector, sqInt aCogMethod, sqInt mcpc);
+static sqInt NoDbgRegParms inverseBranchFor(sqInt opcode);
+static sqInt NoDbgRegParms isBackwardBranchatextsin(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
+static sqInt NoDbgRegParms isPCMappedAnnotation(sqInt annotation);
+extern sqInt isPCWithinMethodZone(void *address);
+extern sqInt isSendReturnPC(sqInt retpc);
+static AbstractInstruction * NoDbgRegParms gJumpFPEqual(void *jumpTarget);
+static AbstractInstruction * NoDbgRegParms gJumpFPGreaterOrEqual(void *jumpTarget);
+static AbstractInstruction * NoDbgRegParms gJumpFPGreater(void *jumpTarget);
+static AbstractInstruction * NoDbgRegParms gJumpFPNotEqual(void *jumpTarget);
+static AbstractInstruction * NoDbgRegParms gJumpNonZero(void *jumpTarget);
+static AbstractInstruction * gLabel(void);
+static AbstractInstruction * NoDbgRegParms gLogicalShiftLeftCqR(sqInt quickConstant, sqInt reg);
+static AbstractInstruction * lastOpcode(void);
+extern void linkNSSendCacheclassTagenclosingObjecttargetcaller(NSSendCache *nsSendCache, sqInt classTag, sqInt enclosingObject, CogMethod *targetMethod, CogMethod *callingMethod);
+extern void linkSendAtintooffsetreceiver(sqInt callSiteReturnAddress, CogMethod *sendingMethod, CogMethod *targetMethod, sqInt theEntryOffset, sqInt receiver);
+static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc);
+static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg);
+static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg);
+static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg);
+static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2);
+static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod);
+static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg);
+static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC);
+static void mapObjectReferencesInGeneratedRuntime(void);
+static void mapObjectReferencesInMachineCodeForBecome(void);
+static void mapObjectReferencesInMachineCodeForFullGC(void);
+static void mapObjectReferencesInMachineCodeForYoungGC(void);
+extern void mapObjectReferencesInMachineCode(sqInt gcMode);
+extern void markAndTraceMachineCodeOfMarkedMethods(void);
+static void markAndTraceObjectReferencesInGeneratedRuntime(void);
+static sqInt NoDbgRegParms markAndTraceOrFreeCogMethodfirstVisit(CogMethod *cogMethod, sqInt firstVisit);
+static sqInt NoDbgRegParms markAndTraceOrFreePICTargetin(sqInt entryPoint, CogMethod *cPIC);
+static sqInt NoDbgRegParms markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
+static sqInt NoDbgRegParms markLiteralspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
+extern void markMethodAndReferents(CogBlockMethod *aCogMethod);
+extern usqInt maxCogMethodAddress(void);
+static sqInt maybeAllocAndInitIRCs(void);
+static sqInt NoDbgRegParms maybeFreeCogMethodDoesntLookKosher(CogMethod *cogMethod);
+static void NoDbgRegParms maybeMarkCountersIn(CogMethod *cogMethod);
+static sqInt mclassIsSmallInteger(void);
+extern usqInt mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
+static sqInt methodNumArgs(void);
+static sqInt NoDbgRegParms methodhasSameCodeAscheckPenultimate(sqInt methodA, sqInt methodB, sqInt comparePenultimateLiteral);
+extern sqInt minCogMethodAddress(void);
+extern sqInt mnuOffset(void);
+static AbstractInstruction * NoDbgRegParms gNegateR(sqInt reg);
+static sqInt NoDbgRegParms needsFrameIfImmutability(sqInt stackDelta);
+static sqInt NoDbgRegParms needsFrameIfInBlock(sqInt stackDelta);
+static sqInt NoDbgRegParms needsFrameNever(sqInt stackDelta);
+static sqInt NoDbgRegParms noAssertMethodClassAssociationOf(sqInt methodPointer);
+static sqInt noCogMethodsMaximallyMarked(void);
+static sqInt NoDbgRegParms noTargetsFreeInClosedPIC(sqInt cPIC);
+static sqInt NoDbgRegParms outputInstructionsAt(sqInt startAddress);
+static sqInt NoDbgRegParms outputInstructionsForGeneratedRuntimeAt(sqInt startAddress);
+static AbstractInstruction * NoDbgRegParms gPushCw(sqInt wordConstant);
+extern sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
+static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
+static AbstractInstruction * previousInstruction(void);
+extern void printCogMethodFor(void *address);
+extern void printTrampolineTable(void);
+static sqInt processorHasDivQuoRemAndMClassIsSmallInteger(void);
+static sqInt processorHasMultiplyAndMClassIsSmallInteger(void);
+static AbstractInstruction * NoDbgRegParms gRotateRightCqR(sqInt quickConstant, sqInt reg);
+static void NoDbgRegParms recordGeneratedRunTimeaddress(char *aString, sqInt address);
+extern sqInt recordPrimTraceFunc(void);
+static void recordRunTimeObjectReferences(void);
+static sqInt NoDbgRegParms registerMaskFor(sqInt reg);
+static sqInt NoDbgRegParms registerMaskForand(sqInt reg1, sqInt reg2);
+static sqInt NoDbgRegParms registerMaskForandandandandandandandand(sqInt reg1, sqInt reg2, sqInt reg3, sqInt reg4, sqInt reg5, sqInt reg6, sqInt reg7, sqInt reg8, sqInt reg9);
+static void NoDbgRegParms relocateCallsAndSelfReferencesInMethod(CogMethod *cogMethod);
+static void NoDbgRegParms relocateCallsInClosedPIC(CogMethod *cPIC);
+static sqInt NoDbgRegParms relocateIfCallOrMethodReferencemcpcdelta(sqInt annotation, char *mcpc, sqInt refDelta);
+static sqInt NoDbgRegParms remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr);
+static sqInt NoDbgRegParms remapMaybeObjRefInClosedPICAt(sqInt mcpc);
+static void NoDbgRegParms rewriteCPICCaseAttagobjReftarget(sqInt followingAddress, sqInt newTag, sqInt newObjRef, sqInt newTarget);
+static AbstractInstruction * NoDbgRegParms gSubCwR(sqInt wordConstant, sqInt reg);
+static sqInt scanForCleanBlocks(void);
+extern void setBreakMethod(sqInt anObj);
+extern void setPostCompileHook(void (*aFunction)(CogMethod *));
+extern void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);
+static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC);
+static AbstractInstruction * NoDbgRegParms gTstCqR(sqInt quickConstant, sqInt reg);
+extern sqInt traceLinkedSendOffset(void);
+static sqInt NoDbgRegParms trampolineArgConstant(sqInt booleanOrInteger);
+static char * NoDbgRegParms trampolineNamenumArgs(char *routinePrefix, sqInt numArgs);
+static char * NoDbgRegParms trampolineNamenumRegArgs(char *routinePrefix, sqInt numArgs);
+static sqInt unknownBytecode(void);
+extern void unlinkAllSends(void);
+static sqInt NoDbgRegParms unlinkIfFreeOrLinkedSendpcof(sqInt annotation, char *mcpc, sqInt theSelector);
+static sqInt NoDbgRegParms unlinkIfInvalidClassSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity);
+static sqInt NoDbgRegParms unlinkIfLinkedSendToFreepcignored(sqInt annotation, char *mcpc, sqInt superfluity);
+static sqInt NoDbgRegParms unlinkIfLinkedSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity);
+static sqInt NoDbgRegParms unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod);
+extern void unlinkSendsLinkedForInvalidClasses(void);
+extern void unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector);
+extern void unlinkSendsToFree(void);
+extern void unlinkSendsToandFreeIf(sqInt targetMethodObject, sqInt freeIfTrue);
+static AbstractInstruction * NoDbgRegParms gXorCwR(sqInt wordConstant, sqInt reg);
+static void zeroOpcodeIndex(void);
+extern void addAllToYoungReferrers(void);
+static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC);
+static void NoDbgRegParms addToUnpairedMethodList(CogMethod *aCogMethod);
+static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod);
+static sqInt alignment(void);
+static sqInt NoDbgRegParms allocate(sqInt numBytes);
+static void clearCogCompiledCode(void);
+static void compactCompiledCode(void);
+static void NoDbgRegParms ensureInYoungReferrers(CogMethod *cogMethod);
+static CogMethod * NoDbgRegParms findPreviouslyCompiledVersionOfwith(sqInt aMethodObj, sqInt aSelectorOop);
+extern void freeMethod(CogMethod *cogMethod);
+static void freeOlderMethodsForCompaction(void);
+static sqInt kosherYoungReferrers(void);
+static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress);
+extern CogMethod * methodFor(void *address);
+static sqInt numMethods(void);
+extern sqInt numMethodsOfType(sqInt cogMethodType);
+static sqInt NoDbgRegParms occurrencesInYoungReferrers(CogMethod *cogMethod);
+static CogMethod * NoDbgRegParms openPICWithSelector(sqInt aSelector);
+static void planCompaction(void);
+extern void printCogMethods(void);
+extern void printCogMethodsOfType(sqInt cmType);
+extern void printCogMethodsWithMethod(sqInt methodOop);
+extern void printCogMethodsWithPrimitive(sqInt primIdx);
+extern void printCogMethodsWithSelector(sqInt selectorOop);
+extern void printCogYoungReferrers(void);
+extern void printOpenPICList(void);
+static sqInt pruneYoungReferrers(void);
+static sqInt relocateAndPruneYoungReferrers(void);
+static sqInt relocateMethodsPreCompaction(void);
+static sqInt NoDbgRegParms removeFromOpenPICList(CogMethod *anOpenPIC);
+static sqInt NoDbgRegParms removeFromUnpairedMethodList(CogMethod *aCogMethod);
+static void voidYoungReferrersPostTenureAll(void);
+extern char * whereIsMaybeCodeThing(sqInt anOop);
+static sqInt NoDbgRegParms checkValidObjectReference(sqInt anOop);
+static AbstractInstruction * NoDbgRegParms genCmpClassFloatCompactIndexR(sqInt reg);
+static AbstractInstruction * NoDbgRegParms genCmpClassMethodContextCompactIndexR(sqInt reg);
+static sqInt NoDbgRegParms genLoadSlotsourceRegdestReg(sqInt index, sqInt sourceReg, sqInt destReg);
+static sqInt genPrimitiveAdd(void);
+static sqInt genPrimitiveAsFloat(void);
+static sqInt genPrimitiveBitAnd(void);
+static sqInt genPrimitiveBitOr(void);
+static sqInt genPrimitiveBitShift(void);
+static sqInt genPrimitiveBitXor(void);
+static sqInt genPrimitiveClass(void);
+static sqInt genPrimitiveDiv(void);
+static sqInt genPrimitiveDivide(void);
+static sqInt genPrimitiveEqual(void);
+static sqInt genPrimitiveFloatAdd(void);
+static sqInt genPrimitiveFloatDivide(void);
+static sqInt genPrimitiveFloatEqual(void);
+static sqInt genPrimitiveFloatGreaterOrEqual(void);
+static sqInt genPrimitiveFloatGreaterThan(void);
+static sqInt genPrimitiveFloatLessOrEqual(void);
+static sqInt genPrimitiveFloatLessThan(void);
+static sqInt genPrimitiveFloatMultiply(void);
+static sqInt genPrimitiveFloatNotEqual(void);
+static sqInt genPrimitiveFloatSquareRoot(void);
+static sqInt genPrimitiveFloatSubtract(void);
+static sqInt genPrimitiveGreaterOrEqual(void);
+static sqInt genPrimitiveGreaterThan(void);
+static sqInt genPrimitiveIdentical(void);
+static sqInt genPrimitiveLessOrEqual(void);
+static sqInt genPrimitiveLessThan(void);
+static sqInt genPrimitiveMod(void);
+static sqInt genPrimitiveMultiply(void);
+static sqInt genPrimitiveNewMethod(void);
+static sqInt genPrimitiveNotEqual(void);
+static sqInt genPrimitiveNotIdentical(void);
+static sqInt genPrimitiveQuo(void);
+static sqInt genPrimitiveSmallFloatAdd(void);
+static sqInt genPrimitiveSmallFloatDivide(void);
+static sqInt genPrimitiveSmallFloatEqual(void);
+static sqInt genPrimitiveSmallFloatGreaterOrEqual(void);
+static sqInt genPrimitiveSmallFloatGreaterThan(void);
+static sqInt genPrimitiveSmallFloatLessOrEqual(void);
+static sqInt genPrimitiveSmallFloatLessThan(void);
+static sqInt genPrimitiveSmallFloatMultiply(void);
+static sqInt genPrimitiveSmallFloatNotEqual(void);
+static sqInt genPrimitiveSmallFloatSquareRoot(void);
+static sqInt genPrimitiveSmallFloatSubtract(void);
+static sqInt genPrimitiveSubtract(void);
+static sqInt NoDbgRegParms genSmallIntegerComparison(sqInt jumpOpcode);
+static sqInt NoDbgRegParms genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *), sqInt invertComparison);
+static sqInt NoDbgRegParms isUnannotatableConstant(CogSimStackEntry *simStackEntry);
+static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister);
+static AbstractInstruction * NoDbgRegParms genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt scratch1, sqInt scratch2);
+static sqInt NoDbgRegParms genClearAndSetSmallIntegerTagsIn(sqInt scratchReg);
+static sqInt NoDbgRegParms genConvertBitsToSmallFloatInscratch(sqInt reg, sqInt scratch);
+static void NoDbgRegParms genConvertCharacterToSmallIntegerInReg(sqInt reg);
+static sqInt NoDbgRegParms genConvertIntegerToSmallIntegerInReg(sqInt reg);
+static void NoDbgRegParms genConvertSmallIntegerToCharacterInReg(sqInt reg);
+static sqInt NoDbgRegParms genConvertSmallIntegerToIntegerInReg(sqInt reg);
+static sqInt NoDbgRegParms genFetchIndexRegisterfrominto(sqInt indexReg, sqInt tableObj, sqInt destReg);
+static sqInt NoDbgRegParms genFloatArithmeticpreOpCheckboxed(sqInt arithmeticOperator, AbstractInstruction *(*preOpCheckOrNil)(int rcvrReg, int argReg), sqInt rcvrBoxed);
+static sqInt NoDbgRegParms genFloatComparisoninvertboxed(AbstractInstruction *(*jumpOpcodeGenerator)(void *), sqInt invertComparison, sqInt rcvrBoxed);
+static sqInt NoDbgRegParms genGetHashFieldNonImmOfasSmallIntegerInto(sqInt instReg, sqInt destReg);
+static sqInt NoDbgRegParms genGetHashFieldNonImmOfinto(sqInt instReg, sqInt destReg);
+static AbstractInstruction * NoDbgRegParms genGetInlineCacheClassTagFromintoforEntry(sqInt sourceReg, sqInt destReg, sqInt forEntry);
+static sqInt NoDbgRegParms genGetOverflowSlotsOfinto(sqInt srcReg, sqInt destReg);
+static sqInt NoDbgRegParms genGetSmallFloatValueOfscratchinto(sqInt oopReg, sqInt scratch, sqInt dpReg);
+static AbstractInstruction * NoDbgRegParms genJumpIsSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg);
+static AbstractInstruction * NoDbgRegParms genJumpNotCharacterscratchReg(sqInt reg, sqInt scratch);
+static AbstractInstruction * NoDbgRegParms genJumpNotSmallFloatValueBitsscratch(sqInt reg, sqInt exponent);
+static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegersInandScratchReg(sqInt aRegister, sqInt scratchReg);
+static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg);
+static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerscratchReg(sqInt reg, sqInt scratch);
+static AbstractInstruction * NoDbgRegParms genJumpSmallIntegerscratchReg(sqInt reg, sqInt scratch);
+static sqInt genPrimitiveAt(void);
+static sqInt genPrimitiveAtPut(void);
+static sqInt genPrimitiveIdentityHash(void);
+static sqInt genPrimitiveMirrorNew(void);
+static sqInt genPrimitiveMirrorNewWithArg(void);
+static sqInt genPrimitiveNew(void);
+static sqInt genPrimitiveNewWithArg(void);
+static sqInt genPrimitiveStringAt(void);
+static sqInt genPrimitiveStringAtPut(void);
+static sqInt NoDbgRegParms genRemoveSmallIntegerTagsInScratchReg(sqInt scratchReg);
+static sqInt NoDbgRegParms genShiftAwaySmallIntegerTagsInScratchReg(sqInt scratchReg);
+static sqInt NoDbgRegParms inlineCacheTagForInstance(sqInt oop);
+static sqInt log2BytesPerWord(void);
+static void maybeGenerateSelectorIndexDereferenceRoutine(void);
+static sqInt numSmallIntegerBits(void);
+static sqInt numSmallIntegerTagBits(void);
+static sqInt NoDbgRegParms validInlineCacheTag(sqInt classIndexOrTagPattern);
+static sqInt NoDbgRegParms cacheTagIsMarked(sqInt cacheTag);
+static sqInt NoDbgRegParms checkValidOopReference(sqInt anOop);
+static sqInt NoDbgRegParms couldBeObject(sqInt literal);
+static sqInt NoDbgRegParms genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString);
+static sqInt NoDbgRegParms genConvertCharacterToCodeInReg(sqInt reg);
+static sqInt NoDbgRegParms genConvertIntegerToCharacterInReg(sqInt reg);
+static sqInt NoDbgRegParms genCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sqInt numArgs, sqInt numCopied, sqInt ctxtNumArgs, sqInt isLargeCtxt, sqInt isInBlock);
+static sqInt NoDbgRegParms genEnsureObjInRegNotForwardedscratchReg(sqInt reg, sqInt scratch);

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list