Skip to content

Commit

Permalink
include function name in sort key for items (call_once duplicates)
Browse files Browse the repository at this point in the history
  • Loading branch information
jberthold committed Jan 16, 2025
1 parent e6d3086 commit c866509
Show file tree
Hide file tree
Showing 12 changed files with 739 additions and 739 deletions.
4 changes: 2 additions & 2 deletions tests/integration/normalise-filter.jq
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
),
items:
( [ .items[] ]
# sort items by symbol name they refer to
| sort_by(.symbol_name)
# sort items by symbol name they refer to and by the function name for functions
| sort_by(.symbol_name, .mono_item_kind.MonoItemFn.name)
)
}
134 changes: 67 additions & 67 deletions tests/integration/programs/assert_eq.smir.json.expected
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,73 @@
},
"symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h"
},
{
"details": null,
"mono_item_kind": {
"MonoItemFn": {
"body": [
{
"arg_count": 2,
"blocks": [
{
"statements": [],
"terminator": {
"kind": {
"Call": {
"args": [],
"destination": {
"local": 0,
"projection": []
},
"func": {
"Move": {
"local": 1,
"projection": []
}
},
"target": 1,
"unwind": "Continue"
}
},
"span": 40
}
},
{
"statements": [],
"terminator": {
"kind": "Return",
"span": 40
}
}
],
"locals": [
{
"mutability": "Mut",
"span": 40,
"ty": 1
},
{
"mutability": "Not",
"span": 40,
"ty": 7
},
{
"mutability": "Not",
"span": 40,
"ty": 1
}
],
"span": 40,
"spread_arg": 2,
"var_debug_info": []
}
],
"id": 3,
"name": "<fn() as std::ops::FnOnce<()>>::call_once"
}
},
"symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h"
},
{
"details": null,
"mono_item_kind": {
Expand Down Expand Up @@ -1136,73 +1203,6 @@
},
"symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h"
},
{
"details": null,
"mono_item_kind": {
"MonoItemFn": {
"body": [
{
"arg_count": 2,
"blocks": [
{
"statements": [],
"terminator": {
"kind": {
"Call": {
"args": [],
"destination": {
"local": 0,
"projection": []
},
"func": {
"Move": {
"local": 1,
"projection": []
}
},
"target": 1,
"unwind": "Continue"
}
},
"span": 40
}
},
{
"statements": [],
"terminator": {
"kind": "Return",
"span": 40
}
}
],
"locals": [
{
"mutability": "Mut",
"span": 40,
"ty": 1
},
{
"mutability": "Not",
"span": 40,
"ty": 7
},
{
"mutability": "Not",
"span": 40,
"ty": 1
}
],
"span": 40,
"spread_arg": 2,
"var_debug_info": []
}
],
"id": 3,
"name": "<fn() as std::ops::FnOnce<()>>::call_once"
}
},
"symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h"
},
{
"details": null,
"mono_item_kind": {
Expand Down
134 changes: 67 additions & 67 deletions tests/integration/programs/binop.smir.json.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,73 @@
},
"symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h"
},
{
"details": null,
"mono_item_kind": {
"MonoItemFn": {
"body": [
{
"arg_count": 2,
"blocks": [
{
"statements": [],
"terminator": {
"kind": {
"Call": {
"args": [],
"destination": {
"local": 0,
"projection": []
},
"func": {
"Move": {
"local": 1,
"projection": []
}
},
"target": 1,
"unwind": "Continue"
}
},
"span": 40
}
},
{
"statements": [],
"terminator": {
"kind": "Return",
"span": 40
}
}
],
"locals": [
{
"mutability": "Mut",
"span": 40,
"ty": 1
},
{
"mutability": "Not",
"span": 40,
"ty": 7
},
{
"mutability": "Not",
"span": 40,
"ty": 1
}
],
"span": 40,
"spread_arg": 2,
"var_debug_info": []
}
],
"id": 3,
"name": "<fn() as std::ops::FnOnce<()>>::call_once"
}
},
"symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h"
},
{
"details": null,
"mono_item_kind": {
Expand Down Expand Up @@ -2245,73 +2312,6 @@
},
"symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h"
},
{
"details": null,
"mono_item_kind": {
"MonoItemFn": {
"body": [
{
"arg_count": 2,
"blocks": [
{
"statements": [],
"terminator": {
"kind": {
"Call": {
"args": [],
"destination": {
"local": 0,
"projection": []
},
"func": {
"Move": {
"local": 1,
"projection": []
}
},
"target": 1,
"unwind": "Continue"
}
},
"span": 40
}
},
{
"statements": [],
"terminator": {
"kind": "Return",
"span": 40
}
}
],
"locals": [
{
"mutability": "Mut",
"span": 40,
"ty": 1
},
{
"mutability": "Not",
"span": 40,
"ty": 7
},
{
"mutability": "Not",
"span": 40,
"ty": 1
}
],
"span": 40,
"spread_arg": 2,
"var_debug_info": []
}
],
"id": 3,
"name": "<fn() as std::ops::FnOnce<()>>::call_once"
}
},
"symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h"
},
{
"details": null,
"mono_item_kind": {
Expand Down
Loading

0 comments on commit c866509

Please sign in to comment.