mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1143194 - Emit JSTRY_FOR_OF notes for for-of loops. (r=jorendorff)
This commit is contained in:
parent
2b21b4db17
commit
8f681cbcb3
@ -4956,6 +4956,9 @@ BytecodeEmitter::emitForOf(StmtType type, ParseNode *pn, ptrdiff_t top)
|
||||
// For STMT_SPREAD, just pop pc->topStmt.
|
||||
popStatement();
|
||||
|
||||
if (!tryNoteList.append(JSTRY_FOR_OF, stackDepth, top, offset()))
|
||||
return false;
|
||||
|
||||
if (letDecl) {
|
||||
if (!LeaveNestedScope(cx, this, &letStmt))
|
||||
return false;
|
||||
|
@ -67,6 +67,7 @@ enum JSTryNoteKind {
|
||||
JSTRY_CATCH,
|
||||
JSTRY_FINALLY,
|
||||
JSTRY_ITER,
|
||||
JSTRY_FOR_OF,
|
||||
JSTRY_LOOP
|
||||
};
|
||||
|
||||
|
@ -2184,7 +2184,7 @@ JS_STATIC_ASSERT(JSTRY_CATCH == 0);
|
||||
JS_STATIC_ASSERT(JSTRY_FINALLY == 1);
|
||||
JS_STATIC_ASSERT(JSTRY_ITER == 2);
|
||||
|
||||
static const char* const TryNoteNames[] = { "catch", "finally", "iter", "loop" };
|
||||
static const char* const TryNoteNames[] = { "catch", "finally", "iter", "for-of", "loop" };
|
||||
|
||||
static bool
|
||||
TryNotes(JSContext *cx, HandleScript script, Sprinter *sp)
|
||||
|
Loading…
Reference in New Issue
Block a user