Mercurial > octave
changeset 32968:338860f6d680 bytecode-interpreter
Create new warning ID "Octave:bytecode-compilation" (bug #65243)
Create and set the warning ID "Octave:bytecode-compilation" when encountering
bytecode auto-compilation issues.
* pt-bytecode-vm.cc (maybe_compile_or_compiled): Call warning_with_id() instead
of just warning().
* warning_ids.m: Update documentation for the new warning ID
"Octave:bytecode-compilation".
author | koerhen <koerhen@web.de> |
---|---|
date | Sat, 03 Feb 2024 09:18:30 +0800 |
parents | 56544327a45a |
children | a3b312564056 |
files | libinterp/parse-tree/pt-bytecode-vm.cc scripts/help/warning_ids.m |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-bytecode-vm.cc Wed Feb 07 14:54:02 2024 -0500 +++ b/libinterp/parse-tree/pt-bytecode-vm.cc Sat Feb 03 09:18:30 2024 +0800 @@ -8545,8 +8545,9 @@ } catch (std::exception &e) { - warning ("auto-compilation of %s failed with message %s", fn->name().c_str (), e.what ()); - fn->set_compilation_failed(true); + warning_with_id ("Octave:bytecode-compilation", + "auto-compilation of %s failed with message %s", + fn->name().c_str (), e.what ()); return false; } }
--- a/scripts/help/warning_ids.m Wed Feb 07 14:54:02 2024 -0500 +++ b/scripts/help/warning_ids.m Sat Feb 03 09:18:30 2024 +0800 @@ -148,6 +148,11 @@ ## the others. ## By default, the @code{Octave:charmat-truncated} warning is enabled. ## +## @item Octave:bytecode-compilation +## If the @code{Octave:bytecode-compilation} warning is enabled, a warning is +## printed when the bytecode compiler encounters unsupported code constructs. +## By default, the @code{Octave:bytecode-compilation} warning is enabled. +## ## @item Octave:classdef-to-struct ## If the @code{Octave:classdef-to-struct} warning is enabled, a warning ## is issued when a classdef object is forcibly converted into a struct with