merge upstream changes

This commit is contained in:
Dan Mills 2008-08-25 14:36:10 -07:00
commit d8823b23f4
2 changed files with 25 additions and 9 deletions

View File

@ -4498,18 +4498,32 @@ MemberExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc,
pn2->pn_pos.begin = pn->pn_pos.begin;
pn2->pn_pos.end = CURRENT_TOKEN(ts).pos.end;
/* Optimize o['p'] to o.p by rewriting pn2. */
if (pn3->pn_type == TOK_STRING) {
pn2->pn_type = TOK_DOT;
pn2->pn_op = JSOP_GETPROP;
pn2->pn_arity = PN_NAME;
pn2->pn_expr = pn;
pn2->pn_atom = pn3->pn_atom;
} else {
/*
* Optimize o['p'] to o.p by rewriting pn2, but avoid rewriting
* o['0'] to use JSOP_GETPROP, to keep fast indexing disjoint in
* the interpreter from fast property access. However, if the
* bracketed string is a uint32, we rewrite pn3 to be a number
* instead of a string.
*/
do {
if (pn3->pn_type == TOK_STRING) {
jsuint index;
if (!js_IdIsIndex(ATOM_TO_JSID(pn3->pn_atom), &index)) {
pn2->pn_type = TOK_DOT;
pn2->pn_op = JSOP_GETPROP;
pn2->pn_arity = PN_NAME;
pn2->pn_expr = pn;
pn2->pn_atom = pn3->pn_atom;
break;
}
pn3->pn_type = TOK_NUMBER;
pn3->pn_dval = index;
}
pn2->pn_op = JSOP_GETELEM;
pn2->pn_left = pn;
pn2->pn_right = pn3;
}
} while (0);
} else if (allowCallSyntax && tt == TOK_LP) {
pn2 = NewParseNode(cx, ts, PN_LIST, tc);
if (!pn2)

View File

@ -128,6 +128,8 @@ pref("browser.chrome.image_icons.max_size", 1024);
pref("browser.triple_click_selects_paragraph", true);
// 0 = Off, 1 = Full, 2 = Tagged Images Only.
// See eCMSMode in gfx/thebes/public/gfxPlatform.h
pref("gfx.color_management.mode", 0);
pref("gfx.color_management.display_profile", "");
pref("gfx.color_management.rendering_intent", 0);