Jim Tcl

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

46 check-ins using file autosetup/autosetup version dc016ea8b5

2013-03-27
21:17
Need abs() since modulo of -ve is impl dependent

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 8058474b6f user: steveb@workware.net.au tags: trunk

03:44
More small improvements to JimWideToString

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 60f3f4513d user: steveb@workware.net.au tags: trunk

02:20
Further improvements to JimWideToString

Small time and space improvements

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9f23823583 user: steveb@workware.net.au tags: trunk

01:35
Implement WideToString locally, printf is slow

Even though it shouldn't need to, sprintf uses the libc-internal mutex, locale support, and other parts making it slow.

[while] busy loop - 306 ms 311 ms - [for] busy loop - 180 ms 182 ms - mini loops - 146 ms 146 ms - fibonacci(25) - 191 ms 176 ms 92.1466 heapsort - 138 ms 131 ms 94.9275 sieve - 182 ms 143 ms 78.5714 sieve [dict] - 162 ms 138 ms 85.1852 ary - 188 ms 166 ms 88.2979 ary [dict] - 173 ms 156 ms 90.1734 repeat - 132 ms 130 ms - upvar - 142 ms 147 ms - nested loops - 173 ms 173 ms - rotate - 22 ms 22 ms - dynamic code - 108 ms 97 ms 89.8148 dynamic code (list) - 45 ms 46 ms - PI digits - 333 ms 319 ms 95.7958 expand - 46 ms 45 ms - wiki.tcl.tk/8566 - 251 ms 235 ms 93.6255 mandel - 212 ms 199 ms 93.8679

Signed-off-by: Lauri Kasanen <cand@gmx.com> check-in: e9aee28cda user: steveb@workware.net.au tags: trunk

01:04
Remove most quotingType allocations in JimMakeListStringRep

Only two bits are needed, so also change to unsigned char from int.

Signed-off-by: Lauri Kasanen <cand@gmx.com> check-in: 7a3c3748fb user: steveb@workware.net.au tags: trunk

2013-03-26
12:44
Avoid list allocations under four pointers (16/32 bytes)

It's more overhead than usable space to get space for two pointers.

Signed-off-by: Lauri Kasanen <cand@gmx.com> check-in: 40f36dbef9 user: steveb@workware.net.au tags: trunk

2013-03-25
13:17
Put short-lived hash iterator allocations on the stack

No reason to have these on the heap for such short whiles. They are small (32 bytes) and only used within the same function.

v2: The external interface is preserved.

Signed-off-by: Lauri Kasanen <cand@gmx.com> check-in: 224b7724c6 user: steveb@workware.net.au tags: trunk

2013-03-24
22:35
Shuffle ScanFmtPartDescr to reduce size (40 -> 32)

Signed-off-by: Lauri Kasanen <cand@gmx.com> check-in: dff9f4bef9 user: steveb@workware.net.au tags: trunk

2013-03-14
00:10
Trivial optimisation

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 2aff467da8 user: steveb@workware.net.au tags: trunk

2013-03-13
01:46
Shuffle ExprByteCode to reduce size on 64-bit (24->16)

Signed-off-by: Lauri Kasanen <cand@gmx.com> check-in: 28ecda72d4 user: steveb@workware.net.au tags: trunk

01:46
Make expr array more compact

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 3e089f33d1 user: steveb@workware.net.au tags: trunk

2013-03-11
23:00
Shuffle Jim_Obj to shrink it on 64bit (72 -> 64), removing holes

No perf difference measured using bench.tcl.

Signed-off-by: Lauri Kasanen <cand@gmx.com> check-in: e2546815df user: steveb@workware.net.au tags: trunk

23:00
Precompute operator length for JimParseExprOperator, optimize logic

No regressions, no changes in bench.tcl.

JimParseExprOperator was shockingly inefficient, to the point of taking 63% of cpu in my own app.

It did a linear search over >60 structs, re-computing the string length each time, and doing a string comparison for each.

This patch pre-computes the operator string length, speeding the function up by two.

Adding the first-letter fast path and evaluating length before strncmp make for another 2x speedup, making the total speedup 4x.

Signed-off-by: Lauri Kasanen <cand@gmx.com> check-in: 93cd0d7b6e user: steveb@workware.net.au tags: trunk

2013-02-15
02:26
Fix [string replace] replacing single char

Also added some additional tests

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: cfca969b62 user: steveb@workware.net.au tags: trunk

2012-12-14
04:30
Update linenoise.c to match recent github

From git://github.com/msteveb/linenoise.git

Allow tab-completion only at the end of line Replace magic number 9 with '\t' in linenoisePrompt() Fix several warnings from gcc. Fix first-chance exceptions in Windows - WriteConsoleOutputCharacter() didn't have its final parameter set Add MSVC support - Test for _WIN32 to check for building for Windows. check-in: b21543be23 user: steveb@workware.net.au tags: trunk

2012-11-29
00:30
Use sqlite3_prepare_v2()

When I'm working with SQLite3 databases in Jim, I find that I occasionally get a 'schema has changed' error so I end up using catch to detect the error and try the query again.

Here's a quick patch to change the SQLite3 extension to use the sqlite3_prepare_v2() API function instead of sqlite3_prepare() - trivial but the _v2() function has a number of benefits and everyone should have a new enough SQLite3 library to support it. Please can you consider it for inclusion?

See - http://www.sqlite.org/c3ref/prepare.html

The benefit I'm specifically interested in is:

With the _v2() variant, "If the database schema changes, instead of returning SQLITE_SCHEMA as it always used to do, sqlite3_step() will automatically recompile the SQL statement and try to run it again." check-in: 5494d1bea4 user: steveb@workware.net.au tags: trunk

2012-10-31
10:09
Fix linenoise serial console window size for vt102

This includes minicom, which doesn't support hpa (CHA), only cuf.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 171c4f06ce user: steveb@workware.net.au tags: trunk

2012-10-30
21:16
bug in sqlite module (array index out of bounds)

Invalid array indexing in error message (array index out of bounds). check-in: 85765854f1 user: steveb@workware.net.au tags: trunk

2012-10-18
22:02
Fix a linenoise bug when moving off the left

If the buffer is too big to fit in the window and the cursor would move off the left edge of the windows, the display is not shown correctly.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: bd639c7cb1 user: steveb@workware.net.au tags: trunk

2012-10-09
22:23
Fix bug that was causing the system "environ" variable to be freed, which caused mayhem in stdio etc. check-in: 7e6d70351e user: steveb@workware.net.au tags: trunk
2012-09-24
09:18
Fix binary scan for too-few bytes.

According to the Tcl manual, in this case "binary scan returns immediately with the number of variables that were set".

(Tests added by Steve Bennett)

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 0a3e2512f0 user: steveb@workware.net.au tags: trunk

08:59
Fix the check of readline library. check-in: d743ab5f22 user: steveb@workware.net.au tags: trunk
2012-09-21
23:48
Add tests for the glob command

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: e66c3967bd user: steveb@workware.net.au tags: trunk

23:45
Allow abbreviations to glob options

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 5503afc8b0 user: steveb@workware.net.au tags: trunk

2012-09-19
22:47
Add support for glob -directory

Implement support for the -directory option to the [glob] command. The -tails option is accepted for Tcl compatibility, but ignored; the command always behaves as if -tails were given. check-in: 685b40ce1a user: steveb@workware.net.au tags: trunk

2012-09-11
01:24
Add support for string {equal,compare} -length

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: b38ee05891 user: steveb@workware.net.au tags: trunk

2012-09-05
21:24
aio seek and tell should allow for 64 bit offsets

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9da73a2214 user: steveb@workware.net.au tags: trunk

21:23
Fix conversion of numbers >= 2^31

A conversion was being stored in a long rather than a long long

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 77592a88d9 user: steveb@workware.net.au tags: trunk

2012-08-19
01:40
Fix buffer overflow in [info references]

Need to account for the null terminator

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 7783059c45 user: steveb@workware.net.au tags: trunk

00:49
Ensure that the full ref is passed to finalizer

The reference was being incorrectly truncated

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: c783a1a3ae user: steveb@workware.net.au tags: trunk

00:49
Reference keys are unsigned long, not jim_wide

This fixes an invalid memory reference in [info references]

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: c8b16055b2 user: steveb@workware.net.au tags: trunk

00:49
Fix invalid memory reference during finalisers

Avoid destroying the reference object until after the finaliser has been run

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 15875fea01 user: steveb@workware.net.au tags: trunk

2012-08-18
07:02
Fix a dict/list shimmering bug

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 274f684164 user: steveb@workware.net.au tags: trunk

2012-08-07
05:09
Remove octal literals with a leading 0 (TIP #114)

Now an octal literal needs to be explicitly indicated with a leading 0o or 0O, otherwise the number is treated as decimal.

This patch also adds support for binary literals. e.g. 0b101 0B1101

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: f21c6c42d5 user: steveb@workware.net.au tags: trunk

2012-05-10
00:39
Fix a compiler warning with namespaces disabled

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 2dc0b5f724 user: steveb@workware.net.au tags: trunk

2012-03-13
01:58
Fix a reference counting bug

Ensure that the internal rep of interp->emptyObj is never changed to a script, since scripts use emptyObj as the source filename when no source info is available. Instead use a special nullScriptObj for this purpose.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 595f1a815d user: steveb@workware.net.au tags: trunk

2012-03-02
05:57
Fix make-index speed-up

Need to substitute the index too

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9c9434e508 user: steveb@workware.net.au tags: trunk

2012-02-28
02:48
Optimise calls to a proc with an empty body

Note that even white space will defeat this optimisation

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9b733ded5f user: steveb@workware.net.au tags: trunk

00:52
Short circuit converting empty string to list

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 08049e93e7 user: steveb@workware.net.au tags: trunk

2012-02-26
23:21
Fix a bug in glob

On mingw, double slashes don't work so be sure to join "/" and "z" as "/z", not "//z"

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: bc00a9cd93 user: steveb@workware.net.au tags: trunk

22:13
Add support for aio command: isatty

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 58393ee7f8 user: steveb@workware.net.au tags: trunk

2012-02-24
04:48
Enabled optimised dict -> list conversion

Especially since it preserves source info

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: eff9ef6848 user: steveb@workware.net.au tags: trunk

2012-02-21
02:18
file normalize only works with an existing path

Because file normalize uses realpath(), the path must exist. This is not 100% compatible with Tcl which can also normalize nonexistent paths.

Don't ignore the error from realpath()

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 1ddf3ca604 user: steveb@workware.net.au tags: trunk

2012-02-18
04:47
Small cleanup/optimisation in object create/dup

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 26590fb652 user: steveb@workware.net.au tags: trunk

2012-02-17
08:49
subst -noc should substitute vars inside brackets

This also simplifies and shrinks the implementation of subst

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: c85e72f132 user: steveb@workware.net.au tags: trunk

2012-02-14
00:58
Update autosetup to 0.6.4

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 31b5625b96 user: steveb@workware.net.au tags: trunk