| Polaris: Mutator< T > Class Template Reference | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
Mutator< T > Class Template ReferenceDESCRIPTIONSee the Iterator.h file for a description of how this class works. More...
Inheritance diagram for Mutator< T >: ![]()
Detailed Descriptiontemplate<class T>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||
|
< nothing else to do |
|
||||||||||
|
This method copies the entire state (including current element) of the iterator. If you don't like this, then immediately follow this constructor with a call to reset() |
|
||||||||||
|
Reimplemented from Iterator< T >. |
|
||||||||||
|
This method copies the entire state (including current element) of the iterator. If you don't like this, then immediately follow this constructor with a call to reset() |
|
||||||||||
|
Useful for RefMutators This sets the current reference to el and results in an error if called on a live collection.
Reimplemented from Iterator< T >. Definition at line 192 of file Mutator.h. References BaseIter::modify(). Referenced by _p_r_o_of_add(), _p_r_o_of_min_max(), SSAProgramUnit::convert_to_standard(), fix_alternate_expr(), and SSAProgramUnit::SEARCH(). |
|
||||||||||
|
Useful for Mutators This sets current to el and results in an error if called on a ref-collection.
Reimplemented from Iterator< T >. Definition at line 199 of file Mutator.h. References BaseIter::modify(). |
|
||||||||||||||||
|
Modify current in place by calling mod(obj, extra_data) where obj is the pointer which owns current. The procedure 'mod' is expected to do it's own garbage collection. The procedure must be of the form: (*mod)(T *& object, void *extra_data) This results in an error if current is invalid or if it is called on a ref-collection. Reimplemented from Iterator< T >. Definition at line 206 of file Mutator.h. References BaseIter::modify_in_place(). |
|
|||||||||
|
Delete the current element, useful for Mutators and RefMutators. This results in an error if the current node has already been deleted.
Reimplemented from Iterator< T >. Definition at line 214 of file Mutator.h. References BaseIter::del(). Referenced by _additive_inverse(), _delete_dead_code(), _delete_expr_in_list(), _determine_entry_points(), _divide_by_factor1(), _filter_vars(), _intersect_range_maps(), _p_r_o_of_min_max(), _pull_out_divisible(), _pull_ranges_out(), _remove_assertion(), _remove_truncates1(), _solve_linear_expr(), IPCPProcData::add_maymods(), AliasSets::aliases(), is_evenly_divisible(), remove_redundant_min_max_terms(), and PropCtrlRangeWS::update_out_ranges(). |
|
|||||||||
|
Grab the current element, useful for Mutators. Results in an error if called on a ref-collection.
Reimplemented from Iterator< T >. Definition at line 222 of file Mutator.h. References BaseIter::grab(). Referenced by _add_asserts_to_ranges(), _combine_int_relations(), _combine_other_logicals(), _factor_out_var_top(), _fold_divisible_in_mult(), NonBinaryExpr::_fold_top(), _grab_divisible(), _invert_expr(), _merge_range_mult_terms(), _p_mm_o_of_add(), _p_mm_o_of_mult(), _pull_out_common_min_max1(), _pull_out_divisible(), _pull_ranges_out(), _remove_truncates1(), _solve_linear_expr(), _subst_vars_in_expr1(), DDgraph::add(), IPCPProcData::create_jump_function(), SSAProgramUnit::insert_phi_stmt(), merge_DVs(), IPCPConstants::merge_invocation_sites(), parse_directives(), SSAProgramUnit::SEARCH(), SEARCH(), Summation::sum_add(), and Summation::sum_mul(). |
|
|||||||||
|
|||||||||
|
assign/pull is designed to allow the functionality of modifying an element of a list to be some function of the old value of that position The assign() is meant to be executed first, to capture the original position in the under-lying list for the element. The Assign<T> object returned by assign() stores the position information of the element. Then, pull() is used to remove the element from the list, without losing its position in the list. The 'pull' method removes the specified object from its list (like grab) but maintains it's 'place' in the list. Once an object has been pulled, it is no longer possible to access the List using the pulled object as a reference. Once an object has been pulled it can be modified in any way. Once the modification is complete, the object can be returned to its position by assigning to the Assign<T> object (the one created by the original assign() call). The user, of course, is responsible for garbage collecting any intermediate forms of the pulled object which may be created. A complete use would be as follows:
{
Assign<Expression> a = iter.assign();
a = function(iter.pull() );
} // "a" is removed by leaving the scope
'function' is simply a function which returns the modified value. If the modified value is a different object than the original, function is responsible for garbage collecting the original. In this case, the specified object is pulled from the list, modified somehow by function and the returned value takes it's place in the list. Reimplemented from Iterator< T >. Definition at line 237 of file Mutator.h. References BaseIter::pull(). Referenced by _additive_inverse(), _annotate_assert(), _annotate_expr(), _annotate_stmt(), _assert_expand_substituted(), _assert_substitute_parameters(), _call_args_expand_substituted(), _divide_by_factor1(), _elim_known_facts(), _factor_out_var(), _filter_arrays(), _logical_complement(), _mult_range_with_expr(), _multiply_out_divs_for_var1(), _norm_func_calls1(), _normalize_func_calls(), _pull_in_add_expr(), _pull_in_div_expr(), _pull_in_exp_expr(), _pull_in_mult_expr(), _pull_ranges_out(), _push_down_args_nots(), _remove_local_effects_from_expr1(), _remove_truncates1(), _replace_mul_minus_one(), _simplify(), _subst_ints_in_expr(), _subst_unkeepable_vars(), _subst_vars_in_expr1(), _substitute_mono_var1(), TranslateObject::_translate_GSA_symbol_refs_mutr(), abs_to_max(), expand_substituted(), expr_expand_substituted(), expr_substitute_parameters(), fix_alternate_expr(), pull_min_max_out(), remove_redundant_min_max_terms(), replace_expression(), SEARCH(), substitute_argument(), substitute_parameters(), sym_factors(), and translate_and_reshape(). |
| © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved. | Fri Mar 25 23:07:48 2005 |