mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 486713 - fixing flag propagation to generator expression function. r=brendan
This commit is contained in:
parent
0fa0dccf7c
commit
fd755722cc
@ -261,7 +261,7 @@ struct JSTreeContext { /* tree context for semantic checks */
|
||||
#define TCF_HAS_SHARPS 0x8000 /* source contains sharp defs or uses */
|
||||
|
||||
/*
|
||||
* Flags to propagate from FunctionBody.
|
||||
* Sticky deoptimization flags to propagate from FunctionBody.
|
||||
*/
|
||||
#define TCF_FUN_FLAGS (TCF_FUN_SETS_OUTER_NAME | \
|
||||
TCF_FUN_USES_ARGUMENTS | \
|
||||
|
@ -6405,9 +6405,15 @@ GeneratorExpr(JSParseNode *pn, JSParseNode *kid, JSTreeContext *tc)
|
||||
if (!funbox)
|
||||
return NULL;
|
||||
|
||||
gentc.flags |= TCF_FUN_IS_GENERATOR | TCF_GENEXP_LAMBDA;
|
||||
if (tc->flags & TCF_HAS_SHARPS)
|
||||
gentc.flags |= TCF_HAS_SHARPS;
|
||||
/*
|
||||
* We assume conservatively that any deoptimization flag in tc->flags
|
||||
* besides TCF_FUN_PARAM_ARGUMENTS can come from the kid. So we
|
||||
* propagate these flags into genfn. For code simplicity we also do
|
||||
* not detect if the flags were only set in the kid and could be
|
||||
* removed from tc->flags.
|
||||
*/
|
||||
gentc.flags |= TCF_FUN_IS_GENERATOR | TCF_GENEXP_LAMBDA |
|
||||
(tc->flags & (TCF_FUN_FLAGS & ~TCF_FUN_PARAM_ARGUMENTS));
|
||||
funbox->tcflags |= gentc.flags;
|
||||
genfn->pn_funbox = funbox;
|
||||
genfn->pn_blockid = gentc.bodyid;
|
||||
|
Loading…
Reference in New Issue
Block a user