Mercurial > hg > octave-nkf
comparison src/ov.h @ 13241:2a8dcb5b3a00
improve default indexing for objects
* ov-class.cc (octave_class::is_class_method): Also return true for
anonymous functions executing in the context of a class method or
constructor.
* ov-class.h (octave_class:do_multi_index_op): New function.
* ov-fcn.h (octave_function::is_private_function_of_class): Now const.
(octave_function::is_anonymous_function_of_class): New virtual function.
* ov-usr-fcn.h (octave_function::anonymous_function): New data member.
(octave_user_function::mark_as_anonymous_function): New function.
(octave_user_function::is_anonymous_function): New function.
(octave_user_function::is_anonymous_function_of_class): New function.
* ov-usr-fcn.cc (octave_user_function::octave_user_function):
Initialize anonymous_function data member.
(octave_user_function::profiler_name): Distinguish between inline and
anonymous functions.
(octave_user_function::do_multi_index_op): Use is_anonymous_function
instead of checking whether cmd_list is marked as an anonymous
function body.
* pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue1): If parent function
is a class method or constructor, stash the dispatch type in the new
function. Mark the new function as anonymous, not inline.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 28 Sep 2011 16:45:21 -0400 |
parents | 2d5035847529 |
children | 7dce7e110511 |
comparison
equal
deleted
inserted
replaced
13240:32980cbf2338 | 13241:2a8dcb5b3a00 |
---|---|
652 { return rep->is_constant (); } | 652 { return rep->is_constant (); } |
653 | 653 |
654 bool is_function_handle (void) const | 654 bool is_function_handle (void) const |
655 { return rep->is_function_handle (); } | 655 { return rep->is_function_handle (); } |
656 | 656 |
657 bool is_anonymous_function (void) const | |
658 { return rep->is_anonymous_function (); } | |
659 | |
657 bool is_inline_function (void) const | 660 bool is_inline_function (void) const |
658 { return rep->is_inline_function (); } | 661 { return rep->is_inline_function (); } |
659 | 662 |
660 bool is_function (void) const | 663 bool is_function (void) const |
661 { return rep->is_function (); } | 664 { return rep->is_function (); } |