@@ -364,7 +364,7 @@ impl<'a> AstBuilder<'a> {
364364 ) )
365365 }
366366
367- /// Build an [`Expression::ArrowFunctionExpression`] with `scope_id` and `pure`.
367+ /// Build an [`Expression::ArrowFunctionExpression`] with `scope_id` and `pure` and `pife` .
368368 ///
369369 /// This node contains an [`ArrowFunctionExpression`] that will be stored in the memory arena.
370370 ///
@@ -378,8 +378,9 @@ impl<'a> AstBuilder<'a> {
378378 /// * `body`: See `expression` for whether this arrow expression returns an expression.
379379 /// * `scope_id`
380380 /// * `pure`: `true` if the function is marked with a `/*#__NO_SIDE_EFFECTS__*/` comment
381+ /// * `pife`: `true` if the function should be marked as "Possibly-Invoked Function Expression" (PIFE).
381382 #[ inline]
382- pub fn expression_arrow_function_with_scope_id_and_pure < T1 , T2 , T3 , T4 > (
383+ pub fn expression_arrow_function_with_scope_id_and_pure_and_pife < T1 , T2 , T3 , T4 > (
383384 self ,
384385 span : Span ,
385386 expression : bool ,
@@ -390,6 +391,7 @@ impl<'a> AstBuilder<'a> {
390391 body : T4 ,
391392 scope_id : ScopeId ,
392393 pure : bool ,
394+ pife : bool ,
393395 ) -> Expression < ' a >
394396 where
395397 T1 : IntoIn < ' a , Option < Box < ' a , TSTypeParameterDeclaration < ' a > > > > ,
@@ -398,7 +400,7 @@ impl<'a> AstBuilder<'a> {
398400 T4 : IntoIn < ' a , Box < ' a , FunctionBody < ' a > > > ,
399401 {
400402 Expression :: ArrowFunctionExpression (
401- self . alloc_arrow_function_expression_with_scope_id_and_pure (
403+ self . alloc_arrow_function_expression_with_scope_id_and_pure_and_pife (
402404 span,
403405 expression,
404406 r#async,
@@ -408,6 +410,7 @@ impl<'a> AstBuilder<'a> {
408410 body,
409411 scope_id,
410412 pure,
413+ pife,
411414 ) ,
412415 )
413416 }
@@ -6067,6 +6070,7 @@ impl<'a> AstBuilder<'a> {
60676070 body : body. into_in ( self . allocator ) ,
60686071 scope_id : Default :: default ( ) ,
60696072 pure : Default :: default ( ) ,
6073+ pife : Default :: default ( ) ,
60706074 }
60716075 }
60726076
@@ -6114,10 +6118,10 @@ impl<'a> AstBuilder<'a> {
61146118 )
61156119 }
61166120
6117- /// Build an [`ArrowFunctionExpression`] with `scope_id` and `pure`.
6121+ /// Build an [`ArrowFunctionExpression`] with `scope_id` and `pure` and `pife` .
61186122 ///
61196123 /// If you want the built node to be allocated in the memory arena,
6120- /// use [`AstBuilder::alloc_arrow_function_expression_with_scope_id_and_pure `] instead.
6124+ /// use [`AstBuilder::alloc_arrow_function_expression_with_scope_id_and_pure_and_pife `] instead.
61216125 ///
61226126 /// ## Parameters
61236127 /// * `span`: The [`Span`] covering this node
@@ -6129,8 +6133,9 @@ impl<'a> AstBuilder<'a> {
61296133 /// * `body`: See `expression` for whether this arrow expression returns an expression.
61306134 /// * `scope_id`
61316135 /// * `pure`: `true` if the function is marked with a `/*#__NO_SIDE_EFFECTS__*/` comment
6136+ /// * `pife`: `true` if the function should be marked as "Possibly-Invoked Function Expression" (PIFE).
61326137 #[ inline]
6133- pub fn arrow_function_expression_with_scope_id_and_pure < T1 , T2 , T3 , T4 > (
6138+ pub fn arrow_function_expression_with_scope_id_and_pure_and_pife < T1 , T2 , T3 , T4 > (
61346139 self ,
61356140 span : Span ,
61366141 expression : bool ,
@@ -6141,6 +6146,7 @@ impl<'a> AstBuilder<'a> {
61416146 body : T4 ,
61426147 scope_id : ScopeId ,
61436148 pure : bool ,
6149+ pife : bool ,
61446150 ) -> ArrowFunctionExpression < ' a >
61456151 where
61466152 T1 : IntoIn < ' a , Option < Box < ' a , TSTypeParameterDeclaration < ' a > > > > ,
@@ -6158,13 +6164,14 @@ impl<'a> AstBuilder<'a> {
61586164 body : body. into_in ( self . allocator ) ,
61596165 scope_id : Cell :: new ( Some ( scope_id) ) ,
61606166 pure,
6167+ pife,
61616168 }
61626169 }
61636170
6164- /// Build an [`ArrowFunctionExpression`] with `scope_id` and `pure`, and store it in the memory arena.
6171+ /// Build an [`ArrowFunctionExpression`] with `scope_id` and `pure` and `pife` , and store it in the memory arena.
61656172 ///
61666173 /// Returns a [`Box`] containing the newly-allocated node.
6167- /// If you want a stack-allocated node, use [`AstBuilder::arrow_function_expression_with_scope_id_and_pure `] instead.
6174+ /// If you want a stack-allocated node, use [`AstBuilder::arrow_function_expression_with_scope_id_and_pure_and_pife `] instead.
61686175 ///
61696176 /// ## Parameters
61706177 /// * `span`: The [`Span`] covering this node
@@ -6176,8 +6183,9 @@ impl<'a> AstBuilder<'a> {
61766183 /// * `body`: See `expression` for whether this arrow expression returns an expression.
61776184 /// * `scope_id`
61786185 /// * `pure`: `true` if the function is marked with a `/*#__NO_SIDE_EFFECTS__*/` comment
6186+ /// * `pife`: `true` if the function should be marked as "Possibly-Invoked Function Expression" (PIFE).
61796187 #[ inline]
6180- pub fn alloc_arrow_function_expression_with_scope_id_and_pure < T1 , T2 , T3 , T4 > (
6188+ pub fn alloc_arrow_function_expression_with_scope_id_and_pure_and_pife < T1 , T2 , T3 , T4 > (
61816189 self ,
61826190 span : Span ,
61836191 expression : bool ,
@@ -6188,6 +6196,7 @@ impl<'a> AstBuilder<'a> {
61886196 body : T4 ,
61896197 scope_id : ScopeId ,
61906198 pure : bool ,
6199+ pife : bool ,
61916200 ) -> Box < ' a , ArrowFunctionExpression < ' a > >
61926201 where
61936202 T1 : IntoIn < ' a , Option < Box < ' a , TSTypeParameterDeclaration < ' a > > > > ,
@@ -6196,7 +6205,7 @@ impl<'a> AstBuilder<'a> {
61966205 T4 : IntoIn < ' a , Box < ' a , FunctionBody < ' a > > > ,
61976206 {
61986207 Box :: new_in (
6199- self . arrow_function_expression_with_scope_id_and_pure (
6208+ self . arrow_function_expression_with_scope_id_and_pure_and_pife (
62006209 span,
62016210 expression,
62026211 r#async,
@@ -6206,6 +6215,7 @@ impl<'a> AstBuilder<'a> {
62066215 body,
62076216 scope_id,
62086217 pure,
6218+ pife,
62096219 ) ,
62106220 self . allocator ,
62116221 )
0 commit comments