File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
compiler/stable_mir/src/mir Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,21 @@ impl Body {
33
33
Self { blocks, locals, arg_count }
34
34
}
35
35
36
- /// Gets the function's return local .
36
+ /// Return local that holds this function's return value .
37
37
pub fn ret_local ( & self ) -> & LocalDecl {
38
38
& self . locals [ 0 ]
39
39
}
40
40
41
- /// Gets the locals in `self` that correspond to the function's arguments.
41
+ /// Locals in `self` that correspond to this function's arguments.
42
42
pub fn arg_locals ( & self ) -> & [ LocalDecl ] {
43
43
& self . locals [ 1 ..self . arg_count + 1 ]
44
44
}
45
+
46
+ /// Internal locals for this function. These are the locals that are
47
+ /// neither the return local nor the argument locals.
48
+ pub fn internal_locals ( & self ) -> & [ LocalDecl ] {
49
+ & self . locals [ self . arg_count + 1 ..]
50
+ }
45
51
}
46
52
47
53
type LocalDecls = Vec < LocalDecl > ;
You can’t perform that action at this time.
0 commit comments