Mercurial > octave
changeset 32258:58a78f3d29f6
VM silence clang warnings
* corefcn/stack-frame.cc: Remove unused bugged function
* parse-tree/pt-bytecode-vm.h: Include guard for function attribute
author | Petter T. |
---|---|
date | Mon, 07 Aug 2023 15:53:59 +0200 |
parents | 112634c3f947 |
children | 2f93bc7f3cf7 |
files | libinterp/corefcn/stack-frame.cc libinterp/parse-tree/pt-bytecode-vm.h |
diffstat | 2 files changed, 12 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/stack-frame.cc Wed Aug 09 22:23:13 2023 +0200 +++ b/libinterp/corefcn/stack-frame.cc Mon Aug 07 15:53:59 2023 +0200 @@ -139,26 +139,7 @@ operator = (const bytecode_fcn_stack_frame& elt) = delete; bytecode_fcn_stack_frame& - operator = (bytecode_fcn_stack_frame&& elt) - { - if (m_lazy_data) - { - if (m_lazy_data->m_stack_cpy) - { - // Note: int nargout at offset 0 - for (unsigned i = 1; i < m_size; i++) - m_lazy_data->m_stack_cpy[i].ov.~octave_value (); - delete m_lazy_data->m_stack_cpy; - } - delete m_lazy_data->m_unwind_protect_frame; - delete m_lazy_data; - } - - *this = std::move (elt); - elt.m_lazy_data = nullptr; - - return *this; - } + operator = (bytecode_fcn_stack_frame&& elt) = delete; // vm_clear_for_cache () and the dtor need to mirror eachother // so they both call dispose()
--- a/libinterp/parse-tree/pt-bytecode-vm.h Wed Aug 09 22:23:13 2023 +0200 +++ b/libinterp/parse-tree/pt-bytecode-vm.h Mon Aug 07 15:53:59 2023 +0200 @@ -538,8 +538,17 @@ static loc_entry find_loc (int ip, std::vector<octave::loc_entry> &loc_entries); - octave_value_list execute_code (const octave_value_list &args, int root_nargout) - __attribute__ ((optimize("no-gcse","no-crossjumping"))); + // Disable some optimizations in GCC that are not suitable for dynamic label dispatch +#if defined __has_attribute +# if __has_attribute (optimize) +# define OCTAVE_VM_EXECUTE_ATTR __attribute__ ((optimize("no-gcse","no-crossjumping"))) +# endif +#endif +#if !defined OCTAVE_VM_EXECUTE_ATTR +# define OCTAVE_VM_EXECUTE_ATTR +#endif + + octave_value_list execute_code (const octave_value_list &args, int root_nargout) OCTAVE_VM_EXECUTE_ATTR; octave_value find_fcn_for_cmd_call (std::string *name); octave_value handle_object_end (octave_value ov, int idx, int nargs);