Bug 1167823 - Handle more nodes by kind when checking for side effects. r=shu

--HG--
extra : rebase_source : d911d8d47cb09b5c43938f5d011cce862b1a454d
This commit is contained in:
Jeff Walden 2015-05-19 15:45:55 -07:00
Родитель ddb79d4fe3
Коммит 1d25d2ad4e
1 изменённых файлов: 13 добавлений и 8 удалений

Просмотреть файл

@ -2299,15 +2299,14 @@ BytecodeEmitter::checkSideEffects(ParseNode* pn, bool* answer)
*answer = pn->pn_count > 1; *answer = pn->pn_count > 1;
return true; return true;
case PNK_EXPORT_BATCH_SPEC:
case PNK_ARGSBODY:
case PNK_ARRAYCOMP: case PNK_ARRAYCOMP:
case PNK_EXPORT_SPEC_LIST: MOZ_ASSERT(pn->isArity(PN_LIST));
case PNK_IMPORT_SPEC_LIST: MOZ_ASSERT(pn->pn_count == 1);
case PNK_EXPORT_SPEC: return checkSideEffects(pn->pn_head, answer);
case PNK_IMPORT_SPEC:
case PNK_CALLSITEOBJ: case PNK_ARGSBODY:
break; // for now *answer = true;
return true;
case PNK_FORIN: // by PNK_FOR case PNK_FORIN: // by PNK_FOR
case PNK_FOROF: // by PNK_FOR case PNK_FOROF: // by PNK_FOR
@ -2316,6 +2315,12 @@ BytecodeEmitter::checkSideEffects(ParseNode* pn, bool* answer)
case PNK_CLASSMETHOD: // by PNK_CLASS case PNK_CLASSMETHOD: // by PNK_CLASS
case PNK_CLASSNAMES: // by PNK_CLASS case PNK_CLASSNAMES: // by PNK_CLASS
case PNK_CLASSMETHODLIST: // by PNK_CLASS case PNK_CLASSMETHODLIST: // by PNK_CLASS
case PNK_IMPORT_SPEC_LIST: // by PNK_IMPORT
case PNK_IMPORT_SPEC: // by PNK_IMPORT
case PNK_EXPORT_BATCH_SPEC:// by PNK_EXPORT
case PNK_EXPORT_SPEC_LIST: // by PNK_EXPORT
case PNK_EXPORT_SPEC: // by PNK_EXPORT
case PNK_CALLSITEOBJ: // by PNK_TAGGED_TEMPLATE
MOZ_CRASH("handled by parent nodes"); MOZ_CRASH("handled by parent nodes");
case PNK_LIMIT: // invalid sentinel value case PNK_LIMIT: // invalid sentinel value