Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.174.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.174
Author: eem
Time: 26 June 2012, 12:28:31.674 pm
UUID: 28bc956b-53cc-4f7c-a763-09fb8a576071
Ancestors: VMMaker.oscog-eem.173
Comment some return implementations.
Make the array initializer creator non-static (clients can prepend
"static" if required).
Make frame flags printing more concise.
=============== Diff against VMMaker.oscog-eem.173 ===============
Item was added:
+ ----- Method: CCodeGenerator>>arrayInitializerCalled:for:type: (in category 'utilities') -----
+ arrayInitializerCalled: varName for: array type: cType
+ "array is a literal array or a CArray on some array."
+ | sequence lastLine |
+ sequence := array isCollection ifTrue: [array] ifFalse: [array object].
+ lastLine := 0.
+ ^String streamContents:
+ [:s|
+ s nextPutAll: cType;
+ space;
+ nextPutAll: varName;
+ nextPutAll: '[] = {'; crtab: 2.
+ sequence
+ do: [:element| s nextPutAll: (self cLiteralFor: element)]
+ separatedBy:
+ [s nextPut: $,.
+ (s position - lastLine) > 76
+ ifTrue: [s crtab: 2. lastLine := s position]
+ ifFalse: [s space]].
+ s crtab; nextPut: $}; cr]!
Item was removed:
- ----- Method: CCodeGenerator>>staticArrayInitializerCalled:for:type: (in category 'utilities') -----
- staticArrayInitializerCalled: varName for: array type: cType
- "array is a literal array or a CArray on some array."
- | sequence lastLine |
- sequence := array isCollection ifTrue: [array] ifFalse: [array object].
- lastLine := 0.
- ^String streamContents:
- [:s|
- s nextPutAll: 'static ';
- nextPutAll: cType;
- space;
- nextPutAll: varName;
- nextPutAll: '[] = {'; crtab: 2.
- sequence
- do: [:element| s nextPutAll: (self cLiteralFor: element)]
- separatedBy:
- [s nextPut: $,.
- (s position - lastLine) > 76
- ifTrue: [s crtab: 2. lastLine := s position]
- ifFalse: [s space]].
- s crtab; nextPut: $}; cr]!
Item was changed:
----- Method: CoInterpreter class>>declareCVarsIn: (in category 'translation') -----
declareCVarsIn: aCCodeGenerator
"Override to avoid repeating StackInterpreter's declarations and add our own extensions"
| threaded |
self class == thisContext methodClass ifFalse: [^self]. "Don't duplicate decls in subclasses"
threaded := aCCodeGenerator vmClass isThreadedVM.
aCCodeGenerator
addHeaderFile:'"sqCogStackAlignment.h"';
addHeaderFile:'"cogmethod.h"';
addHeaderFile: (threaded ifTrue: ['"cointerpmt.h"'] ifFalse: ['"cointerp.h"']);
addHeaderFile:'"cogit.h"'.
self declareInterpreterVersionIn: aCCodeGenerator
defaultName: (threaded ifTrue: ['Cog MT'] ifFalse: ['Cog']).
aCCodeGenerator
var: #heapBase
declareC: 'static usqInt heapBase';
var: #maxLiteralCountForCompile
declareC: 'sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* ', MaxLiteralCountForCompile printString, ' */';
var: #minBackwardJumpCountForCompile
declareC: 'sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* ', MinBackwardJumpCountForCompile printString, ' */'.
aCCodeGenerator
var: #reenterInterpreter
declareC: 'jmp_buf reenterInterpreter; /* private export */'.
aCCodeGenerator
var: #statCodeCompactionUsecs
type: #usqLong.
aCCodeGenerator
var: #primTraceLogIndex type: #'unsigned char';
var: #primTraceLog declareC: 'sqInt primTraceLog[256]';
var: #traceLog
declareC: 'sqInt traceLog[TraceBufferSize /* ', TraceBufferSize printString, ' */]';
var: #traceSources
declareC: (aCCodeGenerator
+ arrayInitializerCalled: 'traceSources'
- staticArrayInitializerCalled: 'traceSources'
for: TraceSources
type: 'char *')!
Item was changed:
----- Method: CoInterpreter>>baseFrameReturn (in category 'return bytecodes') -----
baseFrameReturn
+ "Return from a baseFrame (the bottom frame in a stackPage). The context to
+ return to (which may be married) is stored in the first word of the stack."
<inline: true>
| contextToReturnTo retToContext theFP theSP thePage newPage frameAbove |
<var: #theFP type: #'char *'>
<var: #theSP type: #'char *'>
<var: #thePage type: #'StackPage *'>
<var: #newPage type: #'StackPage *'>
<var: #frameAbove type: #'char *'>
contextToReturnTo := self frameCallerContext: localFP.
"The stack page is effectively free now, so free it. We must free it to be
correct in determining if contextToReturnTo is still married, and in case
makeBaseFrameFor: cogs a method, which may cause a code compaction,
in which case the frame must be free to avoid the relocation machinery
tracing the dead frame. Since freeing now temporarily violates the page-list
ordering invariant, use the assert-free version."
stackPages freeStackPageNoAssert: stackPage.
retToContext := self isContext: contextToReturnTo.
(retToContext
and: [self isStillMarriedContext: contextToReturnTo])
ifTrue:
[theFP := self frameOfMarriedContext: contextToReturnTo.
thePage := stackPages stackPageFor: theFP.
theFP = thePage headFP
ifTrue:
[theSP := thePage headSP]
ifFalse:
["Returning to some interior frame, presumably because of a sender assignment.
Move the frames above to another page (they may be in use, e.g. via coroutining).
Make the interior frame the top frame."
frameAbove := self findFrameAbove: theFP inPage: thePage.
"Since we've just deallocated a page we know that newStackPage won't deallocate an existing one."
newPage := self newStackPage.
self assert: newPage = stackPage.
self moveFramesIn: thePage through: frameAbove toPage: newPage.
stackPages markStackPageMostRecentlyUsed: newPage.
theFP := thePage headFP.
theSP := thePage headSP]]
ifFalse:
[(retToContext
and: [objectMemory isIntegerObject: (objectMemory fetchPointer: InstructionPointerIndex ofObject: contextToReturnTo)]) ifFalse:
[| contextToReturnFrom |
contextToReturnFrom := stackPages longAt: stackPage baseAddress - BytesPerWord.
self tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFrom: contextToReturnFrom
to: contextToReturnTo
returnValue: localReturnValue.
^self externalCannotReturn: localReturnValue from: contextToReturnFrom].
"We must void the instructionPointer to stop it being updated if makeBaseFrameFor:
cogs a method, which may cause a code compaction."
instructionPointer := 0.
thePage := self makeBaseFrameFor: contextToReturnTo.
theFP := thePage headFP.
theSP := thePage headSP].
self setStackPageAndLimit: thePage.
self assert: (stackPages stackPageFor: theFP) = stackPage.
localSP := theSP.
localFP := theFP.
localIP := self pointerForOop: self internalStackTop.
localIP asUnsignedInteger < objectMemory startOfMemory ifTrue:
[localIP asUnsignedInteger ~= cogit ceReturnToInterpreterPC ifTrue:
["localIP in the cog method zone indicates a return to machine code."
^self returnToMachineCodeFrame].
localIP := self pointerForOop: (self iframeSavedIP: localFP)].
self assert: (self checkIsStillMarriedContext: contextToReturnTo currentFP: localFP).
self setMethod: (self iframeMethod: localFP).
self internalStackTopPut: localReturnValue.
^self fetchNextBytecode!
Item was changed:
----- Method: CoInterpreter>>ceReturnToInterpreter: (in category 'trampolines') -----
ceReturnToInterpreter: anOop
+ "Perform a return from a machine code frame to an interpreted frame.
+ The machine code has executed a return instruction when the return address
+ is set to ceReturnToInterpreterPC. Return the result and switch to the interpreter."
<api>
self assert: ((objectMemory isIntegerObject: anOop) or: [objectMemory addressCouldBeObj: anOop]).
self flag: 'are you really sure setStackPageAndLimit: is needed?'.
"I think you're only doing this for the markStackPageMostRecentlyUsed:
and that's probably not needed either"
self setStackPageAndLimit: stackPage.
self assert: (self isMachineCodeFrame: framePointer) not.
self setMethod: (self iframeMethod: framePointer).
self assertValidExecutionPointe: (self iframeSavedIP: framePointer)
r: framePointer
s: stackPointer
imbar: true.
instructionPointer := self iframeSavedIP: framePointer.
self push: anOop.
self siglong: reenterInterpreter jmp: ReturnToInterpreter.
"NOTREACHED"
^nil!
Item was changed:
----- Method: CoInterpreter>>commonReturn (in category 'return bytecodes') -----
commonReturn
+ "Do an ^-return (return form method), perhaps checking for unwinds if this is a block activation.
+ Note: Assumed to be inlined into the dispatch loop."
- "Note: Assumed to be inlined into the dispatch loop."
| closure home unwindContextOrNilOrZero frameToReturnTo contextToReturnTo theFP callerFP newPage |
<var: #frameToReturnTo type: #'char *'>
<var: #theFP type: #'char *'>
<var: #callerFP type: #'char *'>
<var: #newPage type: #'StackPage *'>
<var: #thePage type: #'StackPage *'>
<sharedCodeNamed: 'commonReturn' inCase: 120>
"If this is a method simply return to the sender/caller."
(self frameIsBlockActivation: localFP) ifFalse:
[^self commonCallerReturn].
"Since this is a block activation the closure is on the stack above any args and the frame."
closure := self pushedReceiverOrClosureOfFrame: localFP.
home := nil.
"Walk the closure's lexical chain to find the context or frame to return from (home)."
[closure ~~ objectMemory nilObject] whileTrue:
[home := objectMemory fetchPointer: ClosureOuterContextIndex ofObject: closure.
closure := objectMemory fetchPointer: ClosureIndex ofObject: home].
"home is to be returned from provided there is no unwind-protect activation between
this frame and home's sender. Search for an unwind. findUnwindThroughContext:
will answer either the context for an unwind-protect activation or nilObj if the sender
cannot be found or 0 if no unwind is found but the sender is. We must update the
current page's headFrame pointers to enable the search to identify widowed contexts
correctly."
self writeBackHeadFramePointers.
unwindContextOrNilOrZero := self internalFindUnwindThroughContext: home.
unwindContextOrNilOrZero = objectMemory nilObject ifTrue:
["error: can't find home on chain; cannot return"
^self internalCannotReturn: localReturnValue].
unwindContextOrNilOrZero ~~ 0 ifTrue:
[^self internalAboutToReturn: localReturnValue through: unwindContextOrNilOrZero].
"Now we know home is on the sender chain.
We could be returning to either a context or a frame. Find out which."
contextToReturnTo := nil.
(self isMarriedOrWidowedContext: home)
ifTrue:
[self assert: (self checkIsStillMarriedContext: home currentFP: localFP).
theFP := self frameOfMarriedContext: home.
(self isBaseFrame: theFP)
ifTrue:
[contextToReturnTo := self frameCallerContext: theFP]
ifFalse:
[frameToReturnTo := self frameCallerFP: theFP]]
ifFalse:
[contextToReturnTo := objectMemory fetchPointer: SenderIndex ofObject: home.
((self isContext: contextToReturnTo)
and: [self isMarriedOrWidowedContext: contextToReturnTo]) ifTrue:
[self assert: (self checkIsStillMarriedContext: contextToReturnTo currentFP: localFP).
frameToReturnTo := self frameOfMarriedContext: contextToReturnTo.
contextToReturnTo := nil]].
"If returning to a context we must make a frame for it unless it is dead."
contextToReturnTo ~= nil ifTrue:
[frameToReturnTo := self establishFrameForContextToReturnTo: contextToReturnTo.
frameToReturnTo == 0 ifTrue:
["error: home's sender is dead; cannot return"
^self internalCannotReturn: localReturnValue]].
"Now we have a frame to return to. If it is on a different page we must free intervening pages and
nil out intervening contexts. We must free intervening stack pages because if we leave the pages
to be divorced then their contexts will be divorced with intact senders and instruction pointers. This
code is similar to primitiveTerminateTo. We must move any frames on itervening pages above the
frame linked to because these may be in use, e.g. via co-routining (see baseFrameReturn)."
self assert: stackPages pageListIsWellFormed.
newPage := stackPages stackPageFor: frameToReturnTo.
newPage ~~ stackPage ifTrue:
[| currentCtx thePage nextCntx |
currentCtx := self frameCallerContext: stackPage baseFP.
self assert: (self isContext: currentCtx).
stackPages freeStackPage: stackPage.
[(self isMarriedOrWidowedContext: currentCtx)
and: [(stackPages stackPageFor: (theFP := self frameOfMarriedContext: currentCtx)) = newPage]] whileFalse:
[(self isMarriedOrWidowedContext: currentCtx)
ifTrue:
[thePage := stackPages stackPageFor: theFP.
theFP ~= thePage headFP ifTrue:
["Since we've just deallocated a page we know that newStackPage won't deallocate an existing one."
self moveFramesIn: thePage through: (self findFrameAbove: theFP inPage: thePage) toPage: self newStackPage].
currentCtx := self frameCallerContext: thePage baseFP.
self freeStackPage: thePage]
ifFalse:
[nextCntx := objectMemory fetchPointer: SenderIndex ofObject: currentCtx.
self markContextAsDead: currentCtx.
currentCtx := nextCntx]].
self setStackPageAndLimit: newPage.
localSP := stackPage headSP.
localFP := stackPage headFP].
"Two cases. Returning to the top frame on a new page or an interior frame on the current page.
The top frame has its instruction pointer on top of stack. An interior frame has its instruction pointer
in the caller frame. We need to peel back any frames on the page until we get to the correct frame."
localFP = frameToReturnTo
ifTrue:
[localIP := self pointerForOop: self internalStackTop]
ifFalse:
[[callerFP := localFP.
localFP := self frameCallerFP: localFP.
localFP ~~ frameToReturnTo] whileTrue.
localIP := self frameCallerSavedIP: callerFP.
localSP := (self frameCallerSP: callerFP) - BytesPerWord].
localIP asUnsignedInteger < objectMemory startOfMemory ifTrue:
[localIP asUnsignedInteger ~= cogit ceReturnToInterpreterPC ifTrue:
["localIP in the cog method zone indicates a return to machine code."
^self returnToMachineCodeFrame].
localIP := self pointerForOop: (self iframeSavedIP: localFP)].
"pop the saved IP, push the return value and continue."
self internalStackTopPut: localReturnValue.
self setMethod: (self iframeMethod: localFP).
^self fetchNextBytecode!
Item was changed:
----- Method: CoInterpreter>>printFrameFlagsForFP: (in category 'debug printing') -----
printFrameFlagsForFP: theFP
| address it |
<inline: false>
<var: #theFP type: #'char *'>
<var: #address type: #'char *'>
(self isMachineCodeFrame: theFP)
ifTrue:
[address := theFP + FoxMethod.
it := (stackPages longAt: address) bitAnd: 16r7]
ifFalse:
[address := theFP + FoxIFrameFlags.
it := stackPages longAt: address].
self printHexPtr: address;
print: ((self isMachineCodeFrame: theFP)
ifTrue: [': mcfrm flags: ']
ifFalse: [':intfrm flags: ']);
printHex: it.
it ~= 0 ifTrue:
[self printChar: $=; printNum: it].
self print: ' numArgs: '; printNum: (self frameNumArgs: theFP);
+ print: ((self frameHasContext: theFP) ifTrue: [' hasContext'] ifFalse: [' noContext']);
+ print: ((self frameIsBlockActivation: theFP) ifTrue: [' isBlock'] ifFalse: [' notBlock']);
- print: ' hasContext: '; printNum: (self frameHasContext: theFP);
- print: ' isBlock: '; printNum: (self frameIsBlockActivation: theFP);
cr!
Item was changed:
----- Method: StackInterpreter>>baseFrameReturn (in category 'return bytecodes') -----
baseFrameReturn
+ "Return from a baseFrame (the bottom frame in a stackPage). The context to
+ return to (which may be married) is stored in the saved instruction pointer slot."
<inline: true>
| contextToReturnTo isAContext theFP theSP thePage frameAbove |
<var: #theFP type: #'char *'>
<var: #theSP type: #'char *'>
<var: #thePage type: #'StackPage *'>
<var: #frameAbove type: #'char *'>
contextToReturnTo := self frameCallerContext: localFP.
isAContext := self isContext: contextToReturnTo.
(isAContext
and: [self isStillMarriedContext: contextToReturnTo])
ifTrue:
[theFP := self frameOfMarriedContext: contextToReturnTo.
thePage := stackPages stackPageFor: theFP.
theFP = thePage headFP
ifTrue:
[theSP := thePage headSP.
stackPages freeStackPageNoAssert: stackPage "for a short time invariant is violated; assert follows"]
ifFalse:
["Returning to some interior frame, presumably because of a sender assignment.
Move the frames above to another page (they may be in use, e.g. via coroutining).
Make the interior frame the top frame."
frameAbove := self findFrameAbove: theFP inPage: thePage.
"Reuse the page we're exiting, which avoids allocating a new page and
manipulating the page list to mark the page we're entering as least recently
used (to avoid it being deallocated when allocating a new page)."
self moveFramesIn: thePage through: frameAbove toPage: stackPage.
theFP := thePage headFP.
theSP := thePage headSP]]
ifFalse:
[(isAContext
and: [objectMemory isIntegerObject: (objectMemory fetchPointer: InstructionPointerIndex ofObject: contextToReturnTo)]) ifFalse:
[^self internalCannotReturn: localReturnValue].
thePage := self makeBaseFrameFor: contextToReturnTo.
theFP := thePage headFP.
theSP := thePage headSP.
stackPages freeStackPageNoAssert: stackPage "for a short time invariant is violated; assert follows"].
self setStackPageAndLimit: thePage.
self assert: (stackPages stackPageFor: theFP) = stackPage.
localSP := theSP.
localFP := theFP.
self setMethod: (self frameMethod: localFP).
localIP := self pointerForOop: self internalStackTop.
self internalStackTopPut: localReturnValue.
self assert: (self checkIsStillMarriedContext: contextToReturnTo currentFP: localFP).
^self fetchNextBytecode!
Item was changed:
----- Method: StackInterpreter>>commonReturn (in category 'return bytecodes') -----
commonReturn
+ "Do an ^-return (return form method), perhaps checking for unwinds if this is a block activation.
+ Note: Assumed to be inlined into the dispatch loop."
- "Note: Assumed to be inlined into the dispatch loop."
| closure home unwindContextOrNilOrZero frameToReturnTo contextToReturnTo theFP callerFP newPage |
<var: #frameToReturnTo type: #'char *'>
<var: #theFP type: #'char *'>
<var: #callerFP type: #'char *'>
<var: #newPage type: #'StackPage *'>
<var: #thePage type: #'StackPage *'>
<sharedCodeNamed: 'commonReturn' inCase: 120>
"If this is a method simply return to the sender/caller."
(self frameIsBlockActivation: localFP) ifFalse:
[^self commonCallerReturn].
"Since this is a block activation the closure is on the stack above any args and the frame."
closure := self pushedReceiverOrClosureOfFrame: localFP.
home := nil.
"Walk the closure's lexical chain to find the context or frame to return from (home)."
[closure ~~ objectMemory nilObject] whileTrue:
[home := objectMemory fetchPointer: ClosureOuterContextIndex ofObject: closure.
closure := objectMemory fetchPointer: ClosureIndex ofObject: home].
"home is to be returned from provided there is no unwind-protect activation between
this frame and home's sender. Search for an unwind. findUnwindThroughContext:
will answer either the context for an unwind-protect activation or nilObj if the sender
cannot be found or 0 if no unwind is found but the sender is. We must update the
current page's headFrame pointers to enable the search to identify widowed contexts
correctly."
self writeBackHeadFramePointers.
unwindContextOrNilOrZero := self internalFindUnwindThroughContext: home.
unwindContextOrNilOrZero = objectMemory nilObject ifTrue:
["error: can't find home on chain; cannot return"
^self internalCannotReturn: localReturnValue].
unwindContextOrNilOrZero ~~ 0 ifTrue:
[^self internalAboutToReturn: localReturnValue through: unwindContextOrNilOrZero].
"Now we know home is on the sender chain.
We could be returning to either a context or a frame. Find out which."
contextToReturnTo := nil.
(self isMarriedOrWidowedContext: home)
ifTrue:
[self assert: (self checkIsStillMarriedContext: home currentFP: localFP).
theFP := self frameOfMarriedContext: home.
(self isBaseFrame: theFP)
ifTrue:
[contextToReturnTo := self frameCallerContext: theFP]
ifFalse:
[frameToReturnTo := self frameCallerFP: theFP]]
ifFalse:
[contextToReturnTo := objectMemory fetchPointer: SenderIndex ofObject: home.
((self isContext: contextToReturnTo)
and: [self isMarriedOrWidowedContext: contextToReturnTo]) ifTrue:
[self assert: (self checkIsStillMarriedContext: contextToReturnTo currentFP: localFP).
frameToReturnTo := self frameOfMarriedContext: contextToReturnTo.
contextToReturnTo := nil]].
"If returning to a context we must make a frame for it unless it is dead."
contextToReturnTo ~= nil ifTrue:
[frameToReturnTo := self establishFrameForContextToReturnTo: contextToReturnTo.
frameToReturnTo == 0 ifTrue:
["error: home's sender is dead; cannot return"
^self internalCannotReturn: localReturnValue]].
"Now we have a frame to return to. If it is on a different page we must free intervening pages and
nil out intervening contexts. We must free intervening stack pages because if we leave the pages
to be divorced then their contexts will be divorced with intact senders and instruction pointers. This
code is similar to primitiveTerminateTo. We must move any frames on itervening pages above the
frame linked to because these may be in use, e.g. via co-routining (see baseFrameReturn)."
self assert: stackPages pageListIsWellFormed.
newPage := stackPages stackPageFor: frameToReturnTo.
newPage ~~ stackPage ifTrue:
[| currentCtx thePage nextCntx |
currentCtx := self frameCallerContext: stackPage baseFP.
self assert: (self isContext: currentCtx).
stackPages freeStackPage: stackPage.
[self assert: (self isContext: currentCtx).
(self isMarriedOrWidowedContext: currentCtx)
and: [(stackPages stackPageFor: (theFP := self frameOfMarriedContext: currentCtx)) = newPage]] whileFalse:
[(self isMarriedOrWidowedContext: currentCtx)
ifTrue:
[thePage := stackPages stackPageFor: theFP.
theFP ~= thePage headFP ifTrue:
["Since we've just deallocated a page we know that newStackPage won't deallocate an existing one."
self moveFramesIn: thePage through: (self findFrameAbove: theFP inPage: thePage) toPage: self newStackPage].
currentCtx := self frameCallerContext: thePage baseFP.
self freeStackPage: thePage]
ifFalse:
[nextCntx := objectMemory fetchPointer: SenderIndex ofObject: currentCtx.
self markContextAsDead: currentCtx.
currentCtx := nextCntx]].
self setStackPageAndLimit: newPage.
localSP := stackPage headSP.
localFP := stackPage headFP].
"Two cases. Returning to the top frame on a new page or an interior frame on the current page.
The top frame has its instruction pointer on top of stack. An interior frame has its instruction pointer
in the caller frame. We need to peel back any frames on the page until we get to the correct frame."
localFP = frameToReturnTo
ifTrue: "pop the saved IP, push the return value and continue."
[localIP := self pointerForOop: self internalStackTop]
ifFalse:
[[callerFP := localFP.
localFP := self frameCallerFP: localFP.
localFP ~~ frameToReturnTo] whileTrue.
localIP := self frameCallerSavedIP: callerFP.
localSP := (self frameCallerSP: callerFP) - BytesPerWord].
self internalStackTopPut: localReturnValue.
self setMethod: (self frameMethod: localFP).
^self fetchNextBytecode!
Item was changed:
----- Method: StackInterpreter>>printFrameFlagsForFP: (in category 'debug printing') -----
printFrameFlagsForFP: theFP
| address it |
<inline: false>
<var: #theFP type: #'char *'>
<var: #address type: #'char *'>
address := theFP + FoxFrameFlags.
it := stackPages longAt: address.
self printHexPtr: address;
print: ': flags: ';
printHex: it.
it ~= 0 ifTrue:
[self printChar: $=; printNum: it].
self print: ' numArgs: '; printNum: (self frameNumArgs: theFP);
+ print: ((self frameHasContext: theFP) ifTrue: [' hasContext'] ifFalse: [' noContext']);
+ print: ((self frameIsBlockActivation: theFP) ifTrue: [' isBlock'] ifFalse: [' notBlock']);
- print: ' hasContext: '; printNum: (self frameHasContext: theFP);
- print: ' isBlock: '; printNum: (self frameIsBlockActivation: theFP);
cr!
Item was changed:
----- Method: TAssignmentNode>>emitLiteralArrayDeclarationOn:level:generator: (in category 'C code generation') -----
emitLiteralArrayDeclarationOn: aStream level: level generator: aCCodeGen
| type |
type := expression args last value.
self assert: type last = $*.
aStream
crtab: level;
+ nextPutAll: '{ static ';
+ nextPutAll: (aCCodeGen arrayInitializerCalled: 'aLiteralArray' for: expression args first value type: type allButLast);
- nextPutAll: '{ ';
- nextPutAll: (aCCodeGen staticArrayInitializerCalled: 'aLiteralArray' for: expression args first value type: type allButLast);
nextPut: $;;
crtab: level + 1;
nextPutAll: variable name;
nextPutAll: ' = aLiteralArray;';
crtab: level;
nextPut: $};
cr!
Item was changed:
----- Method: VMClass>>sizeof: (in category 'translation support') -----
sizeof: objectSymbolOrClass
<doNotGenerate>
| index |
objectSymbolOrClass isInteger ifTrue:
[self flag: #Dan.
^BytesPerWord].
objectSymbolOrClass isSymbol ifTrue:
[(objectSymbolOrClass last == $*
or: [#long == objectSymbolOrClass
or: [#'unsigned long' == objectSymbolOrClass]]) ifTrue:
[^BytesPerWord].
index := #( #sqLong #usqLong #double
#int #'unsigned int' #float
#short #'unsigned short'
#char #'unsigned char' #'signed char')
indexOf: objectSymbolOrClass
+ ifAbsent:
+ [objectSymbolOrClass = #sqInt ifTrue: [^BytesPerOop].
+ self error: 'unrecognized C type name'].
- ifAbsent: [self error: 'unrecognized C type name'].
^#(8 8 8
4 4 4
2 2
1 1 1) at: index].
^(objectSymbolOrClass isBehavior
ifTrue: [objectSymbolOrClass]
ifFalse: [objectSymbolOrClass class])
alignedByteSizeOf: objectSymbolOrClass
forClient: self!
David T. Lewis uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-dtl.276.mcz
==================== Summary ====================
Name: VMMaker-dtl.276
Author: dtl
Time: 26 June 2012, 7:19:34.52 am
UUID: 8ca183d8-1667-4b12-bcb9-9679eed75702
Ancestors: VMMaker-dtl.275
Put CompiledMethod>>requiresConcreteImplementation in package VMMaker. This was miscategorized in my development image, hence missing from the ;VMMaker package.
=============== Diff against VMMaker-dtl.275 ===============
Item was added:
+ ----- Method: CompiledMethod>>requiresConcreteImplementation (in category '*VMMaker-translation') -----
+ requiresConcreteImplementation
+ | marker |
+ marker := self markerOrNil.
+ ^ marker notNil and: [marker = #subclassResponsibility].!
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.171.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.171
Author: eem
Time: 25 June 2012, 7:52:11.789 pm
UUID: c7fe70ad-ea30-4ba0-9645-a4060894480e
Ancestors: VMMaker.oscog-eem.170
Fix super expansions once again. Eliding the final return is ok, but
it means ReturnNode needs to add it back in. Further, AssignmentNode
would need to do something special for super expansions with
returns at other than the last statement, so raise an error if seen.
Move add of bytecodeSetSelector to fetchNextBytecode from
interpret so that e.g. dispatch in sqGnu.h doesn't have to duplicate
offset by bytecodeSetSelector.
=============== Diff against VMMaker.oscog-eem.170 ===============
Item was added:
+ ----- Method: AssignmentNode>>anyReturns: (in category '*VMMaker-C translation') -----
+ anyReturns: aSequenceOfNodes
+ aSequenceOfNodes do:
+ [:node|
+ node nodesDo:
+ [:n|
+ n isReturn ifTrue:
+ [^true]]].
+ ^false!
Item was changed:
----- Method: AssignmentNode>>asTranslatorNodeIn: (in category '*VMMaker-C translation') -----
asTranslatorNodeIn: aTMethod
"make a CCodeGenerator equivalent of me"
| varNode valueNode |
varNode := variable asTranslatorNodeIn: aTMethod.
valueNode := value asTranslatorNodeIn: aTMethod.
valueNode isStmtList ifFalse:
[^TAssignmentNode new
setVariable: varNode
expression: valueNode;
comment: comment].
+ "This is a super expansion. We are in trouble if any statement other than the last is a return."
+ (self anyReturns: valueNode statements allButLast) ifTrue:
+ [self error: 'haven''t implemented pushing down assignments into other than the last return'].
+ "As of 6/25/2012 19:30 superExpansionNodeFor:args: elides the final return."
+ self assert: valueNode statements last isReturn not.
^TStmtListNode new
setStatements: valueNode statements allButLast,
{ TAssignmentNode new
setVariable: varNode
expression: valueNode statements last;
comment: comment };
yourself!
Item was changed:
----- Method: CoInterpreter>>baseFrameReturn (in category 'return bytecodes') -----
baseFrameReturn
+ <inline: true>
| contextToReturnTo retToContext theFP theSP thePage newPage frameAbove |
<var: #theFP type: #'char *'>
<var: #theSP type: #'char *'>
<var: #thePage type: #'StackPage *'>
<var: #newPage type: #'StackPage *'>
<var: #frameAbove type: #'char *'>
contextToReturnTo := self frameCallerContext: localFP.
"The stack page is effectively free now, so free it. We must free it to be
correct in determining if contextToReturnTo is still married, and in case
makeBaseFrameFor: cogs a method, which may cause a code compaction,
in which case the frame must be free to avoid the relocation machinery
tracing the dead frame. Since freeing now temporarily violates the page-list
ordering invariant, use the assert-free version."
stackPages freeStackPageNoAssert: stackPage.
retToContext := self isContext: contextToReturnTo.
(retToContext
and: [self isStillMarriedContext: contextToReturnTo])
ifTrue:
[theFP := self frameOfMarriedContext: contextToReturnTo.
thePage := stackPages stackPageFor: theFP.
theFP = thePage headFP
ifTrue:
[theSP := thePage headSP]
ifFalse:
["Returning to some interior frame, presumably because of a sender assignment.
Move the frames above to another page (they may be in use, e.g. via coroutining).
Make the interior frame the top frame."
frameAbove := self findFrameAbove: theFP inPage: thePage.
"Since we've just deallocated a page we know that newStackPage won't deallocate an existing one."
newPage := self newStackPage.
self assert: newPage = stackPage.
self moveFramesIn: thePage through: frameAbove toPage: newPage.
stackPages markStackPageMostRecentlyUsed: newPage.
theFP := thePage headFP.
theSP := thePage headSP]]
ifFalse:
[(retToContext
and: [objectMemory isIntegerObject: (objectMemory fetchPointer: InstructionPointerIndex ofObject: contextToReturnTo)]) ifFalse:
[| contextToReturnFrom |
contextToReturnFrom := stackPages longAt: stackPage baseAddress - BytesPerWord.
self tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFrom: contextToReturnFrom
to: contextToReturnTo
returnValue: localReturnValue.
^self externalCannotReturn: localReturnValue from: contextToReturnFrom].
"We must void the instructionPointer to stop it being updated if makeBaseFrameFor:
cogs a method, which may cause a code compaction."
instructionPointer := 0.
thePage := self makeBaseFrameFor: contextToReturnTo.
theFP := thePage headFP.
theSP := thePage headSP].
self setStackPageAndLimit: thePage.
self assert: (stackPages stackPageFor: theFP) = stackPage.
localSP := theSP.
localFP := theFP.
localIP := self pointerForOop: self internalStackTop.
localIP asUnsignedInteger < objectMemory startOfMemory ifTrue:
[localIP asUnsignedInteger ~= cogit ceReturnToInterpreterPC ifTrue:
["localIP in the cog method zone indicates a return to machine code."
^self returnToMachineCodeFrame].
localIP := self pointerForOop: (self iframeSavedIP: localFP)].
self assert: (self checkIsStillMarriedContext: contextToReturnTo currentFP: localFP).
self setMethod: (self iframeMethod: localFP).
self internalStackTopPut: localReturnValue.
^self fetchNextBytecode!
Item was changed:
----- Method: CogVMSimulator>>interpret (in category 'interpreter shell') -----
interpret
"This is the main interpreter loop. It normally loops forever, fetching and executing bytecodes.
When running in the context of a web browser plugin VM, however, it must return control to the
web browser periodically. This should done only when the state of the currently running Squeak
thread is safely stored in the object heap. Since this is the case at the moment that a check for
interrupts is performed, that is when we return to the browser if it is time to do so. Interrupt
checks happen quite frequently.
Override for simulation to insert bytecode breakpoint support."
<inline: false>
"If stacklimit is zero then the stack pages have not been initialized."
stackLimit = 0 ifTrue:
[^self initStackPagesAndInterpret].
"record entry time when running as a browser plug-in"
self browserPluginInitialiseIfNeeded.
self internalizeIPandSP.
self fetchNextBytecode.
[true] whileTrue:
[self assertValidExecutionPointers.
atEachStepBlock value. "N.B. may be nil"
+ self dispatchOn: currentBytecode in: BytecodeTable.
- self dispatchOn: currentBytecode + bytecodeSetSelector in: BytecodeTable.
self incrementByteCount].
localIP := localIP - 1. "undo the pre-increment of IP before returning"
self externalizeIPandSP.
^nil
!
Item was changed:
----- Method: ReturnNode>>asTranslatorNodeIn: (in category '*VMMaker-C translation') -----
asTranslatorNodeIn: aTMethod
+ "Make a CCodeGenerator equivalent of a return."
+ | exprTranslation lastExpr |
+ exprTranslation := expr asTranslatorNodeIn: aTMethod.
- "Make a CCodeGenerator equivalent of a return.
- Since super calls are expanded the return must be elided from super expansions."
(expr isMessage
+ and: [expr receiver isVariableNode
+ and: [expr receiver key = 'super'
+ and: [exprTranslation isStmtList]]]) ifTrue:
+ ["super expansions containing returns are fine, and (as of 6/25/2012 19:27) the last
+ return is elided from the expansion by TMethod>>superExpansionNodeFor:args:.
+ So we need to ensure the last expression is a return and simply reuse any other
+ returns in the expansion."
+ exprTranslation statements last isReturn ifFalse:
+ [lastExpr := exprTranslation statements removeLast.
+ exprTranslation statements addLast:
+ (TReturnNode new
+ setExpression: lastExpr;
+ comment: comment;
+ yourself)].
+ ^exprTranslation].
- and: [expr receiver isVariableNode and: [expr receiver key = 'super']]) ifTrue:
- [^expr asTranslatorNodeIn: aTMethod].
^TReturnNode new
+ setExpression: exprTranslation;
+ comment: comment;
+ yourself!
- setExpression: (expr asTranslatorNodeIn: aTMethod);
- comment: comment!
Item was changed:
----- Method: StackInterpreter>>baseFrameReturn (in category 'return bytecodes') -----
baseFrameReturn
+ <inline: true>
| contextToReturnTo isAContext theFP theSP thePage frameAbove |
<var: #theFP type: #'char *'>
<var: #theSP type: #'char *'>
<var: #thePage type: #'StackPage *'>
<var: #frameAbove type: #'char *'>
contextToReturnTo := self frameCallerContext: localFP.
isAContext := self isContext: contextToReturnTo.
(isAContext
and: [self isStillMarriedContext: contextToReturnTo])
ifTrue:
[theFP := self frameOfMarriedContext: contextToReturnTo.
thePage := stackPages stackPageFor: theFP.
theFP = thePage headFP
ifTrue:
[theSP := thePage headSP.
stackPages freeStackPageNoAssert: stackPage "for a short time invariant is violated; assert follows"]
ifFalse:
["Returning to some interior frame, presumably because of a sender assignment.
Move the frames above to another page (they may be in use, e.g. via coroutining).
Make the interior frame the top frame."
frameAbove := self findFrameAbove: theFP inPage: thePage.
"Reuse the page we're exiting, which avoids allocating a new page and
manipulating the page list to mark the page we're entering as least recently
used (to avoid it being deallocated when allocating a new page)."
self moveFramesIn: thePage through: frameAbove toPage: stackPage.
theFP := thePage headFP.
theSP := thePage headSP]]
ifFalse:
[(isAContext
and: [objectMemory isIntegerObject: (objectMemory fetchPointer: InstructionPointerIndex ofObject: contextToReturnTo)]) ifFalse:
[^self internalCannotReturn: localReturnValue].
thePage := self makeBaseFrameFor: contextToReturnTo.
theFP := thePage headFP.
theSP := thePage headSP.
stackPages freeStackPageNoAssert: stackPage "for a short time invariant is violated; assert follows"].
self setStackPageAndLimit: thePage.
self assert: (stackPages stackPageFor: theFP) = stackPage.
localSP := theSP.
localFP := theFP.
self setMethod: (self frameMethod: localFP).
localIP := self pointerForOop: self internalStackTop.
self internalStackTopPut: localReturnValue.
self assert: (self checkIsStillMarriedContext: contextToReturnTo currentFP: localFP).
^self fetchNextBytecode!
Item was changed:
----- Method: StackInterpreter>>fetchNextBytecode (in category 'interpreter shell') -----
fetchNextBytecode
"This method fetches the next instruction (bytecode). Each bytecode method is responsible for fetching the next bytecode, preferably as early as possible to allow the memory system time to process the request before the next dispatch."
+ self cppIf: MULTIPLEBYTECODESETS
+ ifTrue: [currentBytecode := self fetchByte + bytecodeSetSelector]
+ ifFalse: [currentBytecode := self fetchByte]!
- currentBytecode := self fetchByte.
- !
Item was changed:
----- Method: StackInterpreter>>interpret (in category 'interpreter shell') -----
interpret
"This is the main interpreter loop. It normally loops forever, fetching and executing bytecodes. When running in the context of a browser plugin VM, however, it must return control to the browser periodically. This should done only when the state of the currently running Squeak thread is safely stored in the object heap. Since this is the case at the moment that a check for interrupts is performed, that is when we return to the browser if it is time to do so. Interrupt checks happen quite frequently."
<inline: false>
"If stacklimit is zero then the stack pages have not been initialized."
stackLimit = 0 ifTrue:
[^self initStackPagesAndInterpret].
"record entry time when running as a browser plug-in"
self browserPluginInitialiseIfNeeded.
self internalizeIPandSP.
self fetchNextBytecode.
+ [true] whileTrue: [self dispatchOn: currentBytecode in: BytecodeTable].
- [true] whileTrue: [self dispatchOn: currentBytecode + bytecodeSetSelector in: BytecodeTable].
localIP := localIP - 1. "undo the pre-increment of IP before returning"
self externalizeIPandSP.
^nil
!
Could we add issue update mails from
http://code.google.com/p/cog
TODO: Please add cog(a)googlecode.com to the mailing list (this has to be done manually)
best
cami
Author: eliot
Date: 2012-06-25 16:53:39 -0700 (Mon, 25 Jun 2012)
New Revision: 2561
Modified:
branches/Cog/cygwinbuild/HowToBuild
branches/Cog/cygwinbuild/plugins.ext
branches/Cog/cygwinbuild/plugins.int
branches/Cog/macbuild/HowToBuild
branches/Cog/macbuild/plugins.ext
branches/Cog/macbuild/plugins.int
branches/Cog/nsbuild/cygwinbuild/HowToBuild
branches/Cog/nsbuild/cygwinbuild/plugins.ext
branches/Cog/nsbuild/cygwinbuild/plugins.intbranches/Cog/nsbuild/macbuild/plugins.int
branches/Cog/nsbuild/unixbuild/HowToBuild
branches/Cog/nsbuild/unixbuild/bld/plugins.ext
branches/Cog/nsbuild/unixbuild/bld/plugins.int
branches/Cog/nscogbuild/cygwinbuild/HowToBuild
branches/Cog/nscogbuild/cygwinbuild/plugins.ext
branches/Cog/nscogbuild/cygwinbuild/plugins.intbranches/Cog/nscogbuild/macbuild/plugins.int
branches/Cog/nscogbuild/unixbuild/HowToBuild
branches/Cog/nscogbuild/unixbuild/bld/plugins.ext
branches/Cog/nscogbuild/unixbuild/bld/plugins.int
branches/Cog/stackbuild/cygwinbuild/HowToBuild
branches/Cog/stackbuild/cygwinbuild/plugins.ext
branches/Cog/stackbuild/cygwinbuild/plugins.int
branches/Cog/stackbuild/macbuild/HowToBuild
branches/Cog/stackbuild/macbuild/plugins.ext
branches/Cog/stackbuild/macbuild/plugins.int
branches/Cog/unixbuild/HowToBuild
branches/Cog/unixbuild/bld/plugins.ext
branches/Cog/unixbuild/bld/plugins.int
branches/Cog/unixbuild/mtbld/plugins.ext
branches/Cog/unixbuild/mtbld/plugins.int
Log:
Accurate comments for plugins.ext, plugins.int & their use in HowToBuild.
Modified: branches/Cog/cygwinbuild/HowToBuild
===================================================================
--- branches/Cog/cygwinbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/cygwinbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -30,6 +30,8 @@
4. At the end of this process you should have a brand new Croquet VM in the
cygwinbuild/build/vm folder (make sure you copy Croquet.map along with it)
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
+
3a. The cygwin makefile supports building three VM configurations, product,
assert and debug, building product by default. To build a configuration
simply type make configuration, e.g.
Modified: branches/Cog/cygwinbuild/plugins.ext
===================================================================
--- branches/Cog/cygwinbuild/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/cygwinbuild/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# List of external plugins.
+# Copied, perhaps edited, from ../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
BochsIA32Plugin \
SqueakFFIPrims \
Modified: branches/Cog/cygwinbuild/plugins.int
===================================================================
--- branches/Cog/cygwinbuild/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/cygwinbuild/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for internal plugins
+# Copied, perhaps edited, from ../src/examplePlugins.int
INTERNAL_PLUGINS = \
ADPCMCodecPlugin \
AsynchFilePlugin \
Modified: branches/Cog/macbuild/HowToBuild
===================================================================
--- branches/Cog/macbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/macbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -37,3 +37,5 @@
4. At the end of this process you should have a brand new Croquet.app in the
macbuild folder (or Fast.app Assert.app and Debug.app if you've used mvm).
+
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
Modified: branches/Cog/macbuild/plugins.ext
===================================================================
--- branches/Cog/macbuild/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/macbuild/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for external plugins
+# Copied, perhaps edited, from ../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
BochsIA32Plugin \
CroquetPlugin \
Modified: branches/Cog/macbuild/plugins.int
===================================================================
--- branches/Cog/macbuild/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/macbuild/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for internal plugins
+# Copied, perhaps edited, from ../src/examplePlugins.int
INTERNAL_PLUGINS = \
ADPCMCodecPlugin \
AsynchFilePlugin \
Modified: branches/Cog/nsbuild/cygwinbuild/HowToBuild
===================================================================
--- branches/Cog/nsbuild/cygwinbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nsbuild/cygwinbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -30,6 +30,8 @@
4. At the end of this process you should have a brand new Croquet VM in the
cygwinbuild/build/vm folder (make sure you copy Croquet.map along with it)
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
+
3a. The cygwin makefile supports building three VM configurations, product,
assert and debug, building product by default. To build a configuration
simply type make configuration, e.g.
Modified: branches/Cog/nsbuild/cygwinbuild/plugins.ext
===================================================================
--- branches/Cog/nsbuild/cygwinbuild/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nsbuild/cygwinbuild/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,2 +1,2 @@
-# List of external plugins.
+# Copied, perhaps edited, from ../../nssrc/examplePlugins.ext
EXTERNAL_PLUGINS =
Modified: branches/Cog/nsbuild/cygwinbuild/plugins.int
===================================================================
--- branches/Cog/nsbuild/cygwinbuild/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nsbuild/cygwinbuild/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for internal plugins
+# Copied, perhaps edited, from ../../nssrc/examplePlugins.int
INTERNAL_PLUGINS = \
AsynchFilePlugin \
BMPReadWriterPlugin \
Modified: branches/Cog/nsbuild/macbuild/plugins.int
===================================================================
--- branches/Cog/nsbuild/macbuild/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nsbuild/macbuild/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for external plugins
+# Copied, perhaps edited, from ../../nssrc/examplePlugins.int
INTERNAL_PLUGINS = \
AsynchFilePlugin \
BMPReadWriterPlugin \
Modified: branches/Cog/nsbuild/unixbuild/HowToBuild
===================================================================
--- branches/Cog/nsbuild/unixbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nsbuild/unixbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -23,7 +23,9 @@
4. At the end of it you'll get a new VM in the path provided via -prefix
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
+
3a. For an assert-enabled VM do
../../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak --with-src=nssrc --disable-cogit CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNO_VM_PROFILE=1 -DDEBUGVM=0" LIBS=-lpthread
Modified: branches/Cog/nsbuild/unixbuild/bld/plugins.ext
===================================================================
--- branches/Cog/nsbuild/unixbuild/bld/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nsbuild/unixbuild/bld/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,2 +1,2 @@
-# List of external plugins.
+# Copied, perhaps edited, from ../../../nssrc/examplePlugins.ext
EXTERNAL_PLUGINS = \
Modified: branches/Cog/nsbuild/unixbuild/bld/plugins.int
===================================================================
--- branches/Cog/nsbuild/unixbuild/bld/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nsbuild/unixbuild/bld/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for external plugins
+# Copied, perhaps edited, from ../../../nssrc/examplePlugins.int
INTERNAL_PLUGINS = \
AsynchFilePlugin \
BMPReadWriterPlugin \
Modified: branches/Cog/nscogbuild/cygwinbuild/HowToBuild
===================================================================
--- branches/Cog/nscogbuild/cygwinbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nscogbuild/cygwinbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -30,6 +30,9 @@
4. At the end of this process you should have a brand new Croquet VM in the
cygwinbuild/build/vm folder (make sure you copy Croquet.map along with it)
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
+
+
3a. The cygwin makefile supports building three VM configurations, product,
assert and debug, building product by default. To build a configuration
simply type make configuration, e.g.
Modified: branches/Cog/nscogbuild/cygwinbuild/plugins.ext
===================================================================
--- branches/Cog/nscogbuild/cygwinbuild/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nscogbuild/cygwinbuild/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,2 +1,2 @@
-# List of external plugins.
+# Copied, perhaps edited, from ../../nscogsrc/examplePlugins.ext
EXTERNAL_PLUGINS =
Modified: branches/Cog/nscogbuild/cygwinbuild/plugins.int
===================================================================
--- branches/Cog/nscogbuild/cygwinbuild/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nscogbuild/cygwinbuild/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for internal plugins
+# Copied, perhaps edited, from ../../nscogsrc/examplePlugins.int
INTERNAL_PLUGINS = \
AsynchFilePlugin \
BMPReadWriterPlugin \
Modified: branches/Cog/nscogbuild/macbuild/plugins.int
===================================================================
--- branches/Cog/nscogbuild/macbuild/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nscogbuild/macbuild/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for external plugins
+# Copied, perhaps edited, from ../../nscogsrc/examplePlugins.int
INTERNAL_PLUGINS = \
AsynchFilePlugin \
BMPReadWriterPlugin \
Modified: branches/Cog/nscogbuild/unixbuild/HowToBuild
===================================================================
--- branches/Cog/nscogbuild/unixbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nscogbuild/unixbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -25,7 +25,9 @@
4. At the end of it you'll get a new VM in the path provided via -prefix
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
+
3a. For an assert-enabled VM do
../../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak --with-src=nscogsrc CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DDEBUGVM=0" LIBS="-lpthread -luuid"
Modified: branches/Cog/nscogbuild/unixbuild/bld/plugins.ext
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bld/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nscogbuild/unixbuild/bld/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,2 +1,2 @@
-# List of external plugins.
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext
EXTERNAL_PLUGINS = \
Modified: branches/Cog/nscogbuild/unixbuild/bld/plugins.int
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bld/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/nscogbuild/unixbuild/bld/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for external plugins
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
INTERNAL_PLUGINS = \
AsynchFilePlugin \
BMPReadWriterPlugin \
Modified: branches/Cog/stackbuild/cygwinbuild/HowToBuild
===================================================================
--- branches/Cog/stackbuild/cygwinbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/stackbuild/cygwinbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -30,6 +30,9 @@
4. At the end of this process you should have a brand new Croquet VM in the
cygwinbuild/build/vm folder (make sure you copy Croquet.map along with it)
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
+
+
3a. The cygwin makefile supports building three VM configurations, product,
assert and debug, building product by default. To build a configuration
simply type make configuration, e.g.
Modified: branches/Cog/stackbuild/cygwinbuild/plugins.ext
===================================================================
--- branches/Cog/stackbuild/cygwinbuild/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/stackbuild/cygwinbuild/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# List of external plugins.
+# Copied, perhaps edited, from ../../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
SqueakFFIPrims \
Win32OSProcessPlugin
Modified: branches/Cog/stackbuild/cygwinbuild/plugins.int
===================================================================
--- branches/Cog/stackbuild/cygwinbuild/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/stackbuild/cygwinbuild/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for internal plugins
+# Copied, perhaps edited, from ../../src/examplePlugins.int
INTERNAL_PLUGINS = \
ADPCMCodecPlugin \
AsynchFilePlugin \
Modified: branches/Cog/stackbuild/macbuild/HowToBuild
===================================================================
--- branches/Cog/stackbuild/macbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/stackbuild/macbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -25,3 +25,5 @@
4. At the end of this process you should have a brand new Croquet.app in the
macbuild folder (or Fast.app Assert.app and Debug.app if you've used mvm).
+
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
Modified: branches/Cog/stackbuild/macbuild/plugins.ext
===================================================================
--- branches/Cog/stackbuild/macbuild/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/stackbuild/macbuild/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for external plugins
+# Copied, perhaps edited, from ../../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
CroquetPlugin \
SqueakFFIPrims \
Modified: branches/Cog/stackbuild/macbuild/plugins.int
===================================================================
--- branches/Cog/stackbuild/macbuild/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/stackbuild/macbuild/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for internal plugins
+# Copied, perhaps edited, from ../../src/examplePlugins.int
INTERNAL_PLUGINS = \
ADPCMCodecPlugin \
AsynchFilePlugin \
Modified: branches/Cog/unixbuild/HowToBuild
===================================================================
--- branches/Cog/unixbuild/HowToBuild 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/unixbuild/HowToBuild 2012-06-25 23:53:39 UTC (rev 2561)
@@ -37,7 +37,9 @@
4. At the end of it you'll get a new VM in the path provided via -prefix
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
+
3a. For an assert-enabled VM do
../../platforms/unix/config/configure --without-npsqueak CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
Modified: branches/Cog/unixbuild/bld/plugins.ext
===================================================================
--- branches/Cog/unixbuild/bld/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/unixbuild/bld/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for external plugins
+# Copied, perhaps edited, from ../../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
BochsIA32Plugin \
Modified: branches/Cog/unixbuild/bld/plugins.int
===================================================================
--- branches/Cog/unixbuild/bld/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/unixbuild/bld/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for internal plugins
+# Copied, perhaps edited, from ../../src/examplePlugins.int
INTERNAL_PLUGINS = \
ADPCMCodecPlugin \
AsynchFilePlugin \
Modified: branches/Cog/unixbuild/mtbld/plugins.ext
===================================================================
--- branches/Cog/unixbuild/mtbld/plugins.ext 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/unixbuild/mtbld/plugins.ext 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for external plugins
+# Copied, perhaps edited, from ../../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
BochsIA32Plugin \
Modified: branches/Cog/unixbuild/mtbld/plugins.int
===================================================================
--- branches/Cog/unixbuild/mtbld/plugins.int 2012-06-22 01:46:42 UTC (rev 2560)
+++ branches/Cog/unixbuild/mtbld/plugins.int 2012-06-25 23:53:39 UTC (rev 2561)
@@ -1,4 +1,4 @@
-# Automatically generated makefile include for internal plugins
+# Copied, perhaps edited, from ../../src/examplePlugins.int
INTERNAL_PLUGINS = \
ADPCMCodecPlugin \
AsynchFilePlugin \