o [About] o [What's New] o [Whitespace] o [Assembly] o [Optimizer]
About [top] ===== Whitelips is an online IDE for Whitespace. What's New? [top] =========== Version 0.10.1: - Support for virtual machines. See vm/bf.ws. - Support for compilers. See wc/bf2wsa.ws. - New icons. - Optional parameters for asm keywords - parameter is added using a push. - Some bug fixes. - EOF is interpreted as "no change". Whitespace [top] ========== Whitespace is a language that does not force you to add semicolons at the end of statements! Assembly [top] ======== As there is no official standard, Whitelips features it's own assembly language. Care has been taken to make it compatible with others, but this has never been a goal.
push $n - Push value $n onto the stack. dup - Duplicate the topmost stack element. copy $n - copies the $n-th element from stack, where 0 is the topmost value. swap - swap two topmost stack elements. drop - discards the topmost stack value. slide $n - keeps the topmost element, and deletes the next $n elements. add - sub - mul - div - mod - store - retrieve - label $l - call $l - jmp $l - jz $l - jn $l - ret - end - Terminate the program. printc - printi - readc - readi - Where: $n - an integer parameter. $l - a label. [top]
Optimizer [top] ========= The main philosophy behind the optimizer is that all Whitespace instructions are equally slow. This means that all optimizations are made to reduce the number of instructions. Optimizer guarantees that the number of instructions in the output is less or equal to the original program. As a secondary objective, the optimizer tries to reduce the size of the program to speed up parsing. The optimizer does not guarantee that the output code is smaller or equal in bytes compared to the initial program. The optimizer works on the Whitespace instruction level, which means the assembly programs can not be optimized directly - they have to be compiled into Whitespace. This is a serious restriction by design. Rules: * Remove unreachable code. * Inline unconditional jumps, if possible. * Inline function calls. * Remove unused and duplicate labels. * Mimimize label names by usage in the program. [top]