-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd4e4aa
commit 4ca248d
Showing
4 changed files
with
41 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2777,24 +2777,31 @@ addNamesFromModule: [ | |
|
||
finalizeListNode: [ | ||
struct: Struct; | ||
validOutputCount: block.stack.size; | ||
|
||
processor compilable [ | ||
i: 0 dynamic; | ||
|
||
[ | ||
i block.stack.size < [ | ||
curRef: i @[email protected]; | ||
curRef getVar.data.getTag VarInvalid = [ | ||
i @validOutputCount set | ||
FALSE | ||
] [ | ||
newField: Field; | ||
processor.specialNames.emptyNameInfo @newField.@nameInfo set | ||
|
||
newField: Field; | ||
processor.specialNames.emptyNameInfo @newField.@nameInfo set | ||
curRef getVar.temporary [ | ||
curRef @newField.@refToVar set | ||
] [ | ||
@curRef TRUE dynamic @processor @block createRef @newField.@refToVar set | ||
@curRef makeVarPtrCaptured | ||
] if | ||
|
||
curRef getVar.temporary [ | ||
curRef @newField.@refToVar set | ||
] [ | ||
@curRef TRUE dynamic @processor @block createRef @newField.@refToVar set | ||
@curRef makeVarPtrCaptured | ||
newField @[email protected] | ||
i 1 + @i set processor compilable | ||
] if | ||
|
||
newField @[email protected] | ||
i 1 + @i set processor compilable | ||
] && | ||
] loop | ||
] when | ||
|
@@ -2809,7 +2816,7 @@ finalizeListNode: [ | |
|
||
i: 0 dynamic; | ||
[ | ||
i block.stack.size < [ | ||
i validOutputCount < [ | ||
curFieldRef: i @[email protected].@refToVar; | ||
|
||
curFieldRef isVirtual [ | ||
|
@@ -2826,7 +2833,7 @@ finalizeListNode: [ | |
] && | ||
] loop | ||
|
||
@block.@stack.clear | ||
block.stack.size validOutputCount - @block.@stack.shrink | ||
refToStruct @[email protected] | ||
] when | ||
]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,9 @@ getPointerTypeDebugDeclaration: [ | |
var: refToVar getVar; | ||
debugDeclarationIndex: refToVar @processor getMplSchema.dbgTypeDeclarationId copy; | ||
[debugDeclarationIndex -1 = ~] "Pointee has no type debug info!" assert | ||
"DW_TAG_pointer_type" makeStringView debugDeclarationIndex processor.options.pointerSize 0ix cast 0 cast @processor addDerivedTypeInfo | ||
index: "DW_TAG_pointer_type" makeStringView debugDeclarationIndex processor.options.pointerSize 0ix cast 0 cast @processor addDerivedTypeInfo; | ||
|
||
index | ||
]; | ||
|
||
addMemberInfo: [ | ||
|
@@ -147,17 +149,16 @@ addMemberInfo: [ | |
name: field.nameInfo processor.nameManager.getText; | ||
|
||
name "" = [ | ||
("!" index " = !DIDerivedType(tag: DW_TAG_member, name: \"f" fieldNumber "\", scope: !" block.funcDbgIndex | ||
("!" index " = !DIDerivedType(tag: DW_TAG_member, name: \"f" fieldNumber "\"" | ||
", file: !" processor.positions.last.file.debugId | ||
", line: " processor.positions.last.line ", baseType: !" debugDeclarationIndex ", size: " fsize 8 * ", offset: " offset 8 * ")") assembleString | ||
] [ | ||
("!" index " = !DIDerivedType(tag: DW_TAG_member, name: \"" name "\", scope: !" block.funcDbgIndex | ||
("!" index " = !DIDerivedType(tag: DW_TAG_member, name: \"" name "\"" | ||
", file: !" processor.positions.last.file.debugId | ||
", line: " processor.positions.last.line ", baseType: !" debugDeclarationIndex ", size: " fsize 8 * ", offset: " offset 8 * ")") assembleString | ||
] if | ||
|
||
addDebugString | ||
index block.funcDbgIndex @processor.@[email protected] | ||
|
||
offset fsize + @offset set | ||
index | ||
|
@@ -213,15 +214,13 @@ getTypeDebugDeclaration: [ | |
"}" @newDebugInfo.cat | ||
@newDebugInfo move addDebugString | ||
|
||
index block.funcDbgIndex @processor.@[email protected] | ||
|
||
index: processor.debugInfo.lastId copy; | ||
processor.debugInfo.lastId 1 + @processor.@debugInfo.@lastId set | ||
|
||
("!" index " = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !" processor.positions.last.file.debugId | ||
", name: \"" refToVar @processor block getDebugType "\", line: " processor.positions.last.line ", size: " refToVar @processor getStorageSize 0ix cast 0 cast 8 * ", elements: !" index 1 - | ||
", name: \"" refToVar @processor block getDebugType "\", size: " refToVar @processor getStorageSize 0ix cast 0 cast 8 * ", elements: !" index 1 - | ||
")") assembleString addDebugString | ||
index block.funcDbgIndex @processor.@[email protected] | ||
index | ||
] [ | ||
[FALSE] "Unknown type in getTypeDebugDeclaration!" assert | ||
|
@@ -508,13 +507,18 @@ correctUnitInfo: [ | |
clearUnusedDebugInfo: [ | ||
processor:; | ||
|
||
clearString: [ | ||
s:; | ||
String @s set | ||
]; | ||
|
||
processor.debugInfo.locationIds [ | ||
pair:; | ||
locId: pair.key; | ||
funcDbgId: pair.value; | ||
debugString: funcDbgId 4 + processor.debugInfo.strings.at; | ||
debugString.size 0 = [ | ||
String locId 4 + @processor.@[email protected] set | ||
locId 4 + @processor.@[email protected] clearString | ||
] when | ||
] each | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters