Skip to content

Commit 5c89251

Browse files
authored
Merge pull request #997 from tesonep/fixing-build-in-windows
fixing-build-in-windows
2 parents 8457e91 + fbf8f62 commit 5c89251

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

smalltalksrc/VMMaker/CogMethod.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ CogMethod class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [
9999
['objectHeader'] -> [VMClass objectMemoryClass baseHeaderSize = 8
100100
ifTrue: [#sqLong]
101101
ifFalse: [#sqInt]].
102-
['cmNumArgs'] -> [#uint8_t].
102+
['cmNumArgs'] -> [#(unsigned ' : 8')].
103103
['cmType'] -> [#(unsigned ' : 3')].
104104
['cmRefersToYoung'] -> [#(unsigned #Boolean ' : 1')].
105105
['cpicHasMNUCaseOrCMIsFullBlock']

smalltalksrc/VMMaker/CogMethodSurrogate32.class.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ CogMethodSurrogate32 class >> offsetOf: aByteSymbol [
4141
baseHeaderSize := self objectMemoryClass baseHeaderSize.
4242
^aByteSymbol caseOf:
4343
{
44+
[#objectHeader] -> [0].
4445
[#cmNumArgs] -> [0 + baseHeaderSize].
4546
[#picUsage] -> [6 + baseHeaderSize].
4647
[#methodObject] -> [8 + baseHeaderSize].

smalltalksrc/VMMaker/CogMethodSurrogate64.class.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ CogMethodSurrogate64 class >> offsetOf: aByteSymbol [
4141
baseHeaderSize := self objectMemoryClass baseHeaderSize.
4242
^aByteSymbol caseOf:
4343
{
44+
[#objectHeader] -> [0].
4445
[#cmNumArgs] -> [0 + baseHeaderSize].
4546
[#methodObject] -> [8 + baseHeaderSize].
4647
[#methodHeader] -> [16 + baseHeaderSize].

smalltalksrc/VMMaker/CogSistaMethodSurrogate32.class.st

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Class {
88

99
{ #category : 'accessing' }
1010
CogSistaMethodSurrogate32 class >> alignedByteSize [
11-
^24 + self baseHeaderSize
11+
^28 + self baseHeaderSize
1212
]
1313

1414
{ #category : 'accessing' }
@@ -21,12 +21,12 @@ CogSistaMethodSurrogate32 class >> offsetOf: aByteSymbol [
2121

2222
{ #category : 'accessing' }
2323
CogSistaMethodSurrogate32 >> counters [
24-
^memory unsignedLong32At: address + 20 + baseHeaderSize
24+
^memory unsignedLong32At: address + 23 + baseHeaderSize
2525
]
2626

2727
{ #category : 'accessing' }
2828
CogSistaMethodSurrogate32 >> counters: aValue [
2929
^memory
30-
unsignedLong32At: address + baseHeaderSize + 20
30+
unsignedLong32At: address + baseHeaderSize + 23
3131
put: aValue
3232
]

smalltalksrc/VMMaker/CogSistaMethodSurrogate64.class.st

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Class {
88

99
{ #category : 'accessing' }
1010
CogSistaMethodSurrogate64 class >> alignedByteSize [
11-
^40 + self baseHeaderSize
11+
^48 + self baseHeaderSize
1212
]
1313

1414
{ #category : 'accessing' }
@@ -21,12 +21,12 @@ CogSistaMethodSurrogate64 class >> offsetOf: aByteSymbol [
2121

2222
{ #category : 'accessing' }
2323
CogSistaMethodSurrogate64 >> counters [
24-
^memory unsignedLong64At: address + 32 + baseHeaderSize
24+
^memory unsignedLong64At: address + 39 + baseHeaderSize
2525
]
2626

2727
{ #category : 'accessing' }
2828
CogSistaMethodSurrogate64 >> counters: aValue [
2929
^memory
30-
unsignedLong64At: address + baseHeaderSize + 32
30+
unsignedLong64At: address + baseHeaderSize + 39
3131
put: aValue
3232
]

smalltalksrc/VMMaker/SimpleStackBasedCogit.class.st

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,8 @@ SimpleStackBasedCogit >> genLookupForPerformNumArgs: numArgs [
16911691
Jump to fail if not equal"
16921692
self backEnd byteReadsZeroExtend ifFalse:
16931693
[self MoveCq: 0 R: SendNumArgsReg].
1694-
self MoveMb: (self offset: CogMethod of: #cmNumArgs) r: ClassReg R: SendNumArgsReg.
1694+
"We need the offset of cmNumArgs, but as it is a bit field, we have to get the offset of the previous element plus its size. It works because the previous one is a sqLong"
1695+
self MoveMb: ((self offset: CogMethod of: #objectHeader) + (self sizeof: #sqLong)) r: ClassReg R: SendNumArgsReg.
16951696
"numArgs contains the number of arguments of perform, which contains the selector."
16961697
self CmpCq: numArgs - 1 R: SendNumArgsReg.
16971698
jumpWrongArity := self JumpNonZero: 0.

0 commit comments

Comments
 (0)