Mercurial > octave-libgccjit
comparison src/pt-fcn-handle.cc @ 8913:35cd375d4bb3
make tree::dup functions const
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 05 Mar 2009 13:50:25 -0500 |
parents | ab87d08d9a1b |
children | eb63fbe60fab |
comparison
equal
deleted
inserted
replaced
8912:57c3155754d6 | 8913:35cd375d4bb3 |
---|---|
68 return retval; | 68 return retval; |
69 } | 69 } |
70 | 70 |
71 tree_expression * | 71 tree_expression * |
72 tree_fcn_handle::dup (symbol_table::scope_id, | 72 tree_fcn_handle::dup (symbol_table::scope_id, |
73 symbol_table::context_id) | 73 symbol_table::context_id) const |
74 { | 74 { |
75 tree_fcn_handle *new_fh = new tree_fcn_handle (nm, line (), column ()); | 75 tree_fcn_handle *new_fh = new tree_fcn_handle (nm, line (), column ()); |
76 | 76 |
77 new_fh->copy_base (*this); | 77 new_fh->copy_base (*this); |
78 | 78 |
160 } | 160 } |
161 | 161 |
162 #if 0 | 162 #if 0 |
163 tree_expression * | 163 tree_expression * |
164 tree_anon_fcn_handle::dup (symbol_table::scope_id parent_scope, | 164 tree_anon_fcn_handle::dup (symbol_table::scope_id parent_scope, |
165 symbol_table::context_id parent_context) | 165 symbol_table::context_id parent_context) const |
166 { | 166 { |
167 tree_parameter_list *param_list = parameter_list (); | 167 tree_parameter_list *param_list = parameter_list (); |
168 tree_parameter_list *ret_list = return_list (); | 168 tree_parameter_list *ret_list = return_list (); |
169 tree_statement_list *cmd_list = body (); | 169 tree_statement_list *cmd_list = body (); |
170 symbol_table::scope_id this_scope = scope (); | 170 symbol_table::scope_id this_scope = scope (); |
185 return new_afh; | 185 return new_afh; |
186 } | 186 } |
187 #endif | 187 #endif |
188 | 188 |
189 tree_expression * | 189 tree_expression * |
190 tree_anon_fcn_handle::dup (symbol_table::scope_id, symbol_table::context_id) | 190 tree_anon_fcn_handle::dup (symbol_table::scope_id, |
191 symbol_table::context_id) const | |
191 { | 192 { |
192 // Instead of simply duplicating, transform to a tree_constant | 193 // Instead of simply duplicating, transform to a tree_constant |
193 // object that contains an octave_fcn_handle object with the symbol | 194 // object that contains an octave_fcn_handle object with the symbol |
194 // table of the referenced function primed with values from the | 195 // table of the referenced function primed with values from the |
195 // current scope and context. | 196 // current scope and context. |