comparison src/ChangeLog @ 7336:745a8299c2b5

[project @ 2007-12-28 20:56:55 by jwe]
author jwe
date Fri, 28 Dec 2007 20:56:58 +0000
parents 274d9642ac10
children e0a77d2ef9bd
comparison
equal deleted inserted replaced
7335:58f5fab3ebe5 7336:745a8299c2b5
1 2007-12-28 John W. Eaton <jwe@octave.org>
2
3 Merge changes from object branch:
4
5 2007-12-12 John W. Eaton <jwe@octave.org>
6
7 * load-path.cc (load_path::dir_info::get_file_list,
8 load_path::move_method_map, load_path::remove_method_map,
9 load_path::do_find_fcn, load_path::do_find_private_fcn,
10 load_path::do_find_method, load_path::do_find_file,
11 load_path::do_find_first_of, load_path::do_find_all_first_of,
12 load_path::do_display, load_path::add_to_method_map, genpath,
13 execute_pkg_add_or_del): Use file_ops::concat.
14
15 2007-08-24 John W. Eaton <jwe@octave.org>
16
17 * variables.cc (Fmislocked): return value for nargin == 0 case.
18
19 2007-07-27 John W. Eaton <jwe@octave.org>
20
21 * pt-idx.cc (tree_index_expression::rvalue):
22 Pass substring of type to subsref when doing partial evaluation.
23 (tree_index_expression::lvalue): Likewise.
24
25 2007-06-29 John W. Eaton <jwe@octave.org>
26
27 * ov-class.cc (is_built_in_class, set_class_relationship,
28 Fsuperiorto, Finferiorto): New functions.
29 (octave_class::in_class_method): New function.
30 (octave_class::subsref, octave_class:subsasgn): Use it.
31
32 2007-06-28 John W. Eaton <jwe@octave.org>
33
34 * src/ov-class.cc (sanitize): New function.
35 (make_idx_args): Use it.
36
37 2007-06-28 John W. Eaton <jwe@octave.org>
38
39 * src/ov-class.cc (octave_class::subsasgn): Expect and use only
40 one return value from feval of subsasgn method.
41
42 * ov.cc (octave_value::assign): Don't convert to struct if
43 indexing a class object with ".".
44
45 * pt-idx.cc (tree_index_expression::make_arg_struct):
46 Use Cell instead of octave_value_list for subscripts.
47
48 * ov-class.cc (make_idx_args): For "." index, subs field is
49 string, not cell.
50
51 2007-06-27 John W. Eaton <jwe@octave.org>
52
53 * ov-fcn-handle.cc (octave_fcn_handle::save_ascii,
54 octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary,
55 octave_fcn_handle::load_binary, octave_fcn_handle::save_hdf5,
56 octave_fcn_handle::load_hdf5): Adapt to new symbol table objects.
57
58 * symtab.h (symbol_table::all_variables,
59 symbol_table::do_all_variables): New arg, defined_only.
60
61 2007-06-26 John W. Eaton <jwe@octave.org>
62
63 * ls-mat5.cc (read_mat5_binary_element): Adapt to new symbol table
64 objects.
65
66 * variables.cc (Vwhos_line_format): New static variable.
67 (Fwhos_line_format): New function.
68 (symbol_record_name_compare): Delete function.
69 (symbol_record_name_compare, whos_parameter): New structs.
70 (print_descriptor, dimensions_string_req_first_space,
71 dimensions_string_req_total_space, make_dimensions_string,
72 parse_whos_line_format, print_symbol_info_line): New static
73 functions, adapted from old symbol table class.
74 (do_who): Adapt to new symbol table objects.
75
76 * symtab.h (symbol_table::glob_variables): New functions.
77 (symbol_table::do_glob): New argument, vars_only. Change all uses.
78
79 2007-06-22 John W. Eaton <jwe@octave.org>
80
81 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::help_for_dispatch):
82 New function.
83 * symtab.h: Provide decl.
84 (symbol_table::fcn_info::help_for_dispatch,
85 symbol_table::help_for_dispatch): New functions.
86
87 * help.cc (help_from_symbol_table): Call
88 symbol_table::help_for_dispatch instead of
89 extract_help_from_dispatch.
90
91 * help.cc (extract_help_from_dispatch): Delete.
92 * help.h: Delete decl.
93
94 2007-06-21 John W. Eaton <jwe@octave.org>
95
96 * DLD-FUNCTIONS/dispatch.cc (class octave_dispatch): Delete class.
97 (builtin, any_arg_is_magic_colon, dispatch_record): Delete functions.
98 (Fbuiltin, Fdispatch): Adapt to new symbol table objects.
99
100 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::print_dispatch):
101 New function.
102 * symtab.h: Provide decl.
103 (symbol_table::fcn_info::print_dispatch, symbol_table::print_dispatch):
104 New functions.
105
106 * symtab.h (symbol_table::fcn_info::fcn_info_rep::clear_dispatch,
107 symbol_table::fcn_info::clear_dispatch, symbol_table::clear_dispatch):
108 New functions.
109
110 * symtab.h (symbol_table::fcn_info::fcn_info_rep::get_dispatch,
111 symbol_table::fcn_info::get_dispatch, symbol_table::get_dispatch):
112 New functions.
113
114 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find):
115 Use leftmost class argument as dispatch type, or first argument if
116 there are no class arguments.
117
118 2007-06-20 John W. Eaton <jwe@octave.org>
119
120 * ov-base.cc (Vprint_answer_id_name, Fprint_answer_id_name): Delete.
121 (octave_base_value::print_with_name): Always print name.
122
123 * ov-base.cc (Vsilent_functions): No longer static.
124 * ov-base.h: Provide decl.
125
126 * ov-class.cc (Fmethods): Define as command.
127
128 * ov-class.cc (octave_class::print): Simply call print_raw.
129
130 * ov-class.cc (octave_class::print_with_name): New function.
131 * ov-class.h: Provide decl.
132
133 2007-06-19 John W. Eaton <jwe@octave.org>
134
135 * ov.cc (octave_value::do_unary_op, octave_value::do_binary_op):
136 Handle class methods.
137
138 * ov.cc (octave_value::unary_op_fcn_name,
139 octave_value::binary_op_fcn_name): New functions.
140 * ov.h: Provide decls.
141
142 * ov-typeinfo.cc (octave_value_typeinfo::register_unary_class_op,
143 octave_value_typeinfo::register_binary_class_op,
144 octave_value_typeinfo::do_register_unary_class_op,
145 octave_value_typeinfo::do_register_binary_class_op,
146 octave_value_typeinfo::do_lookup_unary_class_op,
147 octave_value_typeinfo::do_lookup_binary_class_op): New functions.
148 * ov-typeinfo.h: Provide decls.
149
150 * ov-typeinfo.h (octave_value_typeinfo::unary_class_op_fcn,
151 octave_value_typeinfo::binary_class_op_fcn): New typedefs.
152 (octave_value_typeinfo::unary_class_ops,
153 octave_value_typeinfo::binary_class_ops): New data members.
154 (octave_value_typeinfo::octave_value_typeinfo): Initialize them.
155 (octave_value_typeinfo::lookup_unary_class_op,
156 octave_value_typeinfo::lookup_binary_class_op): New functions.
157
158 * OPERATORS/op-class.cc: New file.
159 * Makefile.in (OP_XSRC): Add it to the list.
160
161 * ov.cc (install_types): Call octave_class::register_type here.
162
163 * ov-class.h (octave_class): Implement by containing a map object
164 instead of deriving from octave_struct.
165 * ov-class.cc (octave_class::subsref, octave_class::subsasgn):
166 Don't use octave_class implementation as default action.
167
168 * ov.h, ov.cc (octave_value::octave_value (const Octave_map&, const
169 std::string&)): New constructor.
170
171 2007-06-18 John W. Eaton <jwe@octave.org>
172
173 * ov-class.cc (octave_class::subsref, octave_class::subsasgn):
174 Handle dispatch to user-defined methods.
175
176 * parse.y (load_fcn_from_file): New arg, dispatch_type.
177 Change all uses.
178
179 * ov-fcn.h (octave_function::is_class_constructor,
180 octave_function::is_class_method, octave_function::dispatch_class):
181 New virtual functions.
182
183 * ov-usr-fcn.h (octave_user_function::dispatch_class,
184 octave_usr_function::stash_dispatch_class): New functions.
185 (octave_usr_fucntion::xdispatch_class): New data member.
186 * parse.y (frob_function): Call stash_dispatch_class here.
187
188 * ov-struct.cc (Ffieldnames): Also handle objects.
189
190 * ov-class.cc (Fmethods): New function.
191 * load-path.cc (load_path::do_methods): New function.
192 * load-path.h (load_path::methods): New function.
193
194 * ov.h (octave_value::is_object): New function.
195 * ov-base.h (octave_base_value::is_object): New virtual function.
196 * ov-class.h (octave_class::is_object): New function.
197 * ov-class.cc (Fisobject): New function.
198
199 2007-06-15 John W. Eaton <jwe@octave.org>
200
201 * ov-class.cc (octave_class::print): Call display method if found.
202
203 * symtab.h (symbol_table::fcn_info::find_method): New function.
204 (symbol_table::find_method): New function.
205 (symbol_table::fcn_info::fcn_info_rep::find_method): Provide decl.
206 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find_method):
207 New function.
208 (symbol_table::fcn_info::fcn_info_rep::find): Use it.
209
210 2007-06-14 John W. Eaton <jwe@octave.org>
211
212 * symtab.h (symbol_table::clear_mex_functions): Make it work.
213 (symbol_table::fcn_info::fcn_info_rep::clear_mex_function,
214 symbol_table::fcn_info::clear_mex_function): New functions.
215
216 2007-06-08 John W. Eaton <jwe@octave.org>
217
218 * defun.cc (Falias): Delete.
219
220 * variables.cc (load_fcn_try_ctor): New function.
221 (lookup): call load_fcn_try_ctor instead of load_fcn_from_file.
222
223 * variables.cc, variables.h (at_top_level, lookup_by_name, lookup,
224 initialize_symbol_tables, fcn_out_of_date, symbol_out_of_date,
225 lookup_function, lookup_user_function, link_to_global_variable,
226 link_to_builtin_or_function, force_link_to_function, Fdocument,
227 is_local_variable, do_clear_all, do_clear_functions,
228 do_clear_globals, do_clear_variables, do_clear_function,
229 do_clear_global, do_clear_variable, do_clear_symbol,
230 do_clear_function_pattern, do_clear_global_pattern,
231 do_clear_variable_pattern, do_clear_symbol_pattern,
232 clear_function, clear_variable, clear_symbol):
233 Delete (some functionality moved to the new symtab.cc and some is
234 no longer needed).
235 (Fignore_function_time_stamp): Move to symtab.cc.
236
237 * lex.l (lookup_identifier): Delete.
238
239 * parse.y (is_function_file): New function.
240 (load_fcn_from_file): Return pointer to octave_function, not bool.
241
242 * ov-usr-fcn.h, ov-usr-fcn.cc (octave_user_function::argn_sr,
243 octave_user_function::nargin_sr, octave_user_function::nargout_sr,
244 octave_user_function::varargin_sr): Delete data members.
245 (octave_user_function::install_automatic_vars): Delete.
246 (octave_user_script::do_multi_index_op): New function.
247
248 * ov-fcn.h (octave_function::locked, octave_function::my_dir_name):
249 New data members.
250 (octave_function::dir_name, octave_function::stash_dir_name,
251 octave_function::lock, octave_function::unlock,
252 octave_function::islocked): New functions.
253
254 * of-fcn-handle.h, ov-fcn-handle.cc (octave_fcn_handle::subsref):
255 Call out_of_date_check here to simplify time stamp checking.
256 (octave_fcn_handle::reload_warning): Delete.
257
258 * ov.h (octave_value::is_user_script, octave_value::is_user_function):
259 New functions.
260 * ov-base.h (octave_base_value::is_user_script,
261 octave_base_value::is_user_function): New pure virtual functions.
262 * ov-fcn.h (octave_function::is_user_script,
263 octave_function::is_user_function): Delete.
264
265 * load-save.cc (install_loaded_variable): Greatly simplify.
266
267 * load-path.h, load-path.cc: Change private_fcn_file to private_file.
268 (load_path::private_fcn_map): New data member.
269 (load_path::do_add, load_path::do_remove, load_path::do_update):
270 Also manage private_file_map here.
271 (load_path::add_to_private_fcn_map): New function.
272 (load_path::remove_private_fcn_map): New function.
273 (load_path::do_find_private_fcn): Make it work.
274 (get_file_list): New function.
275 (load_path::do_display): Use it. Display private map.
276 (load_path::find_method, load_path::find_fcn): Handle directory name.
277
278 * token.cc, token.h, toplev.cc, debug.cc, defun.cc, defun-dld.h,
279 defun-int.h, error.cc, help.cc, load-save.h, load-save.cc, mex.cc,
280 octave.cc, ov-fcn-handle.cc, ov-usr-fcn.cc, parse.h, parse.y,
281 lex.l, variables.cc: Adapt to new symbol table objects (my
282 apologies for the lack of detail).
283
284 * unwind-prot.h (unwind_protect::add): Set default value for ptr arg.
285
286 * pt-stmt.cc (tree_statement::eval): Rework method for deciding
287 whether to assign value to ans.
288
289 * pt-idx.cc (tree_index_expression::rvalue):
290 Looking up symbol may evaluaate first args now.
291
292 * pt-id.h, pt-id.cc (tree_identifier::document,
293 tree_identifier::is_defined, tree_identifier::define,
294 tree_identifier::is_function, tree_identifier::lookup,
295 tree_identifier::link_to_global): Delete.
296 (tree_identifier::do_lookup): Simplify.
297 (tree_identifier::rvalue): Looking up symbol can't execute script now.
298
299 * pt-misc.cc (tree_parameter_list::initialize_undefined,
300 tree_parameter_list::is_defined): Call is_variable for elt, not
301 is_defined.
302
303 * pt-fcn-handle.h (tree_anon_fcn_handle::fcn): Now pointer to
304 octave_user_function, not value. Change all uses.
305
306 * pt-decl.h (tree_decl_command::initialized): Delete data member.
307 (tree_decl_elt::is_variable): New function.
308 * pt-decl.cc: Fix all uses of tree_decl_command::initialized.
309
310 * ls-hdf5.cc, ls-mat-ascii.cc, ls-mat4.cc, ls-mat5.cc,
311 ls-oct-ascii.cc, ls-oct-binary.cc, input.cc: Don't include symtab.h.
312
313 * dynamic-ld.h, dynamic-ld.cc (octave_dynamic_loader::load_oct,
314 octave_dynamic_loader::load_mex, octave_dynamic_loader::do_load_oct,
315 octave_dynamic_loader::do_load_mex): Adapt to new symbol table
316 objects. Return pointer octave_function instead of bool.
317
318 * DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Disable for now.
319 Disable code that works with old symbol tables.
320 (Fbuiltin): Simply call symbol_table::add_dispatch.
321
322 * pt-arg-list.cc, pt-arg-list.h, pt-assign.cc, pt-assign.h,
323 pt-binop.cc, pt-binop.h, pt-bp.h, pt-cell.cc, pt-cell.h,
324 pt-cmd.cc, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc,
325 pt-const.h, pt-decl.cc, pt-decl.h, pt-except.cc, pt-except.h,
326 pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc, pt-id.h,
327 pt-idx.cc, pt-idx.h, pt-jump.cc, pt-jump.h, pt-loop.cc, pt-loop.h,
328 pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-select.cc,
329 pt-select.h, pt-stmt.cc, pt-stmt.h, pt-unop.cc, pt-unop.h:
330 Adapt dup functions to use scope instead of symbol_table objects.
331
332 * TEMPLATE-INST/Array-sym.cc: Delete.
333 * Makefile.in (TI_XSRC): Remove it from the list.
334
335 * symtab.h, symtab.cc: Replace with new versions.
336
337 2007-05-16 John W. Eaton <jwe@octave.org>
338
339 * oct-lvalue.cc, oct-lvalue.h (octave_lvalue::chg_fcn): Delete.
340 Fix all uses.
341
342 2007-05-15 John W. Eaton <jwe@octave.org>
343
344 * load-path.cc (load_path::do_find_private_function): New function.
345 * load-path.h (load_path::do_find_private_function): Provide decl.
346 (load_path::find_private_function): New function.
347
348 2007-05-08 John W. Eaton <jwe@octave.org>
349
350 * pt-idx.cc (tree_index_expression::rvalue): Handle dispatch here.
351
352 * pt-id.cc (tree_identifier::is_variable, tree_identifier::lookup):
353 New functions.
354 * pt-id.cc: Provide decls.
355
356 * parse.y (current_class_name): New global variable.
357 * parse.h: Provide decl.
358
359 * parse.y (load_fcn_from_file, parse_fcn_file):
360 New arg, dispatch_type.
361 (parse_fcn_file): Protect current_class_name and set it to
362 dispatch_type before parsing function.
363 (load_fcn_from_file): If dispatch_type is not empty, call
364 load_path::find_method instead of load_path::find_fcn.
365 * parse.h: Fix decls for extern functions.
366
367 * lex.h (lexical_feedback::parsing_class_method): New data member.
368 * lex.l (lexical_feedback::init): Initialize it.
369 (lookup_identifier): Check it and set sym_name accordingly.
370
371 * ov-usr-fcn.h (octave_user_function::mark_as_class_constructor,
372 octave_user_function::is_class_constructor,
373 octave_user_function::mark_as_class_method,
374 octave_user_function::is_class_method): New functions.
375 (octave_user_function::class_constructor,
376 octave_user_function::class_method): New data members.
377 * ov-usr-fcn.cc (octave_user_function::octave_user_function):
378 Initialize them.
379
380 * load-path.h, load-path.cc: Use typedefs to simplify template decls.
381 Use fcn consistently instead of function.
382
383 2007-05-03 John W. Eaton <jwe@octave.org>
384
385 * ov-class.cc (Fclass): Move here.
386 * ov-typeinfo.cc: From here.
387
388 * input.cc (octave_gets): Call load_path::update if user input
389 contains something other than one of the characters " \t\n\r".
390
391 * ov-class.cc, ov-class.h: New files.
392 * Makefile.in: Add them to the appropriate lists.
393
394 * load-path.cc (genpath): Skip directories beginning with "@".
395 (load_path::dir_info::get_file_list): Don't return anything.
396 Call get_private_function_map here.
397 (load_path::dir_info::initialize): Not here.
398 (load_path::dir_info_::get_method_file_map): New function.
399 (load_path::method_map): New data member.
400 (load_path::do_clear): Also clear method_map.
401 (load_path::do_add): Also call add_to_method_map.
402 (load_path::do_update): Also clear method_map and call
403 (load_path::do_find_method): New function.
404 (load_path::do_add_to_method_map): New function.
405 (load_path::move_fcn_map, load_path::move_method_map): New functions.
406 (load_path::move): Use them.
407 (load_path::remove_fcn_map, load_path::remove_method_map):
408 New functions.
409 (load_path::remove): Use them.
410 * load-path.h: Provide/fix decls.
411 (load_path::find_method): New static function.
412
413 * Makefile.in (%.df : %.cc): Use mv instead of
414 $(simple-move-if-change-rule).
415
1 2007-12-21 John W. Eaton <jwe@octave.org> 416 2007-12-21 John W. Eaton <jwe@octave.org>
2 417
3 Version 3.0.0 released. 418 Version 3.0.0 released.
4 419
5 * version.h (OCTAVE_VERSION): Now 3.0.0. 420 * version.h (OCTAVE_VERSION): Now 3.0.0.