@@ -16,8 +16,8 @@ pub struct JIT {
1616 /// context per thread, though this isn't in the simple demo here.
1717 ctx : codegen:: Context ,
1818
19- /// The data context , which is to data objects what `ctx` is to functions.
20- data_ctx : DataDescription ,
19+ /// The data description , which is to data objects what `ctx` is to functions.
20+ data_description : DataDescription ,
2121
2222 /// The module, with the jit backend, which manages the JIT'd
2323 /// functions.
@@ -41,7 +41,7 @@ impl Default for JIT {
4141 Self {
4242 builder_context : FunctionBuilderContext :: new ( ) ,
4343 ctx : module. make_context ( ) ,
44- data_ctx : DataDescription :: new ( ) ,
44+ data_description : DataDescription :: new ( ) ,
4545 module,
4646 }
4747 }
@@ -95,16 +95,16 @@ impl JIT {
9595 pub fn create_data ( & mut self , name : & str , contents : Vec < u8 > ) -> Result < & [ u8 ] , String > {
9696 // The steps here are analogous to `compile`, except that data is much
9797 // simpler than functions.
98- self . data_ctx . define ( contents. into_boxed_slice ( ) ) ;
98+ self . data_description . define ( contents. into_boxed_slice ( ) ) ;
9999 let id = self
100100 . module
101101 . declare_data ( name, Linkage :: Export , true , false )
102102 . map_err ( |e| e. to_string ( ) ) ?;
103103
104104 self . module
105- . define_data ( id, & self . data_ctx )
105+ . define_data ( id, & self . data_description )
106106 . map_err ( |e| e. to_string ( ) ) ?;
107- self . data_ctx . clear ( ) ;
107+ self . data_description . clear ( ) ;
108108 self . module . finalize_definitions ( ) . unwrap ( ) ;
109109 let buffer = self . module . get_finalized_data ( id) ;
110110 // TODO: Can we move the unsafe into cranelift?
0 commit comments