@@ -9,7 +9,7 @@ use swc_core::{
9
9
common:: { comments:: Comments , pass:: AstNodePath , Mark , Span , Spanned , SyntaxContext , GLOBALS } ,
10
10
ecma:: {
11
11
ast:: * ,
12
- atoms:: js_word ,
12
+ atoms:: atom ,
13
13
utils:: contains_ident_ref,
14
14
visit:: { fields:: * , * } ,
15
15
} ,
@@ -658,7 +658,7 @@ impl EvalContext {
658
658
}
659
659
let args = args. iter ( ) . map ( |arg| self . eval ( & arg. expr ) ) . collect ( ) ;
660
660
661
- let callee = Box :: new ( JsValue :: FreeVar ( js_word ! ( "import" ) ) ) ;
661
+ let callee = Box :: new ( JsValue :: FreeVar ( atom ! ( "import" ) ) ) ;
662
662
663
663
JsValue :: call ( callee, args)
664
664
}
@@ -673,7 +673,7 @@ impl EvalContext {
673
673
. iter ( )
674
674
. map ( |e| match e {
675
675
Some ( e) => self . eval ( & e. expr ) ,
676
- _ => JsValue :: FreeVar ( js_word ! ( "undefined" ) ) ,
676
+ _ => JsValue :: FreeVar ( atom ! ( "undefined" ) ) ,
677
677
} )
678
678
. collect ( ) ;
679
679
JsValue :: array ( arr)
@@ -1127,7 +1127,7 @@ impl Analyzer<'_> {
1127
1127
match callee {
1128
1128
Callee :: Import ( _) => {
1129
1129
self . add_effect ( Effect :: Call {
1130
- func : Box :: new ( JsValue :: FreeVar ( js_word ! ( "import" ) ) ) ,
1130
+ func : Box :: new ( JsValue :: FreeVar ( atom ! ( "import" ) ) ) ,
1131
1131
args,
1132
1132
ast_path : as_parent_path ( ast_path) ,
1133
1133
span,
@@ -1213,7 +1213,7 @@ impl Analyzer<'_> {
1213
1213
let values = self . cur_fn_return_values . take ( ) . unwrap ( ) ;
1214
1214
1215
1215
Box :: new ( match values. len ( ) {
1216
- 0 => JsValue :: FreeVar ( js_word ! ( "undefined" ) ) ,
1216
+ 0 => JsValue :: FreeVar ( atom ! ( "undefined" ) ) ,
1217
1217
1 => values. into_iter ( ) . next ( ) . unwrap ( ) ,
1218
1218
_ => JsValue :: alternatives ( values) ,
1219
1219
} )
@@ -1793,7 +1793,7 @@ impl VisitAstPath for Analyzer<'_> {
1793
1793
. arg
1794
1794
. as_deref ( )
1795
1795
. map ( |e| self . eval_context . eval ( e) )
1796
- . unwrap_or ( JsValue :: FreeVar ( js_word ! ( "undefined" ) ) ) ;
1796
+ . unwrap_or ( JsValue :: FreeVar ( atom ! ( "undefined" ) ) ) ;
1797
1797
1798
1798
values. push ( return_value) ;
1799
1799
}
0 commit comments