23 #if ! defined (octave_ov_usr_fcn_h) 24 #define octave_ov_usr_fcn_h 1 26 #include "octave-config.h" 47 class tree_parameter_list;
48 class tree_statement_list;
50 class tree_expression;
52 #if defined (HAVE_LLVM) 53 class jit_function_info;
67 curr_unwind_protect_frame (nullptr)
74 curr_unwind_protect_frame (nullptr)
90 return curr_unwind_protect_frame;
95 std::deque<std::string> get_code_lines (
size_t line,
size_t num_lines);
102 virtual std::map<std::string, octave_value> subfunctions (
void)
const;
108 void get_file_info (
void);
165 mark_fcn_file_up_to_date (
t);
225 return is_anonymous_function ()
243 location_line =
line;
244 location_column = col;
252 end_location_line =
line;
253 end_location_column = col;
259 void maybe_relocate_end (
void);
274 mark_fcn_file_up_to_date (
t);
292 void mark_as_system_fcn_file (
void);
298 void erase_subfunctions (
void);
300 bool takes_varargs (
void)
const;
302 bool takes_var_return (
void)
const;
304 void mark_as_private_function (
const std::string& cname =
"");
306 void lock_subfunctions (
void);
308 void unlock_subfunctions (
void);
310 std::map<std::string, octave_value> subfunctions (
void)
const;
312 bool has_subfunctions (
void)
const;
314 void stash_subfunction_names (
const std::list<std::string>& names);
316 std::list<std::string> subfunction_names (
void)
const;
334 bool is_anonymous_function_of_class
337 return anonymous_function
339 ? (! dispatch_class ().empty ())
340 : cname == dispatch_class ())
349 return is_inline_function () || is_anonymous_function ();
362 return class_constructor == legacy
363 ? (cname.empty () ? true : cname == dispatch_class ()) :
false;
368 return class_constructor == classdef
369 ? (cname.empty () ? true : cname == dispatch_class ()) :
false;
377 ? (cname.empty () ? true : cname == dispatch_class ()) :
false;
398 bool subsasgn_optimization_ok (
void);
402 #if defined (HAVE_LLVM) 485 #if defined (HAVE_LLVM) 489 void maybe_relocate_end_internal (
void);
491 void print_code_function_header (
const std::string& prefix);
493 void print_code_function_trailer (
const std::string& prefix);
500 void restore_warning_states (
void);
void mark_fcn_file_up_to_date(const octave::sys::time &t)
void mark_as_inline_function(void)
void stash_info(octave::jit_function_info *info)
octave_user_function * user_function_value(bool=false)
void stash_trailing_comment(octave::comment_list *tc)
void stash_fcn_file_time(const octave::sys::time &t)
bool is_user_function(void) const
int ending_line(void) const
void stash_leading_comment(octave::comment_list *lc)
octave::sys::time time_checked(void) const
octave::comment_list * lead_comm
octave::sys::time time_parsed(void) const
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
octave::sys::time t_parsed
octave::symbol_scope parent_fcn_scope(void) const
octave::tree_statement_list * body(void)
bool is_special_expr(void) const
octave::file_info * m_file_info
octave_user_code(const std::string &nm, const octave::symbol_scope &scope=octave::symbol_scope(), const std::string &ds="")
octave::sys::time t_checked
int beginning_column(void) const
octave::tree_statement_list * body(void)
void stash_fcn_end_location(int line, int col)
bool is_class_method(const std::string &cname="") const
octave::sys::time time_parsed(void) const
octave_user_code * user_code_value(bool=false)
octave::sys::time time_checked(void) const
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
bool is_user_script(void) const
octave::jit_function_info * jit_info
octave_function * function_value(bool=false)
octave::sys::time t_parsed
void mark_fcn_file_up_to_date(const octave::sys::time &t)
void stash_fcn_location(int line, int col)
int beginning_line(void) const
octave::tree_parameter_list * parameter_list(void)
octave::symbol_scope scope(void)
bool is_subfunction(void) const
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
std::string parent_fcn_name(void) const
std::shared_ptr< symbol_scope_rep > parent_scope(void) const
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
octave::comment_list * trailing_comment(void)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
octave::tree_parameter_list * ret_list
void stash_function_name(const std::string &s)
octave::jit_function_info * get_info(void)
void mark_as_nested_function(void)
void mark_as_class_method(void)
int ending_column(void) const
octave::sys::time t_checked
void stash_fcn_file_time(const octave::sys::time &t)
octave::comment_list * leading_comment(void)
octave::tree_parameter_list * return_list(void)
bool is_anonymous_function(void) const
octave::tree_statement_list * cmd_list
octave::tree_parameter_list * param_list
void mark_as_classdef_constructor(void)
octave_user_code * user_code_value(bool=false)
std::string fcn_file_name(void) const
octave_user_script * user_script_value(bool=false)
octave::unwind_protect * unwind_protect_frame(void)
bool is_inline_function(void) const
octave::unwind_protect * curr_unwind_protect_frame
void stash_fcn_file_name(const std::string &nm)
bool is_user_code(void) const
octave::tree_statement_list * cmd_list
class_ctor_type class_constructor
octave_function * function_value(bool=false)
void mark_as_anonymous_function(void)
octave::comment_list * trail_comm
bool is_class_constructor(const std::string &cname="") const
bool is_classdef_constructor(const std::string &cname="") const
octave::symbol_record::context_id active_context() const
void mark_as_subfunction(void)
bool is_nested_function(void) const
void stash_parent_fcn_name(const std::string &p)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
bool is_system_fcn_file(void) const
void mark_as_class_constructor(void)
octave::symbol_scope m_scope
std::string fcn_file_name(void) const