Changes between Version 2 and Version 3 of LoritoOps
- Timestamp:
- 07/20/10 23:04:23 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
LoritoOps
v2 v3 8 8 * if - conditional branch 9 9 10 === Value (12 ops) === 11 The Value, Math, Comparison and Object ops are designed to minimize op proliferation. Apart from type coercion via set_[ins]_[ins], all ops require that each of their arguments be of the same type. 12 13 * set_[ins]_[ins] - copy/coerce registers between primitive types (objects will provide the same functionality via vtable functions) 14 * load_const_[ins] - load a constant into a register 15 10 16 === Math (14 ops) === 11 17 * add_[in] - add two registers of the same type 12 * sub_[in] - subtract two registers 13 * mul_[in] - multiply two registers 14 * div_[in] - divide two registers 15 * mod_[in] - take the mod of a register18 * sub_[in] - subtract two registers of the same type 19 * mul_[in] - multiply two registers of the same type 20 * div_[in] - divide two registers of the same type 21 * mod_[in] - return the remainder of $2/$3 16 22 * and - bitwise and of an int 17 23 * or - bitwise or of an int … … 23 29 * isgt_[in] - a > b 24 30 * isge_[in] - a >= b 25 26 === Values (12 ops) ===27 * set_[ins]_[ins] - copy/coerce registers between primitive types28 * load_const_[ins] - load a constant into a register29 31 30 32 === Objects (8 ops) === … … 39 41 40 42 === I/O (3 ops, bootstrapping only) === 41 * read - read from stdin* 42 * write - write to stdout* 43 * gripe - write to stderr* 43 These three ops are only intended for use during Lorito's implementation phase. Once Lorito matures to the point where we have a fixed set of ops and have tools that can generate Lorito, we expect these ops to become methods on a FileHandle. 44 44 45 * read, write and gripe are only intended for use during Lorito's implementation phase. Once Lorito matures, these ops will become methods on a FileHandle. 45 * read - read from stdin 46 * write - write to stdout 47 * gripe - write to stderr 48