59606d85fd
ncd: modules: arithmetic: store the results as an integer rather than string, and use compute_decimal_repr_size() to generate the decimal representation. This provides a significant performance improvement.
ambrop7
2012-10-21 00:17:32 +00:00
3c72535ad2
examples/parse_number_test.c: add tests for generate_decimal_repr()
ambrop7
2012-10-21 00:13:29 +00:00
4420e952c5
oops... NCDStringIndex_GetBin() requires that the string contains no nulls, but ncd_get_string_id() does not verify that. This triggers assertion failures e.g. when process_manager::start() is called with a template name which contains nulls.
ambrop7
2012-10-20 21:31:40 +00:00
65c389a1e1
ncd: modules: make some modules not check if strings have nulls inside, but just pass them through to parsing functions which can handle nulls in the input
ambrop7
2012-10-20 21:15:17 +00:00
dcf14442e2
ncd/value_utils.h: name value variables by what type they must be
ambrop7
2012-10-20 20:51:03 +00:00
bc5f09f6e4
ncd: modules: process_manager: use ncd_get_string_id() instead of NCDStringIndex_GetBin()
ambrop7
2012-10-20 20:49:28 +00:00
982cc30386
ncd: modules: don't use NCDModuleProcess_Init(); use _InitValue() or _InitId() instead, to pass through ID-strings
ambrop7
2012-10-20 20:34:18 +00:00
50af137e19
ncd: modules: use ncd_read_uintmax() to parse numeric arguments
ambrop7
2012-10-20 19:28:36 +00:00
aef19f5e21
misc: parse_number.h: speed up parsing decimal strings by detecring overflow before doing the actual parsing
ambrop7
2012-10-20 15:15:52 +00:00
05a7887de3
ncd: NCDStringIndex: increase initial capacity and size of bucket array
ambrop7
2012-10-10 22:03:12 +00:00
ea9eed6af4
ncd: NCDStringIndex: use CHash_MultiplyBuckets() to increase the size of the hash table buckets array when we resize the entries array
ambrop7
2012-10-10 21:49:31 +00:00
7e29861b10
ncd: NCDObject: store object type as a string identifier instead of char pointer
ambrop7
2012-10-10 18:41:15 +00:00
7227efdfe4
ncd: make NCDModule structs non-const (for next commit which will need to modify them)
ambrop7
2012-10-10 17:35:29 +00:00
5e10dff851
oops, we need to make struct NCDModule non-const, not struct NCDModuleGroup. So revert previous commit.
ambrop7
2012-10-10 15:40:48 +00:00
8ed78cb35d
ncd: make NCDModuleGroup structs non-const (for next commit which will need to modify them)
ambrop7
2012-10-10 15:30:15 +00:00
8d37e18d31
ncd: get some more stuff working nicely with string id's
ambrop7
2012-10-10 10:19:48 +00:00
3c304cdc77
ncd: NCDInterpProcess: handcraft a hash table instead of using CHash (it's less code)
ambrop7
2012-10-09 23:30:30 +00:00
de8f155c29
ncd: NCDInterpProcess: store statement names as id's and use a hash table not trie to look for them
ambrop7
2012-10-09 22:37:49 +00:00
8c92bac09b
ncd: modules: alias: optimize by preallocating some memory for string id's and not strdup'ing the input string
ambrop7
2012-10-09 21:15:01 +00:00
a157cf9829
ncd: use unique string identifiers when resolveing variable/object names. The goal is to improve performance by eliminating strcmp() and similar, but this isn't any faster at this point because stuff just turns identifiers back into strings.
ambrop7
2012-10-09 00:40:25 +00:00
147e005e08
version 1.999.125rc1
ambrop7
2012-10-07 22:32:05 +00:00
a3ea934a96
ncd: NCDModule: don't store a pointer to struct NCDModuleInst_iparams in NCDModuleInst. Instead, store it in struct NCDModuleInst_params, to save memory.
ambrop7
2012-10-07 21:45:06 +00:00
ed95b609d4
ncd: NCDModuleInst: don't store "args" and "method_user" in the NCDModuleInst struct. Instead, pass them at instance initialization, via a struct.
ambrop7
2012-10-07 19:58:51 +00:00
0d4ac51bb3
ncd: port modules/alias to func_new2 (missed in previous commit)
ambrop7
2012-10-07 17:06:19 +00:00
0b235e7b6d
ncd: NCDModule: remove func_new and port all modules that used it to func_new2
ambrop7
2012-10-07 17:04:43 +00:00
9a7f7e0e1c
ncd: NCDModuleInst: don't store a user pointer (to the struct statement), and instead pass a pointer to NCDModuleInst to callbacks
ambrop7
2012-10-07 16:35:32 +00:00
907aba2046
misc/offset.h: in UPPER_OBJECT, cast to char * not to uint8_t *
ambrop7
2012-10-07 10:55:05 +00:00
826ebc98b5
ncd: ncd.c: don't store a pointer to the process in every statement. Instead, compute it from the statement index.
ambrop7
2012-10-06 23:06:13 +00:00
f28490976e
ncd: ncd.c: merge the state and have_error members into a single member
ambrop7
2012-10-06 22:18:43 +00:00
590f394096
ncd: ncd.c: save memory by not storing pointer to and size of preallocated process memory. Instead, to figure out if statement memory was individually allocated or is part of preallocated memory, use negative mem_size for individually allocated.
ambrop7
2012-10-06 21:24:20 +00:00
da424e04ab
system: BReactor: don't store a callback void pointer in BSmallTimer, instead just pass the BSmallTimer pointer to the callback.
ambrop7
2012-10-06 20:20:52 +00:00
3e66decc2b
ncd: use BAlloc and BSizeAdd/BSizeAlign to allocate process memory, and use a flexible array member for statements
ambrop7
2012-10-06 17:44:27 +00:00
f04080f95b
misc/balloc.h: add BSizeAdd and BSizeAlign
ambrop7
2012-10-06 15:36:28 +00:00
be82ff9462
ncd: ncd.c: use BSmallPending instead of BPending
ambrop7
2012-10-06 14:07:56 +00:00
d547f87417
base: BPending: transform BPending into BSmallPending, which doesn't keep a pointer to its BPendingGroup, and implement BPending on top of BSmallPending
ambrop7
2012-10-06 14:01:36 +00:00
fc56e70160
ncd: ncd.c: use BSmallTimer instead of BTimer to save 8 bytes per process
ambrop7
2012-10-06 13:22:29 +00:00
70e6c3ddd3
system: BReactor: transform BTimer into BSmallTimer which doesn't have a default time, and implement BTimer on top of BSmallTimer
ambrop7
2012-10-06 13:16:12 +00:00
6cfaee0f78
ncd: NCDAst: use a linked list instead of AVL tree to store map elements. There is no reason to use an AVL tree at the parsing stage.
ambrop7
2012-10-04 19:27:27 +00:00
c1ac3f62d3
ncd: NCDAst: remove comments for NCDValue stuff, this is becoming internal and will change soon
ambrop7
2012-10-04 18:11:13 +00:00
7ca97e219a
ncd: add NCDValCons, which implements efficient construction of values without knowing list/map lengths in advance
ambrop7
2012-10-03 13:59:05 +00:00