mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 696284 - Add a comment explaining why we allocate BytecodeEmitter on the heap. r=jorendorff. DONTBUILD
This commit is contained in:
parent
68cc56a6b0
commit
744ba05dd6
@ -5820,7 +5820,11 @@ frontend::EmitTree(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
|||||||
JS_ASSERT_IF(pn->pn_funbox->tcflags & TCF_FUN_HEAVYWEIGHT,
|
JS_ASSERT_IF(pn->pn_funbox->tcflags & TCF_FUN_HEAVYWEIGHT,
|
||||||
fun->kind() == JSFUN_INTERPRETED);
|
fun->kind() == JSFUN_INTERPRETED);
|
||||||
|
|
||||||
/* Generate code for the function's body. */
|
/*
|
||||||
|
* Generate code for the function's body. bce2 is not allocated on the
|
||||||
|
* stack because doing so significantly reduces the maximum depth of
|
||||||
|
* nested functions we can handle. See bug 696284.
|
||||||
|
*/
|
||||||
BytecodeEmitter *bce2 = cx->new_<BytecodeEmitter>(bce->parser, pn->pn_pos.begin.lineno);
|
BytecodeEmitter *bce2 = cx->new_<BytecodeEmitter>(bce->parser, pn->pn_pos.begin.lineno);
|
||||||
if (!bce2) {
|
if (!bce2) {
|
||||||
js_ReportOutOfMemory(cx);
|
js_ReportOutOfMemory(cx);
|
||||||
|
Loading…
Reference in New Issue
Block a user