@@ -482,6 +482,7 @@ let default_config =
482482 vs_scope = BlockScope ;
483483 vs_flags = [] ;
484484 };
485+ pf_can_capture_this = true ;
485486 pf_supports_atomics = false ;
486487 }
487488
@@ -516,6 +517,7 @@ let get_config com =
516517 (if defined Define. JsUnflatten then ReserveAllTopLevelSymbols else ReserveAllTypesFlat )
517518 :: if es6 then [NoShadowing ; SwitchCasesNoBlocks ;] else [VarHoisting ; NoCatchVarShadowing ];
518519 };
520+ pf_can_capture_this = es6;
519521 pf_supports_atomics = true ;
520522 }
521523 | Lua ->
@@ -527,7 +529,8 @@ let get_config com =
527529 pf_supports_rest_args = true ;
528530 pf_exceptions = { default_config.pf_exceptions with
529531 ec_avoid_wrapping = false ;
530- }
532+ };
533+ pf_can_capture_this = false ;
531534 }
532535 | Neko ->
533536 {
@@ -542,7 +545,8 @@ let get_config com =
542545 };
543546 pf_exceptions = { default_config.pf_exceptions with
544547 ec_avoid_wrapping = false
545- }
548+ };
549+ pf_can_capture_this = false ;
546550 }
547551 | Flash ->
548552 {
@@ -567,6 +571,7 @@ let get_config com =
567571 vs_scope = FunctionScope ;
568572 vs_flags = [VarHoisting ];
569573 };
574+ pf_can_capture_this = false ;
570575 }
571576 | Php ->
572577 {
@@ -603,6 +608,7 @@ let get_config com =
603608 vs_flags = [NoShadowing ];
604609 vs_scope = FunctionScope ;
605610 };
611+ pf_can_capture_this = false ;
606612 pf_supports_atomics = true ;
607613 }
608614 | Jvm ->
@@ -626,6 +632,7 @@ let get_config com =
626632 ec_wildcard_catch = ([" java" ;" lang" ]," Throwable" );
627633 ec_base_throw = ([" java" ;" lang" ]," RuntimeException" );
628634 };
635+ pf_can_capture_this = false ;
629636 pf_supports_atomics = true ;
630637 }
631638 | Python ->
@@ -650,6 +657,7 @@ let get_config com =
650657 vs_scope = FunctionScope ;
651658 vs_flags = [VarHoisting ]
652659 };
660+ pf_can_capture_this = false ;
653661 }
654662 | Hl ->
655663 {
@@ -664,7 +672,8 @@ let get_config com =
664672 };
665673 pf_exceptions = { default_config.pf_exceptions with
666674 ec_avoid_wrapping = false
667- }
675+ };
676+ pf_can_capture_this = false ;
668677 }
669678 | Eval ->
670679 {
@@ -676,7 +685,8 @@ let get_config com =
676685 pf_capture_policy = CPWrapRef ;
677686 pf_exceptions = { default_config.pf_exceptions with
678687 ec_avoid_wrapping = false
679- }
688+ };
689+ pf_can_capture_this = false ;
680690 }
681691
682692let memory_marker = [|Unix. time() |]
0 commit comments