Mercurial > octave
comparison libinterp/parse-tree/pt-eval.h @ 30919:4ed7dfe28584
move eval of anon fcn handles and built-in and mex functions to pt-eval.cc
For consistency with the evaluation of user-defined functions and
scripts, move the evaluation of anonymous function handles and
built-in and mex functions to the tree_evaluator class in pt-eval.cc.
* pt-eval.h, pt-eval.cc (tree_evaluator::evaluate_anon_fcn_handle,
tree_evaluator::execute_builtin_function,
tree_evaluator::execute_mex_function): New functions extracted
from tree_anon_fcn_handle::evalueate, octave_builtin::execute and
octave_mex_function::execute, respectively.
* ov-builtin.cc (octave_builtin::execute):
Forward to tree_evaluator::execute_builtin_function.
* ov-mex-fcn.cc (octave_mex_function::execute):
Forward to tree_evaluator::execute_mex_function.
* pt-fcn-handle.cc (tree_anon_fcn_handle::evaluate):
Forward to tree_evaluator::evaluate_anon_fcn_handle.
* mex.cc: Move call_mex inside octave namespace.
* mex-private.h: New file.
* libinterp/corefcn/module.mk: Update.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 08 Apr 2022 14:11:05 -0400 |
parents | 796f54d4ddbf |
children | 47cbc69e66cd |
comparison
equal
deleted
inserted
replaced
30918:297f32524dd8 | 30919:4ed7dfe28584 |
---|---|
42 #include "ovl.h" | 42 #include "ovl.h" |
43 #include "profiler.h" | 43 #include "profiler.h" |
44 #include "pt-walk.h" | 44 #include "pt-walk.h" |
45 #include "stack-frame.h" | 45 #include "stack-frame.h" |
46 | 46 |
47 class octave_builtin; | |
48 class octave_mex_function; | |
47 class octave_user_code; | 49 class octave_user_code; |
50 class octave_user_function; | |
51 class octave_user_script; | |
48 | 52 |
49 OCTAVE_NAMESPACE_BEGIN | 53 OCTAVE_NAMESPACE_BEGIN |
50 | 54 |
51 class symbol_info_list; | 55 class symbol_info_list; |
52 class symbol_scope; | 56 class symbol_scope; |
244 | 248 |
245 void visit_complex_for_command (tree_complex_for_command&); | 249 void visit_complex_for_command (tree_complex_for_command&); |
246 | 250 |
247 void visit_spmd_command (tree_spmd_command&); | 251 void visit_spmd_command (tree_spmd_command&); |
248 | 252 |
253 octave_value evaluate_anon_fcn_handle (tree_anon_fcn_handle& afh); | |
254 | |
255 octave_value_list | |
256 execute_builtin_function (octave_builtin& builtin_function, int nargout, | |
257 const octave_value_list& args); | |
258 octave_value_list | |
259 execute_mex_function (octave_mex_function& mex_function, int nargout, | |
260 const octave_value_list& args); | |
261 | |
249 void visit_octave_user_script (octave_user_script&); | 262 void visit_octave_user_script (octave_user_script&); |
250 | 263 |
251 octave_value_list | 264 octave_value_list |
252 execute_user_script (octave_user_script& user_script, int nargout, | 265 execute_user_script (octave_user_script& user_script, int nargout, |
253 const octave_value_list& args); | 266 const octave_value_list& args); |