зеркало из https://github.com/mozilla/gecko-dev.git
No bug, fix MSVC warnings, no_r=me
This commit is contained in:
Родитель
03ac22d54b
Коммит
216c6b7dd0
|
@ -1842,7 +1842,7 @@ EmitEnterBlock(JSContext *cx, JSParseNode *pn, JSCodeGenerator *cg)
|
|||
JSDefinition *dn = (JSDefinition *) v.toPrivate();
|
||||
JS_ASSERT(dn->pn_defn);
|
||||
JS_ASSERT(uintN(dn->frameSlot() + depth) < JS_BIT(16));
|
||||
dn->pn_cookie.set(dn->pn_cookie.level(), dn->frameSlot() + depth);
|
||||
dn->pn_cookie.set(dn->pn_cookie.level(), uint16(dn->frameSlot() + depth));
|
||||
#ifdef DEBUG
|
||||
for (JSParseNode *pnu = dn->dn_uses; pnu; pnu = pnu->pn_link) {
|
||||
JS_ASSERT(pnu->pn_lexdef == dn);
|
||||
|
@ -1946,7 +1946,7 @@ MakeUpvarForEval(JSParseNode *pn, JSCodeGenerator *cg)
|
|||
}
|
||||
|
||||
pn->pn_op = JSOP_GETUPVAR;
|
||||
pn->pn_cookie.set(cg->staticLevel, ALE_INDEX(ale));
|
||||
pn->pn_cookie.set(cg->staticLevel, uint16(ALE_INDEX(ale)));
|
||||
pn->pn_dflags |= PND_BOUND;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2750,7 +2750,7 @@ Parser::functionDef(uintN lambda, bool namePermitted)
|
|||
return NULL;
|
||||
rhs->pn_type = TOK_NAME;
|
||||
rhs->pn_op = JSOP_GETARG;
|
||||
rhs->pn_cookie.set(funtc.staticLevel, slot);
|
||||
rhs->pn_cookie.set(funtc.staticLevel, uint16(slot));
|
||||
rhs->pn_dflags |= PND_BOUND;
|
||||
|
||||
item = JSParseNode::newBinaryOrAppend(TOK_ASSIGN, JSOP_NOP, lhs, rhs, &funtc);
|
||||
|
@ -3170,7 +3170,7 @@ BindLet(JSContext *cx, BindData *data, JSAtom *atom, JSTreeContext *tc)
|
|||
* include script->nfixed.
|
||||
*/
|
||||
pn->pn_op = JSOP_GETLOCAL;
|
||||
pn->pn_cookie.set(tc->staticLevel, n);
|
||||
pn->pn_cookie.set(tc->staticLevel, uint16(n));
|
||||
pn->pn_dflags |= PND_LET | PND_BOUND;
|
||||
|
||||
/*
|
||||
|
|
|
@ -102,7 +102,7 @@ class UpvarCookie
|
|||
uint32 asInteger() const { return value; }
|
||||
/* isFree check should be performed before using these accessors. */
|
||||
uint16 level() const { JS_ASSERT(!isFree()); return value >> 16; }
|
||||
uint16 slot() const { JS_ASSERT(!isFree()); return value; }
|
||||
uint16 slot() const { JS_ASSERT(!isFree()); return uint16(value); }
|
||||
|
||||
void set(const UpvarCookie &other) { set(other.level(), other.slot()); }
|
||||
void set(uint16 newLevel, uint16 newSlot) { value = (uint32(newLevel) << 16) | newSlot; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче