[[TracNav(DevelDocTOC)]] [[PageOutline]] = Module List = == Cacher == Cache opcode into shared memory. === Compiler Sandbox === Setup sandbox for php compiler. Files: [browser:trunk/utils.c] [browser:trunk/utils.h] === Struct Copying === To copy struct safely and efficiently. (xc_processor_store_xc_entry_t + xc_processor_restore_xc_entry_t) * Calc size of the whole compiler result. (xc_calc_xc_entry_t) * Allocate memory in shm with this size. (xc_mem_malloc) * Copy to shm after compile. (xc_store_xc_entry_t) * Copy from shm on cache hit. (xc_restore_xc_entry_t) Files: [browser:trunk/processor/] === Shared Memory === Shared memory provider. (aka. shm) Only mmap is supported as shm currently. Files: * [browser:trunk/myshm.h]: This is an proto and can be instanced in different way beside mmap. * [browser:trunk/mmap.c] === Locking === Lock provider, to operate shm atomicly. It's important to note that the "scope" of the lock must be same as of shared memory. * Anonymous shared memory <-> Anonymous lock: The shm/lock is shared inside process group * Non-Anonymous shared memory <-> Non-Anonymous lock: The shm/lock is shared between different process group === Memory Manager === Memory manager, working on top of shm + lock. It's something like malloc/emalloc family, but works on shm. Files: [browser:trunk/mem.h] [browser:trunk/mem.c] === Administration === XCache administration scripts. TheScriptingWay and PhpTepmlating is used. Files: [browser:trunk/admin/] == Optimizer == To optimize opcode. (N/A) == Coverager == Collect coverage info. TheScriptingWay isn't used by Coverager itself but Coverager+Viewer. Because you might have many files included and covered in 1 page hit, performance is important making the test faster. Files: [browser:trunk/coverager.h] [browser:trunk/coverager.c] === Coverage Viewer === Produce visual output from the coverage data. PhpTepmlating is used. Files: [browser:trunk/coverager/] === Live Test Runner === An LivingTest framework that help to hit your code generating coverage data. (TOSHARE) == Assembler == Assemble from asm code to opcode data. (N/A) == Disassembler == Disassemble opcode data to asm code. We use TheScriptingWay. Files: * [browser:trunk/processor/]: Disassembler works as an opcode processor. * [browser:trunk/phpdop.phpr]: Executable. Dump opcode array. === Decompiler === Decompile opcode data to php code using Disassembler. This is experminal and is for study only. Files: * [browser:trunk/Decompiler.class.php]: The core Decompiler class, it's partly implemented. * [browser:trunk/phpdc.phpr]: Executable. Usage: {{{./phpdc.phpr file}}} or {{{cat file | ./phpdc.php}}}, no bundle help yet. == Encoder == Encode opcode data to file. (N/A) == Decoder == Decode opcode data from file. (aka. loader) (N/A)