comparison src/cjr_print.sml @ 2209:0ca11d57c175

Cleans up interface (it's now a command line option) and renames project to "sqlcache" in the all-one-word style. Still has issues to do with concurrency, retrying transactions, and foreign function calls that either rely on state or have side effects.
author Ziv Scully <ziv@mit.edu>
date Sat, 31 May 2014 03:08:16 -0400
parents 01c8aceac480
children ef766ef6e242
comparison
equal deleted inserted replaced
2208:cb74460f046a 2209:0ca11d57c175
3386 string i, 3386 string i,
3387 string " = NULL;", 3387 string " = NULL;",
3388 newline, 3388 newline,
3389 string "static uw_Basis_bool uw_Cache_check", 3389 string "static uw_Basis_bool uw_Cache_check",
3390 string i, 3390 string i,
3391 string "(uw_context ctx) { puts(\"Checked ", 3391 string "(uw_context ctx) { puts(\"Checked cache ",
3392 string i, 3392 string i,
3393 string "\"); if (cache", 3393 string ".\"); if (cache",
3394 string i, 3394 string i,
3395 string " == NULL) { uw_recordingStart(ctx); return uw_Basis_False; } else { uw_write(ctx, cache", 3395 string " == NULL) { uw_recordingStart(ctx); return uw_Basis_False; } else { uw_write(ctx, cache",
3396 string i, 3396 string i,
3397 string "); return uw_Basis_True; } };", 3397 string "); return uw_Basis_True; } };",
3398 newline, 3398 newline,
3399 string "static uw_unit uw_Cache_store", 3399 string "static uw_unit uw_Cache_store",
3400 string i, 3400 string i,
3401 string "(uw_context ctx) { cache", 3401 string "(uw_context ctx) { cache",
3402 string i, 3402 string i,
3403 string " = uw_recordingRead(ctx); puts(\"Stored ", 3403 string " = uw_recordingRead(ctx); puts(\"Stored cache ",
3404 string i, 3404 string i,
3405 string "\"); return uw_unit_v; };", 3405 string ".\"); return uw_unit_v; };",
3406 newline, 3406 newline,
3407 string "static uw_unit uw_Cache_flush", 3407 string "static uw_unit uw_Cache_flush",
3408 string i, 3408 string i,
3409 string "(uw_context ctx) { free(cache", 3409 string "(uw_context ctx) { free(cache",
3410 string i, 3410 string i,
3411 string "); cache", 3411 string "); cache",
3412 string i, 3412 string i,
3413 string " = NULL; puts(\"Flushed ", 3413 string " = NULL; puts(\"Flushed cache ",
3414 string i, 3414 string i,
3415 string "\"); return uw_unit_v; };", 3415 string ".\"); return uw_unit_v; };",
3416 newline, 3416 newline,
3417 string "static uw_unit uw_Cache_ready", 3417 string "static uw_unit uw_Cache_ready",
3418 string i, 3418 string i,
3419 string "(uw_context ctx) { return uw_unit_v; };", 3419 string "(uw_context ctx) { return uw_unit_v; };",
3420 newline, 3420 newline,
3421 newline] 3421 newline]
3422 end) 3422 end)
3423 (!SqlCache.ffiIndices)), 3423 (!Sqlcache.ffiIndices)),
3424 newline, 3424 newline,
3425 3425
3426 p_list_sep newline (fn x => x) pds, 3426 p_list_sep newline (fn x => x) pds,
3427 newline, 3427 newline,
3428 newline, 3428 newline,