1
- use rustc_abi:: { ExternAbi , Size } ;
1
+ use rustc_abi:: Size ;
2
2
use rustc_ast:: ast:: Mutability ;
3
3
use rustc_middle:: ty:: layout:: LayoutOf as _;
4
4
use rustc_middle:: ty:: { self , Instance , Ty } ;
5
5
use rustc_span:: { BytePos , Loc , Symbol , hygiene} ;
6
+ use rustc_target:: callconv:: FnAbi ;
7
+ use rustc_target:: callconv:: Conv ;
6
8
7
9
use crate :: helpers:: check_min_arg_count;
8
10
use crate :: * ;
@@ -11,13 +13,13 @@ impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}
11
13
pub trait EvalContextExt < ' tcx > : crate :: MiriInterpCxExt < ' tcx > {
12
14
fn handle_miri_backtrace_size (
13
15
& mut self ,
14
- abi : ExternAbi ,
16
+ abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
15
17
link_name : Symbol ,
16
18
args : & [ OpTy < ' tcx > ] ,
17
19
dest : & MPlaceTy < ' tcx > ,
18
20
) -> InterpResult < ' tcx > {
19
21
let this = self . eval_context_mut ( ) ;
20
- let [ flags] = this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
22
+ let [ flags] = this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
21
23
22
24
let flags = this. read_scalar ( flags) ?. to_u64 ( ) ?;
23
25
if flags != 0 {
@@ -31,7 +33,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
31
33
32
34
fn handle_miri_get_backtrace (
33
35
& mut self ,
34
- abi : ExternAbi ,
36
+ abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
35
37
link_name : Symbol ,
36
38
args : & [ OpTy < ' tcx > ] ,
37
39
dest : & MPlaceTy < ' tcx > ,
@@ -72,7 +74,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
72
74
// storage for pointers is allocated by miri
73
75
// deallocating the slice is undefined behavior with a custom global allocator
74
76
0 => {
75
- let [ _flags] = this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
77
+ let [ _flags] = this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
76
78
77
79
let alloc = this. allocate ( array_layout, MiriMemoryKind :: Rust . into ( ) ) ?;
78
80
@@ -87,7 +89,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
87
89
}
88
90
// storage for pointers is allocated by the caller
89
91
1 => {
90
- let [ _flags, buf] = this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
92
+ let [ _flags, buf] = this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
91
93
92
94
let buf_place = this. deref_pointer ( buf) ?;
93
95
@@ -137,13 +139,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
137
139
138
140
fn handle_miri_resolve_frame (
139
141
& mut self ,
140
- abi : ExternAbi ,
142
+ abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
141
143
link_name : Symbol ,
142
144
args : & [ OpTy < ' tcx > ] ,
143
145
dest : & MPlaceTy < ' tcx > ,
144
146
) -> InterpResult < ' tcx > {
145
147
let this = self . eval_context_mut ( ) ;
146
- let [ ptr, flags] = this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
148
+ let [ ptr, flags] = this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
147
149
148
150
let flags = this. read_scalar ( flags) ?. to_u64 ( ) ?;
149
151
@@ -215,14 +217,14 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
215
217
216
218
fn handle_miri_resolve_frame_names (
217
219
& mut self ,
218
- abi : ExternAbi ,
220
+ abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
219
221
link_name : Symbol ,
220
222
args : & [ OpTy < ' tcx > ] ,
221
223
) -> InterpResult < ' tcx > {
222
224
let this = self . eval_context_mut ( ) ;
223
225
224
226
let [ ptr, flags, name_ptr, filename_ptr] =
225
- this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
227
+ this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
226
228
227
229
let flags = this. read_scalar ( flags) ?. to_u64 ( ) ?;
228
230
if flags != 0 {
0 commit comments