comparison libinterp/corefcn/dynamic-ld.cc @ 31607:aac27ad79be6 stable

maint: Re-indent code after switch to using namespace macros. * build-env.h, build-env.in.cc, Cell.h, __betainc__.cc, __eigs__.cc, __ftp__.cc, __ichol__.cc, __ilu__.cc, __isprimelarge__.cc, __magick_read__.cc, __pchip_deriv__.cc, amd.cc, base-text-renderer.cc, base-text-renderer.h, besselj.cc, bitfcns.cc, bsxfun.cc, c-file-ptr-stream.h, call-stack.cc, call-stack.h, ccolamd.cc, cellfun.cc, chol.cc, colamd.cc, dasrt.cc, data.cc, debug.cc, defaults.cc, defaults.h, det.cc, display.cc, display.h, dlmread.cc, dynamic-ld.cc, dynamic-ld.h, ellipj.cc, environment.cc, environment.h, error.cc, error.h, errwarn.h, event-manager.cc, event-manager.h, event-queue.cc, event-queue.h, fcn-info.cc, fcn-info.h, fft.cc, fft2.cc, file-io.cc, filter.cc, find.cc, ft-text-renderer.cc, ft-text-renderer.h, gcd.cc, gl-render.cc, gl-render.h, gl2ps-print.cc, gl2ps-print.h, graphics-toolkit.cc, graphics-toolkit.h, graphics.cc, gsvd.cc, gtk-manager.cc, gtk-manager.h, help.cc, help.h, hook-fcn.cc, hook-fcn.h, input.cc, input.h, interpreter-private.cc, interpreter-private.h, interpreter.cc, interpreter.h, inv.cc, jsondecode.cc, jsonencode.cc, latex-text-renderer.cc, latex-text-renderer.h, load-path.cc, load-path.h, load-save.cc, load-save.h, lookup.cc, ls-hdf5.cc, ls-mat4.cc, ls-mat5.cc, lsode.cc, lu.cc, mappers.cc, matrix_type.cc, max.cc, mex.cc, mexproto.h, mxarray.h, mxtypes.in.h, oct-errno.in.cc, oct-hdf5-types.cc, oct-hist.cc, oct-hist.h, oct-map.cc, oct-map.h, oct-opengl.h, oct-prcstrm.h, oct-process.cc, oct-process.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.h, octave-default-image.h, ordqz.cc, ordschur.cc, pager.cc, pager.h, pinv.cc, pow2.cc, pr-output.cc, psi.cc, qr.cc, quadcc.cc, rand.cc, regexp.cc, settings.cc, settings.h, sighandlers.cc, sighandlers.h, sparse-xpow.cc, sqrtm.cc, stack-frame.cc, stack-frame.h, stream-euler.cc, strfns.cc, svd.cc, syminfo.cc, syminfo.h, symrcm.cc, symrec.cc, symrec.h, symscope.cc, symscope.h, symtab.cc, symtab.h, sysdep.cc, sysdep.h, text-engine.cc, text-engine.h, text-renderer.cc, text-renderer.h, time.cc, toplev.cc, typecast.cc, url-handle-manager.cc, url-handle-manager.h, urlwrite.cc, utils.cc, utils.h, variables.cc, variables.h, xdiv.cc, __delaunayn__.cc, __init_fltk__.cc, __init_gnuplot__.cc, __ode15__.cc, __voronoi__.cc, audioread.cc, convhulln.cc, gzip.cc, cdef-class.cc, cdef-class.h, cdef-fwd.h, cdef-manager.cc, cdef-manager.h, cdef-method.cc, cdef-method.h, cdef-object.cc, cdef-object.h, cdef-package.cc, cdef-package.h, cdef-property.cc, cdef-property.h, cdef-utils.cc, cdef-utils.h, ov-base-diag.cc, ov-base-int.cc, ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.cc, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool.cc, ov-builtin.h, ov-cell.cc, ov-ch-mat.cc, ov-class.cc, ov-class.h, ov-classdef.cc, ov-classdef.h, ov-complex.cc, ov-cx-diag.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-dld-fcn.cc, ov-dld-fcn.h, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn.h, ov-float.cc, ov-flt-complex.cc, ov-flt-cx-diag.cc, ov-flt-cx-mat.cc, ov-flt-re-diag.cc, ov-flt-re-mat.cc, ov-flt-re-mat.h, ov-intx.h, ov-java.cc, ov-lazy-idx.cc, ov-legacy-range.cc, ov-magic-int.cc, ov-mex-fcn.cc, ov-mex-fcn.h, ov-null-mat.cc, ov-perm.cc, ov-range.cc, ov-re-diag.cc, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-scalar.cc, ov-str-mat.cc, ov-struct.cc, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov.cc, ov.h, ovl.h, octave.cc, octave.h, op-b-sbm.cc, op-bm-sbm.cc, op-cs-scm.cc, op-fm-fcm.cc, op-fs-fcm.cc, op-s-scm.cc, op-scm-cs.cc, op-scm-s.cc, op-sm-cs.cc, ops.h, anon-fcn-validator.cc, anon-fcn-validator.h, bp-table.cc, bp-table.h, comment-list.cc, comment-list.h, filepos.h, lex.h, oct-lvalue.cc, oct-lvalue.h, parse.h, profiler.cc, profiler.h, pt-anon-scopes.cc, pt-anon-scopes.h, pt-arg-list.cc, pt-arg-list.h, pt-args-block.cc, pt-args-block.h, pt-array-list.cc, pt-array-list.h, pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.cc, pt-bp.h, pt-cbinop.cc, pt-cbinop.h, pt-cell.cc, pt-cell.h, pt-check.cc, pt-check.h, pt-classdef.cc, pt-classdef.h, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h, pt-eval.cc, pt-eval.h, pt-except.cc, pt-except.h, pt-exp.cc, pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-spmd.cc, pt-spmd.h, pt-stmt.cc, pt-stmt.h, pt-tm-const.cc, pt-tm-const.h, pt-unop.cc, pt-unop.h, pt-walk.cc, pt-walk.h, pt.cc, pt.h, token.cc, token.h, Range.cc, Range.h, idx-vector.cc, idx-vector.h, range-fwd.h, CollocWt.cc, CollocWt.h, aepbalance.cc, aepbalance.h, chol.cc, chol.h, gepbalance.cc, gepbalance.h, gsvd.cc, gsvd.h, hess.cc, hess.h, lo-mappers.cc, lo-mappers.h, lo-specfun.cc, lo-specfun.h, lu.cc, lu.h, oct-convn.cc, oct-convn.h, oct-fftw.cc, oct-fftw.h, oct-norm.cc, oct-norm.h, oct-rand.cc, oct-rand.h, oct-spparms.cc, oct-spparms.h, qr.cc, qr.h, qrp.cc, qrp.h, randgamma.cc, randgamma.h, randmtzig.cc, randmtzig.h, randpoisson.cc, randpoisson.h, schur.cc, schur.h, sparse-chol.cc, sparse-chol.h, sparse-lu.cc, sparse-lu.h, sparse-qr.cc, sparse-qr.h, svd.cc, svd.h, child-list.cc, child-list.h, dir-ops.cc, dir-ops.h, file-ops.cc, file-ops.h, file-stat.cc, file-stat.h, lo-sysdep.cc, lo-sysdep.h, lo-sysinfo.cc, lo-sysinfo.h, mach-info.cc, mach-info.h, oct-env.cc, oct-env.h, oct-group.cc, oct-group.h, oct-password.cc, oct-password.h, oct-syscalls.cc, oct-syscalls.h, oct-time.cc, oct-time.h, oct-uname.cc, oct-uname.h, action-container.cc, action-container.h, base-list.h, cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h, f77-fcn.h, file-info.cc, file-info.h, lo-array-errwarn.cc, lo-array-errwarn.h, lo-hash.cc, lo-hash.h, lo-ieee.h, lo-regexp.cc, lo-regexp.h, lo-utils.cc, lo-utils.h, oct-base64.cc, oct-base64.h, oct-glob.cc, oct-glob.h, oct-inttypes.h, oct-mutex.cc, oct-mutex.h, oct-refcount.h, oct-shlib.cc, oct-shlib.h, oct-sparse.cc, oct-sparse.h, oct-string.h, octave-preserve-stream-state.h, pathsearch.cc, pathsearch.h, quit.cc, quit.h, unwind-prot.cc, unwind-prot.h, url-transfer.cc, url-transfer.h: Re-indent code after switch to using namespace macros.
author Rik <rik@octave.org>
date Thu, 01 Dec 2022 18:02:15 -0800
parents e88a07dec498
children 597f3ee61a48
comparison
equal deleted inserted replaced
31605:e88a07dec498 31607:aac27ad79be6
49 #define STRINGIFY(s) STRINGIFY1(s) 49 #define STRINGIFY(s) STRINGIFY1(s)
50 #define STRINGIFY1(s) #s 50 #define STRINGIFY1(s) #s
51 51
52 OCTAVE_BEGIN_NAMESPACE(octave) 52 OCTAVE_BEGIN_NAMESPACE(octave)
53 53
54 void 54 void
55 dynamic_loader::shlibs_list::append (const dynamic_library& shl) 55 dynamic_loader::shlibs_list::append (const dynamic_library& shl)
56 { 56 {
57 m_lib_list.push_back (shl); 57 m_lib_list.push_back (shl);
58 } 58 }
59 59
60 std::list<std::string> 60 std::list<std::string>
61 dynamic_loader::shlibs_list::remove (dynamic_library& shl) 61 dynamic_loader::shlibs_list::remove (dynamic_library& shl)
62 { 62 {
63 std::list<std::string> removed_fcns; 63 std::list<std::string> removed_fcns;
64 64
65 for (auto p = m_lib_list.begin (); p != m_lib_list.end (); p++) 65 for (auto p = m_lib_list.begin (); p != m_lib_list.end (); p++)
66 { 66 {
67 if (*p == shl) 67 if (*p == shl)
68 { 68 {
69 m_lib_list.erase (p); 69 m_lib_list.erase (p);
70 70
71 removed_fcns = shl.close (); 71 removed_fcns = shl.close ();
72 72
73 break; 73 break;
74 } 74 }
75 } 75 }
76 76
77 return removed_fcns; 77 return removed_fcns;
78 } 78 }
79 79
80 dynamic_library 80 dynamic_library
81 dynamic_loader::shlibs_list::find_file (const std::string& file_name) const 81 dynamic_loader::shlibs_list::find_file (const std::string& file_name) const
82 { 82 {
83 dynamic_library retval; 83 dynamic_library retval;
84 84
85 for (const auto& lib : m_lib_list) 85 for (const auto& lib : m_lib_list)
86 { 86 {
87 if (lib.file_name () == file_name) 87 if (lib.file_name () == file_name)
88 { 88 {
89 retval = lib; 89 retval = lib;
90 break; 90 break;
91 } 91 }
92 } 92 }
93 93
94 return retval; 94 return retval;
95 } 95 }
96 96
97 void 97 void
98 dynamic_loader::shlibs_list::display (void) const 98 dynamic_loader::shlibs_list::display (void) const
99 { 99 {
100 std::cerr << "current shared libraries:" << std::endl; 100 std::cerr << "current shared libraries:" << std::endl;
101 for (const auto& lib : m_lib_list) 101 for (const auto& lib : m_lib_list)
102 std::cerr << " " << lib.file_name () << std::endl; 102 std::cerr << " " << lib.file_name () << std::endl;
103 } 103 }
104 104
105 void 105 void
106 dynamic_loader::clear_function (const std::string& fcn_name) 106 dynamic_loader::clear_function (const std::string& fcn_name)
107 { 107 {
108 warning_with_id ("Octave:reload-forces-clear", " %s", fcn_name.c_str ()); 108 warning_with_id ("Octave:reload-forces-clear", " %s", fcn_name.c_str ());
109 109
110 // FIXME: is there a way to avoid this? Can we manage the list of 110 // FIXME: is there a way to avoid this? Can we manage the list of
111 // functions that are loaded in the symbol table completely outside 111 // functions that are loaded in the symbol table completely outside
112 // of the dynamic_loader class? 112 // of the dynamic_loader class?
113 113
114 symbol_table& symtab = m_interpreter.get_symbol_table (); 114 symbol_table& symtab = m_interpreter.get_symbol_table ();
115 115
116 symtab.clear_dld_function (fcn_name); 116 symtab.clear_dld_function (fcn_name);
117 } 117 }
118 118
119 void 119 void
120 dynamic_loader::clear (dynamic_library& oct_file) 120 dynamic_loader::clear (dynamic_library& oct_file)
121 { 121 {
122 if (oct_file.number_of_functions_loaded () > 1) 122 if (oct_file.number_of_functions_loaded () > 1)
123 { 123 {
124 warning_with_id ("Octave:reload-forces-clear", 124 warning_with_id ("Octave:reload-forces-clear",
125 "reloading %s clears the following functions:", 125 "reloading %s clears the following functions:",
126 oct_file.file_name ().c_str ()); 126 oct_file.file_name ().c_str ());
127 127
128 std::list<std::string> removed_fcns = m_loaded_shlibs.remove (oct_file); 128 std::list<std::string> removed_fcns = m_loaded_shlibs.remove (oct_file);
129 129
130 for (const auto& fcn_name : removed_fcns) 130 for (const auto& fcn_name : removed_fcns)
131 clear_function (fcn_name); 131 clear_function (fcn_name);
132 } 132 }
133 else 133 else
134 { 134 {
135 std::list<std::string> removed_fcns = m_loaded_shlibs.remove (oct_file); 135 std::list<std::string> removed_fcns = m_loaded_shlibs.remove (oct_file);
136 136
137 // FIXME: is there a way to avoid this? Can we manage the list 137 // FIXME: is there a way to avoid this? Can we manage the list
138 // of functions that are loaded in the symbol table completely 138 // of functions that are loaded in the symbol table completely
139 // outside of the dynamic_loader class? 139 // outside of the dynamic_loader class?
140 140
141 symbol_table& symtab = m_interpreter.get_symbol_table (); 141 symbol_table& symtab = m_interpreter.get_symbol_table ();
142 142
143 for (const auto& fcn_name : removed_fcns) 143 for (const auto& fcn_name : removed_fcns)
144 symtab.clear_dld_function (fcn_name); 144 symtab.clear_dld_function (fcn_name);
145 } 145 }
146 } 146 }
147 147
148 octave_function * 148 octave_function *
149 dynamic_loader::load_oct (const std::string& fcn_name, 149 dynamic_loader::load_oct (const std::string& fcn_name,
150 const std::string& file_name, 150 const std::string& file_name,
151 bool relative) 151 bool relative)
152 { 152 {
153 octave_function *retval = nullptr; 153 octave_function *retval = nullptr;
154 154
155 unwind_protect_var<bool> restore_var (m_doing_load, true); 155 unwind_protect_var<bool> restore_var (m_doing_load, true);
156 156
157 dynamic_library oct_file = m_loaded_shlibs.find_file (file_name); 157 dynamic_library oct_file = m_loaded_shlibs.find_file (file_name);
158 158
159 if (oct_file && oct_file.is_out_of_date ()) 159 if (oct_file && oct_file.is_out_of_date ())
160 clear (oct_file); 160 clear (oct_file);
161 161
162 if (! oct_file) 162 if (! oct_file)
163 { 163 {
164 oct_file.open (file_name); 164 oct_file.open (file_name);
165 165
166 if (oct_file) 166 if (oct_file)
167 m_loaded_shlibs.append (oct_file); 167 m_loaded_shlibs.append (oct_file);
168 } 168 }
169 169
170 if (! oct_file) 170 if (! oct_file)
171 error ("%s is not a valid shared library", file_name.c_str ()); 171 error ("%s is not a valid shared library", file_name.c_str ());
172 172
173 void *function = oct_file.search (fcn_name, name_mangler); 173 void *function = oct_file.search (fcn_name, name_mangler);
174 174
175 if (! function) 175 if (! function)
176 { 176 {
177 // FIXME: can we determine this C mangling scheme 177 // FIXME: can we determine this C mangling scheme
178 // automatically at run time or configure time? 178 // automatically at run time or configure time?
179 179
180 function = oct_file.search (fcn_name, name_uscore_mangler); 180 function = oct_file.search (fcn_name, name_uscore_mangler);
181 } 181 }
182 182
183 if (function) 183 if (function)
184 { 184 {
185 octave_dld_fcn_getter f 185 octave_dld_fcn_getter f
186 = reinterpret_cast<octave_dld_fcn_getter> (function); 186 = reinterpret_cast<octave_dld_fcn_getter> (function);
187 187
188 retval = f (oct_file, relative); 188 retval = f (oct_file, relative);
189 189
190 if (! retval) 190 if (! retval)
191 error ("failed to install .oct file function '%s'", 191 error ("failed to install .oct file function '%s'",
192 fcn_name.c_str ()); 192 fcn_name.c_str ());
193 } 193 }
194 194
195 return retval; 195 return retval;
196 } 196 }
197 197
198 void * 198 void *
199 dynamic_loader::try_load_mex (dynamic_library& mex_file, 199 dynamic_loader::try_load_mex (dynamic_library& mex_file,
200 const std::string& fcn_name, bool& have_fmex) 200 const std::string& fcn_name, bool& have_fmex)
201 { 201 {
202 // FCN_NAME is not used here, the mangler functions always return 202 // FCN_NAME is not used here, the mangler functions always return
203 // some form of "mexFunction". 203 // some form of "mexFunction".
204 204
205 have_fmex = false; 205 have_fmex = false;
206 206
207 void *function = mex_file.search (fcn_name, mex_mangler); 207 void *function = mex_file.search (fcn_name, mex_mangler);
208 208
209 if (! function) 209 if (! function)
210 { 210 {
211 // FIXME: Can we determine this C mangling scheme 211 // FIXME: Can we determine this C mangling scheme
212 // automatically at run time or configure time? 212 // automatically at run time or configure time?
213 213
214 function = mex_file.search (fcn_name, mex_uscore_mangler); 214 function = mex_file.search (fcn_name, mex_uscore_mangler);
215 215
216 if (! function) 216 if (! function)
217 { 217 {
218 function = mex_file.search (fcn_name, mex_f77_mangler); 218 function = mex_file.search (fcn_name, mex_f77_mangler);
219 219
220 if (function) 220 if (function)
221 have_fmex = true; 221 have_fmex = true;
222 } 222 }
223 } 223 }
224 224
225 return function; 225 return function;
226 } 226 }
227 227
228 octave_function * 228 octave_function *
229 dynamic_loader::load_mex (const std::string& fcn_name, 229 dynamic_loader::load_mex (const std::string& fcn_name,
230 const std::string& file_name, 230 const std::string& file_name,
231 bool /*relative*/) 231 bool /*relative*/)
232 { 232 {
233 unwind_protect_var<bool> restore_var (m_doing_load, true); 233 unwind_protect_var<bool> restore_var (m_doing_load, true);
234 234
235 dynamic_library mex_file = m_loaded_shlibs.find_file (file_name); 235 dynamic_library mex_file = m_loaded_shlibs.find_file (file_name);
236 236
237 if (mex_file && mex_file.is_out_of_date ()) 237 if (mex_file && mex_file.is_out_of_date ())
238 clear (mex_file); 238 clear (mex_file);
239 239
240 if (! mex_file) 240 if (! mex_file)
241 { 241 {
242 mex_file.open (file_name); 242 mex_file.open (file_name);
243 243
244 if (mex_file) 244 if (mex_file)
245 m_loaded_shlibs.append (mex_file); 245 m_loaded_shlibs.append (mex_file);
246 } 246 }
247 247
248 if (! mex_file) 248 if (! mex_file)
249 error ("%s is not a valid shared library", file_name.c_str ()); 249 error ("%s is not a valid shared library", file_name.c_str ());
250 250
251 bool have_fmex = false; 251 bool have_fmex = false;
252 252
253 void *function = try_load_mex (mex_file, fcn_name, have_fmex); 253 void *function = try_load_mex (mex_file, fcn_name, have_fmex);
254 254
255 if (! function) 255 if (! function)
256 error ("failed to install .mex file function '%s'", fcn_name.c_str ()); 256 error ("failed to install .mex file function '%s'", fcn_name.c_str ());
257 257
258 void *symbol = mex_file.search ("__mx_has_interleaved_complex__"); 258 void *symbol = mex_file.search ("__mx_has_interleaved_complex__");
259 259
260 bool interleaved = symbol != nullptr; 260 bool interleaved = symbol != nullptr;
261 261
262 return new octave_mex_function (function, interleaved, have_fmex, 262 return new octave_mex_function (function, interleaved, have_fmex,
263 mex_file, fcn_name); 263 mex_file, fcn_name);
264 } 264 }
265 265
266 bool 266 bool
267 dynamic_loader::remove_oct (const std::string& fcn_name, 267 dynamic_loader::remove_oct (const std::string& fcn_name,
268 dynamic_library& shl) 268 dynamic_library& shl)
269 { 269 {
270 bool retval = false; 270 bool retval = false;
271 271
272 // We don't need to do anything if this is called because we are in 272 // We don't need to do anything if this is called because we are in
273 // the process of reloading a .oct file that has changed. 273 // the process of reloading a .oct file that has changed.
274 274
275 if (! m_doing_load) 275 if (! m_doing_load)
276 { 276 {
277 retval = shl.remove (fcn_name); 277 retval = shl.remove (fcn_name);
278 278
279 if (shl.number_of_functions_loaded () == 0) 279 if (shl.number_of_functions_loaded () == 0)
280 m_loaded_shlibs.remove (shl); 280 m_loaded_shlibs.remove (shl);
281 } 281 }
282 282
283 return retval; 283 return retval;
284 } 284 }
285 285
286 bool 286 bool
287 dynamic_loader::remove_mex (const std::string& fcn_name, 287 dynamic_loader::remove_mex (const std::string& fcn_name,
288 dynamic_library& shl) 288 dynamic_library& shl)
289 { 289 {
290 // Use the same procedure as for oct files. 290 // Use the same procedure as for oct files.
291 return remove_oct (fcn_name, shl); 291 return remove_oct (fcn_name, shl);
292 } 292 }
293 293
294 std::string 294 std::string
295 dynamic_loader::name_mangler (const std::string& name) 295 dynamic_loader::name_mangler (const std::string& name)
296 { 296 {
297 return 'G' + name; 297 return 'G' + name;
298 } 298 }
299 299
300 std::string 300 std::string
301 dynamic_loader::name_uscore_mangler (const std::string& name) 301 dynamic_loader::name_uscore_mangler (const std::string& name)
302 { 302 {
303 return "_G" + name; 303 return "_G" + name;
304 } 304 }
305 305
306 std::string 306 std::string
307 dynamic_loader::mex_mangler (const std::string&) 307 dynamic_loader::mex_mangler (const std::string&)
308 { 308 {
309 return "mexFunction"; 309 return "mexFunction";
310 } 310 }
311 311
312 std::string 312 std::string
313 dynamic_loader::mex_uscore_mangler (const std::string&) 313 dynamic_loader::mex_uscore_mangler (const std::string&)
314 { 314 {
315 return "_mexFunction"; 315 return "_mexFunction";
316 } 316 }
317 317
318 std::string 318 std::string
319 dynamic_loader::mex_f77_mangler (const std::string&) 319 dynamic_loader::mex_f77_mangler (const std::string&)
320 { 320 {
321 return STRINGIFY (F77_FUNC (mexfunction, MEXFUNCTION)); 321 return STRINGIFY (F77_FUNC (mexfunction, MEXFUNCTION));
322 } 322 }
323 323
324 OCTAVE_END_NAMESPACE(octave) 324 OCTAVE_END_NAMESPACE(octave)