File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ impl<'module_environment> FuncEnvironment<'module_environment> {
231231 self . isa . pointer_type ( )
232232 }
233233
234+ /// Retrieves the VMContext, creating it first if necessary.
234235 pub ( crate ) fn vmctx ( & mut self , func : & mut Function ) -> ir:: GlobalValue {
235236 self . vmctx . unwrap_or_else ( || {
236237 let vmctx = func. create_global_value ( ir:: GlobalValueData :: VMContext ) ;
@@ -257,6 +258,7 @@ impl<'module_environment> FuncEnvironment<'module_environment> {
257258 } )
258259 }
259260
261+ /// Codegens a reference to the VMContext, and return it as well.
260262 pub ( crate ) fn vmctx_val ( & mut self , pos : & mut FuncCursor < ' _ > ) -> ir:: Value {
261263 let pointer_type = self . pointer_type ( ) ;
262264 let vmctx = self . vmctx ( & mut pos. func ) ;
@@ -327,7 +329,7 @@ impl<'module_environment> FuncEnvironment<'module_environment> {
327329 ptr
328330 }
329331
330- /// Get the `*mut VMStoreContext` value for our `VMContext`.
332+ /// Codegens and returns the `*mut VMStoreContext` value for our `VMContext`.
331333 fn get_vmstore_context_ptr ( & mut self , builder : & mut FunctionBuilder ) -> ir:: Value {
332334 let global = self . get_vmstore_context_ptr_global ( & mut builder. func ) ;
333335 builder. ins ( ) . global_value ( self . pointer_type ( ) , global)
You can’t perform that action at this time.
0 commit comments