- Add (jsatomid) cast to GET_ATOM_INDEX to abate warnings.

- Fix js_GetAtom fallibility by returning &dummy on assert-botch "can't happen"
  index out of range case.
- js_InitAtomMap needn't bother nulling ale->next with tmp save
- js_InitAtomState explicit tail fusion for FROB via goto bad, and early memset
  (I know, JSRuntime is cleared already and it contains the atom state ... but
  jsatom.c doesn't know that).
- Clear all ATOM_ flags save ATOM_PINNED when creating a new atom.
- Cleanup xtra, ALIGNNUM, etc. useless variables, use JSVAL_ALIGN and JS_MAX.
This commit is contained in:
brendan@netscape.com
1999-06-29 02:19:17 +00:00
parent fcd32bd824
commit d8b2bed2bf
2 changed files with 29 additions and 33 deletions

View File

@@ -78,7 +78,7 @@ typedef enum JSOp {
#define ATOM_INDEX_LEN 2
#define ATOM_INDEX_HI(index) ((jsbytecode)((index) >> 8))
#define ATOM_INDEX_LO(index) ((jsbytecode)(index))
#define GET_ATOM_INDEX(pc) (((pc)[1] << 8) | (pc)[2])
#define GET_ATOM_INDEX(pc) ((jsatomid)(((pc)[1] << 8) | (pc)[2]))
#define SET_ATOM_INDEX(pc,index)((pc)[1] = ATOM_INDEX_HI(index), \
(pc)[2] = ATOM_INDEX_LO(index))
#define GET_ATOM(cx,script,pc) js_GetAtom((cx), &(script)->atomMap, \