Bug 720316 - Introduce GET_UINT8 and SET_UINT8 helpers for bytecode immediate examination/setting. r=luke
This commit is contained in:
@@ -151,6 +151,18 @@ typedef enum JSOp {
|
||||
* Immediate operand getters, setters, and bounds.
|
||||
*/
|
||||
|
||||
static JS_ALWAYS_INLINE uint8_t
|
||||
GET_UINT8(jsbytecode *pc)
|
||||
{
|
||||
return (uint8_t) pc[1];
|
||||
}
|
||||
|
||||
static JS_ALWAYS_INLINE void
|
||||
SET_UINT8(jsbytecode *pc, uint8_t u)
|
||||
{
|
||||
pc[1] = (jsbytecode) u;
|
||||
}
|
||||
|
||||
/* Common uint16_t immediate format helpers. */
|
||||
#define UINT16_LEN 2
|
||||
#define UINT16_HI(i) ((jsbytecode)((i) >> 8))
|
||||
|
||||
Reference in New Issue
Block a user