|Version 8 (modified by moo, 8 years ago) (diff)|
Cache opcode into shared memory.
Setup sandbox for php compiler.
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)
Shared memory provider. (aka. shm)
Only mmap is supported as shm currently.
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, working on top of shm + lock. It's something like malloc/emalloc family, but works on shm.
To optimize opcode. (N/A)
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.
Produce visual output from the coverage data. PhpTepmlating? is used.
Live Test Runner
An LivingTest? framework that help to hit your code generating coverage data. (TOSHARE)
Assemble from asm code to opcode data. (N/A)
Disassemble opcode data to asm code. We use TheScriptingWay.
- trunk/processor/: Disassembler works as an opcode processor.
- trunk/phpdop.phpr: Executable. Dump opcode array.
Decompile opcode data to php code using Disassembler. This is experminal and is for study only.
- trunk/Decompiler.class.php: The core Decompiler class, it's partly implemented.
- trunk/phpdc.phpr: Executable. Usage: ./phpdc.phpr file or cat file | ./phpdc.php, no bundle help yet.
Encode opcode data to file. (N/A)
Decode opcode data from file. (aka. loader) (N/A)