cwal

All files named "test.c"
Login

All files named "test.c"

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

History for test.c

2022-01-20
16:57
Renamed to src/test.c. Major build reorg, step 1 of N. Moving to a top-level non-recursive make, based on the recent libfossil build tree re-org. Currently onlythe main libcwal builds. check-in: [a6705cc58a] user: stephan branch: build-reorg, size: 0
2021-08-01
10:23
Removed CWAL_FEATURE_SCOPE_STORAGE_HASH and changed the default of CWAL_OBASE_ISA_HASH to 1. file: [dc4a329338] check-in: [deddd35e15] user: stephan branch: trunk, size: 44879
2021-07-11
23:49
Added sizeof(cwal_htable) to (test -z) output. Minor doc tweaks. file: [8708e92c04] check-in: [f942d3c07e] user: stephan branch: obase-isa-hash2, size: 45162
22:06
CWAL_OBASE_ISA_HASH is mostly implemented and seems to basically work, but cwal_hash_take_props() still has to be reimplemented. file: [9469282bf2] check-in: [273b214789] user: stephan branch: obase-isa-hash2, size: 45143
2021-07-10
22:22
Refactored the core cwal_hash operations into the internal-only cwal_htable type, for eventual re-use in implementing hash-hosted object-level properties (as opposed to the current sorted list impl). A full valgrind of the s2 test scripts is happy. file: [231c118da4] check-in: [5e0ce36380] user: stephan branch: trunk, size: 45141
12:58
test.c tests of hash property storage basically works but any non-empty script in s2sh triggers assertions at scope cleanup related to unexpected refcounts and missing scope ownership. file: [f41c8deb07] check-in: [d7a5284c55] user: stephan branch: obase-isa-hash, size: 45180
10:35
More work on the new hashtable infrastructure. The old/non-hash obase case works with this new code, but still hammering on the new case. file: [2b22016511] check-in: [4fdff30fc3] user: stephan branch: obase-isa-hash, size: 45421
04:26
More work on enabling hash storage for cwal_obase properties. file: [315aba7377] check-in: [a6b871bfd0] user: stephan branch: obase-isa-hash, size: 45281
2021-07-09
22:49
In prep for upcoming experimentation, capped cwal_list at 32 bits of length, rather than 64. Saves 8 bytes per array/hashtable on 64-bit builds. file: [1c3e00bf12] check-in: [a1749cbb7f] user: stephan branch: trunk, size: 45273
21:28
cwal now requires C99. Updated auto.def to deal with that. Ported in cwal_printf() %j (JSON-escape string) from libfossil. file: [8f8eff4d3d] check-in: [c6569dba37] user: stephan branch: trunk, size: 45256
2021-06-24
11:06
Re-indented the remaining core lib files to 2 spaces. file: [84d931565a] check-in: [c42231d524] user: stephan branch: trunk, size: 45249
2020-02-01
10:47
Started work on a new sanity-test app for cwal core. file: [7ce78f09ff] check-in: [1ac1d80599] user: stephan branch: trunk, size: 48607
2019-12-29
06:11
Minor fixes for non-debug building. Also noticed that the header of cwal's test.c still referred to it as a cson test app (from the very early origins of this tree). file: [677b9fdd88] check-in: [51c47e20dd] user: stephan branch: trunk, size: 49827
2019-12-12
02:04
MOAR multi-iteration-related work. We broke the cycle-detection in the JSON bits with this undertaking, and now have to fall back to the configured max output depth to catch them. file: [b70c9b9788] check-in: [4fc57dd5d5] user: stephan branch: multi-iteration, size: 49774
2019-12-10
17:33
Flags-related refactoring in prep for an attempt to increase some flag sizes without increasing sizeof() (with the help of existing padding). file: [d04dc32675] check-in: [cdd0f4d93f] user: stephan branch: trunk, size: 49809
2019-07-06
07:21
Fixed core property lookup to always perform type-strict comparison if either the lookup key or property key is of type CWAL_TYPE_BOOL. Without this, X[true] was resolving to the first truthy property key, and X[false] to the first falsy one. file: [31e951ac20] check-in: [a32fcc4268] user: stephan branch: trunk, size: 49784
2018-11-29
16:19
Removed cwal_utf8_char_next() - its interface is fundamentally flawed. Need to revisit it later (thankfully it was only use in test code). file: [1e6ac260ba] check-in: [935a059e13] user: stephan branch: trunk, size: 50311
2018-11-28
17:45
Added some metrics output. Wow - the recycling parts take up just over 1/3rd of cwal_engine, and the metrics take just over 1/4th. file: [e05d9b124d] check-in: [8b2114a0d4] user: stephan branch: trunk, size: 50235
2018-11-27
09:25
cwal_function_call_in_scope() now calls cwal_refunref() on the callback's result if its own caller passes NULL for the rv pointer (which, in practice, is never done). Fixed a missing cwal_strlen() in cwal_prop_take() (a holdover from when the API treated an explicit length of 0 to mean 'count it yourself'). Removed the last of the functions which were marked as @deprecated. file: [012210b076] check-in: [7b251481bd] user: stephan branch: trunk, size: 50179
01:05
Swapped out cwal_double_to_cstr() with an impl which doesn't write e-notation (because s2 can't read that (and i don't want to teach it to), so it shouldn't generate it). This caused several hours more hassle than it really should have, in the form of broken comparison operations and weird stringified output, but floating point numbers are strange, strange beasts. file: [8a445a41f3] check-in: [6fcff747c1] user: stephan branch: trunk, size: 50162
2018-11-26
16:33
The obligatory test file accidentally skipped in the previous commit. file: [cd9210961b] check-in: [071a456994] user: stephan branch: trunk, size: 50137
2018-11-23
07:48
Initial work on scope push/pop hooks. The intent is so that clients (s2) can keep their own scope state in sync with cwal's, but whether that will really be possible is as yet uncertain because of engine init/startup timing vis-a-vis access to the allocator. file: [d0e011729d] check-in: [a1472de17e] user: stephan branch: scope-push-pop-hooks, size: 50101
2018-11-20
09:16
Squelched a couple non-debug build warnings. file: [3c51e4dc0d] check-in: [2656a0cb3c] user: stephan branch: trunk, size: 49367
09:05
Squelched dozens of unused parameter warnings (removing their names causes a completely different warning) triggered by work on the build process. Fixed cwal_scope_chain_set_with_flags() to not ignore the flags it was given and to honor various KVP/container flags which its _v() counterpart was honoring. file: [fba24ea91a] check-in: [211af69f84] user: stephan branch: trunk, size: 49351
2018-11-05
16:20
Wrote a test to find cases where tolower/toupper UTF-8 chars have different byte sizes. These results invalidate all the rest of the work done today :/. file: [578215a5aa] check-in: [1c6480e2e0] user: stephan branch: trunk, size: 49311
2018-01-03
16:04
consistency: changed signature of cwal_prop_has() and cwal_prop_has_v(), removed cwal_prop_has_s(). file: [c41268f815] check-in: [db1a5c3526] user: stephan branch: trunk, size: 48106
2017-12-26
10:24
Removed more superfluous funcs. Added one unit test. file: [4cae07102c] check-in: [ad93dd9b93] user: stephan branch: trunk, size: 48106
09:59
removed some old/unused functions. file: [e01f5bd9a9] check-in: [f5570c4333] user: stephan branch: trunk, size: 48039
2017-12-03
15:16
Added cwal_build_info() to make various build-time config options available to client code. Stole another bit from the maximum string length to add an is-ascii flag to strings, which we can use to speed up many algorithms for the most common cases (but it slows down string creation for the common case). file: [8d7544066b] check-in: [72236d95aa] user: stephan branch: trunk, size: 48001
2017-12-02
14:34
Should have been part of the previous commit. file: [6d2a253ec3] check-in: [21ef461ea6] user: stephan branch: trunk, size: 47830
2017-11-12
11:35
minor API renaming. file: [b3fd989fe9] check-in: [b96526ad29] user: stephan branch: trunk, size: 47656
2017-10-13
12:23
s/\bUNUSED\b/CWAL_UNUSED_VAR/g. Minor s2 unit test tweak. file: [d7e6ee0880] check-in: [6eaa08f972] user: stephan branch: trunk, size: 47661
2017-10-07
13:38
re-renamed a couple routines left mis-named by the strlen refactoring. file: [695ef68987] check-in: [a78283a20f] user: stephan branch: trunk, size: 47490
2017-10-05
17:09
Merged (private) strlen-rewrite branch. This eliminates the 'length of 0 means to use cwal_strlen()' semantics from the major APIs (there may be a couple small outliers). My hands managed to survive, with the left pinky being only ever so slightly sore. file: [509bc2d29c] check-in: [ef477c5d1e] user: stephan branch: trunk, size: 47496
2017-03-22
20:38
added a todo. file: [ab2c764cdb] check-in: [b54ba31ff3] user: stephan branch: trunk, size: 47385
2017-03-20
11:56
cwal core now sorts Object properties internally, making searches faster (on average). file: [63eca2d8b4] check-in: [792bbb7ddd] user: stephan branch: trunk, size: 47365
2016-09-09
19:21
Adding a preliminary CMakeLists.txt for use in CLion. Also changed the UNUSED_VAR macro to an UNUSED attribute which appears to be more widely adopted by compilers. file: [d7543209d9] check-in: [d834ba36b3] user: calebg branch: s2-ndebug, size: 47325
2016-09-02
13:43
Correctly disabled assert with NDEBUG and sprinkled even more UNUSED_VAR macros around. file: [cb8daec6f4] check-in: [ebf7545c0b] user: calebg branch: s2-ndebug, size: 47695
2016-08-30
13:37
Fixing up the cwal non-debug build: * Switched around the amal build so that cwal_amalgamation.* files can be used without including other files. * Added ENABLE_SPEED_OPTIMIZATIONS and ENABLE_SIZE_OPTIMIZATIONS to config.make - ENABLE_DEBUG=0 make - ENABLE_DEBUG=0 ENABLE_SPEED_OPTIMIZATIONS=1 make - ENABLE_DEBUG=0 ENABLE_SIZE_OPTIMIZATIONS=1 make * Replaced all debugging double negatives with just a positive expressions: "#if !defined(NDEBUG)" is now "#ifdef DEBUG" * Added the UNUSED_VAR macro to prevent the 'unused variable' compiler warning. * Removed the "force assert() to always work" section in the test.c file. * Added CWAL_AMALGAMATION_BUILD to test.c so that it's possible to easily build the test with the amal build. * Literred UNUSED_VAR everywhere it was needed in the test.c file. file: [c70a899738] check-in: [fce3c1d39b] user: calebg branch: cwal-ndebug, size: 47611
2016-02-13
17:25
Initial refactoring for encoding a few bits of flags in cwal_value::refcount. Both th1ish and s2 tests pass with these changes, though we're internally encoding the refcount differently now. Initially 4 bits, but that will likely drop to 2. file: [c9fa4b13a3] check-in: [ac9cf983f2] user: stephan branch: value-refcount-flags, size: 47188
2016-02-06
01:10
Added integer values 2..10 to the built-in constants. The malloc difference in s2's unit tests is absolutely negligible (a small handful). Maybe we'll crank it up to 100 someday. file: [62c589a80c] check-in: [7745e5b370] user: stephan branch: trunk, size: 47034
2016-01-31
17:38
pedantic sorting of output. file: [7ce7da84b7] check-in: [b44f8f7fc4] user: stephan branch: trunk, size: 47013
17:36
added more output to the -z (sizeofs) mode. file: [f97affa16d] check-in: [750dafd1bf] user: stephan branch: trunk, size: 46982
2016-01-26
17:06
more interning notes/warnings. file: [26b550f4c7] check-in: [48bf6eead2] user: stephan branch: trunk, size: 46886
2016-01-11
16:53
added workaround: string interning no longer re-uses an interned string when a copy in the interning table has a refcount of 0. Interned values should now not introduce any weird/hard-to-find differences from other values. Incidentally also undid a recent code tweak which broke the cwal_value_unref() return value expectations. file: [c891ca2cbc] check-in: [da9d7bdceb] user: stephan branch: trunk, size: 46739
2016-01-08
14:55
large batch of tweaks, largely related to the hash-vs-objects work, but also an attempt at guaranteeing under/overflow behaviour on integer ops. file: [0d19215a6d] check-in: [b79462d915] user: stephan branch: s2-scope-hashes, size: 45327
2014-12-17
04:32
core: internal refactoring to make Buffer Values containers, so they may now hold properties and be prototypes. It was much easier than expected to implement and the cost increase is negligible (48 bytes) in the amalgamated s2 unit tests. file: [3cf824129e] check-in: [73df044fc1] user: stephan branch: trunk, size: 44606
2014-12-14
15:12
core: added optional allocation count/amount capping, in support of Caleb's site. Refactored the Unique type to act like a wrapper for a single value. My hand has had it - enough hacking for a good while :(. file: [4fb2add417] check-in: [8cb797fc88] user: stephan branch: trunk, size: 44585
2014-12-05
22:44
more work on the container flags, added a couple missing cwal_value_is_XXX() variants, minor API renamings. file: [8b15902cce] check-in: [38060dc5e9] user: stephan branch: trunk, size: 43968
18:38
compile fixes for non-debug builds. file: [fb99059687] check-in: [6b170364c7] user: stephan branch: trunk, size: 43928
01:41
added a missing test. file: [4df78c9a35] check-in: [79fc6ce095] user: stephan branch: trunk, size: 43907
01:31
core: metrics tweaks. Fixed mis-recycling of cwal_weak_ref. Added new "unique" type for use as opaque sentry values and a sort of enum type. file: [c38d3fd3a8] check-in: [d23084f162] user: stephan branch: trunk, size: 43861
2014-11-29
14:13
core: Value recycling bins are now allotted by the size of the Value, so like-sized Value types get grouped. i.e. more effective use of the recycler. However, this does not jive with the per-type-based configuration of bin sizes, but is an overall improvement with no losers, so we'll find a different configuration mechanism. file: [f9fe78d610] check-in: [97b8ce3372] user: stephan branch: trunk, size: 42528
2014-11-25
16:29
Minor but subtle semantics changes in cwal_function_call() and friends ("self" is now made vacuum-safe) and cwal_exception/propagating_set() (now uses unref instead of unhand when reseting/clearing the value). Accommodated that in s2/th1ish. Added cwal_utf8_char_next() utility function. In s2: started experimentation with the "new" keyword, but it is disabled and incomplete. Yeah, that is more than i wanted in this commit. file: [f62fe47903] check-in: [bd8ecee444] user: stephan branch: trunk, size: 42351
2014-11-24
21:32
core: fixed a bug in waiting in the handling of vacuum-proofing functions for the duration of their call. Cleanups related to the previous commit. file: [9555ae6f3d] check-in: [fd27a99b8a] user: stephan branch: trunk, size: 41649
2014-10-11
14:18
inor portability fixes for building with CWAL_SIZE_T_BITS=16. file: [b6a47fb178] check-in: [8aead931ee] user: stephan branch: trunk, size: 41646
11:46
changed tests broken by the previous commit. file: [3e0e48d296] check-in: [c281f26d4d] user: stephan branch: trunk, size: 41746
2014-06-28
15:32
fixed a test broken by a recent change. Minor internal fix in cwal weak ref cleanup. file: [671deaf852] check-in: [7f98a79b52] user: stephan branch: trunk, size: 41797
2014-06-14
17:09
fixed test code for undef==null change. file: [7ab9c90a3d] check-in: [d597ab632a] user: stephan branch: trunk, size: 41761
2014-05-16
21:22
cwal_function_call_in_scope() now vaccuum- and sweep-proofs the function for the duration of the call, to avoid that a recursive cleanup potentially nukes an temp function called at its decl point. file: [9fad3a980e] check-in: [25ee81e2ed] user: stephan branch: trunk, size: 41761
2014-05-14
20:41
A round of cleanups, tweaks, and API renamings. Improvements in the ++/-- operators. file: [7e07298785] check-in: [6fca161343] user: stephan branch: trunk, size: 41741
2014-05-09
18:24
Minor cleanups. Increased StringPadSize to 8, as this gives us a big boost in efficiency on large scripts. Once again removed the 'phantom ref' on interned strings. Improved api.ob API a bit by returning api.ob from the void-returning methods. file: [ff38da56b3] check-in: [2c2187749f] user: stephan branch: trunk, size: 41753
12:12
test code improvements. file: [b49e96f3a5] check-in: [bbeff509a7] user: stephan branch: trunk, size: 41753
11:31
Found the hashing (int range) culprit which broke interning lookups. Other tweaking with vacuuming and interning. Added a kludge ++refcount on interned strings upon insertion to save them from vacuuming. i don't like that, but it does save memory. Switched string hash algos again. file: [7b75dd789b] check-in: [a6668115e9] user: stephan branch: trunk, size: 42300
2014-05-03
15:35
more work on vacuum. Seems it cannot be dropped right in to th1ish for reasons as yet determined but very possibly incompatibilities with vacuuming assumptions. file: [ffe50f0a78] check-in: [e276ed0f1d] user: stephan branch: trunk, size: 42114
14:53
forgot to check in first cwal_engine_vacuum() test code. file: [9a7bd4079d] check-in: [7d7ad9bb3a] user: stephan branch: trunk, size: 42120
2014-05-02
17:41
minor tweaks to the cwal_native bindings. file: [51362f2b5c] check-in: [7411d5518f] user: stephan branch: trunk, size: 40556
2014-05-01
14:05
minor internal cleanups. file: [502b08e35b] check-in: [b869fcd158] user: stephan branch: trunk, size: 40720
2014-04-20
19:02
final test code fixes before giving up on this. file: [02485d7008] check-in: [856cc7c77a] user: stephan branch: new-string-length, size: 40685
13:50
Started re-doing the semantics for the length param to cwal_new_string() and friends, to something easier to use downstream. Breaks semantics in lots of th1ish code. file: [b3d8dce4f2] check-in: [b0dee8928f] user: stephan branch: new-string-length, size: 40682
2014-04-17
19:09
Added allocation metrics tracking cwal_engine. Added -metrics flag to the th1ish shell to dump them out. They do not tell 100% of the story but are interesting nonetheless. file: [1617dcff59] check-in: [65cbcfd22a] user: stephan branch: trunk, size: 40632
16:56
Another round of minor cleanups and doc improvements. file: [f4f656c165] check-in: [66b65cb7ff] user: stephan branch: trunk, size: 40593
2014-04-04
10:34
Fixed signed/unsigned comparison warnings, which apparently do not show up without -Wsign-compare. file: [7a2502de69] check-in: [c256618440] user: stephan branch: trunk, size: 40632
2014-03-07
16:59
Removed some dead code. Added some more. file: [727be7a80a] check-in: [44bd21d624] user: stephan branch: trunk, size: 40624
2013-07-20
12:42
Minor refactoring of cwal_value_prototype_get() and friends. file: [5589584268] check-in: [8bf2f71a4e] user: stephan branch: trunk, size: 40650
2013-07-18
22:33
cwal_buffer_format(): fixed the combination of width.precision for strings, at least for the current test code. file: [a518f1af2f] check-in: [8b2189b4a1] user: stephan branch: trunk, size: 40531
22:20
more fixes for cwal_buffer_format(). file: [cc45d3a7c3] check-in: [af3fdae475] user: stephan branch: trunk, size: 40484
21:38
More work on cwal_buffer_format(). file: [d4b6f19aef] check-in: [3e09506f1c] user: stephan branch: trunk, size: 40257
20:10
Started work on cwal_buffer_format(), similar to java.lang.String.format() but formats cwal_value arguments. file: [35b6e6c62b] check-in: [eb33816df1] user: stephan branch: trunk, size: 39941
2013-07-05
23:23
Much tinkering with the weak references support. Refcounted them and share all instances pointing to the same memory. Most of this is untested, though (no use case yet :/). Added APIs for (un)registering client-side memory for weak referencing. file: [06ea73259f] check-in: [e0e531af6d] user: stephan branch: trunk, size: 38716
2013-07-02
15:14
Tweaking the weak ref support. file: [ede94084fa] check-in: [6c85df8cb2] user: stephan branch: trunk, size: 38570
14:04
Added weak value reference support. This allows, e.g., N bound natives with mutual relationships to safely figure out if the other endpoint has been destroyed. file: [8877b83228] check-in: [fab8ad55e3] user: stephan branch: trunk, size: 38113
2013-07-01
15:37
Revamped cwal_new_function() and friends to take a type ID tag for the state parameter, to safify some of the current casting, enable 'multiple-context' callbacks, and a couple other minor things i would like to try out. file: [09f7cfef94] check-in: [cb4072639e] user: stephan branch: trunk, size: 37888
2013-06-18
15:38
cwal_value_prototype_set() no longer allows (what it can recognize as) cycles between the child and its prototype. file: [3b685419ff] check-in: [69ab011467] user: stephan branch: trunk, size: 37869
2013-06-10
20:46
Removed some old comments and a stray debug message. Tweaked size of string interning table size again. Cleaned up the main test app a bit. file: [500c9e4dd8] check-in: [0c0a865f24] user: stephan branch: trunk, size: 37780
20:03
Fixed inconsistent orderings in cross-type value comparisons. Fixed a huge bug in the new cwal_ptr_table linked list which caused several megabytes of tables to be allocated (one per string). file: [20a03d53ae] check-in: [f4773da793] user: stephan branch: trunk, size: 37053
17:14
Refactored cwal_ptr_page to a linked list and replaced cwal_ptr_table::pages (type=cwal_list) with that linked list. Saves a small tick of memory when interning strings, removes several potential malloc error cases (on OOM), and has the same performance characteristics as before. file: [0fb0688250] check-in: [823220ffed] user: stephan branch: trunk, size: 36996
15:24
Added cwal_array_reverse(). cwal_array_sort() now fails if called while the array is being visited/traversed. Doc additions. file: [8ae4538896] check-in: [8079c5b03d] user: stephan branch: trunk, size: 37175
2013-06-06
19:36
Some rough (completely garbage) cycle-counting code i may want to revisit someday. file: [0d873d5b54] check-in: [429a1a3dad] user: stephan branch: cycle-counting-revisited, size: 40652
15:32
Added a kludge/workaround to skip some tests on a 32-bit build because of assertions which appear to be lying to me (they don't match what my debuggerer shows me). file: [003532786c] check-in: [1c46fd926c] user: stephan branch: trunk, size: 37025
2013-06-04
18:01
Added some test code for customizing the recycler sizes. file: [97c74382a5] check-in: [253eb95262] user: stephan branch: th1ish_script, size: 36404
2013-06-02
17:58
Added cwal_array_sort(). file: [5717c23025] check-in: [d114a07e93] user: stephan branch: trunk, size: 35998
13:45
added cwal_cstr_to_int/double(). Documented CWAL_INT_T_MIN/MAX. file: [9858bba9a3] check-in: [4b8d1e0a45] user: stephan branch: trunk, size: 35516
2013-06-01
06:09
Added new json formating option (addSpaceAfterComma). Added experimental code to insert object properties in sorted order. Searching is not optimized based on it, though. file: [f0f610bfce] check-in: [76df00ac93] user: stephan branch: trunk, size: 34714
2013-05-31
21:50
Extended cwal_scope_push() to accept an externally-allocated scope instance (malloc optimization). file: [afa2fa82df] check-in: [9c1398a9c1] user: stephan branch: trunk, size: 34630
17:09
Changes signatures of cwal_new_function() and friends. Started adding toString support to th1ish.. file: [432646f900] check-in: [0ac710027a] user: stephan branch: trunk, size: 34507
15:57
Simplified the func_call() signatures a bit. file: [f4008109b3] check-in: [dc614cb0ac] user: stephan branch: trunk, size: 34553
14:53
factored out cwal_value::value ptr, saving sizeof(void ptr) bytes per value instance. This has broken something in th1ish, though. file: [f628d3d05b] check-in: [e7cf5db3b5] user: stephan branch: no-value, size: 34547
2013-05-29
14:46
more x-string-related fixes and some prep for z-strings (like x-strings, but the cwal_string owns and deallocates the (char*)). file: [6ace808da3] check-in: [0edafb49ef] user: stephan branch: trunk, size: 34307
13:23
fixes related to x-string handling. file: [97a46fbe0a] check-in: [93debd3607] user: stephan branch: trunk, size: 34282
09:28
32/64-bit printf portability fix. file: [5ac2e9d9c1] check-in: [9c984b2ae6] user: stephan branch: trunk, size: 34042
2013-05-28
19:04
Added initial support for x-strings (external strings, not allocated by cwal). file: [416e89bd74] check-in: [76b841bfbd] user: stephan branch: trunk, size: 34027
2013-05-24
14:56
Disabled the special value 1 when the big-void-ptr optimization is on because i cannot seem to get dereferencing of the int pointer working for that case. file: [148b480607] check-in: [6987fd404a] user: stephan branch: refcount0, size: 33293
2013-05-23
13:21
removed some debug code. fixed a corner case in a test. file: [4df186e00d] check-in: [647f26d03e] user: stephan branch: refcount0, size: 33243
12:22
started adding searchPrototype option to functions which can use it. file: [9231b60b7d] check-in: [6e23ecc726] user: stephan branch: refcount0, size: 33119
2013-05-22
17:11
Added cwal_scope::mine::r0 list to keep extra track refcount==0 values. sweep-scope is now much faster and safer. file: [b7133f7c59] check-in: [ef4c8f9e67] user: stephan branch: refcount0, size: 33117
2013-05-21
22:53
minor tinkering before bed. Seems to work so far. file: [0cb82583bc] check-in: [6be90896fc] user: stephan branch: refcount0, size: 32781
22:30
changed value refcount to start at 0, meaning no my ref held by the scope. This _might_ give me semantics off of which i can vastly improve the memory usage in th1ish, by proving a "purgatory" state where a value has not yet gotten an explicit reference. Previously we had start refcount==1, with the 1 being justified as the holding scope, but that causes us grief in script implementations (orphaned values held too long) and an adds ambiguity between "purgatory" and "refcount was _reduced_ to 1". file: [9321b49e7d] check-in: [7ca566b740] user: stephan branch: refcount0, size: 32650
2013-05-19
21:09
Simplified some of the Array APIs, removing extraneous cwal_engine argument. file: [7f4407c696] check-in: [ddb16f0fe4] user: stephan branch: trunk, size: 31963
18:22
accommodated API change. file: [73865131f4] check-in: [aee1fb6f0d] user: stephan branch: trunk, size: 31984
14:28
Added a new cwal_scope_prop_XXX() API to supplement or replace the cwal_var...() bits. Changed how Function call()s return their value, to make cwal_result_{s,g}et() unnecessary and handle result value lifetime better from the client. file: [fc3181cbe3] check-in: [0e89645697] user: stephan branch: trunk, size: 32164
2013-05-11
02:16
fixed var-set(NULL) return value. Changed semantics of sweep() return value. Other minor tweaking. file: [76709e7bab] check-in: [1eab8d6ab8] user: stephan branch: trunk, size: 32161
2013-05-10
18:10
turned off the display of the sizeof info. file: [a16a845329] check-in: [cae0e21b95] user: stephan branch: trunk, size: 31872
09:48
Simplified more of the public API by removing more extraneous cwal_engine parameters. file: [8430fa12b4] check-in: [17395f36ae] user: stephan branch: trunk, size: 31873
2013-05-09
14:47
more minor tinkering. file: [1a77715aaf] check-in: [6522247bd2] user: stephan branch: basic-prototypes, size: 31765
10:17
minor internal tweaking and refactoring. file: [6288f8963a] check-in: [4ba195c6b8] user: stephan branch: basic-prototypes, size: 31078
09:39
more object parameter simplifications file: [e8e9bb1104] check-in: [57af8b5b6a] user: stephan branch: basic-prototypes, size: 30305
03:30
more removal of extraneous cwal_engine parameters. file: [9ae40a26c5] check-in: [977eb9cd6e] user: stephan branch: basic-prototypes, size: 30336
03:08
Fixed the unset leak. Was an old, old bug which i am surprised i have no triggered yet. file: [9ae7d7bb56] check-in: [6fc95ba5ab] user: stephan branch: basic-prototypes, size: 30225
02:58
more work on values-as-keys. Found unset-prop cases for non-strings which cause leaks, though. file: [de0a85e760] check-in: [51fddf67c7] user: stephan branch: basic-prototypes, size: 30264
01:29
obase cleanup now unrefs the object's prototype. file: [2c52e722d5] check-in: [4d13c51957] user: stephan branch: basic-prototypes, size: 28777
01:14
more work on getting non-string key infrastructure in place. file: [972e0c2d72] check-in: [630cba347c] user: stephan branch: basic-prototypes, size: 28777
00:02
Started adding experimental "prototypes" support (similar to JavaScript). More work on making key/value pairs able to use non-string keys. file: [fcd95cfc5f] check-in: [743b712cda] user: stephan branch: basic-prototypes, size: 28508
2012-08-20
20:47
Fixed a bug in kvp recycling (counter was wrong). Added scope recycling, which shaves a significant number of mallocs off of my test code and in s1. file: [cdc61a2ef8] check-in: [24a0e9a8f2] user: stephan branch: trunk, size: 27622
17:16
moved the main rescope-children operation into cwal_value_vtab to make it easier to re-use that code for new classes without touching the core for it. file: [e413c870a0] check-in: [47e431d767] user: stephan branch: trunk, size: 27283
2012-08-18
05:07
Got execution of custom script-side functions working, but still missing keywords to allow one to declare such a thing. Minor API renamings. file: [938e88d689] check-in: [e744cdc31e] user: stephan branch: trunk, size: 27282
01:20
got first scripted function call working. file: [8a08f098ca] check-in: [6eec35f8e9] user: stephan branch: trunk, size: 27283
00:06
Extended a search test to cover ensure that there is more than one var to search. file: [6e6512027f] check-in: [40de17dbce] user: stephan branch: trunk, size: 27286
2012-08-17
20:45
more touch-ups and testing of the exception handling. file: [5b0ba66b69] check-in: [668442941e] user: stephan branch: trunk, size: 27120
19:36
renamed cwal_error to cwal_exception. Fixed lifetime/ownership problems in exception message handling by moving into a normal property. file: [62868ce75a] check-in: [6d6374aa15] user: stephan branch: trunk, size: 27029
15:27
Added missing cwal_value_get_native() impl. file: [ecef476602] check-in: [b73394c788] user: stephan branch: trunk, size: 25993
14:48
oops - fixed memleaks caused by Function/Native/Array cleanup routines which did not honor their (new) property state. file: [12251f37ea] check-in: [6f3110ea33] user: stephan branch: trunk, size: 25906
14:34
Refactored the key/value pair support to work with any cwal_obase type (object, array, function, native). Functions and Natives may now contribute to cycles. file: [35c3c9bc37] check-in: [c111db9842] user: stephan branch: trunk, size: 25687
2012-08-15
14:22
Finally pulled in the good old printf() implementation. Added cwal_outputf(), cwal_new_stringf(), cwal_buffer_printf(), and a few others. file: [5bbdb055ef] check-in: [07c25cf985] user: stephan branch: trunk, size: 25687
2012-08-14
21:49
more work on the kvp-related internal refactoring (to consolidate key/value pairs support for higher-level types). file: [b085fa87e9] check-in: [15a61ebbf2] user: stephan branch: trunk, size: 25444
2012-08-11
11:27
Got first prototype script token eval working. file: [e20dfc1c60] check-in: [c74131e774] user: stephan branch: trunk, size: 25438
05:36
Minor fixes(?) to the resultScope handling. Started some refactoring to consolidate property handling of Object and friends. file: [af6e9b202c] check-in: [a9ff58bb0e] user: stephan branch: trunk, size: 25415
04:07
Seem to have gotten a reasonable return-value mechanism in place. The JSON output API now fails gracefully when faced with cycles. file: [9c259709cc] check-in: [027070161a] user: stephan branch: trunk, size: 24771
2012-08-10
21:51
Had to add a second link to cwal_value. i cannot believe it even worked this far with one link. file: [5082a87eb7] check-in: [ede1cffe1b] user: stephan branch: trunk, size: 24041
17:10
oops - moved cwal_list.h to where it belongs. file: [087baeb483] check-in: [432f1c4b11] user: stephan branch: trunk, size: 24041
14:56
"var" API seems to work. file: [7fc5bfa2b6] check-in: [bc65ff9434] user: stephan branch: trunk, size: 24042
2012-08-09
20:59
Added the cwal_var_xxx() API, but it is completely untested (and will remain so until at least tomorrow ;). file: [f095479652] check-in: [00060a9b01] user: stephan branch: trunk, size: 23333
17:38
Added cwal_scope_sweep(). Reworked the trace masking (b/c 31 bits really is too few). file: [85f11b038d] check-in: [40e15d31ab] user: stephan branch: trunk, size: 23120
15:37
Fixed memory corruption in the kvp recycling code. Added cwal_engine_vtab::init_engine(). file: [3b70b9d7a5] check-in: [28ea4d13f9] user: stephan branch: trunk, size: 22639
14:39
Added basics for the Function type. file: [9bea6d7805] check-in: [2506f0d91a] user: stephan branch: trunk, size: 22596
12:41
minor doc/test tweaks. file: [bc0bdac334] check-in: [6daf048209] user: stephan branch: obj-kvp-list, size: 21706
12:31
Moved cwal_obase::list into cwal_array. Fixed json code to use cwal_object::kvp. Removed the cycle-counting code, since the current API doesn't use it. (We might need it later, though.) file: [25a3ed5be2] check-in: [77b2583370] user: stephan branch: obj-kvp-list, size: 21706
11:52
initial porting of cwal_object properties to a cwal_kvp linked list. Compiles but segfaults predictibly on some test code. file: [3cb59ae7e0] check-in: [7c2b40e63a] user: stephan branch: obj-kvp-list, size: 21706
10:30
started adding hash/compare infrastructure to allow some downstream features like arbitrary keys for object properties and interning of arbitrary POD values. file: [9a7b786c8f] check-in: [03c22e0473] user: stephan branch: trunk, size: 21049
2012-08-06
22:05
disabled auto-interning by default, minor tinkering with the VOID_PTR_IS_BIG bits (hope it still builds on x64). file: [ad6ff9151c] check-in: [b53e520cfc] user: stephan branch: trunk, size: 20025
20:20
Tinkering with interned string table size, other minor cleanups. file: [fa2f88f586] check-in: [8e6142c151] user: stephan branch: trunk, size: 19837
19:25
Fixed some bugs in the scope cleanup code triggered by interned strings, and incidentally ended up trimming the algo from about 40 lines and two nested loops to only 1 functional line (and several tracing/checking lines) in a single loop. file: [cf473dcb79] check-in: [02af50b668] user: stephan branch: trunk, size: 19500
17:02
added Value binding for cwal_buffer class. file: [8b85686ecb] check-in: [f378d18817] user: stephan branch: trunk, size: 19422
13:47
dammit, i am simply not going to be able to get that to compile in both 32- and 64-bit modes, am i? file: [c57ab1007d] check-in: [44f5d6f109] user: stephan branch: trunk, size: 19261
2012-08-05
19:27
final (i think) tinkering for the night. file: [1e23c9d39d] check-in: [ee81b02749] user: stephan branch: trunk, size: 19247
19:09
Tracing tweaks. Fixed a bitmasking range error in the tracing flags. file: [da3f4c1c64] check-in: [8414ccbc5b] user: stephan branch: trunk, size: 19247
17:51
valgrind likes it. time to walk Baako. file: [9b0deb1fa6] check-in: [0def871fe5] user: stephan branch: trunk, size: 18955
15:59
minor cleanups, nothing notable. file: [888eef18e0] check-in: [6295b36c28] user: stephan branch: trunk, size: 18723
13:21
auto-interning of strings can now be toggled on/off at runtime. file: [da35430e46] check-in: [3244397263] user: stephan branch: trunk, size: 18409
12:07
Refactored recycling list to use value linked lists, removing the 5 mallocs needed for the lists and cutting the cost of the recycler a bit. file: [17c3e37a6e] check-in: [1489228c0d] user: stephan branch: trunk, size: 18289
2012-08-04
20:21
Renamed cwal_value_pop() to cwal_value_take(). file: [2078a95244] check-in: [3e93418fa1] user: stephan branch: trunk, size: 18260
13:28
more work on the tracing API. Added an engine param to cwal_value_ref(). file: [540c69b8a7] check-in: [4a5609991f] user: stephan branch: trunk, size: 18226
2012-08-03
16:12
First draft of tracing calls. file: [bf2daf46d7] check-in: [ea25245906] user: stephan branch: trunk, size: 18035
00:13
Started adding more tracing infrastructure to replace most of the debug output. file: [44af085211] check-in: [536bb58c0b] user: stephan branch: scope-parenting, size: 17936
2012-08-02
21:57
Had to add auto-down-scoping of container children when a container is moved down, to avoid an up/down cross-scope cleanup problem. Seems to work. file: [2ee8e526ab] check-in: [3b1fc938cf] user: stephan branch: scope-parenting, size: 17858
19:43
valgrind seems to like this construct. file: [82cdb98cc6] check-in: [f3b2b88b06] user: stephan branch: scope-parenting, size: 25607
16:54
more refactoring and docs. file: [e005caa108] check-in: [1053654f66] user: stephan branch: scope-parenting, size: 25279
2012-08-01
23:28
started adding infrastructure for tracing engine activity via a callback. file: [77a94ee610] check-in: [7334a03423] user: stephan branch: scope-parenting, size: 25241
22:08
Demonstrates a client-supplied native living amongst the cycle gang :). file: [3f4ddb34d0] check-in: [60d147bb16] user: stephan branch: scope-parenting, size: 24556
21:27
This one shows a well-knotted array/object graph going down the drain (in a good way). file: [81cd529024] check-in: [3cbd9d5079] user: stephan branch: scope-parenting, size: 23300
17:49
array cycling appears to work after scope-wandering refactoring. file: [160b8d213e] check-in: [fb7610aa39] user: stephan branch: scope-parenting, size: 22860
16:20
fixed a counting error in value-list-removal. file: [c16396898a] check-in: [7c58c67231] user: stephan branch: scope-parenting, size: 22844
2012-07-31
22:02
i broke down and added a scope ptr to the values. This costs me but it greatly simplifies some problems and code paths until i can find a way to do it safely without the ptr. file: [d49e7fb173] check-in: [11a0bb37af] user: stephan branch: scope-parenting, size: 22643
20:21
Tweaking of the string-interning table size and hash function (found a combination i like better). Initial POD destruction looks good except i am going to run into a problem with lower-level scopes when they get refs to strings from higher-level scopes. i think i can only fix this by adding a scope ptr to each value :/. file: [9322d737b9] check-in: [f0b3dff0a7] user: stephan branch: scope-parenting, size: 22643
18:29
Started rewriting test code in baby steps to ensure new tracking/cleanup mechanism is working as desired. Lots not working right now, but the path looks clear :-D. file: [24ea4e107f] check-in: [7fd3dcf630] user: stephan branch: scope-parenting, size: 21590
02:34
ALMOST got scope-parenting-based cleanup working. Leaking primitives now but not composites, it seems. file: [525d684009] check-in: [0da5da5d1a] user: stephan branch: scope-parenting, size: 20762
2012-07-30
22:51
More tinkering with the string interning (to find a decent memory balance) and started add cycle-clearing/counting, but it is not working and i am too tired to debugger it. file: [0d9589ab3a] check-in: [e45735c13d] user: stephan branch: trunk, size: 20601
19:32
Minor tinkering with the scope cleanup and debug output. file: [4db004878c] check-in: [5c4e2e8c47] user: stephan branch: trunk, size: 19271
18:24
Added cwal_dump_interned_strings_table(), revealing what _appears_ to be a bug in the string de-internalization. Todo... file: [6c9a902d6b] check-in: [f343473f84] user: stephan branch: trunk, size: 18980
17:37
Increased default string internalization table size to approx. 2kb/table (exact value depends on sizeof(void*) and a nearby prime number). file: [adfa28bee4] check-in: [c7ae7457d0] user: stephan branch: trunk, size: 18609
17:13
Refactored cwal_scope::allocs into two lists, one for containers and one for atomics, to help optimize some operations. file: [fc4a5f7183] check-in: [de3b8113d7] user: stephan branch: trunk, size: 18609
2012-07-29
18:34
Added string-interning support. Now all new strings with the same bytes get auto-interned/re-used. There might be a cross-scope ownership problem here, but only (i think) if we leave the "strict scope ordering" realm (e.g. for closures, which are not a high-prio feature). file: [c7bc2004d4] check-in: [32a0ade6f0] user: stephan branch: trunk, size: 18387
16:10
Started adding support for interning strings (so we share _all_ strings which have the same content), but it has a serious Denkfehler in how i am using the hashtable and needs to be fixed. file: [25eb649245] check-in: [19759dcf7b] user: stephan branch: trunk, size: 16635
03:40
Added initial 'native' (a.k.a. Host Object) binding support. file: [b211bbf052] check-in: [c5d9755013] user: stephan branch: trunk, size: 16547
02:07
more minor refactoring. file: [f5078be274] check-in: [c0912871aa] user: stephan branch: trunk, size: 15691
2012-07-28
23:52
Ported in most of the missing cson docs. Minor refactoring. file: [1ddfe82e38] check-in: [0e4f895e99] user: stephan branch: trunk, size: 15687
21:14
added cwal_json_output() and friends, ported from libcson. Changed the signature for cwal_output_f as part of that. file: [88882da2ea] check-in: [d16e8ab46a] user: stephan branch: trunk, size: 15498
20:20
An assertion fix in cwal_value_push(). cwal_value_pop() now manipulates the scope alloc list to avoid endless expansion of it. file: [faf2c727be] check-in: [48fd00e698] user: stephan branch: trunk, size: 15015
18:49
More private/internal refactoring. Seeing a weird bug in e_such_much_recycling(), but am too tired to chase it down. file: [335c02622a] check-in: [fc32638cd1] user: stephan branch: trunk, size: 14333
13:51
Added initial value allocation recyler. Lots of other tweaks, improvements, and debug output. file: [cfd240701b] check-in: [02ab3dc56e] user: stephan branch: cycle-counting, size: 13938
02:21
minor tinkering. Fixed, i think, a future bug when cycle counting more than once. file: [103900cf8a] check-in: [92dd48c7c1] user: stephan branch: cycle-counting, size: 12591
2012-07-27
23:35
Added boatloads of API docs. Still far from finished (many still to be copied from cson). file: [f4c214fe30] check-in: [6c4c514f74] user: stephan branch: cycle-counting, size: 12427
20:18
this is a beautiful thing when seen through the eyes of valgrind... file: [153ee4ed18] check-in: [354aa42b4e] user: stephan branch: cycle-counting, size: 12390
20:13
this one looks a bit better. Fixed a REALLY dumb flags bitset bug which caused a mis-diagnosed is-destructing check. file: [0ac49315f3] check-in: [aed1986bae] user: stephan branch: cycle-counting, size: 12333
17:42
minor cleanups before the jackhammering begins. file: [7f3aae40ce] check-in: [50037bf0e2] user: stephan branch: cycle-counting, size: 11453
02:06
Auto-cycle-count/clean is now done at scope-pop, but this is not a complete solution because values can outlive a scope. file: [ac4ad0964e] check-in: [303510704d] user: stephan branch: cycle-counting, size: 11442
00:35
First cyclic free-up demonstrated when the parent scope expired :-D, but requires that one run the cycle-counter first :/. Making that transparent is on the TODO list for the weekend :D. Reminder to self: we might be able to put that in the Scope cleanup. file: [ea834d75d1] check-in: [5b1208c9f8] user: stephan branch: cycle-counting, size: 11438
2012-07-26
22:51
Contains an intentional memleak due to incomplete refactoring, but it is time for bed and do not want to risk losing this. file: [2243c8d8e2] check-in: [d73fbf518a] user: stephan branch: cycle-counting, size: 11363
2012-07-25
13:05
a number of API tweaks. file: [7925963287] check-in: [56ac8240e7] user: stephan branch: trunk, size: 11132
10:01
more refactoring and tinkering. file: [c65595602c] check-in: [348267e3b3] user: stephan branch: trunk, size: 10281
08:05
ported in the object API. file: [f4069b3735] check-in: [e77bdf86b5] user: stephan branch: trunk, size: 9860
06:37
switched to stdint fixed-size ints throughout. Added cwal_size_t and renamed a few things. file: [60c6be9f5a] check-in: [bb5b0db794] user: stephan branch: trunk, size: 9297
05:39
more refactoring. file: [3ec0594bc8] check-in: [89909b7eac] user: stephan branch: trunk, size: 9309
05:10
minor test code reorgs. file: [295760cbbb] check-in: [bb82a8dd8d] user: stephan branch: trunk, size: 9293
05:05
got the object skeleton in place but it is missing any useful features. file: [5ccaaaf80e] check-in: [84f2fc8b27] user: stephan branch: trunk, size: 8915
04:14
minor refactoring. file: [a82b37cc9d] check-in: [1868791179] user: stephan branch: trunk, size: 7363
03:14
Tinkering with various loads for the ptr table. 90% only causes 2 tables under the right circumstances, the second one only lightly loaded. file: [df712a249a] check-in: [91da9fef15] user: stephan branch: trunk, size: 7213
02:02
Got an array containing a self-cycle to free without upsetting valgrind. :) file: [e9896dbbe6] check-in: [4dcb87c117] user: stephan branch: trunk, size: 7354
01:47
ptr table is looking good. file: [03d3ae199a] check-in: [d88a5fa845] user: stephan branch: trunk, size: 7055
2012-07-24
21:45
ptr table almost works right, but page->entryCount seems to be off by one sometimes? To check tomorrow... file: [6241f322ac] check-in: [0c98670772] user: stephan branch: trunk, size: 6600
20:31
got arrays ported in. file: [f5a0a78168] check-in: [c1e7d24d89] user: stephan branch: trunk, size: 5731
19:43
new "key table" seems to work. Now i am not sure i need it :/. file: [a990fa3822] check-in: [0c7c5ce695] user: stephan branch: trunk, size: 5592
19:19
insert/search seem to work on the ptr table. file: [24555c726c] check-in: [69c3ef00e5] user: stephan branch: trunk, size: 5213
17:03
refactored page list to use a cwal_list (simplifies the code notably). file: [d9d7b20f06] check-in: [fb89dc98ad] user: stephan branch: trunk, size: 4766
16:47
some more work on the weird hashtable. file: [dcf851d2a3] check-in: [33c220873c] user: stephan branch: trunk, size: 4756
2012-07-23
21:58
We can now allocate vars, but scoping is not far enough to add the allocations there. file: [6ee23115ec] check-in: [d0cc64e478] user: stephan branch: trunk, size: 4449
18:47
Added: egg file: [e66ecd95ba] check-in: [a71b168320] user: stephan branch: trunk, size: 4233