Skip to content

Cleanup warnings #906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: pharo-12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 17 additions & 30 deletions smalltalksrc/VMMaker/Cogit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ Class {
'cPICEndOfCodeLabel',
'ceMallocTrampoline',
'ceFreeTrampoline',
'debugBytecodePointers',
'debugOpcodeIndices',
'disassemblingMethod',
'cogConstituentIndex',
'directedSendUsesBinding',
Expand Down Expand Up @@ -1193,20 +1191,18 @@ Cogit class >> mustBeGlobal: var [
only used outside of Cogit by the object representation). Include CFramePointer CStackPointer as
a hack to get them declared at all."

^ #( 'ceBaseFrameReturnTrampoline' #ceCaptureCStackPointers
'ceCheckForInterruptTrampoline' ceEnterCogCodePopReceiverReg
realCEEnterCogCodePopReceiverReg
ceCallCogCodePopReceiverReg realCECallCogCodePopReceiverReg
ceCallCogCodePopReceiverAndClassRegs
realCECallCogCodePopReceiverAndClassRegs
'ceReturnToInterpreterTrampoline'
'ceCannotResumeTrampoline' ceTryLockVMOwner ceUnlockVMOwner
'cmEntryOffset' 'cmNoCheckEntryOffset' 'cmDynSuperEntryOffset'
'cmSelfSendEntryOffset' 'missOffset' 'cbEntryOffset'
'cbNoSwitchEntryOffset' 'blockNoContextSwitchOffset'
CFramePointer CStackPointer 'cFramePointerInUse'
ceGetFP ceGetSP traceFlags 'traceStores' debugPrimCallStackOffset )
includes: var
^#( 'ceBaseFrameReturnTrampoline' #ceCaptureCStackPointers 'ceCheckForInterruptTrampoline'
ceEnterCogCodePopReceiverReg realCEEnterCogCodePopReceiverReg
ceCallCogCodePopReceiverReg realCECallCogCodePopReceiverReg
ceCallCogCodePopReceiverAndClassRegs realCECallCogCodePopReceiverAndClassRegs
'ceReturnToInterpreterTrampoline' 'ceCannotResumeTrampoline'
ceTryLockVMOwner ceUnlockVMOwner
'cmEntryOffset' 'cmNoCheckEntryOffset' 'cmDynSuperEntryOffset' 'cmSelfSendEntryOffset'
'missOffset' 'cbEntryOffset' 'cbNoSwitchEntryOffset' 'blockNoContextSwitchOffset'
CFramePointer CStackPointer 'cFramePointerInUse' ceGetFP ceGetSP
traceFlags 'traceStores' debugPrimCallStackOffset)
includes: var

]

{ #category : 'translation' }
Expand Down Expand Up @@ -5203,6 +5199,7 @@ Cogit >> compileCogFullBlockMethod: numCopied [
inBlock := InFullBlock.
postCompileHook := nil.
maxLitIndex := -1.

initialPC := coInterpreter startPCOfMethod: methodObj.
"initial estimate. Actual endPC is determined in scanMethod."
endPC := objectMemory numBytesOf: methodObj.
Expand Down Expand Up @@ -7631,8 +7628,8 @@ Cogit >> generateInstructionsAt: eventualAbsoluteAddress [
<var: #fixup type: #'BytecodeFixup *'>
absoluteAddress := eventualAbsoluteAddress.
pcDependentIndex := 0.
0 to: opcodeIndex - 1 do:
[:i|

0 to: opcodeIndex - 1 do: [:i|
abstractInstruction := self abstractInstructionAt: i.
abstractInstruction isPCDependent
ifTrue:
Expand All @@ -7643,8 +7640,7 @@ Cogit >> generateInstructionsAt: eventualAbsoluteAddress [
absoluteAddress := absoluteAddress + abstractInstruction machineCodeSize]
ifFalse:
[absoluteAddress := abstractInstruction concretizeAt: absoluteAddress]].
0 to: pcDependentIndex - 1 do:
[:j|
0 to: pcDependentIndex - 1 do: [:j|
fixup := self fixupAtIndex: j.
abstractInstruction := self abstractInstructionAt: fixup instructionIndex.
abstractInstruction concretizeAt: abstractInstruction address].
Expand Down Expand Up @@ -11199,16 +11195,7 @@ Cogit >> setInterpreter: aCoInterpreter [

extA := numExtB := extB := 0.

compilationTrace ifNil: [
compilationTrace := self class initializationOptions
at: #compilationTrace
ifAbsent: [ 0 ] ].
debugOpcodeIndices := self class initializationOptions
at: #debugOpcodeIndices
ifAbsent: [ Set new ].
debugBytecodePointers := self class initializationOptions
at: #debugBytecodePointers
ifAbsent: [ Set new ]
compilationTrace ifNil: [compilationTrace := self class initializationOptions at: #compilationTrace ifAbsent: [0]]
]

{ #category : 'jit - api' }
Expand Down
30 changes: 23 additions & 7 deletions smalltalksrc/VMMaker/StackInterpreter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -1081,8 +1081,8 @@ StackInterpreter class >> initializePrimitiveTable [
(63 primitiveStringAt)
(64 primitiveStringAtPut)
"The stream primitives no longer pay their way; normal Smalltalk code is faster."
(65 primitiveStartProfiling)"was primitiveNext"
(66 primitiveStopProfiling) "was primitiveNextPut"
(65 0)
(66 0)
(67 0 "a.k.a. primitiveFail but faster because primitiveFail won't even be called") "was primitiveAtEnd"

"StorageManagement Primitives (68-79)"
Expand Down Expand Up @@ -1955,16 +1955,32 @@ StackInterpreter >> addIdleUsecs: idleUsecs [
StackInterpreter >> addLastLink: proc toList: aList [
"Add the given process to the end of the given linked list
and set the backpointer of process to its new list."
| lastLink |
| lastLink procList |

lastLink := objectMemory
fetchPointer: LastLinkIndex
ofObject: aList.

"If the process is already in a list two cases may arise"
procList := objectMemory followField: MyListIndex ofObject: proc.
procList ~= objectMemory nilObject ifTrue: [
procList = aList ifTrue: [
"It it is in the same list we want to put it, remove it so we make sure to install it at the end"
self removeProcess: proc fromList: aList.
] ifFalse: [
"Otherwise, we cannot ensure a correct behavior, fail.
If the process is already in a list, do not silently move it to another one"
self error: 'Process is already suspended in a different list'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is failing here now, we should update the Pharo image to an image that does not present this bug.

]].

self deny: (objectMemory isForwarded: proc).
self deny: (objectMemory isForwarded: aList).
self assert: (objectMemory fetchPointer: NextLinkIndex ofObject: proc) = objectMemory nilObject.
(self isEmptyList: aList)
ifTrue: [objectMemory storePointer: FirstLinkIndex ofObject: aList withValue: proc]
ifFalse:
[lastLink := objectMemory fetchPointer: LastLinkIndex ofObject: aList.
self assert: lastLink ~= proc.
objectMemory storePointer: NextLinkIndex ofObject: lastLink withValue: proc].
ifFalse: [
lastLink := objectMemory fetchPointer: LastLinkIndex ofObject: aList.
objectMemory storePointer: NextLinkIndex ofObject: lastLink withValue: proc].
objectMemory storePointer: LastLinkIndex ofObject: aList withValue: proc.
objectMemory storePointer: MyListIndex ofObject: proc withValue: aList
]
Expand Down
7 changes: 3 additions & 4 deletions smalltalksrc/VMMaker/StackToRegisterMappingCogit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3134,8 +3134,8 @@ StackToRegisterMappingCogit >> generateInstructionsAt: eventualAbsoluteAddress [
<var: #fixup type: #'BytecodeFixup *'>
absoluteAddress := eventualAbsoluteAddress.
pcDependentIndex := 0.
0 to: opcodeIndex - 1 do:
[:i|

0 to: opcodeIndex - 1 do: [:i|
abstractInstruction := self abstractInstructionAt: i.
abstractInstruction isPCDependent
ifTrue:
Expand All @@ -3157,8 +3157,7 @@ StackToRegisterMappingCogit >> generateInstructionsAt: eventualAbsoluteAddress [
absoluteAddress := absoluteAddress + abstractInstruction machineCodeSize]
ifFalse:
[absoluteAddress := abstractInstruction concretizeAt: absoluteAddress]].
0 to: pcDependentIndex - 1 do:
[:j|
0 to: pcDependentIndex - 1 do: [:j|
fixup := self fixupAtIndex: j.
abstractInstruction := self abstractInstructionAt: fixup instructionIndex.
abstractInstruction concretizeAt: abstractInstruction address].
Expand Down
2 changes: 1 addition & 1 deletion src/ffi/worker/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void *worker_run(void *aWorker) {
}


logWarn("Finishing Nested run: %d from %d\n", worker->nestedRuns, myRun);
logInfo("Finishing Nested run: %d from %d\n", worker->nestedRuns, myRun);

worker->nestedRuns --;

Expand Down