summaryrefslogtreecommitdiff
path: root/docs/Bytecode
Commit message (Collapse)AuthorAgeFilesLines
* The advantage of interning strings is that you don't have to store their ↵John Mark Bell2008-12-011-3/+2
| | | | | | | | length everywhere. Purge the length part from the encoding of a string in the bytecode. Fix bytecode dump code to cope with this. svn path=/trunk/libcss/; revision=5864
* All numerical values are represented in 22:10 fixed point.John Mark Bell2008-11-231-9/+4
| | | | svn path=/trunk/libcss/; revision=5762
* A bunch of property parsers.John Mark Bell2008-10-251-3/+3
| | | | | | | | | | Split out !important parsing into a separate function. Support for dumping bytecode to a file handle in some kind of human-readable format. Strings can be represented in the bytecode as a pointer, length pair rather than embedding the string data into the bytecode -- all strings are interned by the core syntax parser. Add todo relating to early destruction of parser object (it shouldn't be needed once parsing is complete). Note documented issue surrounding interned string dictionary, however. In general, it seems wasteful to create a new dictionary containing string representations of keywords for every single parser instance. It would be better to have one central (statically allocated?) dictionary for this and then each parser instance can have a smaller dictionary containing any unknown strings contained within the stylesheet being parsed (e.g. string constants or URLs). svn path=/trunk/libcss/; revision=5627
* In hindsight, it's more likely that opcodes will be added than flags, so use ↵John Mark Bell2008-10-221-5/+5
| | | | | | 10 bits for the opcode and 8 for flags. svn path=/trunk/libcss/; revision=5619
* Provide example of typed parameter listJohn Mark Bell2008-10-211-0/+9
| | | | svn path=/trunk/libcss/; revision=5618
* Document shorthand propertiesJohn Mark Bell2008-10-211-0/+32
| | | | svn path=/trunk/libcss/; revision=5617
* Reduce space requirements by squashing opcode + flags + value into 32 bits. John Mark Bell2008-10-211-545/+431
| | | | | | | This has been achieved by reducing opcode's width from 16 to 8 bits. This is fine as there's 172 opcodes still available at present so plenty of room for expansion. Flags have been reduced from 16 to 10 bits wide and currently have 8 bits unused. This leaves 14 bits available for the opcode-specific value. No opcode needs all 14 bits at present. Inherit is now a global flag rather than a pre-defined value. This saves looking at the value field at all when styles are inherited and generally reduces complexity. svn path=/trunk/libcss/; revision=5616
* All properties done.John Mark Bell2008-10-211-23/+844
| | | | svn path=/trunk/libcss/; revision=5615
* Beginnings of a bytecode format.John Mark Bell2008-10-211-0/+318
svn path=/trunk/libcss/; revision=5611