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 {
3333 Self { blocks, locals, arg_count }
3434 }
3535
36- /// Gets the function's return local .
36+ /// Return local that holds this function's return value .
3737 pub fn ret_local ( & self ) -> & LocalDecl {
3838 & self . locals [ 0 ]
3939 }
4040
41- /// Gets the locals in `self` that correspond to the function's arguments.
41+ /// Locals in `self` that correspond to this function's arguments.
4242 pub fn arg_locals ( & self ) -> & [ LocalDecl ] {
4343 & self . locals [ 1 ..self . arg_count + 1 ]
4444 }
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+ }
4551}
4652
4753type LocalDecls = Vec < LocalDecl > ;
You can’t perform that action at this time.
0 commit comments