diff options
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 313 |
1 files changed, 313 insertions, 0 deletions
@@ -15,6 +15,113 @@ * debug.c: Ditto. * command.y: Ditto. Some minor whitespace and comments cleanup. +2012-04-24 Arnold D. Robbins <arnold@skeeve.com> + + io.c cleanup and some speedup for RS as regexp parsing. + + * awk.h (Regexp): New members has_meta and maybe_long. + (enum redirval): Add redirect_none as value 0. + (remaybelong): Remove function declaration. + * awkgram.y: Use redirect_none instead of 0 for no redirect cases. + * io.c (go_getline_redir): Second arg now of type enum redirval. + Changed intovar into into_variable. + (comments and whitespace): Lots of general cleanup. + (socket_open): readle changed to read_len. + (two_way_open): Add additional calls to os_close_on_exec. + (rsrescan): Simplify code a bit and use RS->maybe_long. + * re.c (make_regexp): Set up new members in Regexp struct. + (remaybelong): Remove function. + (reisstring): Simplified code. + +2012-04-16 Eli Zaretskii <eliz@gnu.org> + + * io.c (read_with_timeout) [__MINGW32__]: Just call the blocking + 'read', as 'select' is only available for sockets. + * mpfr.c (set_ROUNDMODE) [!HAVE_MPFR]: Renamed from set_RNDMODE. + * main.c (load_procinfo): Declare name[] also when HAVE_MPFR is + defined even though HAVE_GETGROUPS etc. are not. + +2012-04-12 John Haque <j.eh@mchsi.com> + + * array.c, awk.h, awkgram.y, builtin.c, command.y, debug.c, + field.c, mpfr.c, profile.c: Change RND_MODE to ROUND_MODE. + +2012-04-11 John Haque <j.eh@mchsi.com> + + * main.c (varinit): Change RNDMODE to ROUNDMODE. + +2012-04-11 Arnold D. Robbins <arnold@skeeve.com> + + * main.c: Change --arbitrary-precision to --bignum. + +2012-04-02 John Haque <j.eh@mchsi.com> + + Add support for arbitrary-precision arithmetic. + + * mpfr.c: New file. + * awk.h (struct exp_node): Add union to handle different number types. + (MPFN, MPZN): New flag values. + (DO_MPFR, do_mpfr): New defines. + (PREC_node, RNDMODE_node): Add declarations. + (PRECISION, RND_MODE, MNR, MFNR, mpzval, do_ieee_fmt): Add declarations. + (make_number, str2number, format_val, cmp_numbers): Ditto. + (force_number): Change definition. + (Func_pre_exec, Func_post_exec): New typedefs. + (POP_NUMBER, TOP_NUMBER): Change definitions. + (get_number_ui, get_number_si, get_number_d, get_number_uj, + iszero, IEEE_FMT, mpg_float, mpg_integer, mpg_float, + mpg_integer): New defines. + * awkgram.y (tokentab): Add alternate function entries for MPFR/GMP. + (snode): Choose the appropriate function. + (negate_num): New function to negate a number. + (grammar): Use it. + (yylex): Adjust number handling code. + * array.c (value_info, asort_actual, sort_user_func): Adjust for + MPFR/GMP numbers. + (do_adump, indent): Minor changes. + (sort_up_index_number, sort_up_value_number, sort_up_value_type): Use + cmp_numbers() for numeric comparisons. + * builtin.c (mpz2mpfr): New function. + (format_tree): Adjust to handle MPFR and GMP numbers. + * eval.c (register_exec_hook): New function to manage interpreter hooks. + (num_exec_hook, pre_execute, post_execute): New and adjusted definitions. + (h_interpret): Renamed from debug_interpret. + (init_interpret): Changed to use the new name. + (flags2str): New entries for MPFN and MPZN. + (cmp_nodes): Reworked to use seperate routine for numeric comparisons. + (set_IGNORECASE, set_BINMODE, set_LINT, update_NR, update_FNR, + update_NF): Adjust code and some cleanup. + * field.c (rebuild_record): Field copying code reworked to handle + MPFR/GMP numbers. + (set_NF): Minor adjustment. + * io.c (INCREMENT_REC): New macro. + (inrec, do_getline): Use the new macro. + (nextfile, set_NR, set_FNR, get_read_timeout, pty_vs_pipe): Adjust code + to handle MPFR/GMP numbers. + * interpret.h (r_interpret): Adjust TOP_NUMBER/POP_NUMBER usage. + (EXEC_HOOK): New macro and definition. + (DEBUGGING): Removed. + * main.c (DEFAULT_PREC, DEFAULT_RNDMODE): New defines. + (opttab): New entry for option arbitrary-precision. + (main): Handle the new option. + (usage): Add to usage message. + (varinit): Add PREC and RNDMODE. + (load_procinfo): Install MPFR and GMP related items. + (version): Append MPFR and GMP versions to message. + * msg.c (err) : Adjust FNR handling with MPFR/GMP. + * node.c (r_format_val): Renamed from format_val. + (r_force_number): Return NODE * instead of AWKNUM. + (make_number, str2number, format_val, cmp_numpers: Defined and initialized. + (r_unref): Free MPFR/MPZ numbers. + (get_numbase): Renamed from isnondecimal and return the base. + (cmp_awknums): New function to compare two AWKNUMs. + * command.y (yylex): Adjust number handling code. + (grammar): Minor adjustments to handle negative numbers. + * debug.c (init_debug): New function. + (do_info, do_set_var, watchpoint_triggered, serialize, + initialize_watch_item, do_watch, print_watch_item): Minor adjustments. + (debug_pre_execute): Adjusted to handle MPFR and GMP numbers. + 2012-04-09 Arnold D. Robbins <arnold@skeeve.com> * INSTALL, config.guess, config.sub, depcomp, install-sh, @@ -132,12 +239,92 @@ * dfa.c: Sync with GNU grep. +2012-01-02 Arnold D. Robbins <arnold@skeeve.com> + + * io.c (Read_can_timeout, Read_timeout, Read_default_timeout): + Renamed to use lower case. + Other minor stylistic edits. + +2012-01-01 John Haque <j.eh@mchsi.com> + + * awk.h (struct iobuf): New entry read_func. + * io.c (Read_can_timeout, Read_timeout, Read_default_timeout): + New variables. + (init_io): New routine to initialize the variables. + (in_PROCINFO): New "clever" routine to parse elements with indices + seperated by a SUPSEP. + (get_read_timeout): New routine to read timeout value for an IOBUF. + (read_with_timeout): New routine to read from a fd with a timeout. + (pty_vs_pipe): Use in_PROCINFO(). + (get_a_record): Set the timeout value and the read routine as necessary. + * main.c (main): Call init_io(). + +2011-12-31 Arnold D. Robbins <arnold@skeeve.com> + + * profile_p.c: Remove the file. + * msg.c (err): Remove check for name being dgawk. + 2011-12-31 Arnold D. Robbins <arnold@skeeve.com> * awk.h [STREQ, STREQN]: Remove macros. * awkgram.y, builtin.c, command.y, debug.c, eval.c, io.c, msg.c: Change all uses to call strcmp, strncmp. +2011-12-28 Arnold D. Robbins <arnold@skeeve.com> + + * int_array.c, str_array.c: Fix some compiler warnings 32/64 + bit system differences. + +2011-12-26 John Haque <j.eh@mchsi.com> + + Merge gawk, pgawk and dgawk into a single executable gawk. + + * awk.h (DO_PRETTY_PRINT, DO_PROFILE, DO_DEBUG, + do_pretty_print, do_debug): New defines. + (interpret): New variable, a pointer to an interpreter routine. + (enum exe_mode): Nuked. + * main.c (opttab): New options --pretty-print and --debug; + Remove option --command. + (usage): Update usage messages. + * interpret.h: New file. + * eval.c (r_interpret): Move to the new file. + (debug_interpret): New interpreter routine when debugging. + (init_interpret): New routine to initialize interpreter related + variables. + * eval_d.c, eval_p.c: Delete files. + * debug.c (interpret): Renamed to debug_prog. + (DEFAULT_PROMPT, DEFAULT_HISTFILE, DEFAULT_OPTFILE): Remove prefix 'd'. + * profile.c (init_profiling): Nuked. + * Makefile.am: Adjusted. + + Add command line option --load for loading extensions. + + * awk.h (srctype): Add new source type SRC_EXTLIB. + * ext.c(load_ext): New routine to load extension. + (do_ext): Adjust to use load_ext(). + * main.c (opttab): Add new option --load. + (main): Call load_ext() to load extensions. + (usage): Add usage message for the new option. + * io.c (get_cwd): New routine. + (do_find_source): Use the new routine. + (find_source): Handle new type SRC_EXTLIB. + * awkgram.y (parse_program, next_sourcefile): Skip type SRC_EXTLIB. + (add_srcfile): Adjust call to find_source. + * debug.c (source_find): Same. + + Unrelated: + + * ext.c (get_argument): Fixed argument parsing. + * array.c (null_array_func): Reworked array routines for an empty array. + * str_array.c, int_array.c: Make GCC happy, use %u instead of %lu + printf formats. + * eval.c (node_Boolean): New array for TRUE and FALSE nodes. + (init_interpret): Create the new nodes. + (eval_condition): Add test for the new nodes. + (setup_frame): Disable tail-recursion optimization when profiling. + * interpret.h (r_interpret): Use the boolean nodes instead of making + new ones when needed. + 2011-12-26 Arnold D. Robbins <arnold@skeeve.com> Finish Rational Range Interpretation (!) @@ -197,6 +384,14 @@ 2011-10-25 Arnold D. Robbins <arnold@skeeve.com> + Merge with gawk_performance branch done. Additionally: + + * cint_array.c, int_array.c, str_array.c: Fix compiler complaints + about printf formats (signed / unsigned vs. %d / %u). + * eval.c (setup_frame): Add a missing return value. + +2011-10-25 Arnold D. Robbins <arnold@skeeve.com> + * Makefile.am (dist-hook): Use `cd $(srcdir)/pc' so that `make distcheck' works completely. * builtin.c (do_strftime): Add cast to long int in check @@ -268,10 +463,25 @@ (remap_std_file): Per Eli's suggestion, removed the leading close of oldfd and will let dup2 do the close for us. +2011-10-11 John Haque <j.eh@mchsi.com> + + * symbol.c: Add licence notice. + * array.c (PREC_NUM, PREC_STR): Define as macros. + 2011-10-09 Arnold D. Robbins <arnold@skeeve.com> * dfa.c: Sync with GNU grep. +2011-10-07 John Haque <j.eh@mchsi.com> + + Tail recursion optimization. + * awkgram.y (grammar, mk_function): Recognize tail-recursive + calls. + * awk.h (tail_call, num_tail_calls): New defines. + * eval.c (setup_frame): Reuse function call stack for + tail-recursive calls. + (dump_fcall_stack): Reworked. + 2011-10-04 Arnold D. Robbins <arnold@skeeve.com> * awk.h, main.c (gawk_mb_cur_max): Make it a constant 1 when @@ -308,10 +518,113 @@ * dfa.c: Sync with GNU grep. +2011-09-08 John Haque <j.eh@mchsi.com> + + Optimization for compound assignment, increment and + decrement operators; Avoid unref and make_number calls + when there is no extra references to the value NODE. + 2011-09-03 Arnold D. Robbins <arnold@skeeve.com> * dfa.c: Sync with GNU grep. +2011-08-31 John Haque <j.eh@mchsi.com> + + Grammar related changes: Simplify grammar for user-defined + functions and general cleanups. + + * symbol.c: New file. + * awkgram.y: Move symbol table related routines to the + new file. + (rule, func_name, function_prologue, param_list): Reworked. + (install_function, check_params): Do all error checkings + for the function name and parameters before installing in + the symbol table. + (mk_function): Finalize function definition. + (func_install, append_param, dup_params): Nuked. + * symbol.c (make_params): allocate function parameter nodes + for the symbol table. Use the hash node as Node_param_list; + Saves a NODE for each parameter. + (install_params): Install function parameters into the symbol + table. + (remove_params): Remove parameters out of the symbol table. + * awk.h (parmlist, FUNC): Nuked. + (fparms): New define. + + + Dynamically loaded function parameters are now handled like + those for a builtin. + + * awk.h (Node_ext_func, Op_ext_builtin): New types. + (Op_ext_func): Nuked. + * ext.c (make_builtin): Simplified. + (get_curfunc_arg_count): Nuked; Use the argument 'nargs' of + the extension function instead. + (get_argument, get_actual_argument): Adjust. + * eval.c (r_interpret): Update case Op_func_call for a dynamic + extension function. Handle the new opcode Op_ext_builtin. + * pprint (profile.c): Adjust. + + + Use a single variable to process gawk options. + + * awk.h (do_flags): New variable. + (DO_LINT_INVALID, DO_LINT_ALL, DO_LINT_OLD, DO_TRADITIONAL, + DO_POSIX, DO_INTL, DO_NON_DEC_DATA, DO_INTERVALS, + DO_PROFILING, DO_DUMP_VARS, DO_TIDY_MEM, + DO_SANDBOX): New defines. + (do_traditional, do_posix, do_intervals, do_intl, + do_non_decimal_data, do_profiling, do_dump_vars, + do_tidy_mem, do_sandbox, do_lint, + do_lint_old): Defined as macros. + * main.c: Remove definitions of the do_XX variables. Add + do_flags definition. + * debug.c (execute_code, do_eval, parse_condition): Save + do_flags before executing/parsing and restore afterwards. + + + Nuke PERM flag. Always increment/decrement the reference + count for a Node_val. Simplifies macros and avoids + occassional memory leaks, specially in the debugger. + + * awk.h (UPREF, DEREF, dupnode, unref): Simplified. + (mk_number): Nuked. + * (*.c): Increment the reference count of Nnull_string before + assigning as a value. + + + Revamped array handling mechanism for more speed and + less memory consumption. + + * awk.h (union bucket_item, BUCKET): New definitions. Used as + bucket elements for the hash table implementations of arrays; + 40% space saving in 32 bit x86. + (buckets, nodes, array_funcs, array_base, array_capacity, + xarray, alookup, aexists, aclear, aremove, alist, + acopy, adump, NUM_AFUNCS): New defines. + (array_empty): New macro to test for an empty array. + (assoc_lookup, in_array): Defined as macros. + (enum assoc_list_flags): New declaration. + (Node_ahash, NUMIND): Nuked. + * eval.c (r_interpret): Adjust cases Op_subscript, + Op_subscript_lhs, Op_store_var and Op_arrayfor_incr. + * node.c (dupnode, unref): Removed code related to Node_ahash. + * str_array.c: New file to handle array with string indices. + * int_array.c: New file to handle array with integer indices. + * cint_array.c: New file. Special handling of arrays with + (mostly) consecutive integer indices. + + + Memory pool management reworked to handle NODE and BUCKET. + + * awk.h (struct block_item, BLOCK, block_id): New definitions. + (getblock, freeblock): New macros. + (getbucket, freebucket): New macros to allocate and deallocate + a BUCKET. + (getnode, freenode): Adjusted. + * node.c (more_nodes): Nuked. + (more_blocks): New routine to allocate blocks of memory. + 2011-08-24 Arnold D. Robbins <arnold@skeeve.com> Fix pty co-process communication on Ubuntu GNU/Linux. |