Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fd52bc399a
Fetching contributors…

Cannot retrieve contributors at this time

371 lines (297 sloc) 15.101 kb
LuaSrcDiet changelog
*** Remember to update version and date information in LuaSrcDiet.lua ***
2008-06-08 Kein-Hong Man <>
* optparser.lua: improved local variable collision discrimination
* technotes.txt: updated notes on local variable collision tests
* optparser.lua: changed a collision test to be more conservative
* Manifest: updated
* README: updated
* Version: 0.11.2
2008-06-07 Kein-Hong Man <>
* plugin/sloc.lua, plugin/html.lua: added skeletons for two
planned plugins
* LuaSrcDiet.lua: added early exit options for plugins
* plugin/example.lua: added early exit for plugin, filenames
* plugin/sloc.lua: implemented SLOC plugin
* plugin/html.lua: implemented HTML plugin
* numbers_original.lua, numbers_on_diet.lua: fixed missing commas
* LuaSrcDiet.lua: fixed early exit handling for multiple files
* sample/Makefile: added generator entry for HTML plugin
* sample/html_sample.html: added HTML plugin sample (html.lua)
* plugin/example.lua: updated comments
* technotes.txt: added note on maximum local identifiers needed
* optparser.lua: minor formatting tweaks
2008-06-06 Kein-Hong Man <>
* plugin/: created directory for plugins
* plugin/example.lua: created example plugin with specified calls
* LuaSrcDiet.lua: added --plugin option with plugin handling code
* LuaSrcDiet.lua: tweaked usage text
2008-06-03 Kein-Hong Man <>
* LuaSrcDiet.lua: added --opt-entropy option handling
* sample/Makefile: improved with an explanation list
* optparser.lua: added implementation for --opt-entropy
* Manifest: updated
* README: updated
* Version: 0.11.1
2008-06-03 Kein-Hong Man <>
* technotes.txt: added notes on local variable rename algorithm
* optparser.lua: bug fix, avoid keywords when generating names
* test/test_benchmark1.lua: fixed missing die() to error()
* test/test_benchmark1.lua: added verification of scripts after
first loading them using loadstring()
* LuaSrcDiet.lua, optlex.lua: --detail implementation for
strings and numbers, extra info display
* optlex.lua (do_number): fixed --detail handling where the
converted number is no different
* optparser.lua: updated final local renaming handling
* optparser.lua: added --details statistics implementation for
local variable renaming
* sample/Makefile: added --details to standard 'all' build
* LuaSrcDiet.lua, llex.lua, lparser.lua, optlex.lua: fixed some
inadvertent or forgotten or unnecessary global variable accesses
2008-05-31 Kein-Hong Man <>
* test/test_benchmark1.lua: coded simple test for loader
* test/LuaSrcDiet_fixed.lua, test/LuaSrcDiet_fixed_.lua: files
without shbang first line to satisfy loadstring()
2008-05-29 Kein-Hong Man <>
* Manifest: updated
* README: updated
* lparser.lua: added isself flag to handle "self" specially
* LuaSrcDiet.lua (dump_parser): added display for 'isself'
* optparser.lua (optimize): added support for preserving implicit
"self" parameter, updated local renaming loop
* Version: 0.11.0
* README: updated
2008-05-29 Kein-Hong Man <>
* optparser.lua (stats_summary): improved with output stats, clean up
* LuaSrcDiet.lua (process_file): clean up stats display
* LuaSrcDiet.lua (process_file): mistake in assigning optional print,
mistakenly assigned to lparser.print instead of optparser.print
* sample/Makefile: added entries for dumping --dump-* samples
* sample/Makefile: added entries for different optimization options
2008-05-29 Kein-Hong Man <>
* optparser.lua (optimize): finished coding local variable
optimizer, to test now
* optparser.lua (optimize): syntax error, used 'then' instead of 'do'
* lparser.lua: bug in binopr_*, missing "%" operator, Yueliang bug
* lparser.lua: added nameref, to track local variable declaration's
position properly
* lparser.lua (searchvar): bug, forgot to fix a "return 1" to return
a proper useful id
* optparser.lua (optimize): fix obj/object handling, no need to
compare against nil
* optparser.lua (optimize): rewrite local-local collision loop using
a variable scanleft to track objects left to process
* optparser.lua (optimize): objects assigned to mark properly with
skip and done
* lparser.lua (adjustlocalvars): change 'rem' assignment if local
variables are overlapping
* optparser.lua (optimize): added handling for 'rem' extension if
it is negative
* sample/Makefile: updated, plus second-generation test, auto-diffed
* optparser.lua: local variable optimization seems to work
2008-05-28 Kein-Hong Man <>
* optparser.lua: added designs for stats tables
* optparser.lua (debug_dump_info): beautify variable names
* optparser.lua: added draft of statistics dump code
* optparser.lua (optimize): added option as parm for future
* optparser.lua (debug_dump_info): removed along with associated
stuff, moved to main program as a dump option
* LuaSrcDiet.lua: change name of --dump to --dump-lexer, added
* LuaSrcDiet.lua (dump_parser): adapted from debug_dump_info
* optparser.lua: rearranged some code
* optparser.lua: fixed LETTERS, upper-case is valid also
* optparser.lua (new_var_name): implemented variable name allocator
* optparser.lua (preprocess): added preprocess to find first and
last accesses of locals
2008-05-28 Kein-Hong Man <>
* lparser.lua (removevars): adapted from original parser,
needed for proper local variable activation/deactivation tracking
* optparser.lua: added some debugging display code
* lparser.lua (forlist): bug, nvar set to 0 but should be 1,
mistake in copy-and-paste
* lparser.lua: global/local tables seems okay
* lparser.lua (adjustlocalvars): adjusted activation order
* LuaSrcDiet.lua: added --keep option to leave license or
copyright texts alone
2008-05-28 Kein-Hong Man <>
* technotes.txt: added a list of possible optimizations
* optparser.lua: updated constant strings to handle name entropy
* LuaSrcDiet.lua: added --none option for zero optimizations
* LuaSrcDiet.lua: added --details option (flag only) for display
of extra or useful optimization output information
2008-05-28 Kein-Hong Man <>
* LuaSrcDiet.lua: enabled code for --opt-locals
* LuaSrcDiet.lua: added code to call parser, parser optimizer
* lparser.lua: added tables for deferred local variable activation
* lparser.lua (adjustlocalvars): adapted from original parser,
needed for deferred local variable activation, updated various
functions that uses it as well
* lparser.lua (init): off by 1 error for j index, 0 should be 1
* lparser.lua: bug in unopr, missing "#" lookup, Yueliang bug
* optparser.lua (optimize): added debug code
* lparser.lua: working better
2008-05-28 Kein-Hong Man <>
* lparser.lua: fitted with new token retrieval scheme using tables
* llex.lua: simplified locals declaration
* sample/Makefile: added lparser.lua and optparser.lua for testing
* lparser.lua: restored some earlier line numbering code
* lparser.lua (init): rewrote token retrieval properly to take into
consideration non-grammar tokens and fake constants
* lparser.lua: removed unused token peeking code, added table init
* lparser.lua: add local variable tracking code
* lparser.lua: coded local/global variable tracking code
* lparser.lua (singlevar): bug, tried to local globalinfo[id]
* lparser.lua (init): rename mistake, toklist should be tokorig
* lparser.lua (init): indexing mistake, target, i should be j
* lparser.lua: passes parsing of LuaSrcDiet.lua
2008-05-27 Kein-Hong Man <>
* README: updated
* Version: 0.10.2
2008-05-27 Kein-Hong Man <>
* sample/numbers_original.lua: adding number samples
* optlex.lua (do_number): fixed trying to compare string variable
and constant number in if statements
* optlex.lua (do_number): mistake in scientific number regex,
+/- sign must be optional
* optlex.lua (do_number): mistake in taking substring, forgot
first position index parameter
* sample/numbers_original.lua: completed basic samples
* optlex.lua (do_number): mostly works
2008-05-27 Kein-Hong Man <>
* optlex.lua (do_number): coded number optimizer
* sample/strings_original.lua: adding string samples
* sample/Makefile: added entry to build string samples
* optlex.lua (do_string): bug, used string.byte instead of
string.char in /ddd tests
* LuaSrcDiet.lua: bug, missing handling for --opt*, --noopt*
optimization options
* optlex.lua (do_string): bug, incomplete code for handling
\ddd for \\ and translation to literal char
* sample/strings_original.lua: completed basic samples
* optlex.lua (do_string): mostly works
2008-05-27 Kein-Hong Man <>
* lparser.lua: added, from Yueliang 0.4.0, removed log() calls
* optparser.lua: added placeholder, parser-based optimizer file
* test/test_optparser.lua: placeholder for optparser.lua testing
2008-05-27 Kein-Hong Man <>
* optlex.lua (optimize): fixed missing parameter for toklnlist
* optlex.lua (do_string): forgot to initialize c_delim, c_ndelim
to zero
* optlex.lua (do_lstring): bad regex (missing '%' to escape '['),
mistake in editing
* optlex.lua (do_lstring, do_lcomment): attempted to use p from
a string.find when it is nil
* optlex.lua (do_lstring, do_lcomment): rearranged to allow a nil
position variable p to break out of loop
* optlex.lua (do_string): missing i update for \<delim> case
* LuaSrcDiet.lua: enabled relevant command-line options
* optlex.lua (do_string, do_lstring): seem to work
2008-05-27 Kein-Hong Man <>
* llex.lua: added tokln table for keeping line numbers
* optlex.lua: added management of token line number list
* optlex.lua (do_lstring): changed trailing whitespace warning
message to include approximate line number
* LuaSrcDiet.lua (process_file): adjusted warning handling
* optlex.lua: comment updates, minor improvements
* LuaSrcDiet.lua (process_file): added warning for when settings
cause some CRLF or LFCR line endings to still exist
* optlex.lua (do_string): coded string optimizer
* optlex.lua: updated notes for number optimization
2008-05-26 Kein-Hong Man <>
* optlex.lua (do_comment): coded short comment optimizer
* optlex.lua (do_lcomment): coded long comment optimizer
* optlex.lua (do_lstring): coded long string optimizer
2008-05-25 Kein-Hong Man <>
* README: updated
* Version: 0.10.1
2008-05-25 Kein-Hong Man <>
* LuaSrcDiet.lua (process_file): added code to print statistics
* LuaSrcDiet.lua: set back executable flag, added #! line
* sample/: added directory for samples
* sample/Makefile: braindead Makefile to create samples,
statistics.txt and *.lua files are Makefile-generated
* LuaSrcDiet.lua: formatting adjustments for statistics output
* LuaSrcDiet.lua: added version information option
* optlex.lua (optimize): done pass 2 (opt-eols) and tested
* LuaSrcDiet.lua: removed non-functional options for now
2008-05-25 Kein-Hong Man <>
* LuaSrcDiet.lua: updated option description for --opt-eols
* LuaSrcDiet.lua: added function to save data
* LuaSrcDiet.lua (process_file): preliminary implementation
* LuaSrcDiet.lua (main): bug, avoid assigning option.OUTPUT_FILE
if it is not set
* technotes.txt: updated TK_OP-TK_OP behaviour, and behaviour
of '-' followed by comments
* optlex.lua (checkpair): fixed TK_OP-TK_OP behaviour
* optlex.lua (optimize): fixed bug, option[] lookup wrong
* optlex.lua (optimize): added option forcing for --opt-eols
* optlex.lua: added support function to repack tokens
* optlex.lua (optimize): fixed bug, don't allow reinterpret if
current token deleted
* optlex.lua: preliminary working version with pass 1 working,
optimization calls to be done, pass 2 to be done
2008-05-25 Kein-Hong Man <>
* 5.0/README: created for old notes, moved old README to here
* README: mostly deleted, to rewrite
* optlex.lua: support functions, pass 1/2 skeleton
* technotes.txt: updated to reflect optlex.lua work
* optlex.lua: added prototypes for optimization functions
* optlex.lua: completed pass 1 of lexer-based optimization
2008-05-24 Kein-Hong Man <>
* optlex.lua: create file for lexer-based optimization code
* test/test_optlex.lua: created file for optlex.lua testing
* technotes.txt: updated, cut out some comments from llex.lua
* optlex.lua: coding lexer-based optimization code
2008-05-24 Kein-Hong Man <>
* LuaSrcDiet.lua (main): fixed a missing return flag
* LuaSrcDiet.lua: coded file loader, token dumper
* LuaSrcDiet.lua: coded statistics dump feature
* technotes.txt: new file detailing optimization tech notes
2008-05-23 Kein-Hong Man <>
* LuaSrcDiet.lua: coded messages, part of options handling
* LuaSrcDiet.lua: coded argument handling
* llex.lua: converted lexer to LuaSrcDiet needs
* test/test_llex.lua: copied over from Yueliang for testing
* llex.lua (init): reset token, seminfo tables at initialization
* test/test_llex.lua: updated for LuaSrcDiet's lexer, testing
* llex.lua (read_long_string): re-insert is_str parameter, needed
for error message
* test/test_llex.lua: adjusted test cases, all tests passes,
except a test for accented character identifiers, fails for now
* lparser.lua: remove first, work on lexer features first
* LuaSrcDiet.lua: ported over file handling code
2008-05-23 Kein-Hong Man <>
* LuaSrcDiet.lua: created file for work on 5.1 version
* llex.lua: added 5.1.x lexer from Yueliang, to be worked on
* lparser.lua: added 5.1.x parser skeleton from Yueliang, to
be worked on
* COPYRIGHT: updated copyright
* COPYRIGHT_Lua51: added Lua 5.1.x copyright for completeness
2008-05-23 Kein-Hong Man <>
* 5.0/: created directory for old 5.0 scripts to make way
for new 5.1 work
* 5.0/LuaSrcDiet.lua, 5.0/LuaSrcDiet_.lua, 5.0/LSDTest.lua:
moved from root directory
2005-08-16 Kein-Hong Man <>
* Version: 0.9.1
2005-08-15 Kein-Hong Man <>
* LuaSrcDiet.lua (llex:lex): fixed buff init bug
* LuaSrcDiet.lua (DumpTokens): added --dump option
2005-04-14 Kein-Hong Man <>
* LuaSrcDiet.lua: adjusted shellbang
* moved project to a Subversion repository
2005-02-15 Kein-Hong Man <>
* LuaSrcDiet.lua: preliminary functional script
* LuaSrcDiet.lua: preliminary feature-complete
* README: written for preliminary release
* LuaSrcDiet.lua: finalized for preliminary release
* Version: 0.9.0
2005-02-14 Kein-Hong Man <>
* LuaSrcDiet.lua: done modifying llex.lua for LuaSrcDiet
* LSDTest.lua: created
2005-01-14 Kein-Hong Man <>
* started project
Jump to Line
Something went wrong with that request. Please try again.