зеркало из https://github.com/mozilla/pjs.git
clean up old assertions and remove vestigial tryLimit
This commit is contained in:
Родитель
be6a60c25f
Коммит
4669a11d9a
|
@ -2436,7 +2436,6 @@ js_AllocTryNotes(JSContext *cx, JSCodeGenerator *cg)
|
|||
if (!cg->treeContext.tryCount)
|
||||
return JS_TRUE;
|
||||
|
||||
PR_ASSERT(!cg->tryBase);
|
||||
size = (cg->treeContext.tryCount + 1) * sizeof(JSTryNote);
|
||||
PR_ARENA_ALLOCATE(cg->tryBase, &cx->tempPool, size);
|
||||
if (!cg->tryBase)
|
||||
|
@ -2451,7 +2450,7 @@ js_NewTryNote(JSContext *cx, JSCodeGenerator *cg, ptrdiff_t start,
|
|||
{
|
||||
JSTryNote *tn;
|
||||
|
||||
PR_ASSERT(cg->tryBase <= cg->tryNext && cg->tryNext < cg->tryLimit);
|
||||
PR_ASSERT(cg->tryBase <= cg->tryNext);
|
||||
tn = cg->tryNext++;
|
||||
tn->start = start;
|
||||
tn->length = end - start;
|
||||
|
|
|
@ -96,7 +96,6 @@ struct JSCodeGenerator {
|
|||
uintN noteCount; /* number of source notes so far */
|
||||
ptrdiff_t lastNoteOffset; /* code offset for last source note */
|
||||
JSTryNote *tryBase; /* first exception handling note */
|
||||
JSTryNote *tryLimit; /* pointer to one-past-end note */
|
||||
JSTryNote *tryNext; /* next available note */
|
||||
};
|
||||
|
||||
|
@ -341,7 +340,7 @@ js_FinishTakingSrcNotes(JSContext *cx, JSCodeGenerator *cg);
|
|||
|
||||
/*
|
||||
* Allocate cg->treeContext.tryCount notes (plus one for the end sentinel)
|
||||
* from cx->tempPool and set cg->tryBase/tryNext/tryLimit for exactly tryCount
|
||||
* from cx->tempPool and set cg->tryBase/tryNext for exactly tryCount
|
||||
* js_NewTryNote calls. The storage is freed by js_ResetCodeGenerator.
|
||||
*/
|
||||
extern JSBool
|
||||
|
|
Загрузка…
Ссылка в новой задаче