Explorar o código

Add annotated demo files

Robin Maisch %!s(int64=4) %!d(string=hai) anos
pai
achega
746c8d57fd

+ 2374 - 0
jplag.frontend.rust/src/test/resources/de/jplag/rust/annotated/complete.rs.annotated

@@ -0,0 +1,2374 @@
+5       #![crate_type = "lib"]
+        |INNER_ATTR          |
+6       #![crate_name = "rary"]
+        |INNER_ATTR           |
+8       fn main(){
+        |FUNCTION|func{
+9           #![crate_type = "lib"]
+            |INNER_ATTR          |
+10          let y = &&& x;
+            |VAR_DECL
+                  |assign
+11          y = &a & &b;
+              |assign
+12          y = false == false && true
+              |assign
+13      }
+        |}func
+14      fn main1(){
+        |FUNCTION |func{
+15          #[foo]
+            |OUTER_ATTR
+16          #[bar]
+            |OUTER_ATTR
+17          let x = 1;
+            |VAR_DECL
+                  |assign
+19          let x = #[foo] #[bar]1;
+            |VAR_DECL
+                  |assign
+                    |OUTER_ATTR
+                           |OUTER_ATTR
+20          let _ = #[a] - #[b]-1;
+            |VAR_DECL
+                  |assign
+                    |OUTER_ATTR
+                           |OUTER_ATTR
+22          #[foo]
+            |OUTER_ATTR
+23          #[bar]
+            |OUTER_ATTR
+24          {}
+            |inner{
+             |}inner
+25      }
+        |}func
+40      async fn foo() {}
+              |FUNCTION|func{
+                        |}func
+41      async fn bar() {}
+              |FUNCTION|func{
+                        |}func
+43      trait T {
+        |TRAIT  |trait{
+44          async fn foo();
+                  |FUNCTION
+45          async fn bar();
+                  |FUNCTION
+46      }
+        |}trait
+48      enum E {
+        |ENUM  |enum{
+49          #[cfg(test)] F(#[cfg(test)] i32)
+            |enum_item
+            |OUTER_ATTR|  |tuple(
+                           |t_elem
+                           |OUTER_ATTR|
+                                |tuple(
+                                     |)tuple
+                                           |)tuple
+50      }
+        |}enum
+52      #[empty_attr()]
+        |OUTER_ATTR   |
+53      const T: i32 = 92;
+        |VAR_DECL    |assign
+55      fn attrs_on_statements() {
+        |FUNCTION                |func{
+56          #[cfg(test)]
+            |OUTER_ATTR|
+57          let x = 92;
+            |VAR_DECL
+                  |assign
+59          #[cfg(test)]
+            |OUTER_ATTR|
+60          loop {}
+            |LOOP|loop{
+                  |}loop
+62          #[cfg(test)]
+            |OUTER_ATTR|
+63          x = 1 + 1;
+              |assign
+65          S { #[foo] foo: 92 };
+            |struct()
+                |ARG         |
+                |OUTER_ATTR
+66      }
+        |}func
+68      struct S<#[foo]'a, #[may_dangle] T> {}
+        |STRUCT  |<T>   |
+                 |OUTER_ATTR
+                           |<T>          |
+                           |OUTER_ATTR |    |struct{
+                                             |}struct
+70      #[macro_export]
+        |OUTER_ATTR   |
+71      macro_rules! give_me_struct {
+        |MACRO_RULES                |macro_rules{
+72          ($name:ident) => {
+            |macro_rule      |macro_rule{
+75          }
+            |}macro_rule
+76      }
+        |}macro_rules
+78      #[cfg(not(test))]
+        |OUTER_ATTR     |
+79      give_me_struct! {
+        |MACRO()     |  |macro(){
+81      }
+        |}macro()
+83      #[post("/", data = "<todo_form>")]
+        |OUTER_ATTR                      |
+84      fn string_value() {}
+        |FUNCTION         |func{
+                           |}func
+86      const C: i32 = 0;
+        |VAR_DECL    |assign
+88      #[cfg(attr(value = C))]
+        |OUTER_ATTR           |
+89      fn const_value() {}
+        |FUNCTION        |func{
+                          |}func
+91      #[py::class]
+        |OUTER_ATTR|
+92      fn path() {}
+        |FUNCTION |func{
+                   |}func
+94      #[cfg_attr(test, assert_instr(add_a.b))]
+        |OUTER_ATTR                            |
+95      fn custom_name() {}
+        |FUNCTION        |func{
+                          |}func
+97      #[attr(foo::{bar, baz}, qwe)]
+        |OUTER_ATTR                 |
+98      fn arbitrary_token_tree() {}
+        |FUNCTION                 |func{
+                                   |}func
+100     fn f1(#[attr1] #[attr2] pat: S) {}
+        |FUNCTION
+              |PARAM                 |
+              |OUTER_ATTR
+                       |OUTER_ATTR      |func{
+                                         |}func
+102     fn f2(#[attr] x: S) {}
+        |FUNCTION
+              |PARAM     |
+              |OUTER_ATTR   |func{
+                             |}func
+104     impl S {
+        |IMPL  |impl{
+105         fn f3(#[attr] self) {}
+            |FUNCTION
+                  |PARAM     |
+                  |OUTER_ATTR   |func{
+                                 |}func
+107         fn f4(#[attr] &self) {}
+            |FUNCTION
+                  |PARAM      |
+                  |OUTER_ATTR    |func{
+                                  |}func
+109         fn f5<'a>(#[attr] &mut self) {}
+            |FUNCTION
+                  |<T>|PARAM          |
+                      |OUTER_ATTR        |func{
+                                          |}func
+111         fn f6<'a>(#[attr] &'a self) {}
+            |FUNCTION
+                  |<T>|PARAM         |
+                      |OUTER_ATTR       |func{
+                                         |}func
+113         fn f7<'a>(#[attr] &'a mut self, #[attr] x: S, y: S) {}
+            |FUNCTION
+                  |<T>|PARAM             |
+                      |OUTER_ATTR           |PARAM     |
+                                            |OUTER_ATTR   |PARAM|func{
+                                                                 |}func
+115         fn f8(#[attr] self: Self) {}
+            |FUNCTION
+                  |PARAM           |
+                  |OUTER_ATTR         |func{
+                                       |}func
+117         fn f9(#[attr] self: S<Self>) {}
+            |FUNCTION
+                  |PARAM              |
+                  |OUTER_ATTR            |func{
+                                          |}func
+118     }
+        |}impl
+120     trait T { fn f10(#[attr] S); }
+        |TRAIT  |trait{
+                  |FUNCTION
+                         |PARAM  |
+                         |OUTER_ATTR |}trait
+122     extern "C" {
+        |EXTERN    |extern{
+123         fn f11(#[attr] x: S, #[attr] ...);
+            |FUNCTION
+                   |PARAM     |
+                   |OUTER_ATTR   |PARAM    |
+                                 |OUTER_ATTR
+124     }
+        |}extern
+128     pub fn foo(x: String) {
+            |FUNCTION
+                   |PARAM  |  |func{
+130         { 1 }
+            |inner{
+                |}inner
+133         { 1 }
+            |inner{
+                |}inner
+136         loop {}
+            |LOOP|loop{
+                  |}loop
+139         while true {}
+            |LOOP      |loop{
+                        |}loop
+142         loop {}
+            |LOOP|loop{
+                  |}loop
+145         let foo = ();
+            |VAR_DECL
+                    |assign
+                      |tuple(
+                       |)tuple
+146         {foo}
+            |inner{
+                |}inner
+147         ();
+            |apply
+150         let _ = { 1 } * 2;
+            |VAR_DECL
+                  |assign
+                    |inner{
+                        |}inner
+151         let _ = { 1 } & 2;
+            |VAR_DECL
+                  |assign
+                    |inner{
+                        |}inner
+152         let _ = loop {} * 1;
+            |VAR_DECL
+                  |assign
+                    |LOOP|loop{
+                          |}loop
+153         2 & { 1 };
+                |inner{
+                    |}inner
+155         fn bar() {}
+            |FUNCTION|func{
+                      |}func
+156         let _ = {bar}();
+            |VAR_DECL
+                  |assign
+                    |inner{
+                        |}inner
+                         |apply
+157     }
+        |}func
+159     fn main3() {
+        |FUNCTION  |func{
+160         let simple_block = {
+            |VAR_DECL        |assign
+                               |inner{
+162         };
+            |}inner
+175     }
+        |}func
+179     fn documented_function() {
+        |FUNCTION                |func{
+181         fn foo() { }
+            |FUNCTION|func{
+                       |}func
+182     }
+        |}func
+185     mod m {
+        |MODULE
+              |module{
+189         fn undocumented_function() {}
+            |FUNCTION                  |func{
+                                        |}func
+192         fn documented_function() {}
+            |FUNCTION                |func{
+                                      |}func
+193     }
+        |}module
+196     #[cfg(test)]
+        |OUTER_ATTR|
+198     struct S {
+        |STRUCT  |struct{
+201         field: f32
+            |FIELD
+202     }
+        |}struct
+206     struct T (
+        |STRUCT  |struct{
+208       i32
+          |T_ELEM
+209     );
+        |}struct
+212     enum E {
+        |ENUM  |enum{
+214         Foo,
+            |ENUM_ITEM
+215     }
+        |}enum
+217     enum ES {
+        |ENUM   |enum{
+219         Foo {
+            |ENUM_ITEM
+                |enum{
+221             field: usize
+                |FIELD
+222         },
+            |}enum
+223     }
+        |}enum
+225     extern {
+        |EXTERN|extern{
+227         fn foo();
+            |FUNCTION
+230         static errno: i32;
+            |STATIC
+231     }
+        |}extern
+234     macro_rules! makro {
+        |MACRO_RULES       |macro_rules{
+235         () => { };
+            |macro_rule
+                  |macro_rule{
+                    |}macro_rule
+236     }
+        |}macro_rules
+247     fn blanks() {}
+        |FUNCTION   |func{
+                     |}func
+255     fn foo() {}
+        |FUNCTION|func{
+                  |}func
+260     fn bar() {}
+        |FUNCTION|func{
+                  |}func
+262     fn main4() {
+        |FUNCTION  |func{
+263         if 1 < 2 {}
+            |IF      |if{
+                      |}if
+264         if let Some(x) = o {}
+            |IF|VAR_DECL
+                   |STRUCT()
+                        |arg
+                           |assign
+                               |if{
+                                |}if
+265         if let | Err(e) = r {}
+            |IF|VAR_DECL
+                     |STRUCT()
+                         |arg
+                            |assign
+                                |if{
+                                 |}if
+266         if let V1(s) | V2(s) = value {}
+            |IF|VAR_DECL
+                   |STRUCT()
+                      |arg |STRUCT()
+                              |arg
+                                 |assign |if{
+                                          |}if
+267         if let | Cat(name) | Dog(name) | Parrot(name) = animal {}
+            |IF|VAR_DECL
+                     |STRUCT()
+                         |ARG    |STRUCT()
+                                     |ARG    |STRUCT()
+                                                    |ARG  |assign  |if{
+                                                                    |}if
+271         while 1 < 2 {}
+            |LOOP       |loop{
+                         |}loop
+272         while let Some(x) = o {}
+            |LOOP |VAR_DECL
+                      |STRUCT()
+                           |arg
+                              |assign
+                                  |loop{
+                                   |}loop
+273         while let | Err(e) = r {}
+            |LOOP |VAR_DECL
+                        |STRUCT()
+                            |arg
+                               |assign
+                                   |loop{
+                                    |}loop
+274         while let V1(s) | V2(s) = value {}
+            |LOOP |VAR_DECL
+                      |STRUCT()
+                         |arg |STRUCT()
+                                 |arg
+                                    |assign |loop{
+                                             |}loop
+275         while let | Cat(name) | Dog(name) | Parrot(name) = animal {}
+            |LOOP |VAR_DECL
+                        |STRUCT()
+                            |ARG    |STRUCT()
+                                        |ARG    |STRUCT()
+                                                       |ARG  |assign  |loop{
+                                                                       |}loop
+277     }
+        |}func
+285     const FOO: i32 = 42;
+        |VAR_DECL      |assign
+286     const _: i32 = 123;
+        |VAR_DECL    |assign
+294     struct S<>;
+        |STRUCT
+295     trait T<> {}
+        |TRAIT    |trait{
+                   |}trait
+296     enum E<> { V }
+        |ENUM    |enum{
+                   |enum_item
+                     |}enum
+297     impl<> T<> for S<> {}
+        |IMPL              |impl{
+                            |}impl
+298     impl T for E {}
+        |IMPL        |impl{
+                      |}impl
+299     fn foo<>() {}
+        |FUNCTION  |func{
+                    |}func
+300     fn bar() {}
+        |FUNCTION|func{
+                  |}func
+302     fn main() {
+        |FUNCTION |func{
+303         let _ = S;
+            |VAR_DECL
+                  |assign
+304         let _ = S::<>;
+            |VAR_DECL
+                  |assign
+305         let _ = E::V;
+            |VAR_DECL
+                  |assign
+306         let _ = E::<>::V;
+            |VAR_DECL
+                  |assign
+307         foo();
+               |apply
+308         foo::<>();
+                   |apply
+311         bar::<>();
+                   |apply
+312         let _: i32<>;
+            |VAR_DECL
+313     }
+        |}func
+315     fn foo() where for<> for<> T: T {}
+        |FUNCTION                       |func{
+                                         |}func
+317     fn f() -> i32 {}
+        |FUNCTION     |func{
+                       |}func
+319     fn test() -> u32 {
+        |FUNCTION        |func{
+327         x = y = z;      /* assignment + ; */
+              |assign
+                  |assign
+335         t = (0, 1, 2);  /* tuple */
+              |assign
+                |tuple(
+                 |t_elem
+                    |t_elem
+                       |t_elem
+                        |)tuple
+341         f.m();          /* method-invokation */
+               |apply
+343         f();            /* call */
+             |apply
+344         <T as Foo>::U::generic_method::<f64>();
+                                            |T_ARG
+                                                |apply
+345         S::<isize>::foo::<usize>();
+                |T_ARG        |T_ARG|apply
+346         let xs: Box<[()]> = Box::<[(); 0]>::new([]);
+            |VAR_DECL         |assign |T_ARG|      |apply
+                                                    |ARG
+                                                    |array{
+                                                     |}array
+348         t = ();         /* unit */
+              |assign
+                |tuple(
+                 |)tuple
+350         [   0,          /* array */
+            |array{
+                |array_elem
+351             1,
+                |array_elem
+352             2,
+                |array_elem
+353             [ 0 ; 1 ] ];
+                |array_elem
+                |array{
+                  |array_elem
+                      |array_elem
+                        |}array
+                          |}array
+354         [];
+            |array{
+             |}array
+355         [1,];
+            |array{
+             |array_elem
+               |}array
+356         [1;2];
+            |array{
+             |array_elem
+               |array_elem
+                |}array
+358         || {};          /* lambda */
+            |CLOSURE
+               |closure{
+               |return
+               |inner{
+                |}inner
+                |}closure
+359         |x| x;
+            |closure
+             |param
+                |closure{
+                |return
+                |}closure
+360         |&x| x;
+            |closure
+             |param
+                 |closure{
+                 |return
+                 |}closure
+365         move |x: i32| {
+            |CLOSURE
+                  |param  |closure{
+                          |return
+                          |inner{
+367         };
+            |}inner
+            |}closure
+369         |x: &mut i32| x = 92;
+            |closure
+             |param       |closure{
+                          |return
+                            |assign
+                              |}CLOSURE
+371         { }             /* block */
+            |inner{
+              |}inner
+373         unsafe { 92 }
+                   |inner{
+                        |}inner
+375         {
+            |inner{
+376             {92}.to_string()
+                |inner{
+                   |}inner    |apply
+377         }
+            |}inner
+381         let _ = 1 as i32 <= 1;
+            |VAR_DECL
+                  |assign
+385         const TEN: u32 = 10;
+            |VAR_DECL      |assign
+386         let _ = 1 as u32 + TEN;
+            |VAR_DECL
+                  |assign
+388         let _ = 1 as (i32);
+            |VAR_DECL
+                  |assign
+393         return (x = y)  /* return */
+            |RETURN   |assign
+395     }
+        |}func
+398     #[link(name = "objc")]
+        |OUTER_ATTR          |
+399     extern {
+        |EXTERN|extern{
+400         fn foo(name: *const libc::c_uchar);
+            |FUNCTION
+                   |PARAM                   |
+401         fn bar(a: i32,  ...) -> i32;
+            |FUNCTION
+                   |PARAM   |PARAM
+403         #[cfg(test)]
+            |OUTER_ATTR|
+404         pub fn baz(b: i64, );
+                |FUNCTION
+                       |PARAM
+406         #[doc = "Hello"]
+            |OUTER_ATTR    |
+407         pub static X: i32;
+                |STATIC
+410     }
+        |}extern
+412     extern crate foo;
+        |EXTERN
+413     #[macro_use] extern crate bar;
+        |OUTER_ATTR| |EXTERN
+414     extern crate spam as eggs;
+        |EXTERN
+416     extern crate self;
+        |EXTERN
+417     extern crate self as foo;
+        |EXTERN
+419     extern fn baz() {}
+               |FUNCTION|func{
+                         |}func
+420     unsafe extern fn foo() {}
+                      |FUNCTION|func{
+                                |}func
+421     unsafe extern "C" fn bar() {}
+                          |FUNCTION|func{
+                                    |}func
+424     fn add(x: i32, y: i32) -> i32 {
+        |FUNCTION
+               |PARAM  |PARAM         |func{
+425         return x + y;
+            |RETURN
+426     }
+        |}func
+428       fn mul(x: i32, y: i32) -> i32 {
+          |FUNCTION
+                 |PARAM  |PARAM         |func{
+429         x * y;
+            |return
+430     }
+        |}func
+432       fn id(x: i32,) -> i32 { x }
+          |FUNCTION
+                |PARAM          |func{
+                                    |}func
+434       fn constant() -> i32 { 92 }
+          |FUNCTION            |func{
+                                    |}func
+436       const        fn a() -> () { () }
+                       |FUNCTION    |func{
+                                      |tuple(
+                                       |)tuple
+                                         |}func
+437       const unsafe fn b() -> () { () }
+                       |FUNCTION    |func{
+                                      |tuple(
+                                       |)tuple
+                                         |}func
+439       fn diverging() -> ! { panic("! is a type") }
+          |FUNCTION           |func{ |apply
+                                      |ARG        |  |}func
+447       struct S;
+          |STRUCT
+449       trait A {
+          |TRAIT  |trait{
+450           type B;
+              |TYPE_ALIAS
+451       }
+          |}trait
+453       impl A for S {
+          |IMPL        |impl{
+454           type B = S;
+              |TYPE_ALIAS
+                     |assign
+455       }
+          |}impl
+458       trait T { }
+          |TRAIT  |trait{
+                    |}trait
+459       trait P<X> { }
+          |TRAIT  |<t>
+                     |trait{
+                       |}trait
+462       impl T  { }
+          |IMPL   |impl{
+                    |}impl
+463       impl (T) { }
+          |IMPL    |impl{
+                     |}impl
+464       impl T for S { }
+          |IMPL        |impl{
+                         |}impl
+468       impl<U> P<U> { }
+          |IMPL|<t>    |impl{
+                         |}impl
+469       impl<U> (P<U>) { }
+          |IMPL|<t>      |impl{
+                           |}impl
+470       impl<U> P<U> for S { }
+          |IMPL|<t>          |impl{
+                               |}impl
+471       impl T for <S as A>::B { }
+          |IMPL                  |impl{
+                                   |}impl
+474       impl (<S as A>::B) { }
+          |IMPL              |impl{
+                               |}impl
+476       impl<'a, T> Iterator for Iter<'a, T> + 'a {
+          |IMPL|<T>|<t>                             |impl{
+477           type Item = &'a T;
+              |TYPE_ALIAS
+                        |assign
+479           foo!();
+              |MACRO()
+                  |macro(){
+                   |}macro()
+480       }
+          |}impl
+482       impl<T> GenVal<T> {
+          |IMPL|<t>         |impl{
+483           fn value(&self) -> &T {}
+              |FUNCTION|PARAM       |func{
+                                     |}func
+484           fn foo<A, B>(&mut self, a: i32, b: i32) -> &A {}
+              |FUNCTION
+                     |<t>
+                        |<t>
+                           |PARAM  |  |PARAM  |PARAM        |func{
+                                                             |}func
+485       }
+          |}impl
+501     mod m {
+        |MODULE
+              |module{
+502         #    !    [ cfg ( test ) ]
+            |INNER_ATTR              |
+503     }
+        |}module
+505     fn main() {
+        |FUNCTION |func{
+506         {} // This should a stmt.
+            |inner{
+             |}inner
+507         {} // And this one is an expr.
+            |inner{
+             |}inner
+508     }
+        |}func
+509     fn main() {
+        |FUNCTION |func{
+510         'label: while let Some(_) = Some(92) {}
+            |LABEL  |LOOP |VAR_DECL
+                              |STRUCT()
+                                   |arg
+                                      |assign
+                                            |apply
+                                             |ARG|loop{
+                                                  |}loop
+512         let _  = loop { break 92 };
+            |VAR_DECL
+                   |assign
+                     |LOOP|loop{
+                            |BREAK   |}loop
+513         let _ = 'l: loop { break 'l 92 };
+            |VAR_DECL
+                  |assign
+                    |LABEL
+                        |LOOP|loop{
+                               |BREAK      |}loop
+515         'll: loop {
+            |LABEL
+                 |LOOP|loop{
+516             break 'll;
+                |BREAK
+517         }
+            |}loop
+518     }
+        |}func
+524     macro_rules! vec {
+        |MACRO_RULES     |macro_rules{
+525         ( $( $x:expr ),* ) => {
+            |macro_rule           |macro_rule{
+533         };
+            |}macro_rule
+534     }
+        |}macro_rules
+536     macro_rules! comments {
+        |MACRO_RULES          |macro_rules{
+537         () => {
+            |macro_rule
+                  |macro_rule{
+543         };
+            |}macro_rule
+544     }
+        |}macro_rules
+546     macro_rules! default {
+        |MACRO_RULES         |macro_rules{
+547         ($ty: ty) => { /* ANYTHING */ };
+            |macro_rule  |macro_rule{     |}macro_rule
+548     }
+        |}macro_rules
+550     macro_rules! foobar {
+        |MACRO_RULES        |macro_rules{
+551         ($self: ident) => {  };
+            |macro_rule       |macro_rule{
+                                 |}macro_rule
+552     }
+        |}macro_rules
+554     default!(String);
+        |MACRO()|macro(){
+                       |}macro()
+556     thread_local!(static HANDLE: Handle = Handle(0));
+        |MACRO()   | |macro(){                         |}macro()
+558     #[cfg(foo)]
+        |OUTER_ATTR
+559     foo!();
+        |MACRO()
+            |macro(){
+             |}macro()
+561     include!("path/to/rust/file.rs");
+        |MACRO()|macro(){              |}macro()
+562     const STR: &str = include_str!("foo.in");
+        |VAR_DECL       |assign
+                          |MACRO()  | |macro(){|}macro()
+563     const BYTES: &[u8] = include_bytes!("data.data",);
+        |VAR_DECL          |assign
+                             |MACRO()    | |macro(){    |}macro()
+565     include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
+        |MACRO()|macro(){                                |}macro()
+567     std::include!("path/to/rust/file.rs");
+        |MACRO()     |macro(){              |}macro()
+568     ::std::include!("path/to/rust/file.rs");
+        |MACRO()       |macro(){              |}macro()
+569     crate::foo! {}
+        |MACRO()    |macro(){
+                     |}macro()
+570     self::foo! {}
+        |MACRO()   |macro(){
+                    |}macro()
+571     super::foo! {}
+        |MACRO()    |macro(){
+                     |}macro()
+573     fn foo() {
+        |FUNCTION|func{
+574         #[cfg(foo)]
+            |OUTER_ATTR
+575         foo! {}
+            |MACRO()
+                 |macro(){
+                  |}macro()
+576         let a = 0; // needed to check that we parsed the call as a stmt
+            |VAR_DECL
+                  |assign
+578         macro_rules! bar {
+            |MACRO_RULES     |macro_rules{
+579             () => {};
+                |macro_rule
+                      |macro_rule{
+                       |}macro_rule
+580         }
+            |}macro_rules
+582         let mut macro_rules = 0;
+            |VAR_DECL           |assign
+583         macro_rules += 1;
+                        |ASSIGN
+585         foo!() + foo!();
+            |MACRO()
+                |macro(){
+                 |}macro()
+                     |MACRO()
+                         |macro(){
+                          |}macro()
+589         let v1 = vec![1, 2, 3];
+            |VAR_DECL
+                   |assign
+                     |MACRO()
+                         |macro(){
+                                 |}macro()
+590         let v2 = vec![1; 10];
+            |VAR_DECL
+                   |assign
+                     |MACRO()
+                         |macro(){
+                               |}macro()
+591         let v: Vec<i32> = vec![];
+            |VAR_DECL       |assign
+                              |MACRO()
+                                  |macro(){
+                                   |}macro()
+592         let vv: Vec<i32> = std::vec![]; // fully qualified macro call
+            |VAR_DECL        |assign
+                               |MACRO() |macro(){
+                                         |}macro()
+593         let vvv: Vec<i32> = std::vec /*comment*/ ![]; // fully qualified macro call with comment
+            |VAR_DECL         |assign
+                                |MACRO()              |macro(){
+                                                       |}macro()
+594         vec!(Foo[]); // custom vec macro
+            |MACRO()
+                |macro(){
+                      |}macro()
+598         println!("{}", 92);
+            |MACRO()|macro(){|}macro()
+599         format!("{argument}", argument = "test");  // => "test"
+            |MACRO()
+                   |macro(){                       |}macro()
+600         format_args!("{name} {}", 1, name = 2);    // => "2 1"
+            |MACRO()  | |macro(){                |}macro()
+601         format!["hello {}", "world!"];
+            |MACRO()
+                   |macro(){            |}macro()
+602         format! {
+            |MACRO()|macro(){
+605         }
+            |}macro()
+606         panic!("division by zero");
+            |MACRO()
+                  |macro(){          |}macro()
+607         unimplemented!("{} {} {}", 1, 2, 3);
+            |MACRO()    | |macro(){           |}macro()
+608         todo!("it's too {epithet} to implement", epithet = "boring");
+            |MACRO()
+                 |macro(){                                             |}macro()
+609         std::println!("{}", 92); // fully qualified macro call
+            |MACRO()     |macro(){|}macro()
+610         std::println /*comment*/ !("{}", 92); // fully qualified macro call with comment
+            |MACRO()                  |macro(){|}macro()
+611         ::std::println!("{}", 92); // fully qualified macro call beginning with double colon
+            |MACRO()       |macro(){|}macro()
+612         eprintln!(Foo[]); // custom format macro
+            |MACRO() |macro(){
+                           |}macro()
+622         dbg!();
+            |MACRO()
+                |macro(){
+                 |}macro()
+623         dbg!("Some text");
+            |MACRO()
+                |macro(){   |}macro()
+624         dbg!(123 + 567,);
+            |MACRO()
+                |macro(){  |}macro()
+625         std::dbg!(123); // fully qualified macro call
+            |MACRO() |macro(){
+                         |}macro()
+626         std::dbg /*comment*/ !(123); // fully qualified macro call with comment
+            |MACRO()              |macro(){
+                                      |}macro()
+627         dbg!(Foo[]); // custom expr macro
+            |MACRO()
+                |macro(){
+                      |}macro()
+631         error!();
+            |MACRO()
+                  |macro(){
+                   |}macro()
+632         debug!("{a} {c} {b}", a="a", b='b', c=3);  // => "a 3 b"
+            |MACRO()
+                  |macro(){                        |}macro()
+633         trace!(target: "smbc", "open_with {:?}", options);
+            |MACRO()
+                  |macro(){                                 |}macro()
+634         log::warn!(target: "smbc", "open_with {:?}", options); // fully qualified macro call
+            |MACRO()  |macro(){                                 |}macro()
+635         log::info /*comment*/ !(target: "smbc", "open_with {:?}", options); // fully qualified macro call with comment
+            |MACRO()               |macro(){                                 |}macro()
+636         debug!(log, "debug values"; "x" => 1, "y" => -1); // custom log macro
+            |MACRO()
+                  |macro(){                                |}macro()
+640         let a = 42u32;
+            |VAR_DECL
+                  |assign
+641         let b = 43u32;
+            |VAR_DECL
+                  |assign
+642         assert!(a == b);
+            |MACRO()
+                   |macro(){
+                          |}macro()
+643         assert![a == b];
+            |MACRO()
+                   |macro(){
+                          |}macro()
+644         assert!{a == b};
+            |MACRO()
+                   |macro(){
+                          |}macro()
+646         assert_eq!(a, b, "Some text");
+            |MACRO()| |macro(){         |}macro()
+647         assert_ne!(a, b, "Some text");
+            |MACRO()| |macro(){         |}macro()
+648         assert!(a == b, "Some text");
+            |MACRO()
+                   |macro(){           |}macro()
+649         assert!(a == b, "Text {} {} syntax", "with", "format");
+            |MACRO()
+                   |macro(){                                     |}macro()
+651         assert!(a == b);
+            |MACRO()
+                   |macro(){
+                          |}macro()
+652         debug_assert!(a == b);
+            |MACRO()   | |macro(){
+                                |}macro()
+653         assert_eq!(a, b);
+            |MACRO()| |macro(){
+                           |}macro()
+654         debug_assert_eq!(a, b);
+            |MACRO()      | |macro(){
+                                 |}macro()
+655         assert_ne!(a, b);
+            |MACRO()| |macro(){
+                           |}macro()
+656         debug_assert_ne!(a, b);
+            |MACRO()      | |macro(){
+                                 |}macro()
+657         std::assert!(a == b); // fully qualified macro call
+            |MACRO()    |macro(){
+                               |}macro()
+658         std::assert /*comment*/ !(a == b); // fully qualified macro call with comment
+            |MACRO()                 |macro(){
+                                            |}macro()
+659         assert_eq!(Foo[]); // custom assert macro
+            |MACRO()| |macro(){
+                            |}macro()
+663         concat!("abc");
+            |MACRO()
+                   |macro(){
+                         |}macro()
+664         concat!("abc", "def");
+            |MACRO()
+                   |macro(){    |}macro()
+665         concat!("abc", "def",);
+            |MACRO()
+                   |macro(){     |}macro()
+666         std::concat!("abc", "def"); // fully qualified macro call
+            |MACRO()    |macro(){    |}macro()
+667         std::concat /*comment*/ !("abc", "def"); // fully qualified macro call with comment
+            |MACRO()                 |macro(){    |}macro()
+668         concat!(Foo[]); // custom concat macro
+            |MACRO()
+                   |macro(){
+                         |}macro()
+672         env!("FOO");
+            |MACRO()
+                |macro(){
+                      |}macro()
+673         env!("FOO",);
+            |MACRO()
+                |macro(){
+                       |}macro()
+674         env!("FOO", "error message");
+            |MACRO()
+                |macro(){              |}macro()
+675         env!("FOO", "error message", );
+            |MACRO()
+                |macro(){                |}macro()
+676         std::env!("FOO"); // fully qualified macro call
+            |MACRO() |macro(){
+                           |}macro()
+677         std::env /*comment*/ !("FOO"); // fully qualified macro call with comment
+            |MACRO()              |macro(){
+                                        |}macro()
+678         env!(Foo[]); // custom env macro
+            |MACRO()
+                |macro(){
+                      |}macro()
+682         asm!("nop");
+            |MACRO()
+                |macro(){
+                      |}macro()
+683         asm!("nop", "nop");
+            |MACRO()
+                |macro(){    |}macro()
+684         asm!("nop", options(pure, nomem, nostack));
+            |MACRO()
+                |macro(){                            |}macro()
+685         asm!("nop", const 5, a = const 5);
+            |MACRO()
+                |macro(){                   |}macro()
+686         asm!("nop", sym foo::bar, a = sym foo::bar, const 6);
+            |MACRO()
+                |macro(){                                      |}macro()
+687         asm!("nop", a = const A + 1);
+            |MACRO()
+                |macro(){              |}macro()
+688         asm!("nop", in(reg) x => y, out("eax") _);
+            |MACRO()
+                |macro(){                           |}macro()
+689         asm!("nop", a = const 5, b = sym foo::bar, c = in(reg) _, d = out(reg) a => _);
+            |MACRO()
+                |macro(){                                                                |}macro()
+690         std::asm!("nop"); // fully qualified macro call
+            |MACRO() |macro(){
+                           |}macro()
+691         std::asm /*comment*/ !("nop"); // fully qualified macro call with comment
+            |MACRO()              |macro(){
+                                        |}macro()
+693     }
+        |}func
+694     fn main() {
+        |FUNCTION |func{
+695         match x {
+            |MATCH  |match{
+696             _ => {}
+                |case|inner{
+                      |}inner
+697             _ => 1,
+                |case
+698             _ => unsafe { 1 }.to_string(),
+                |case       |inner{
+                                |}inner    |apply
+699             _ => 92
+                |case
+700         };
+            |}match
+702         match x {
+            |MATCH  |match{
+703             | 0
+                |case
+705             | _ => 42,
+                |case
+706         };
+            |}match
+707     }
+        |}func
+709     fn main() {
+        |FUNCTION |func{
+710         match () {
+            |MATCH|tuple(
+                   |)tuple
+                     |match{
+711             () => {}
+                |case
+                |tuple
+                |tuple(
+                 |)tuple
+                      |inner{
+                       |}inner
+712             () => {}
+                |case
+                |tuple
+                |tuple(
+                 |)tuple
+                      |inner{
+                       |}inner
+713         }
+            |}match
+714     }
+        |}func
+717     fn match_with_guard() {
+        |FUNCTION             |func{
+718         match () {
+            |MATCH|tuple(
+                   |)tuple
+                     |match{
+719             () if true => {}
+                |case
+                |tuple
+                |tuple(
+                 |)tuple
+                   |GUARD     |inner{
+                               |}inner
+720             () if false => {}
+                |case
+                |tuple
+                |tuple(
+                 |)tuple
+                   |GUARD      |inner{
+                                |}inner
+721         }
+            |}match
+722     }
+        |}func
+724     fn genericMethod<E>(element: E) -> i32 {
+        |FUNCTION        |<t>
+                            |PARAM   |         |func{
+725         return 1;
+            |RETURN
+726     }
+        |}func
+728     fn callGeneric() {
+        |FUNCTION        |func{
+729         genericMethod("Okay!");
+                         |apply
+                          |ARG  |
+730         let f = genericMethod::<i32>;
+            |VAR_DECL
+                  |assign           |T_ARG
+731         f("Not okay!"); // type mismatch
+             |apply
+              |ARG      |
+732     }
+        |}func
+735     mod arith {
+        |MODULE   |module{
+737         fn add(x: i32, y: i32) -> i32 {
+            |FUNCTION
+                   |PARAM  |PARAM         |func{
+738           return x + y;
+              |RETURN
+739         }
+            |}func
+741         fn mul(x: i32, y: i32) -> i32 {
+            |FUNCTION
+                   |PARAM  |PARAM         |func{
+742           x * y;
+              |return
+743         }
+            |}func
+745     }
+        |}module
+748     mod empty {
+        |MODULE   |module{
+750     }
+        |}module
+752     fn main() {
+        |FUNCTION |func{
+754         let _ = 1.0;
+            |VAR_DECL
+                  |assign
+755         let _ = 1f32;
+            |VAR_DECL
+                  |assign
+756         let _ = 1f64;
+            |VAR_DECL
+                  |assign
+757         let _ = 1.0f64;
+            |VAR_DECL
+                  |assign
+758         let _ = 1.0e92;
+            |VAR_DECL
+                  |assign
+759         let _ = 1.0e92f32;
+            |VAR_DECL
+                  |assign
+760         let _ = 1.;
+            |VAR_DECL
+                  |assign
+761         let _ = 10e_6;
+            |VAR_DECL
+                  |assign
+767         let _ = 0f32.foo();
+            |VAR_DECL
+                  |assign   |apply
+770         let _ = 1234567890;
+            |VAR_DECL
+                  |assign
+771         let _ = 1234567890i32;
+            |VAR_DECL
+                  |assign
+772         let _ = 1_________;
+            |VAR_DECL
+                  |assign
+773         let _ = 1_________i32;
+            |VAR_DECL
+                  |assign
+774         let _ = 0x1234567890abcdef;
+            |VAR_DECL
+                  |assign
+775         let _ = 0o1234567;
+            |VAR_DECL
+                  |assign
+776         let _ = 0b10101011101010000111;
+            |VAR_DECL
+                  |assign
+777         let _ = 0.foo();
+            |VAR_DECL
+                  |assign|apply
+778     }
+        |}func
+780     fn moo() {
+        |FUNCTION|func{
+783     }
+        |}func
+784     fn patterns() {
+        |FUNCTION     |func{
+785         let S {..} = x;
+            |VAR_DECL
+                |struct
+                  |struct{
+                     |}struct
+                       |assign
+786         let S {field} = x;
+            |VAR_DECL
+                |struct
+                  |struct{
+                   |FIELD
+                        |}struct
+                          |assign
+787         let S {field,} = x;
+            |VAR_DECL
+                |struct
+                  |struct{
+                   |FIELD|}struct
+                           |assign
+788         let S {field, ..} = x;
+            |VAR_DECL
+                |struct
+                  |struct{
+                   |FIELD   |}struct
+                              |assign
+789         let T(field, ..) = x;
+            |VAR_DECL
+                |struct()
+                  |ARG|  |ARG|assign
+790         let T(.., field) = x;
+            |VAR_DECL
+                |struct()
+                  |ARG|ARG|  |assign
+791         let (x, .., y) = (1, 2, 3, 4, 5);
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |t_elem
+                    |T_ELEM
+                        |t_elem
+                         |)tuple
+                           |assign
+                             |tuple(
+                              |t_elem
+                                 |t_elem
+                                    |t_elem
+                                       |t_elem
+                                          |t_elem
+                                           |)tuple
+792         let [x, .., y] = [1, 2, 3, 4];
+            |VAR_DECL      |assign
+                             |array{
+                              |array_elem
+                                 |array_elem
+                                    |array_elem
+                                       |array_elem
+                                        |}array
+794         let &[x, ref y @ ..] = [1, 2, 3];
+            |VAR_DECL            |assign
+                                   |array{
+                                    |array_elem
+                                       |array_elem
+                                          |array_elem
+                                           |}array
+795         let [..] = [1, 2];
+            |VAR_DECL|assign
+                       |array{
+                        |array_elem
+                           |array_elem
+                            |}array
+797         let ref a @ _ = value;
+            |VAR_DECL     |assign
+799         if let Some(x,) = Some(92) { }
+            |IF|VAR_DECL
+                   |STRUCT()
+                        |arg|assign
+                                  |apply
+                                   |ARG|if{
+                                         |}if
+801         let m!(x) = 92;
+            |VAR_DECL
+                |macro()
+                  |macro(){
+                    |}macro()
+                      |assign
+803         let <i32>::foo ... <i32>::bar = 92;
+            |VAR_DECL                     |assign
+804         let Option::None = None;
+            |VAR_DECL        |assign
+815         match 10 {
+            |MATCH   |match{
+816             -100 => x,
+                |case
+817             X => x,
+                |case
+818             Q::T => x,
+                |case
+821             2...4 => x,
+                |case
+826             _ => x
+                |case
+827         };
+            |}match
+828     }
+        |}func
+830     fn single_bound<T: Bar>() {}
+        |FUNCTION       |<T> |    |func{
+                                   |}func
+832     fn parenthesized_bound<T: (Bar)>() {}
+        |FUNCTION              |<T>   |    |func{
+                                            |}func
+834     struct QuestionBound<T: ?Sized>(Unique<T>);
+        |STRUCT              |<T>    | |struct{
+                                        |T_ELEM  |}struct
+836     struct ParenthesizedQuestionBound<T: (?Sized)>(Unique<T>);
+        |STRUCT                           |<T>      |
+                                             |struct{
+                                                    |}struct
+                                                      |struct{
+                                                       |T_ELEM  |}struct
+838     fn multiple_bound<T: Bar + Baz>() {}
+        |FUNCTION         |<T>       |    |func{
+                                           |}func
+840     fn parenthesized_multiple_bound<T: (Bar) + (Baz)>() {}
+        |FUNCTION                       |<T>           |    |func{
+                                                             |}func
+842     fn lifetime_bound<'a, T:'a>() {}
+        |FUNCTION         |<T>|<T>    |func{
+                                       |}func
+847     fn for_lifetime_bound<F>(f: F) where F: for<'a> Fn(&'a i32) {}
+        |FUNCTION             |<t>
+                                 |PARAM                             |func{
+                                                                     |}func
+849     fn parenthesized_for_lifetime_bound<F>(f: F) where F: (for<'a> Fn(&'a i32)) {}
+        |FUNCTION                           |<t>
+                                               |PARAM                               |func{
+                                                                                     |}func
+851     fn impl_bound() -> impl Bar {}
+        |FUNCTION                   |func{
+                                     |}func
+853     fn parenthesized_impl_bound() -> impl (Bar) {}
+        |FUNCTION                                   |func{
+                                                     |}func
+855     fn impl_multiple_bound() -> impl Bar + Baz {}
+        |FUNCTION                                  |func{
+                                                    |}func
+857     fn parenthesized_impl_multiple_bound() -> impl (Bar) + (Baz) {}
+        |FUNCTION                                                    |func{
+                                                                      |}func
+859     fn dyn_bound(b: &mut dyn Bar) {}
+        |FUNCTION    |PARAM        |  |func{
+                                       |}func
+861     fn parenthesized_dyn_bound(b: &mut dyn (Bar)) {}
+        |FUNCTION                  |PARAM          |  |func{
+                                                       |}func
+867     fn lifetime_bound_on_Fn_returning_reference<'b, F, Z: 'b>() where F: Fn() -> &'b Z + 'static {}
+        |FUNCTION                                   |<T>|<t>
+                                                           |<T>|                                     |func{
+                                                                                                      |}func
+876     fn main() {
+        |FUNCTION |func{
+877         let a = 1 + 2 * 3;
+            |VAR_DECL
+                  |assign
+878         let b = *x == y;
+            |VAR_DECL
+                  |assign
+879     }
+        |}func
+880     fn main() {
+        |FUNCTION |func{
+881         r = 1..2;
+              |assign
+882         r =  ..2;
+              |assign
+883         r = 1.. ;
+              |assign
+884         r =  .. ;
+              |assign
+885         r = {1}..{2};
+              |assign
+                |inner{
+                  |}inner
+                     |inner{
+                       |}inner
+889         r = 1..=10;
+              |assign
+890         r = 1 ..= 10;
+              |assign
+891         r = ..= 10;
+              |assign
+895         for i in 0.. {
+            |FOR         |for{
+897         }
+            |}for
+898     }
+        |}func
+926     struct S { f: i32 }
+        |STRUCT  |struct{
+                   |field |}struct
+927     struct S2 { foo: i32, bar: () }
+        |STRUCT   |struct{
+                    |FIELD    |FIELD  |}struct
+929     fn main() {
+        |FUNCTION |func{
+930         if if true { S {f:1}; true } else { S {f:1}; false } {
+            |IF|IF     |if{
+                         |struct()
+                            |ARG       |}if
+                                         |ELSE|else{
+                                                |struct()
+                                                   |ARG        |else}
+                                                                 |if{
+931             ()
+                |tuple(
+                 |)tuple
+932         } else {
+            |}if
+              |ELSE|else{
+933             ()
+                |tuple(
+                 |)tuple
+934         };
+            |else}
+936         if {S {f:1}; let _ = S {f:1}; true} {()};
+            |IF|inner{
+                |struct()
+                   |ARG  |VAR_DECL
+                               |assign
+                                 |struct()
+                                    |ARG      |}inner
+                                                |if{
+                                                 |tuple(
+                                                  |)tuple
+                                                   |}if
+938         if { 1 } == 1 { 1; }
+            |IF|inner{
+                   |}inner|if{ |}if
+939         if unsafe { 0 } == 0 { 0; }
+            |IF       |inner{
+                          |}inner|if{ |}if
+941         let (foo, bar) = (1, ());
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM
+                      |T_ELEM
+                         |)tuple
+                           |assign
+                             |tuple(
+                              |t_elem
+                                 |t_elem
+                                 |tuple(
+                                  |)tuple
+                                   |)tuple
+942         let s2 = S2 { foo, bar };
+            |VAR_DECL
+                   |assign
+                     |STRUCT()
+                          |ARG |ARG
+943     }
+        |}func
+945     struct S1;
+        |STRUCT
+946     struct S2 {}
+        |STRUCT   |struct{
+                   |}struct
+947     struct S3 { field: f32  }
+        |STRUCT   |struct{
+                    |FIELD      |}struct
+948     struct S4 { field: f32, }
+        |STRUCT   |struct{
+                    |FIELD      |}struct
+949     struct S5 { #[foo] field: f32 }
+        |STRUCT   |struct{
+                    |field
+                    |OUTER_ATTR       |}struct
+950     struct S6 { #[foo] field: f32, #[foo] field2: f32 }
+        |STRUCT   |struct{
+                    |field
+                    |OUTER_ATTR        |field
+                                       |OUTER_ATTR        |}struct
+952     struct S10();
+        |STRUCT   |struct{
+                   |}struct
+953     struct S11(i32);
+        |STRUCT   |struct{
+                   |T_ELEM
+                      |}struct
+954     struct S12(i32,);
+        |STRUCT   |struct{
+                   |T_ELEM
+                       |}struct
+955     struct S13(i32,i32);
+        |STRUCT   |struct{
+                   |T_ELEM
+                       |T_ELEM
+                          |}struct
+956     struct S14(#[foo] i32);
+        |STRUCT   |struct{
+                   |t_elem
+                   |OUTER_ATTR
+                             |}struct
+957     struct S15(#[foo] i32, #[foo] i32);
+        |STRUCT   |struct{
+                   |t_elem
+                   |OUTER_ATTR |t_elem
+                               |OUTER_ATTR
+                                         |}struct
+959     #[repr(C)]
+        |OUTER_ATTR
+960     union U {
+        |UNION  |union{
+961         i: i32,
+            |field
+962         f: f32,
+            |field
+963     }
+        |}union
+965     fn foo() {
+        |FUNCTION|func{
+966         struct S1;
+            |STRUCT
+967         struct S2 {}
+            |STRUCT   |struct{
+                       |}struct
+968         struct S3 { field: f32  }
+            |STRUCT   |struct{
+                        |FIELD      |}struct
+969         struct S4 { field: f32, }
+            |STRUCT   |struct{
+                        |FIELD      |}struct
+971         #[repr(C)]
+            |OUTER_ATTR
+972         union U {
+            |UNION  |union{
+973             i: i32,
+                |field
+974             f: f32,
+                |field
+975         }
+            |}union
+976     }
+        |}func
+978     trait Contains {
+        |TRAIT         |trait{
+979         type A;
+            |TYPE_ALIAS
+980         fn inner(&self) -> Self::A;
+            |FUNCTION|PARAM
+981         fn empty();
+            |FUNCTION
+982         fn anon_param(i32);
+            |FUNCTION     |PARAM
+983         fn self_type(x: Self, y: Vec<Self>) -> Self;
+            |FUNCTION    |PARAM|  |PARAM     |
+984     }
+        |}trait
+986     fn foo() {
+        |FUNCTION|func{
+987         trait Inner {};
+            |TRAIT      |trait{
+                         |}trait
+988         unsafe trait UnsafeInner {};
+            |TRAIT                   |trait{
+                                      |}trait
+989     }
+        |}func
+991     trait bar<T> {
+        |TRAIT    |<t>
+                     |trait{
+992         fn baz(&self,);
+            |FUNCTION
+                   |PARAM
+993     }
+        |}trait
+995     trait TrailingPlusIsOk: Clone+{}
+        |TRAIT                        |trait{
+                                       |}trait
+996     trait EmptyBoundsAreValid: {}
+        |TRAIT                     |trait{
+                                    |}trait
+998     fn main() {
+        |FUNCTION |func{
+999         "1".parse::<i32>()?;
+                        |T_ARG
+                            |apply
+1000        {x}?;
+            |inner{
+              |}inner
+1003        Ok(true);
+              |apply
+               |ARG
+1004        let question_should_bind_tighter = !x?;
+            |VAR_DECL                        |assign
+1005    }
+        |}func
+1006    fn main() {
+        |FUNCTION |func{
+1007        a::<B<>>
+                |T_ARG
+1008    }
+        |}func
+1009    type FunType = Fn(f64) -> f64;
+        |TYPE_ALIAS  |assign
+1010    type FunType2 = FnOnce::(i32);
+        |TYPE_ALIAS   |assign
+1012    type FunTypeVoid = Fn();
+        |TYPE_ALIAS      |assign
+1014    type ColonColon = Vec::<[u8; 8]>;
+        |TYPE_ALIAS     |assign
+1016    type Sum = Box<A + Copy>;
+        |TYPE_ALIAS
+                 |assign
+1018    type LifetimeSum = Box<'a + Copy>;
+        |TYPE_ALIAS      |assign
+1020    type HrtbSum = &(for<'a> Trait1 + for<'b> Trait2);
+        |TYPE_ALIAS  |assign
+1022    type FunSum = Box<Fn(f64, f64) -> f64 + Send + Sync>;
+        |TYPE_ALIAS |assign
+1023    type FunSum2 = Box<Fn() -> () + Send>;
+        |TYPE_ALIAS  |assign
+1024    type FunRetDynTrait = Box<Fn() -> dyn Trait + Send>;
+        |TYPE_ALIAS         |assign
+1026    type Shl = F<<i as B>::Q, T=bool>;
+        |TYPE_ALIAS
+                 |assign
+1027    type Shr = Vec<Vec<f64>>;
+        |TYPE_ALIAS
+                 |assign
+1029    type Path = io::Result<()>;
+        |TYPE_ALIAS
+                  |assign
+1031    type AssocType = Box<Iterator<Item=(Idx, T)> + 'a>;
+        |TYPE_ALIAS    |assign
+1033    type GenericAssoc = Foo<T, U=i32>;
+        |TYPE_ALIAS       |assign
+1035    type Trailing1 = Box<TypeA<'static,>>;
+        |TYPE_ALIAS    |assign
+1037    type Trailing2<'a> = MyType<'a, (),>;
+        |TYPE_ALIAS    |<T>|assign
+1039    type TrailingCommaInFn = unsafe extern "system" fn(x: i32,) -> ();
+        |TYPE_ALIAS            |assign
+1041    fn foo<T>(xs: Vec<T>) -> impl Iterator<Item=impl FnOnce() -> T> + Clone {
+        |FUNCTION
+               |<t>
+                  |PARAM   |                                                    |func{
+1042        xs.into_iter().map(|x| || x)
+                        |apply|apply
+                               |ARG   |
+                               |closure
+                                |param
+                                   |CLOSURE{
+                                   |RETURN
+                                   |CLOSURE
+                                      |closure{
+                                      |return
+                                      |}closure
+                                      |}closure
+1043    }
+        |}func
+1045    type DynTrait = dyn Trait;
+        |TYPE_ALIAS   |assign
+1047    struct S<F>
+        |STRUCT  |<t>
+1048        where F: FnMut(&mut Self, &T) -> Result<(), <Self as Encoder>::Error>;
+                          |struct{      |}struct
+1050    struct EmptyWhere where {}
+        |STRUCT                 |struct{
+                                 |}struct
+1052    fn bar() -> foo!() { let a: foo!() = 0 as foo!(); a }
+        |FUNCTION   |MACRO()
+                        |macro(){
+                         |}macro()
+                           |func{
+                             |VAR_DECL
+                                    |MACRO()
+                                        |macro(){
+                                         |}macro()
+                                           |assign|MACRO()
+                                                      |macro(){
+                                                       |}macro()
+                                                            |}func
+1055    use self :: y :: { self   };
+        |USE               |USE_ITEM
+1056    use           :: { self   };
+        |USE               |USE_ITEM
+1057    use           :: { self , };
+        |USE               |USE_ITEM
+1058    use           :: {        };
+        |USE
+1059    use              { y      };
+        |USE               |use_item
+1060    use              { y ,    };
+        |USE               |use_item
+1061    use              {        };
+        |USE
+1062    use self  ::  y :: *;
+        |USE               |use_item
+1063    use self  ::  y as z;
+        |USE|USE_ITEM |
+1064    use self  ::  y as _;
+        |USE|USE_ITEM |
+1065    use self  ::  y;
+        |USE|USE_ITEM |
+1066    use crate  ::  y;
+        |USE|USE_ITEM  |
+1069    use a::{B, d::{self, *, g::H}};
+        |USE    |use_item
+                       |USE_ITEM
+                             |use_item
+                                |USE_ITEM
+1070    use ::{*, *};
+        |USE   |use_item
+                  |use_item
+1072    use foo::{bar, {baz, quux}};
+        |USE      |USE_ITEM
+                        |USE_ITEM
+                             |USE_ITEM
+1073    use {crate::foo, crate::bar, super::baz};
+        |USE |USE_ITEM|  |USE_ITEM|  |USE_ITEM|
+1075    struct S1;
+        |STRUCT
+1076    pub struct S2;
+            |STRUCT
+1077    pub(crate) struct S3;
+                   |STRUCT
+1078    pub(self) struct S4;
+                  |STRUCT
+1079    mod a {
+        |MODULE
+              |module{
+1080        pub (super) struct S5;
+                        |STRUCT
+1081        pub(in a) struct S6;
+                      |STRUCT
+1082        mod b {
+            |MODULE
+                  |module{
+1083            pub(in super::super) struct S7;
+                                     |STRUCT
+1086        }
+            |}module
+1087    }
+        |}module
+1094    crate::macro1!();
+        |MACRO()      |macro(){
+                       |}macro()
+1096    #[macro_export]
+        |OUTER_ATTR   |
+1097    #[doc(hidden)]
+        |OUTER_ATTR  |
+1098    macro_rules! __diesel_column {
+        |MACRO_RULES                 |macro_rules{
+1099        ($($table:ident)::*, $column_name:ident -> $Type:ty) => {
+            |macro_rule                                             |macro_rule{
+1132        }
+            |}macro_rule
+1133    }
+        |}macro_rules
+1135    #[macro_export]
+        |OUTER_ATTR   |
+1136    macro_rules! table {
+        |MACRO_RULES       |macro_rules{
+1139        (
+            |macro_rule
+1141        ) => {
+                 |macro_rule{
+1143        };
+            |}macro_rule
+1146        (
+            |macro_rule
+1147            $($table_name:ident).+ {$($body:tt)*}
+                                       |macro_rule{ |}macro_rule
+1149        ) => {
+                 |macro_rule{
+1153        };
+            |}macro_rule
+1156        (
+            |macro_rule
+1157            $name:ident $(($($pk:ident),+))* {$($body:tt)*}
+                                                 |macro_rule{ |}macro_rule
+1159        ) => {
+                 |macro_rule{
+1163        };
+            |}macro_rule
+1166        (
+            |macro_rule
+1167            $($table_name:ident).+ $(($($pk:ident),+))* {$($body:tt)*}
+                                                            |macro_rule{ |}macro_rule
+1168        ) => {
+                 |macro_rule{
+1173        };
+            |}macro_rule
+1176        (
+            |macro_rule
+1179        ) => {
+                 |macro_rule{
+1183        };
+            |}macro_rule
+1186        (
+            |macro_rule
+1189        ) => {
+                 |macro_rule{
+1193        };
+            |}macro_rule
+1194    }
+        |}macro_rules
+1196    #[macro_export]
+        |OUTER_ATTR   |
+1197    #[doc(hidden)]
+        |OUTER_ATTR  |
+1198    macro_rules! table_body {
+        |MACRO_RULES            |macro_rules{
+1199        (
+            |macro_rule
+1200            $schema_name:ident . $name:ident ($pk:ident) {
+                                                             |macro_rule{
+1202            }
+                |}macro_rule
+1204        ) => {
+                 |macro_rule{
+1213        };
+            |}macro_rule
+1215        (
+            |macro_rule
+1216            $schema_name:ident . $name:ident ($($pk:ident,)+) {
+                                                                  |macro_rule{
+1218            }
+                |}macro_rule
+1220        ) => {
+                 |macro_rule{
+1229        };
+            |}macro_rule
+1231        (
+            |macro_rule
+1238        ) => {
+                 |macro_rule{
+1259        }
+            |}macro_rule
+1260    }
+        |}macro_rules
+1262    #[macro_export]
+        |OUTER_ATTR   |
+1263    #[doc(hidden)]
+        |OUTER_ATTR  |
+1264    macro_rules! __diesel_table_query_source_impl {
+        |MACRO_RULES                                  |macro_rules{
+1265        ($table_struct:ident, public, $table_name:ident) => {
+            |macro_rule                                         |macro_rule{
+1278        };
+            |}macro_rule
+1280        ($table_struct:ident, $schema_name:ident, $table_name:ident) => {
+            |macro_rule                                                     |macro_rule{
+1298        };
+            |}macro_rule
+1299    }
+        |}macro_rules
+1301    #[macro_export]
+        |OUTER_ATTR   |
+1302    #[doc(hidden)]
+        |OUTER_ATTR  |
+1303    macro_rules! joinable {
+        |MACRO_RULES          |macro_rules{
+1304        ($child:ident -> $parent:ident ($source:ident)) => {
+            |macro_rule                                        |macro_rule{
+1307        }
+            |}macro_rule
+1308    }
+        |}macro_rules
+1310    #[macro_export]
+        |OUTER_ATTR   |
+1311    #[doc(hidden)]
+        |OUTER_ATTR  |
+1312    macro_rules! joinable_inner {
+        |MACRO_RULES                |macro_rules{
+1313        ($left_table:path => $right_table:path : ($foreign_key:path = $parent_table:path)) => {
+            |macro_rule                                                                           |macro_rule{
+1322        };
+            |}macro_rule
+1324        (
+            |macro_rule
+1331        ) => {
+                 |macro_rule{
+1343        }
+            |}macro_rule
+1344    }
+        |}macro_rules
+1346    #[macro_export]
+        |OUTER_ATTR   |
+1347    #[doc(hidden)]
+        |OUTER_ATTR  |
+1348    macro_rules! join_through {
+        |MACRO_RULES              |macro_rules{
+1349        ($parent:ident -> $through:ident -> $child:ident) => {
+            |macro_rule                                          |macro_rule{
+1366        }
+            |}macro_rule
+1367    }
+        |}macro_rules
+1369    #[macro_export]
+        |OUTER_ATTR   |
+1370    macro_rules! debug_sql {
+        |MACRO_RULES           |macro_rules{
+1371        ($query:expr) => {{
+            |macro_rule      |macro_rule{
+1377        }};
+             |}macro_rule
+1378    }
+        |}macro_rules
+1380    #[macro_export]
+        |OUTER_ATTR   |
+1381    macro_rules! print_sql {
+        |MACRO_RULES           |macro_rules{
+1382        ($query:expr) => {
+            |macro_rule      |macro_rule{
+1384        };
+            |}macro_rule
+1385    }
+        |}macro_rules
+1387    fn main() {
+        |FUNCTION |func{
+1388        {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
+            |inner{
+             |inner{
+              |inner{
+               |inner{
+                |inner{
+                 |inner{
+                  |inner{
+                   |inner{
+                    |inner{
+                     |inner{
+                      |inner{
+                       |inner{
+                        |inner{
+                         |inner{
+                          |inner{
+                           |inner{
+                            |inner{
+                             |inner{
+                              |inner{
+                               |inner{
+                                |inner{
+                                 |inner{
+                                  |inner{
+                                   |inner{
+                                    |inner{
+                                     |inner{
+                                      |inner{
+                                       |inner{
+                                        |inner{
+                                         |inner{
+                                          |inner{
+                                           |inner{
+                                            |inner{
+                                             |inner{
+                                              |inner{
+                                               |inner{
+                                                |inner{
+                                                 |inner{
+                                                  |inner{
+                                                   |inner{
+                                                    |inner{
+                                                     |inner{
+                                                      |inner{
+                                                       |inner{
+                                                        |inner{
+                                                         |inner{
+                                                          |inner{
+                                                           |inner{
+                                                            |inner{
+                                                             |inner{
+                                                              |inner{
+                                                               |inner{
+                                                                |inner{
+                                                                 |inner{
+                                                                  |inner{
+                                                                   |inner{
+                                                                    |inner{
+                                                                     |inner{
+                                                                      |inner{
+                                                                       |inner{
+                                                                        |inner{
+                                                                         |inner{
+                                                                          |inner{
+                                                                           |inner{
+                                                                            |inner{
+                                                                             |inner{
+                                                                              |inner{
+                                                                               |inner{
+                                                                                |inner{
+                                                                                 |inner{
+                                                                                  |inner{
+                                                                                   |inner{
+                                                                                    |inner{
+                                                                                     |inner{
+                                                                                      |inner{
+                                                                                       |inner{
+                                                                                        |inner{
+                                                                                         |inner{
+1389        ()
+            |tuple(
+             |)tuple
+1390        }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
+            |}inner
+             |}inner
+              |}inner
+               |}inner
+                |}inner
+                 |}inner
+                  |}inner
+                   |}inner
+                    |}inner
+                     |}inner
+                      |}inner
+                       |}inner
+                        |}inner
+                         |}inner
+                          |}inner
+                           |}inner
+                            |}inner
+                             |}inner
+                              |}inner
+                               |}inner
+                                |}inner
+                                 |}inner
+                                  |}inner
+                                   |}inner
+                                    |}inner
+                                     |}inner
+                                      |}inner
+                                       |}inner
+                                        |}inner
+                                         |}inner
+                                          |}inner
+                                           |}inner
+                                            |}inner
+                                             |}inner
+                                              |}inner
+                                               |}inner
+                                                |}inner
+                                                 |}inner
+                                                  |}inner
+                                                   |}inner
+                                                    |}inner
+                                                     |}inner
+                                                      |}inner
+                                                       |}inner
+                                                        |}inner
+                                                         |}inner
+                                                          |}inner
+                                                           |}inner
+                                                            |}inner
+                                                             |}inner
+                                                              |}inner
+                                                               |}inner
+                                                                |}inner
+                                                                 |}inner
+                                                                  |}inner
+                                                                   |}inner
+                                                                    |}inner
+                                                                     |}inner
+                                                                      |}inner
+                                                                       |}inner
+                                                                        |}inner
+                                                                         |}inner
+                                                                          |}inner
+                                                                           |}inner
+                                                                            |}inner
+                                                                             |}inner
+                                                                              |}inner
+                                                                               |}inner
+                                                                                |}inner
+                                                                                 |}inner
+                                                                                  |}inner
+                                                                                   |}inner
+                                                                                    |}inner
+                                                                                     |}inner
+                                                                                      |}inner
+                                                                                       |}inner
+                                                                                        |}inner
+                                                                                         |}inner
+1391    }
+        |}func
+1392    pub type T = A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<B>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
+            |TYPE_ALIAS
+                   |assign
+1393    static i: () =
+        |VAR_DECL    |assign
+1395    ()
+        |tuple(
+         |)tuple
+1399    static j:
+        |VAR_DECL
+1403    =
+        |assign
+1409    static k:
+        |VAR_DECL
+1413    =
+        |assign
+1414    (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
+                                                                  |tuple(
+1415    1,
+        |t_elem
+1416    )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+        |)tuple
+1419    static l:
+        |VAR_DECL
+1423    =
+        |assign
+1424    (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
+        |tuple(
+         |t_elem
+         |tuple(
+          |t_elem
+          |tuple(
+           |t_elem
+           |tuple(
+            |t_elem
+            |tuple(
+             |t_elem
+             |tuple(
+              |t_elem
+              |tuple(
+               |t_elem
+               |tuple(
+                |t_elem
+                |tuple(
+                 |t_elem
+                 |tuple(
+                  |t_elem
+                  |tuple(
+                   |t_elem
+                   |tuple(
+                    |t_elem
+                    |tuple(
+                     |t_elem
+                     |tuple(
+                      |t_elem
+                      |tuple(
+                       |t_elem
+                       |tuple(
+                        |t_elem
+                        |tuple(
+                         |t_elem
+                         |tuple(
+                          |t_elem
+                          |tuple(
+                           |t_elem
+                           |tuple(
+                            |t_elem
+                            |tuple(
+                             |t_elem
+                             |tuple(
+                              |t_elem
+                              |tuple(
+                               |t_elem
+                               |tuple(
+                                |t_elem
+                                |tuple(
+                                 |t_elem
+                                 |tuple(
+                                  |t_elem
+                                  |tuple(
+                                   |t_elem
+                                   |tuple(
+                                    |t_elem
+                                    |tuple(
+                                     |t_elem
+                                     |tuple(
+                                      |t_elem
+                                      |tuple(
+                                       |t_elem
+                                       |tuple(
+                                        |t_elem
+                                        |tuple(
+                                         |t_elem
+                                         |tuple(
+                                          |t_elem
+                                          |tuple(
+                                           |t_elem
+                                           |tuple(
+                                            |t_elem
+                                            |tuple(
+                                             |t_elem
+                                             |tuple(
+                                              |t_elem
+                                              |tuple(
+                                               |t_elem
+                                               |tuple(
+                                                |t_elem
+                                                |tuple(
+                                                 |t_elem
+                                                 |tuple(
+                                                  |t_elem
+                                                  |tuple(
+                                                   |t_elem
+                                                   |tuple(
+                                                    |t_elem
+                                                    |tuple(
+                                                     |t_elem
+                                                     |tuple(
+                                                      |t_elem
+                                                      |tuple(
+                                                       |t_elem
+                                                       |tuple(
+                                                        |t_elem
+                                                        |tuple(
+                                                         |t_elem
+                                                         |tuple(
+                                                          |t_elem
+                                                          |tuple(
+                                                           |t_elem
+                                                           |tuple(
+                                                            |t_elem
+                                                            |tuple(
+                                                             |t_elem
+                                                             |tuple(
+                                                              |t_elem
+                                                              |tuple(
+                                                               |t_elem
+                                                               |tuple(
+                                                                |t_elem
+                                                                |tuple(
+                                                                 |t_elem
+                                                                 |tuple(
+                                                                  |t_elem
+                                                                  |tuple(
+1425    1,
+        |t_elem
+1426    ),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),),)
+        |)tuple
+          |)tuple
+            |)tuple
+              |)tuple
+                |)tuple
+                  |)tuple
+                    |)tuple
+                      |)tuple
+                        |)tuple
+                          |)tuple
+                            |)tuple
+                              |)tuple
+                                |)tuple
+                                  |)tuple
+                                    |)tuple
+                                      |)tuple
+                                        |)tuple
+                                          |)tuple
+                                            |)tuple
+                                              |)tuple
+                                                |)tuple
+                                                  |)tuple
+                                                    |)tuple
+                                                      |)tuple
+                                                        |)tuple
+                                                          |)tuple
+                                                            |)tuple
+                                                              |)tuple
+                                                                |)tuple
+                                                                  |)tuple
+                                                                    |)tuple
+                                                                      |)tuple
+                                                                        |)tuple
+                                                                          |)tuple
+                                                                            |)tuple
+                                                                              |)tuple
+                                                                                |)tuple
+                                                                                  |)tuple
+                                                                                    |)tuple
+                                                                                      |)tuple
+                                                                                        |)tuple
+                                                                                          |)tuple
+                                                                                            |)tuple
+                                                                                              |)tuple
+                                                                                                |)tuple
+                                                                                                  |)tuple
+                                                                                                    |)tuple
+                                                                                                      |)tuple
+                                                                                                        |)tuple
+                                                                                                          |)tuple
+                                                                                                            |)tuple
+                                                                                                              |)tuple
+                                                                                                                |)tuple
+                                                                                                                  |)tuple
+                                                                                                                    |)tuple
+                                                                                                                      |)tuple
+                                                                                                                        |)tuple
+                                                                                                                          |)tuple
+                                                                                                                            |)tuple
+1429    fn main() {}
+        |FUNCTION |func{
+                   |}func
+        |<eof>

+ 4684 - 0
jplag.frontend.rust/src/test/resources/de/jplag/rust/annotated/deno_core_runtime.rs.annotated

@@ -0,0 +1,4684 @@
+3       use rusty_v8 as v8;
+        |USE|USE_ITEM
+5       use crate::bindings;
+        |USE|USE_ITEM     |
+6       use crate::error::attach_handle_to_error;
+        |USE|USE_ITEM                          |
+7       use crate::error::generic_error;
+        |USE|USE_ITEM                 |
+8       use crate::error::AnyError;
+        |USE|USE_ITEM            |
+9       use crate::error::ErrWithV8Handle;
+        |USE|USE_ITEM                   |
+10      use crate::error::JsError;
+        |USE|USE_ITEM           |
+11      use crate::futures::FutureExt;
+        |USE|USE_ITEM               |
+12      use crate::module_specifier::ModuleSpecifier;
+        |USE|USE_ITEM                              |
+13      use crate::modules::LoadState;
+        |USE|USE_ITEM               |
+14      use crate::modules::ModuleId;
+        |USE|USE_ITEM              |
+15      use crate::modules::ModuleLoadId;
+        |USE|USE_ITEM                  |
+16      use crate::modules::ModuleLoader;
+        |USE|USE_ITEM                  |
+17      use crate::modules::ModuleSource;
+        |USE|USE_ITEM                  |
+18      use crate::modules::Modules;
+        |USE|USE_ITEM             |
+19      use crate::modules::NoopModuleLoader;
+        |USE|USE_ITEM                      |
+20      use crate::modules::PrepareLoadFuture;
+        |USE|USE_ITEM                       |
+21      use crate::modules::RecursiveModuleLoad;
+        |USE|USE_ITEM                         |
+22      use crate::ops::*;
+        |USE            |use_item
+23      use crate::shared_queue::SharedQueue;
+        |USE|USE_ITEM                      |
+24      use crate::shared_queue::RECOMMENDED_SIZE;
+        |USE|USE_ITEM                           |
+25      use crate::BufVec;
+        |USE|USE_ITEM   |
+26      use crate::OpState;
+        |USE|USE_ITEM    |
+27      use futures::channel::mpsc;
+        |USE|USE_ITEM            |
+28      use futures::future::poll_fn;
+        |USE|USE_ITEM              |
+29      use futures::stream::FuturesUnordered;
+        |USE|USE_ITEM                       |
+30      use futures::stream::StreamExt;
+        |USE|USE_ITEM                |
+31      use futures::stream::StreamFuture;
+        |USE|USE_ITEM                   |
+32      use futures::task::AtomicWaker;
+        |USE|USE_ITEM                |
+33      use futures::Future;
+        |USE|USE_ITEM     |
+34      use std::any::Any;
+        |USE|USE_ITEM   |
+35      use std::cell::Cell;
+        |USE|USE_ITEM     |
+36      use std::cell::RefCell;
+        |USE|USE_ITEM        |
+37      use std::collections::HashMap;
+        |USE|USE_ITEM               |
+38      use std::convert::TryFrom;
+        |USE|USE_ITEM           |
+39      use std::ffi::c_void;
+        |USE|USE_ITEM      |
+40      use std::mem::forget;
+        |USE|USE_ITEM      |
+41      use std::option::Option;
+        |USE|USE_ITEM         |
+42      use std::pin::Pin;
+        |USE|USE_ITEM   |
+43      use std::rc::Rc;
+        |USE|USE_ITEM |
+44      use std::sync::Once;
+        |USE|USE_ITEM     |
+45      use std::task::Context;
+        |USE|USE_ITEM        |
+46      use std::task::Poll;
+        |USE|USE_ITEM     |
+48      type PendingOpFuture = Pin<Box<dyn Future<Output = (OpId, Box<[u8]>)>>>;
+        |TYPE_ALIAS          |assign
+50      pub enum Snapshot {
+            |ENUM         |enum{
+51        Static(&'static [u8]),
+          |ENUM_ITEM
+                |tuple(
+                 |t_elem      |)tuple
+52        JustCreated(v8::StartupData),
+          |ENUM_ITEM||tuple(
+                      |T_ELEM        |)tuple
+53        Boxed(Box<[u8]>),
+          |ENUM_ITEM
+               |tuple(
+                |T_ELEM  |)tuple
+54      }
+        |}enum
+56      pub type JsErrorCreateFn = dyn Fn(JsError) -> AnyError;
+            |TYPE_ALIAS          |assign
+58      pub type GetErrorClassFn =
+            |TYPE_ALIAS          |assign
+62      #[derive(Default)]
+        |OUTER_ATTR      |
+63      struct IsolateAllocations {
+        |STRUCT                   |struct{
+64        near_heap_limit_callback_data:
+          |FIELD                      |
+66      }
+        |}struct
+78      pub struct JsRuntime {
+            |STRUCT          |struct{
+81        v8_isolate: Option<v8::OwnedIsolate>,
+          |FIELD   |
+82        snapshot_creator: Option<v8::SnapshotCreator>,
+          |FIELD         |
+83        has_snapshotted: bool,
+          |FIELD        |
+84        needs_init: bool,
+          |FIELD   |
+85        allocations: IsolateAllocations,
+          |FIELD    |
+86      }
+        |}struct
+88      struct DynImportModEvaluate {
+        |STRUCT                     |struct{
+89        module_id: ModuleId,
+          |FIELD  |
+90        promise: v8::Global<v8::Promise>,
+          |FIELD|
+91        module: v8::Global<v8::Module>,
+          |FIELD
+92      }
+        |}struct
+94      struct ModEvaluate {
+        |STRUCT            |struct{
+95        promise: v8::Global<v8::Promise>,
+          |FIELD|
+96        sender: mpsc::Sender<Result<(), AnyError>>,
+          |FIELD
+97      }
+        |}struct
+101     pub(crate) struct JsRuntimeState {
+                   |STRUCT               |struct{
+102       pub global_context: Option<v8::Global<v8::Context>>,
+          |FIELD
+103       pub(crate) shared_ab: Option<v8::Global<v8::SharedArrayBuffer>>,
+          |FIELD
+             |struct{
+                   |}struct
+104       pub(crate) js_recv_cb: Option<v8::Global<v8::Function>>,
+          |FIELD
+             |struct{
+                   |}struct
+105       pub(crate) js_macrotask_cb: Option<v8::Global<v8::Function>>,
+          |FIELD
+             |struct{
+                   |}struct
+106       pub(crate) pending_promise_exceptions:
+          |FIELD
+             |struct{
+                   |}struct
+108       pending_dyn_mod_evaluate: HashMap<ModuleLoadId, DynImportModEvaluate>,
+          |FIELD                 |
+109       pending_mod_evaluate: Option<ModEvaluate>,
+          |FIELD             |
+110       pub(crate) js_error_create_fn: Rc<JsErrorCreateFn>,
+          |FIELD
+             |struct{
+                   |}struct
+111       pub(crate) shared: SharedQueue,
+          |FIELD
+             |struct{
+                   |}struct
+112       pub(crate) pending_ops: FuturesUnordered<PendingOpFuture>,
+          |FIELD
+             |struct{
+                   |}struct
+113       pub(crate) pending_unref_ops: FuturesUnordered<PendingOpFuture>,
+          |FIELD
+             |struct{
+                   |}struct
+114       pub(crate) have_unpolled_ops: Cell<bool>,
+          |FIELD
+             |struct{
+                   |}struct
+116       pub(crate) op_state: Rc<RefCell<OpState>>,
+          |FIELD
+             |struct{
+                   |}struct
+117       pub loader: Rc<dyn ModuleLoader>,
+          |FIELD
+118       pub modules: Modules,
+          |FIELD
+119       pub(crate) dyn_import_map:
+          |FIELD
+             |struct{
+                   |}struct
+121       preparing_dyn_imports: FuturesUnordered<Pin<Box<PrepareLoadFuture>>>,
+          |FIELD              |
+122       pending_dyn_imports: FuturesUnordered<StreamFuture<RecursiveModuleLoad>>,
+          |FIELD            |
+123       waker: AtomicWaker,
+          |FIELD
+124     }
+        |}struct
+126     impl Drop for JsRuntime {
+        |IMPL                   |impl{
+127       fn drop(&mut self) {
+          |FUNCTION
+                  |PARAM  |  |func{
+128         if let Some(creator) = self.snapshot_creator.take() {
+            |IF|VAR_DECL
+                   |STRUCT()
+                        |ARG  |  |assign                     |apply
+                                                                |if{
+133           let v8_isolate = self.v8_isolate.take().unwrap();
+              |VAR_DECL      |assign               |apply   |apply
+134           forget(v8_isolate);
+                    |apply
+                     |ARG     |
+141           if self.has_snapshotted {
+              |IF                     |if{
+142             drop(creator);
+                    |apply
+                     |ARG  |
+143           }
+              |}if
+144         }
+            |}if
+145       }
+          |}func
+146     }
+        |}impl
+148     #[allow(clippy::missing_safety_doc)]
+        |OUTER_ATTR                        |
+149     pub unsafe fn v8_init() {
+                   |FUNCTION    |func{
+150       let platform = v8::new_default_platform().unwrap();
+          |VAR_DECL    |assign                   |apply   |apply
+151       v8::V8::initialize_platform(platform);
+                                     |apply
+                                      |ARG   |
+152       v8::V8::initialize();
+                            |apply
+157       let argv = vec![
+          |VAR_DECL|assign
+                     |MACRO()
+                         |macro(){
+162       ];
+          |}macro()
+163       v8::V8::set_flags_from_command_line(argv);
+                                             |apply
+                                              |ARG
+164     }
+        |}func
+166     #[derive(Default)]
+        |OUTER_ATTR      |
+167     pub struct RuntimeOptions {
+            |STRUCT               |struct{
+171       pub js_error_create_fn: Option<Rc<JsErrorCreateFn>>,
+          |FIELD
+175       pub get_error_class_fn: Option<GetErrorClassFn>,
+          |FIELD
+182       pub module_loader: Option<Rc<dyn ModuleLoader>>,
+          |FIELD
+187       pub startup_snapshot: Option<Snapshot>,
+          |FIELD
+192       pub will_snapshot: bool,
+          |FIELD
+195       pub create_params: Option<v8::CreateParams>,
+          |FIELD
+196     }
+        |}struct
+198     impl JsRuntime {
+        |IMPL          |impl{
+200       pub fn new(mut options: RuntimeOptions) -> Self {
+              |FUNCTION
+                     |PARAM                    |          |func{
+201         static DENO_INIT: Once = Once::new();
+            |VAR_DECL              |assign    |apply
+202         DENO_INIT.call_once(|| {
+                               |apply
+                                |ARG
+                                |CLOSURE
+                                   |closure{
+                                   |return
+                                   |inner{
+203           unsafe { v8_init() };
+                     |inner{  |apply
+                                 |}inner
+204         });
+            |}inner
+            |}closure
+206         let global_context;
+            |VAR_DECL
+207         let (mut isolate, maybe_snapshot_creator) = if options.will_snapshot {
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM      |T_ELEM              ||)tuple
+                                                      |assign
+                                                        |IF                      |if{
+209           assert!(options.startup_snapshot.is_none());
+              |MACRO()
+                     |macro(){                          |}macro()
+210           let mut creator =
+              |VAR_DECL       |assign
+211             v8::SnapshotCreator::new(Some(&bindings::EXTERNAL_REFERENCES));
+                                        |apply
+                                         |ARG                               |
+                                             |apply
+                                              |ARG                         |
+212           let isolate = unsafe { creator.get_owned_isolate() };
+              |VAR_DECL   |assign  |inner{                    |apply
+                                                                 |}inner
+213           let mut isolate = JsRuntime::setup_isolate(isolate);
+              |VAR_DECL       |assign                   |apply
+                                                         |ARG  |
+214           {
+              |inner{
+215             let scope = &mut v8::HandleScope::new(&mut isolate);
+                |VAR_DECL |assign                    |apply
+                                                      |ARG       |
+216             let context = bindings::initialize_context(scope);
+                |VAR_DECL   |assign                       |apply
+                                                           |ARG|
+217             global_context = v8::Global::new(scope, context);
+                               |assign          |apply
+                                                 |ARG|  |ARG  |
+218             creator.set_default_context(context);
+                                           |apply
+                                            |ARG  |
+219           }
+              |}inner
+220           (isolate, Some(creator))
+              |tuple(
+               |T_ELEM  |T_ELEM
+                            |apply
+                             |ARG  | |)tuple
+221         } else {
+            |}if
+              |ELSE|else{
+222           let mut params = options
+              |VAR_DECL      |assign
+224             .take()
+                     |apply
+225             .unwrap_or_else(v8::Isolate::create_params)
+                               |apply
+                                |ARG                     |
+226             .external_references(&**bindings::EXTERNAL_REFERENCES);
+                                    |apply
+                                     |ARG                           |
+227           let snapshot_loaded = if let Some(snapshot) = options.startup_snapshot {
+              |VAR_DECL           |assign
+                                    |IF|VAR_DECL
+                                           |STRUCT()
+                                                |ARG   |  |assign                    |if{
+228             params = match snapshot {
+                       |assign
+                         |MATCH         |match{
+229               Snapshot::Static(data) => params.snapshot_blob(data),
+                  |CASE  |
+                  |STRUCT()        |ARG                         |apply
+                                                                 |ARG
+230               Snapshot::JustCreated(data) => params.snapshot_blob(data),
+                  |CASE  |
+                  |STRUCT()             |ARG                         |apply
+                                                                      |ARG
+231               Snapshot::Boxed(data) => params.snapshot_blob(data),
+                  |CASE  |
+                  |STRUCT()       |ARG                         |apply
+                                                                |ARG
+232             };
+                |}match
+234           } else {
+              |}if
+                |ELSE|else{
+236           };
+              |else}
+238           let isolate = v8::Isolate::new(params);
+              |VAR_DECL   |assign           |apply
+                                             |ARG |
+239           let mut isolate = JsRuntime::setup_isolate(isolate);
+              |VAR_DECL       |assign                   |apply
+                                                         |ARG  |
+240           {
+              |inner{
+241             let scope = &mut v8::HandleScope::new(&mut isolate);
+                |VAR_DECL |assign                    |apply
+                                                      |ARG       |
+242             let context = if snapshot_loaded {
+                |VAR_DECL   |assign
+                              |IF                |if{
+243               v8::Context::new(scope)
+                                  |apply
+                                   |ARG|
+244             } else {
+                |}if
+                  |ELSE|else{
+247               bindings::initialize_context(scope)
+                                              |apply
+                                               |ARG|
+248             };
+                |else}
+249             global_context = v8::Global::new(scope, context);
+                               |assign          |apply
+                                                 |ARG|  |ARG  |
+250           }
+              |}inner
+251           (isolate, None)
+              |tuple(
+               |T_ELEM  |T_ELEM
+                            |)tuple
+252         };
+            |else}
+254         let loader = options
+            |VAR_DECL  |assign
+256           .unwrap_or_else(|| Rc::new(NoopModuleLoader));
+                             |apply
+                              |ARG                       |
+                              |CLOSURE
+                                 |CLOSURE{
+                                 |RETURN|apply
+                                         |ARG           ||}closure
+258         let js_error_create_fn = options
+            |VAR_DECL              |assign
+260           .unwrap_or_else(|| Rc::new(JsError::create));
+                             |apply
+                              |ARG                      |
+                              |CLOSURE
+                                 |CLOSURE{
+                                 |RETURN|apply
+                                         |ARG          ||}closure
+261         let mut op_state = OpState::default();
+            |VAR_DECL        |assign           |apply
+263         if let Some(get_error_class_fn) = options.get_error_class_fn {
+            |IF|VAR_DECL
+                   |STRUCT()
+                        |ARG             |  |assign                      |if{
+264           op_state.get_error_class_fn = get_error_class_fn;
+                                          |assign
+265         }
+            |}if
+267         isolate.set_slot(Rc::new(RefCell::new(JsRuntimeState {
+                            |apply
+                             |ARG
+                                    |apply
+                                     |ARG
+                                                 |apply
+                                                  |ARG
+                                                  |STRUCT()    |
+268           global_context: Some(global_context),
+              |ARG                               |
+                                  |apply
+                                   |ARG         |
+269           pending_promise_exceptions: HashMap::new(),
+              |ARG                                     |
+                                                      |apply
+270           pending_dyn_mod_evaluate: HashMap::new(),
+              |ARG                                   |
+                                                    |apply
+271           pending_mod_evaluate: None,
+              |ARG                     |
+272           shared_ab: None,
+              |ARG          |
+273           js_recv_cb: None,
+              |ARG           |
+274           js_macrotask_cb: None,
+              |ARG                |
+275           js_error_create_fn,
+              |ARG             |
+276           shared: SharedQueue::new(RECOMMENDED_SIZE),
+              |ARG                                     |
+                                      |apply
+                                       |ARG           |
+277           pending_ops: FuturesUnordered::new(),
+              |ARG                               |
+                                                |apply
+278           pending_unref_ops: FuturesUnordered::new(),
+              |ARG                                     |
+                                                      |apply
+279           op_state: Rc::new(RefCell::new(op_state)),
+              |ARG                                    |
+                               |apply
+                                |ARG                 |
+                                            |apply
+                                             |ARG   |
+280           have_unpolled_ops: Cell::new(false),
+              |ARG                              |
+                                          |apply
+                                           |ARG|
+281           modules: Modules::new(),
+              |ARG                  |
+                                   |apply
+282           loader,
+              |ARG |
+283           dyn_import_map: HashMap::new(),
+              |ARG                         |
+                                          |apply
+284           preparing_dyn_imports: FuturesUnordered::new(),
+              |ARG                                         |
+                                                          |apply
+285           pending_dyn_imports: FuturesUnordered::new(),
+              |ARG                                       |
+                                                        |apply
+286           waker: AtomicWaker::new(),
+              |ARG                    |
+                                     |apply
+289         Self {
+            |STRUCT()
+290           v8_isolate: Some(isolate),
+              |ARG                    |
+                              |apply
+                               |ARG  |
+291           snapshot_creator: maybe_snapshot_creator,
+              |ARG                                   |
+292           has_snapshotted: false,
+              |ARG                 |
+293           needs_init: true,
+              |ARG           |
+294           allocations: IsolateAllocations::default(),
+              |ARG                                     |
+                                                      |apply
+296       }
+          |}func
+298       pub fn global_context(&mut self) -> v8::Global<v8::Context> {
+              |FUNCTION         |PARAM  |                             |func{
+299         let state = Self::state(self.v8_isolate());
+            |VAR_DECL |assign      |apply
+                                    |ARG            |
+                                                   |apply
+300         let state = state.borrow();
+            |VAR_DECL |assign       |apply
+301         state.global_context.clone().unwrap()
+                                      |apply   |apply
+302       }
+          |}func
+304       pub fn v8_isolate(&mut self) -> &mut v8::OwnedIsolate {
+              |FUNCTION     |PARAM  |                           |func{
+305         self.v8_isolate.as_mut().unwrap()
+                                  |apply   |apply
+306       }
+          |}func
+308       fn setup_isolate(mut isolate: v8::OwnedIsolate) -> v8::OwnedIsolate {
+          |FUNCTION        |PARAM                      |                      |func{
+309         isolate.set_capture_stack_trace_for_uncaught_exceptions(true, 10);
+                                                                   |apply
+                                                                    |ARG  |ARG
+310         isolate.set_promise_reject_callback(bindings::promise_reject_callback);
+                                               |apply
+                                                |ARG                            |
+311         isolate.set_host_initialize_import_meta_object_callback(
+                                                                   |apply
+312           bindings::host_initialize_import_meta_object_callback,
+              |ARG                                                |
+314         isolate.set_host_import_module_dynamically_callback(
+                                                               |apply
+315           bindings::host_import_module_dynamically_callback,
+              |ARG                                            |
+318       }
+          |}func
+320       pub(crate) fn state(isolate: &v8::Isolate) -> Rc<RefCell<JsRuntimeState>> {
+                     |FUNCTION|PARAM              |                                 |func{
+321         let s = isolate.get_slot::<Rc<RefCell<JsRuntimeState>>>().unwrap();
+            |VAR_DECL
+                  |assign              |T_ARG                    | |apply   |apply
+322         s.clone()
+                   |apply
+323       }
+          |}func
+326       fn shared_init(&mut self) {
+          |FUNCTION      |PARAM  |  |func{
+327         if self.needs_init {
+            |IF                |if{
+328           self.needs_init = false;
+                              |assign
+330             .execute("deno:core/core.js", include_str!("core.js"))
+                        |apply
+                         |ARG              |  |ARG                  |
+                                              |MACRO()  | |macro(){ |}macro()
+331             .unwrap();
+                       |apply
+333             .execute("deno:core/error.js", include_str!("error.js"))
+                        |apply
+                         |ARG               |  |ARG                   |
+                                               |MACRO()  | |macro(){  |}macro()
+334             .unwrap();
+                       |apply
+335         }
+            |}if
+336       }
+          |}func
+340       pub fn op_state(&mut self) -> Rc<RefCell<OpState>> {
+              |FUNCTION   |PARAM  |                          |func{
+341         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+342         let state = state_rc.borrow();
+            |VAR_DECL |assign          |apply
+343         state.op_state.clone()
+                                |apply
+344       }
+          |}func
+354       pub fn execute(
+              |FUNCTION
+355         &mut self,
+            |PARAM  |
+356         js_filename: &str,
+            |PARAM          |
+357         js_source: &str,
+            |PARAM        |
+358       ) -> Result<(), AnyError> {
+                                    |func{
+359         self.shared_init();
+                            |apply
+361         let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+363         let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+365         let source = v8::String::new(scope, js_source).unwrap();
+            |VAR_DECL  |assign          |apply
+                                         |ARG|  |ARG    |        |apply
+366         let name = v8::String::new(scope, js_filename).unwrap();
+            |VAR_DECL|assign          |apply
+                                       |ARG|  |ARG      |        |apply
+367         let origin = bindings::script_origin(scope, name);
+            |VAR_DECL  |assign                  |apply
+                                                 |ARG|  |ARG
+369         let tc_scope = &mut v8::TryCatch::new(scope);
+            |VAR_DECL    |assign                 |apply
+                                                  |ARG|
+371         let script = match v8::Script::compile(tc_scope, source, Some(&origin)) {
+            |VAR_DECL  |assign
+                         |MATCH                   |apply
+                                                   |ARG   |  |ARG |  |ARG        |
+                                                                         |apply
+                                                                          |ARG  |   |match{
+372           Some(script) => script,
+              |CASE
+              |STRUCT()
+                   |ARG |
+373           None => {
+              |CASE   |inner{
+374             let exception = tc_scope.exception().unwrap();
+                |VAR_DECL     |assign             |apply   |apply
+375             return exception_to_err_result(tc_scope, exception, false);
+                |RETURN                       |apply
+                                               |ARG   |  |ARG    |  |ARG|
+376           }
+              |}inner
+377         };
+            |}match
+379         match script.run(tc_scope) {
+            |MATCH          |apply
+                             |ARG   |  |match{
+380           Some(_) => Ok(()),
+              |CASE
+              |STRUCT()
+                   |arg    |apply
+                            |ARG
+                            |tuple(
+                             |)tuple
+381           None => {
+              |CASE   |inner{
+382             assert!(tc_scope.has_caught());
+                |MACRO()
+                       |macro(){             |}macro()
+383             let exception = tc_scope.exception().unwrap();
+                |VAR_DECL     |assign             |apply   |apply
+384             exception_to_err_result(tc_scope, exception, false)
+                                       |apply
+                                        |ARG   |  |ARG    |  |ARG|
+385           }
+              |}inner
+386         }
+            |}match
+387       }
+          |}func
+395       pub fn snapshot(&mut self) -> v8::StartupData {
+              |FUNCTION   |PARAM  |                     |func{
+396         assert!(self.snapshot_creator.is_some());
+            |MACRO()
+                   |macro(){                       |}macro()
+397         let state = Self::state(self.v8_isolate());
+            |VAR_DECL |assign      |apply
+                                    |ARG            |
+                                                   |apply
+401         state.borrow_mut().global_context.take();
+                            |apply                |apply
+403         std::mem::take(&mut state.borrow_mut().modules);
+                          |apply
+                           |ARG                          |
+                                                |apply
+405         let snapshot_creator = self.snapshot_creator.as_mut().unwrap();
+            |VAR_DECL            |assign                       |apply   |apply
+406         let snapshot = snapshot_creator
+            |VAR_DECL    |assign
+407           .create_blob(v8::FunctionCodeHandling::Keep)
+                          |apply
+                           |ARG                         |
+408           .unwrap();
+                     |apply
+409         self.has_snapshotted = true;
+                                 |assign
+412       }
+          |}func
+423       pub fn register_op<F>(&mut self, name: &str, op_fn: F) -> OpId
+              |FUNCTION      |<t>
+                                |PARAM  |  |PARAM   |  |PARAM |
+426       {
+          |func{
+427         Self::state(self.v8_isolate())
+                       |apply
+                        |ARG            |
+                                       |apply
+428           .borrow_mut()
+                         |apply
+430           .borrow_mut()
+                         |apply
+432           .register_op(name, op_fn)
+                          |apply
+                           |ARG  |ARG|
+433       }
+          |}func
+440       pub fn add_near_heap_limit_callback<C>(&mut self, cb: C)
+              |FUNCTION                       |<t>
+                                                 |PARAM  |  |PARAM
+443       {
+          |func{
+444         let boxed_cb = Box::new(RefCell::new(cb));
+            |VAR_DECL    |assign   |apply
+                                    |ARG           |
+                                                |apply
+                                                 |ARG
+445         let data = boxed_cb.as_ptr() as *mut c_void;
+            |VAR_DECL|assign          |apply
+447         let prev = self
+            |VAR_DECL|assign
+450           .replace((boxed_cb, near_heap_limit_callback::<C>));
+                      |apply
+                       |ARG                                    |
+                       |tuple(
+                        |T_ELEM|  |T_ELEM                |   |t_arg
+                                                               |)tuple
+451         if let Some((_, prev_cb)) = prev {
+            |IF|VAR_DECL
+                   |STRUCT()
+                        |ARG       |
+                        |tuple
+                        |tuple(
+                         |t_elem
+                            |T_ELEM|)tuple
+                                      |assign|if{
+453             .v8_isolate()
+                           |apply
+454             .remove_near_heap_limit_callback(prev_cb, 0);
+                                                |apply
+                                                 |ARG  |  |arg
+455         }
+            |}if
+458           .v8_isolate()
+                         |apply
+459           .add_near_heap_limit_callback(near_heap_limit_callback::<C>, data);
+                                           |apply
+                                            |ARG                        |
+                                                                       |t_arg
+                                                                           |ARG
+460       }
+          |}func
+462       pub fn remove_near_heap_limit_callback(&mut self, heap_limit: usize) {
+              |FUNCTION                          |PARAM  |  |PARAM          |  |func{
+463         if let Some((_, cb)) = self.allocations.near_heap_limit_callback_data.take()
+            |IF|VAR_DECL
+                   |STRUCT()
+                        |ARG  |
+                        |tuple
+                        |tuple(
+                         |t_elem
+                            |T_ELEM
+                              |)tuple
+                                 |assign                                              |apply
+464         {
+            |if{
+466             .v8_isolate()
+                           |apply
+467             .remove_near_heap_limit_callback(cb, heap_limit);
+                                                |apply
+                                                 |ARG|ARG     |
+468         }
+            |}if
+469       }
+          |}func
+476       pub async fn run_event_loop(&mut self) -> Result<(), AnyError> {
+                    |FUNCTION         |PARAM  |                          |func{
+477         poll_fn(|cx| self.poll_event_loop(cx)).await
+                   |apply
+                    |ARG                        |
+                    |closure
+                     |PARAM
+                         |CLOSURE{
+                         |RETURN             |apply
+                                              |ARG
+                                                |}closure
+478       }
+          |}func
+481       pub fn poll_event_loop(
+              |FUNCTION
+482         &mut self,
+            |PARAM  |
+483         cx: &mut Context,
+            |PARAM         |
+484       ) -> Poll<Result<(), AnyError>> {
+                                          |func{
+485         self.shared_init();
+                            |apply
+487         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+488         {
+            |inner{
+489           let state = state_rc.borrow();
+              |VAR_DECL |assign          |apply
+490           state.waker.register(cx.waker());
+                                  |apply
+                                   |ARG     |
+                                           |apply
+491         }
+            |}inner
+494         {
+            |inner{
+495           let overflow_response = self.poll_pending_ops(cx);
+              |VAR_DECL             |assign                |apply
+                                                            |ARG
+496           self.async_op_response(overflow_response)?;
+                                    |apply
+                                     |ARG            |
+497           self.drain_macrotasks()?;
+                                   |apply
+498           self.check_promise_exceptions()?;
+                                           |apply
+499         }
+            |}inner
+502         {
+            |inner{
+503           let poll_imports = self.prepare_dyn_imports(cx)?;
+              |VAR_DECL        |assign                   |apply
+                                                          |ARG
+504           assert!(poll_imports.is_ready());
+              |MACRO()
+                     |macro(){               |}macro()
+506           let poll_imports = self.poll_dyn_imports(cx)?;
+              |VAR_DECL        |assign                |apply
+                                                       |ARG
+507           assert!(poll_imports.is_ready());
+              |MACRO()
+                     |macro(){               |}macro()
+509           self.evaluate_dyn_imports();
+                                       |apply
+511           self.check_promise_exceptions()?;
+                                           |apply
+512         }
+            |}inner
+515         self.evaluate_pending_module();
+                                        |apply
+517         let state = state_rc.borrow();
+            |VAR_DECL |assign          |apply
+518         let has_pending_ops = !state.pending_ops.is_empty();
+            |VAR_DECL           |assign                      |apply
+520         let has_pending_dyn_imports = !{
+            |VAR_DECL                   |assign
+                                           |inner{
+521           state.preparing_dyn_imports.is_empty()
+                                                  |apply
+522             && state.pending_dyn_imports.is_empty()
+                                                     |apply
+523         };
+            |}inner
+524         let has_pending_dyn_module_evaluation =
+            |VAR_DECL                             |assign
+525           !state.pending_dyn_mod_evaluate.is_empty();
+                                                      |apply
+526         let has_pending_module_evaluation = state.pending_mod_evaluate.is_some();
+            |VAR_DECL                         |assign                             |apply
+528         if !has_pending_ops
+            |IF
+532         {
+            |if{
+533           return Poll::Ready(Ok(()));
+              |RETURN           |apply
+                                 |ARG |
+                                   |apply
+                                    |ARG
+                                    |tuple(
+                                     |)tuple
+534         }
+            |}if
+538         if state.have_unpolled_ops.get() {
+            |IF                           |apply
+                                             |if{
+539           state.waker.wake();
+                              |apply
+540         }
+            |}if
+542         if has_pending_module_evaluation {
+            |IF                              |if{
+543           if has_pending_ops
+              |IF
+546           {
+              |if{
+548           } else {
+              |}if
+                |ELSE|else{
+549             let msg = "Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promise.";
+                |VAR_DECL
+                        |assign
+550             return Poll::Ready(Err(generic_error(msg)));
+                |RETURN           |apply
+                                   |ARG                  |
+                                      |apply
+                                       |ARG             |
+                                                    |apply
+                                                     |ARG
+551           }
+              |else}
+552         }
+            |}if
+554         if has_pending_dyn_module_evaluation {
+            |IF                                  |if{
+555           if has_pending_ops || has_pending_dyn_imports {
+              |IF                                           |if{
+557           } else {
+              |}if
+                |ELSE|else{
+558             let msg = "Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promise.";
+                |VAR_DECL
+                        |assign
+559             return Poll::Ready(Err(generic_error(msg)));
+                |RETURN           |apply
+                                   |ARG                  |
+                                      |apply
+                                       |ARG             |
+                                                    |apply
+                                                     |ARG
+560           }
+              |else}
+561         }
+            |}if
+564       }
+          |}func
+565     }
+        |}impl
+567     extern "C" fn near_heap_limit_callback<F>(
+                   |FUNCTION                   |<t>
+568       data: *mut c_void,
+          |PARAM          |
+569       current_heap_limit: usize,
+          |PARAM                  |
+570       initial_heap_limit: usize,
+          |PARAM                  |
+574     {
+        |func{
+575       let callback = unsafe { &mut *(data as *mut F) };
+          |VAR_DECL    |assign  |inner{                  |}inner
+576       callback(current_heap_limit, initial_heap_limit)
+                  |apply
+                   |ARG             |  |ARG             |
+577     }
+        |}func
+579     impl JsRuntimeState {
+        |IMPL               |impl{
+581       pub fn dyn_import_cb(
+              |FUNCTION
+582         &mut self,
+            |PARAM  |
+583         resolver_handle: v8::Global<v8::PromiseResolver>,
+            |PARAM                                         |
+584         specifier: &str,
+            |PARAM        |
+585         referrer: &str,
+            |PARAM       |
+586       ) {
+            |func{
+587         debug!("dyn_import specifier {} referrer {} ", specifier, referrer);
+            |MACRO()
+                  |macro(){                                                   |}macro()
+589         let load = RecursiveModuleLoad::dynamic_import(
+            |VAR_DECL|assign                              |apply
+590           self.op_state.clone(),
+              |ARG                |
+                                 |apply
+591           specifier,
+              |ARG    |
+592           referrer,
+              |ARG   |
+593           self.loader.clone(),
+              |ARG              |
+                               |apply
+595         self.dyn_import_map.insert(load.id, resolver_handle);
+                                      |apply
+                                       |ARG  |  |ARG          |
+596         self.waker.wake();
+                           |apply
+597         let fut = load.prepare().boxed_local();
+            |VAR_DECL
+                    |assign       |apply        |apply
+598         self.preparing_dyn_imports.push(fut);
+                                           |apply
+                                            |ARG
+599       }
+          |}func
+600     }
+        |}impl
+602     pub(crate) fn exception_to_err_result<'s, T>(
+                   |FUNCTION                  |<T>|<t>
+603       scope: &mut v8::HandleScope<'s>,
+          |PARAM                        |
+604       exception: v8::Local<v8::Value>,
+          |PARAM                        |
+605       in_promise: bool,
+          |PARAM         |
+606     ) -> Result<T, AnyError> {
+                                 |func{
+609       let is_terminating_exception =
+          |VAR_DECL                    |assign
+610         scope.thread_safe_handle().is_execution_terminating();
+                                    |apply                     |apply
+611       let mut exception = exception;
+          |VAR_DECL         |assign
+613       if is_terminating_exception {
+          |IF                         |if{
+618         scope.thread_safe_handle().cancel_terminate_execution();
+                                    |apply                       |apply
+621         if exception.is_null_or_undefined() {
+            |IF                              |apply
+                                                |if{
+622           let message = v8::String::new(scope, "execution terminated").unwrap();
+              |VAR_DECL   |assign          |apply
+                                            |ARG|  |ARG                 |        |apply
+623           exception = v8::Exception::error(scope, message);
+                        |assign               |apply
+                                               |ARG|  |ARG  |
+624         }
+            |}if
+625       }
+          |}if
+627       let mut js_error = JsError::from_v8_exception(scope, exception);
+          |VAR_DECL        |assign                     |apply
+                                                        |ARG|  |ARG    |
+628       if in_promise {
+          |IF           |if{
+629         js_error.message = format!(
+                             |assign
+                               |MACRO()
+                                      |macro(){
+632         );
+            |}macro()
+633       }
+          |}if
+635       let state_rc = JsRuntime::state(scope);
+          |VAR_DECL    |assign           |apply
+                                          |ARG|
+636       let state = state_rc.borrow();
+          |VAR_DECL |assign          |apply
+637       let js_error = (state.js_error_create_fn)(js_error);
+          |VAR_DECL    |assign
+                         |apply                    |apply
+                                                    |ARG   |
+639       if is_terminating_exception {
+          |IF                         |if{
+643         scope.thread_safe_handle().terminate_execution();
+                                    |apply                |apply
+644       }
+          |}if
+646       Err(js_error)
+             |apply
+              |ARG   |
+647     }
+        |}func
+650     impl JsRuntime {
+        |IMPL          |impl{
+654       fn mod_new(
+          |FUNCTION
+655         &mut self,
+            |PARAM  |
+656         main: bool,
+            |PARAM   |
+657         name: &str,
+            |PARAM   |
+658         source: &str,
+            |PARAM     |
+659       ) -> Result<ModuleId, AnyError> {
+                                          |func{
+660         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+661         let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+662         let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+664         let name_str = v8::String::new(scope, name).unwrap();
+            |VAR_DECL    |assign          |apply
+                                           |ARG|  |ARG        |apply
+665         let source_str = v8::String::new(scope, source).unwrap();
+            |VAR_DECL      |assign          |apply
+                                             |ARG|  |ARG |        |apply
+667         let origin = bindings::module_origin(scope, name_str);
+            |VAR_DECL  |assign                  |apply
+                                                 |ARG|  |ARG   |
+668         let source = v8::script_compiler::Source::new(source_str, &origin);
+            |VAR_DECL  |assign                           |apply
+                                                          |ARG     |  |ARG  |
+670         let tc_scope = &mut v8::TryCatch::new(scope);
+            |VAR_DECL    |assign                 |apply
+                                                  |ARG|
+672         let maybe_module = v8::script_compiler::compile_module(tc_scope, source);
+            |VAR_DECL        |assign                              |apply
+                                                                   |ARG   |  |ARG |
+674         if tc_scope.has_caught() {
+            |IF                   |apply
+                                     |if{
+675           assert!(maybe_module.is_none());
+              |MACRO()
+                     |macro(){              |}macro()
+676           let e = tc_scope.exception().unwrap();
+              |VAR_DECL
+                    |assign             |apply   |apply
+677           return exception_to_err_result(tc_scope, e, false);
+              |RETURN                       |apply
+                                             |ARG   |  |arg
+                                                          |ARG|
+678         }
+            |}if
+680         let module = maybe_module.unwrap();
+            |VAR_DECL  |assign              |apply
+682         let mut import_specifiers: Vec<ModuleSpecifier> = vec![];
+            |VAR_DECL                                       |assign
+                                                              |MACRO()
+                                                                  |macro(){
+                                                                   |}macro()
+683         for i in 0..module.get_module_requests_length() {
+            |FOR                                         |apply
+                                                            |for{
+684           let import_specifier =
+              |VAR_DECL            |assign
+685             module.get_module_request(i).to_rust_string_lossy(tc_scope);
+                                         |apply
+                                          |arg                   |apply
+                                                                  |ARG   |
+686           let state = state_rc.borrow();
+              |VAR_DECL |assign          |apply
+687           let module_specifier = state.loader.resolve(
+              |VAR_DECL            |assign               |apply
+688             state.op_state.clone(),
+                |ARG                 |
+                                    |apply
+689             &import_specifier,
+                |ARG            |
+690             name,
+                |ARG
+691             false,
+                |ARG|
+693           import_specifiers.push(module_specifier);
+                                    |apply
+                                     |ARG           |
+694         }
+            |}for
+696         let id = state_rc.borrow_mut().modules.register(
+            |VAR_DECL
+                   |assign              |apply             |apply
+697           name,
+              |ARG
+698           main,
+              |ARG
+699           v8::Global::<v8::Module>::new(tc_scope, module),
+              |ARG                                          |
+                           |T_ARG   |      |apply
+                                            |ARG   |  |ARG |
+700           import_specifiers,
+              |ARG            |
+703         Ok(id)
+              |apply
+               |ARG
+704       }
+          |}func
+711       fn mod_instantiate(&mut self, id: ModuleId) -> Result<(), AnyError> {
+          |FUNCTION          |PARAM  |  |PARAM     |                          |func{
+712         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+713         let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+715         let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+716         let tc_scope = &mut v8::TryCatch::new(scope);
+            |VAR_DECL    |assign                 |apply
+                                                  |ARG|
+718         let module = state_rc
+            |VAR_DECL  |assign
+719           .borrow()
+                     |apply
+721           .get_handle(id)
+                         |apply
+                          |ARG
+722           .map(|handle| v8::Local::new(tc_scope, handle))
+                  |apply
+                   |ARG                                    |
+                   |closure
+                    |PARAM  |CLOSURE{
+                            |RETURN       |apply
+                                           |ARG   |  |ARG ||}closure
+723           .expect("ModuleInfo not found");
+                     |apply
+                      |ARG                 |
+725         if module.get_status() == v8::ModuleStatus::Errored {
+            |IF                 |apply                          |if{
+726           exception_to_err_result(tc_scope, module.get_exception(), false)?
+                                     |apply
+                                      |ARG   |  |ARG                 |
+                                                                    |apply
+                                                                        |ARG|
+727         }
+            |}if
+729         let result =
+            |VAR_DECL  |assign
+730           module.instantiate_module(tc_scope, bindings::module_resolve_callback);
+                                       |apply
+                                        |ARG   |  |ARG                            |
+731         match result {
+            |MATCH       |match{
+732           Some(_) => Ok(()),
+              |CASE
+              |STRUCT()
+                   |arg    |apply
+                            |ARG
+                            |tuple(
+                             |)tuple
+733           None => {
+              |CASE   |inner{
+734             let exception = tc_scope.exception().unwrap();
+                |VAR_DECL     |assign             |apply   |apply
+735             exception_to_err_result(tc_scope, exception, false)
+                                       |apply
+                                        |ARG   |  |ARG    |  |ARG|
+736           }
+              |}inner
+737         }
+            |}match
+738       }
+          |}func
+745       pub fn dyn_mod_evaluate(
+              |FUNCTION
+746         &mut self,
+            |PARAM  |
+747         load_id: ModuleLoadId,
+            |PARAM              |
+748         id: ModuleId,
+            |PARAM     |
+749       ) -> Result<(), AnyError> {
+                                    |func{
+750         self.shared_init();
+                            |apply
+752         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+753         let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+754         let context1 = self.global_context();
+            |VAR_DECL    |assign              |apply
+756         let module_handle = state_rc
+            |VAR_DECL         |assign
+757           .borrow()
+                     |apply
+759           .get_handle(id)
+                         |apply
+                          |ARG
+760           .expect("ModuleInfo not found");
+                     |apply
+                      |ARG                 |
+762         let status = {
+            |VAR_DECL  |assign
+                         |inner{
+763           let scope =
+              |VAR_DECL |assign
+764             &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+                                                  |apply
+                                                   |ARG            |
+                                                                  |apply
+                                                                      |ARG  |
+765           let module = module_handle.get(scope);
+              |VAR_DECL  |assign            |apply
+                                             |ARG|
+766           module.get_status()
+                               |apply
+767         };
+            |}inner
+769         if status == v8::ModuleStatus::Instantiated {
+            |IF                                         |if{
+786           let scope =
+              |VAR_DECL |assign
+787             &mut v8::HandleScope::with_context(self.v8_isolate(), context1);
+                                                  |apply
+                                                   |ARG            |
+                                                                  |apply
+                                                                      |ARG   |
+788           let module = v8::Local::new(scope, &module_handle);
+              |VAR_DECL  |assign         |apply
+                                          |ARG|  |ARG         |
+789           let maybe_value = module.evaluate(scope);
+              |VAR_DECL       |assign          |apply
+                                                |ARG|
+792           let status = module.get_status();
+              |VAR_DECL  |assign            |apply
+794           if let Some(value) = maybe_value {
+              |IF|VAR_DECL
+                     |STRUCT()
+                          |ARG|  |assign       |if{
+795             assert!(
+                |MACRO()
+                       |macro(){
+798             );
+                |}macro()
+799             let promise = v8::Local::<v8::Promise>::try_from(value)
+                |VAR_DECL   |assign       |T_ARG    |           |apply
+                                                                 |ARG|
+800               .expect("Expected to get promise as module evaluation result");
+                         |apply
+                          |ARG                                                |
+801             let promise_global = v8::Global::new(scope, promise);
+                |VAR_DECL          |assign          |apply
+                                                     |ARG|  |ARG  |
+802             let mut state = state_rc.borrow_mut();
+                |VAR_DECL     |assign              |apply
+803             state.pending_promise_exceptions.remove(&promise_global);
+                                                       |apply
+                                                        |ARG          |
+804             let promise_global = v8::Global::new(scope, promise);
+                |VAR_DECL          |assign          |apply
+                                                     |ARG|  |ARG  |
+805             let module_global = v8::Global::new(scope, module);
+                |VAR_DECL         |assign          |apply
+                                                    |ARG|  |ARG |
+807             let dyn_import_mod_evaluate = DynImportModEvaluate {
+                |VAR_DECL                   |assign
+                                              |STRUCT()          |
+808               module_id: id,
+                  |ARG        |
+809               promise: promise_global,
+                  |ARG                  |
+810               module: module_global,
+                  |ARG                |
+815               .insert(load_id, dyn_import_mod_evaluate);
+                         |apply
+                          |ARG  |  |ARG                  |
+816           } else {
+              |}if
+                |ELSE|else{
+817             assert!(status == v8::ModuleStatus::Errored);
+                |MACRO()
+                       |macro(){                           |}macro()
+818           }
+              |else}
+819         }
+            |}if
+821         if status == v8::ModuleStatus::Evaluated {
+            |IF                                      |if{
+822           self.dyn_import_done(load_id, id);
+                                  |apply
+                                   |ARG  |  |ARG
+823         }
+            |}if
+825         Ok(())
+              |apply
+               |ARG
+               |tuple(
+                |)tuple
+826       }
+          |}func
+833       fn mod_evaluate_inner(
+          |FUNCTION
+834         &mut self,
+            |PARAM  |
+835         id: ModuleId,
+            |PARAM     |
+836       ) -> mpsc::Receiver<Result<(), AnyError>> {
+                                                    |func{
+837         self.shared_init();
+                            |apply
+839         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+840         let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+842         let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+844         let module = state_rc
+            |VAR_DECL  |assign
+845           .borrow()
+                     |apply
+847           .get_handle(id)
+                         |apply
+                          |ARG
+848           .map(|handle| v8::Local::new(scope, handle))
+                  |apply
+                   |ARG                                 |
+                   |closure
+                    |PARAM  |CLOSURE{
+                            |RETURN       |apply
+                                           |ARG|  |ARG ||}closure
+849           .expect("ModuleInfo not found");
+                     |apply
+                      |ARG                 |
+850         let mut status = module.get_status();
+            |VAR_DECL      |assign            |apply
+852         let (sender, receiver) = mpsc::channel(1);
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM |T_ELEM||)tuple
+                                   |assign        |apply
+                                                   |arg
+854         if status == v8::ModuleStatus::Instantiated {
+            |IF                                         |if{
+871           let maybe_value = module.evaluate(scope);
+              |VAR_DECL       |assign          |apply
+                                                |ARG|
+874           status = module.get_status();
+                     |assign            |apply
+876           if let Some(value) = maybe_value {
+              |IF|VAR_DECL
+                     |STRUCT()
+                          |ARG|  |assign       |if{
+877             assert!(
+                |MACRO()
+                       |macro(){
+880             );
+                |}macro()
+881             let promise = v8::Local::<v8::Promise>::try_from(value)
+                |VAR_DECL   |assign       |T_ARG    |           |apply
+                                                                 |ARG|
+882               .expect("Expected to get promise as module evaluation result");
+                         |apply
+                          |ARG                                                |
+883             let promise_global = v8::Global::new(scope, promise);
+                |VAR_DECL          |assign          |apply
+                                                     |ARG|  |ARG  |
+884             let mut state = state_rc.borrow_mut();
+                |VAR_DECL     |assign              |apply
+885             state.pending_promise_exceptions.remove(&promise_global);
+                                                       |apply
+                                                        |ARG          |
+886             let promise_global = v8::Global::new(scope, promise);
+                |VAR_DECL          |assign          |apply
+                                                     |ARG|  |ARG  |
+887             assert!(
+                |MACRO()
+                       |macro(){
+890             );
+                |}macro()
+892             state.pending_mod_evaluate = Some(ModEvaluate {
+                                           |assign
+                                                 |apply
+                                                  |ARG
+                                                  |STRUCT() |
+893               promise: promise_global,
+                  |ARG                  |
+894               sender,
+                  |ARG |
+896             scope.perform_microtask_checkpoint();
+                                                  |apply
+897           } else {
+              |}if
+                |ELSE|else{
+898             assert!(status == v8::ModuleStatus::Errored);
+                |MACRO()
+                       |macro(){                           |}macro()
+899           }
+              |else}
+900         }
+            |}if
+903       }
+          |}func
+905       pub async fn mod_evaluate(&mut self, id: ModuleId) -> Result<(), AnyError> {
+                    |FUNCTION       |PARAM  |  |PARAM     |                          |func{
+906         let mut receiver = self.mod_evaluate_inner(id);
+            |VAR_DECL        |assign                  |apply
+                                                       |ARG
+908         poll_fn(|cx| {
+                   |apply
+                    |ARG
+                    |closure
+                     |PARAM
+                         |closure{
+                         |return
+                         |inner{
+909           if let Poll::Ready(maybe_result) = receiver.poll_next_unpin(cx) {
+              |IF|VAR_DECL
+                     |STRUCT()   |ARG       |  |assign                   |apply
+                                                                          |ARG|if{
+910             debug!("received module evaluate {:#?}", maybe_result);
+                |MACRO()
+                      |macro(){                                      |}macro()
+914             let result = maybe_result.unwrap_or(Ok(()));
+                |VAR_DECL  |assign                 |apply
+                                                    |ARG |
+                                                      |apply
+                                                       |ARG
+                                                       |tuple(
+                                                        |)tuple
+915             return Poll::Ready(result);
+                |RETURN           |apply
+                                   |ARG |
+916           }
+              |}if
+917           let _r = self.poll_event_loop(cx)?;
+              |VAR_DECL
+                     |assign               |apply
+                                            |ARG
+919         })
+            |}inner
+            |}closure
+921       }
+          |}func
+923       fn dyn_import_error(&mut self, id: ModuleLoadId, err: AnyError) {
+          |FUNCTION           |PARAM  |  |PARAM         |  |PARAM      |  |func{
+924         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+925         let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+927         let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+929         let resolver_handle = state_rc
+            |VAR_DECL           |assign
+930           .borrow_mut()
+                         |apply
+932           .remove(&id)
+                     |apply
+                      |ARG
+933           .expect("Invalid dyn import id");
+                     |apply
+                      |ARG                  |
+934         let resolver = resolver_handle.get(scope);
+            |VAR_DECL    |assign              |apply
+                                               |ARG|
+936         let exception = err
+            |VAR_DECL     |assign
+937           .downcast_ref::<ErrWithV8Handle>()
+                              |T_ARG        | |apply
+938           .map(|err| err.get_handle(scope))
+                  |apply
+                   |ARG                      |
+                   |closure
+                    |PARAM
+                         |CLOSURE{
+                         |RETURN       |apply
+                                        |ARG||}closure
+939           .unwrap_or_else(|| {
+                             |apply
+                              |ARG
+                              |CLOSURE
+                                 |closure{
+                                 |return
+                                 |inner{
+940             let message = err.to_string();
+                |VAR_DECL   |assign        |apply
+941             let message = v8::String::new(scope, &message).unwrap();
+                |VAR_DECL   |assign          |apply
+                                              |ARG|  |ARG   |        |apply
+942             v8::Exception::type_error(scope, message)
+                                         |apply
+                                          |ARG|  |ARG  |
+943           });
+              |}inner
+              |}closure
+945         resolver.reject(scope, exception).unwrap();
+                           |apply
+                            |ARG|  |ARG    |        |apply
+946         scope.perform_microtask_checkpoint();
+                                              |apply
+947       }
+          |}func
+949       fn dyn_import_done(&mut self, id: ModuleLoadId, mod_id: ModuleId) {
+          |FUNCTION          |PARAM  |  |PARAM         |  |PARAM         |  |func{
+950         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+951         let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+953         debug!("dyn_import_done {} {:?}", id, mod_id);
+            |MACRO()
+                  |macro(){                             |}macro()
+954         let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+956         let resolver_handle = state_rc
+            |VAR_DECL           |assign
+957           .borrow_mut()
+                         |apply
+959           .remove(&id)
+                     |apply
+                      |ARG
+960           .expect("Invalid dyn import id");
+                     |apply
+                      |ARG                  |
+961         let resolver = resolver_handle.get(scope);
+            |VAR_DECL    |assign              |apply
+                                               |ARG|
+963         let module = {
+            |VAR_DECL  |assign
+                         |inner{
+964           let state = state_rc.borrow();
+              |VAR_DECL |assign          |apply
+967             .get_handle(mod_id)
+                           |apply
+                            |ARG |
+968             .map(|handle| v8::Local::new(scope, handle))
+                    |apply
+                     |ARG                                 |
+                     |closure
+                      |PARAM  |CLOSURE{
+                              |RETURN       |apply
+                                             |ARG|  |ARG ||}closure
+969             .expect("Dyn import module info not found")
+                       |apply
+                        |ARG                             |
+970         };
+            |}inner
+972         assert_eq!(module.get_status(), v8::ModuleStatus::Evaluated);
+            |MACRO()| |macro(){                                        |}macro()
+974         let module_namespace = module.get_module_namespace();
+            |VAR_DECL            |assign                      |apply
+975         resolver.resolve(scope, module_namespace).unwrap();
+                            |apply
+                             |ARG|  |ARG           |        |apply
+976         scope.perform_microtask_checkpoint();
+                                              |apply
+977       }
+          |}func
+979       fn prepare_dyn_imports(
+          |FUNCTION
+980         &mut self,
+            |PARAM  |
+981         cx: &mut Context,
+            |PARAM         |
+982       ) -> Poll<Result<(), AnyError>> {
+                                          |func{
+983         let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+985         if state_rc.borrow().preparing_dyn_imports.is_empty() {
+            |IF               |apply                           |apply
+                                                                  |if{
+986           return Poll::Ready(Ok(()));
+              |RETURN           |apply
+                                 |ARG |
+                                   |apply
+                                    |ARG
+                                    |tuple(
+                                     |)tuple
+987         }
+            |}if
+989         loop {
+            |LOOP|loop{
+990           let r = {
+              |VAR_DECL
+                    |assign
+                      |inner{
+991             let mut state = state_rc.borrow_mut();
+                |VAR_DECL     |assign              |apply
+992             state.preparing_dyn_imports.poll_next_unpin(cx)
+                                                           |apply
+                                                            |ARG
+993           };
+              |}inner
+994           match r {
+              |MATCH  |match{
+995             Poll::Pending | Poll::Ready(None) => {
+                |CASE           |STRUCT()   |ARG     |inner{
+997               return Poll::Ready(Ok(()));
+                  |RETURN           |apply
+                                     |ARG |
+                                       |apply
+                                        |ARG
+                                        |tuple(
+                                         |)tuple
+998             }
+                |}inner
+999             Poll::Ready(Some(prepare_poll)) => {
+                |CASE
+                |STRUCT()   |ARG             |
+                            |STRUCT()
+                                 |ARG       |      |inner{
+1000              let dyn_import_id = prepare_poll.0;
+                  |VAR_DECL         |assign
+1001              let prepare_result = prepare_poll.1;
+                  |VAR_DECL          |assign
+1003              match prepare_result {
+                  |MATCH               |match{
+1004                Ok(load) => {
+                    |CASE
+                    |STRUCT()
+                       |ARG     |inner{
+1005                  let state = state_rc.borrow_mut();
+                      |VAR_DECL |assign              |apply
+1006                  state.pending_dyn_imports.push(load.into_future());
+                                                    |apply
+                                                     |ARG             |
+                                                                     |apply
+1007                }
+                    |}inner
+1008                Err(err) => {
+                    |CASE
+                    |STRUCT()
+                        |ARG    |inner{
+1009                  self.dyn_import_error(dyn_import_id, err);
+                                           |apply
+                                            |ARG        |  |ARG
+1010                }
+                    |}inner
+1011              }
+                  |}match
+1012            }
+                |}inner
+1013          }
+              |}match
+1014        }
+            |}loop
+1015      }
+          |}func
+1017      fn poll_dyn_imports(
+          |FUNCTION
+1018        &mut self,
+            |PARAM  |
+1019        cx: &mut Context,
+            |PARAM         |
+1020      ) -> Poll<Result<(), AnyError>> {
+                                          |func{
+1021        let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+1023        if state_rc.borrow().pending_dyn_imports.is_empty() {
+            |IF               |apply                         |apply
+                                                                |if{
+1024          return Poll::Ready(Ok(()));
+              |RETURN           |apply
+                                 |ARG |
+                                   |apply
+                                    |ARG
+                                    |tuple(
+                                     |)tuple
+1025        }
+            |}if
+1027        loop {
+            |LOOP|loop{
+1028          let poll_result = {
+              |VAR_DECL       |assign
+                                |inner{
+1029            let mut state = state_rc.borrow_mut();
+                |VAR_DECL     |assign              |apply
+1030            state.pending_dyn_imports.poll_next_unpin(cx)
+                                                         |apply
+                                                          |ARG
+1031          };
+              |}inner
+1033          match poll_result {
+              |MATCH            |match{
+1034            Poll::Pending | Poll::Ready(None) => {
+                |CASE           |STRUCT()   |ARG     |inner{
+1036              return Poll::Ready(Ok(()));
+                  |RETURN           |apply
+                                     |ARG |
+                                       |apply
+                                        |ARG
+                                        |tuple(
+                                         |)tuple
+1037            }
+                |}inner
+1038            Poll::Ready(Some(load_stream_poll)) => {
+                |CASE
+                |STRUCT()   |ARG                 |
+                            |STRUCT()
+                                 |ARG           |      |inner{
+1039              let maybe_result = load_stream_poll.0;
+                  |VAR_DECL        |assign
+1040              let mut load = load_stream_poll.1;
+                  |VAR_DECL    |assign
+1041              let dyn_import_id = load.id;
+                  |VAR_DECL         |assign
+1043              if let Some(load_stream_result) = maybe_result {
+                  |IF|VAR_DECL
+                         |STRUCT()
+                              |ARG             |  |assign        |if{
+1044                match load_stream_result {
+                    |MATCH                   |match{
+1045                  Ok(info) => {
+                      |CASE
+                      |STRUCT()
+                         |ARG     |inner{
+1049                    match self.register_during_load(info, &mut load) {
+                        |MATCH                         |apply
+                                                        |ARG  |ARG    |  |match{
+1050                      Ok(()) => {
+                          |CASE
+                          |STRUCT()
+                             |ARG
+                             |tuple
+                             |tuple(
+                              |)tuple
+                                    |inner{
+1052                        let state = state_rc.borrow_mut();
+                            |VAR_DECL |assign              |apply
+1053                        state.pending_dyn_imports.push(load.into_future());
+                                                          |apply
+                                                           |ARG             |
+                                                                           |apply
+1054                      }
+                          |}inner
+1055                      Err(err) => self.dyn_import_error(dyn_import_id, err),
+                          |CASE
+                          |STRUCT()
+                              |ARG                         |apply
+                                                            |ARG        |  |ARG
+1056                    }
+                        |}match
+1057                  }
+                      |}inner
+1058                  Err(err) => {
+                      |CASE
+                      |STRUCT()
+                          |ARG    |inner{
+1062                    self.dyn_import_error(dyn_import_id, err)
+                                             |apply
+                                              |ARG        |  |ARG
+1063                  }
+                      |}inner
+1064                }
+                    |}match
+1065              } else {
+                  |}if
+                    |ELSE|else{
+1068                let module_id = load.root_module_id.unwrap();
+                    |VAR_DECL     |assign                     |apply
+1069                self.mod_instantiate(module_id)?;
+                                        |apply
+                                         |ARG    |
+1070                self.dyn_mod_evaluate(dyn_import_id, module_id)?;
+                                         |apply
+                                          |ARG        |  |ARG    |
+1071              }
+                  |else}
+1072            }
+                |}inner
+1073          }
+              |}match
+1074        }
+            |}loop
+1075      }
+          |}func
+1090      fn evaluate_pending_module(&mut self) {
+          |FUNCTION                  |PARAM  |  |func{
+1091        let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+1093        let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+1094        {
+            |inner{
+1095          let scope =
+              |VAR_DECL |assign
+1096            &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+                                                  |apply
+                                                   |ARG            |
+                                                                  |apply
+                                                                      |ARG  |
+1098          let mut state = state_rc.borrow_mut();
+              |VAR_DECL     |assign              |apply
+1100          if let Some(module_evaluation) = state.pending_mod_evaluate.as_ref() {
+              |IF|VAR_DECL
+                     |STRUCT()
+                          |ARG            |  |assign                            |apply
+                                                                                   |if{
+1101            let promise = module_evaluation.promise.get(scope);
+                |VAR_DECL   |assign                        |apply
+                                                            |ARG|
+1102            let mut sender = module_evaluation.sender.clone();
+                |VAR_DECL      |assign                         |apply
+1103            let promise_state = promise.state();
+                |VAR_DECL         |assign        |apply
+1105            match promise_state {
+                |MATCH              |match{
+1106              v8::PromiseState::Pending => {
+                  |CASE                        |inner{
+1109              }
+                  |}inner
+1110              v8::PromiseState::Fulfilled => {
+                  |CASE                          |inner{
+1111                state.pending_mod_evaluate.take();
+                                                   |apply
+1112                scope.perform_microtask_checkpoint();
+                                                      |apply
+1113                sender.try_send(Ok(())).unwrap();
+                                   |apply
+                                    |ARG |
+                                      |apply
+                                       |ARG
+                                       |tuple(
+                                        |)tuple   |apply
+1114              }
+                  |}inner
+1115              v8::PromiseState::Rejected => {
+                  |CASE                         |inner{
+1116                let exception = promise.result(scope);
+                    |VAR_DECL     |assign         |apply
+                                                   |ARG|
+1117                state.pending_mod_evaluate.take();
+                                                   |apply
+1118                drop(state);
+                        |apply
+                         |ARG|
+1119                scope.perform_microtask_checkpoint();
+                                                      |apply
+1120                let err1 = exception_to_err_result::<()>(scope, exception, false)
+                    |VAR_DECL|assign                     |T_ARG
+                                                            |apply
+                                                             |ARG|  |ARG    |  |ARG|
+1121                  .map_err(|err| attach_handle_to_error(scope, err, exception))
+                              |apply
+                               |ARG                                              |
+                               |closure
+                                |PARAM
+                                     |CLOSURE{            |
+                                     |RETURN              ||apply
+                                                            |ARG|  |ARG |ARG    ||}closure
+1122                  .unwrap_err();
+                                 |apply
+1123                sender.try_send(Err(err1)).unwrap();
+                                   |apply
+                                    |ARG    |
+                                       |apply
+                                        |ARG         |apply
+1124              }
+                  |}inner
+1125            }
+                |}match
+1126          }
+              |}if
+1127        };
+            |}inner
+1128      }
+          |}func
+1130      fn evaluate_dyn_imports(&mut self) {
+          |FUNCTION               |PARAM  |  |func{
+1131        let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+1133        loop {
+            |LOOP|loop{
+1134          let context = self.global_context();
+              |VAR_DECL   |assign              |apply
+1135          let maybe_result = {
+              |VAR_DECL        |assign
+                                 |inner{
+1136            let scope =
+                |VAR_DECL |assign
+1137              &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+                                                    |apply
+                                                     |ARG            |
+                                                                    |apply
+                                                                        |ARG  |
+1139            let mut state = state_rc.borrow_mut();
+                |VAR_DECL     |assign              |apply
+1140            if let Some(&dyn_import_id) =
+                |IF|VAR_DECL
+                       |STRUCT()
+                            |ARG         |  |assign
+1141              state.pending_dyn_mod_evaluate.keys().next()
+                                                     |apply |apply
+1142            {
+                |if{
+1143              let handle = state
+                  |VAR_DECL  |assign
+1145                .remove(&dyn_import_id)
+                           |apply
+                            |ARG         |
+1146                .unwrap();
+                           |apply
+1147              drop(state);
+                      |apply
+                       |ARG|
+1149              let module_id = handle.module_id;
+                  |VAR_DECL     |assign
+1150              let promise = handle.promise.get(scope);
+                  |VAR_DECL   |assign             |apply
+                                                   |ARG|
+1151              let _module = handle.module.get(scope);
+                  |VAR_DECL   |assign            |apply
+                                                  |ARG|
+1153              let promise_state = promise.state();
+                  |VAR_DECL         |assign        |apply
+1155              match promise_state {
+                  |MATCH              |match{
+1156                v8::PromiseState::Pending => {
+                    |CASE                        |inner{
+1158                    .borrow_mut()
+                                   |apply
+1160                    .insert(dyn_import_id, handle);
+                               |apply
+                                |ARG        |  |ARG |
+1162                }
+                    |}inner
+1163                v8::PromiseState::Fulfilled => Some(Ok((dyn_import_id, module_id))),
+                    |CASE                              |apply
+                                                        |ARG                         |
+                                                          |apply
+                                                           |ARG                     |
+                                                           |tuple(
+                                                            |T_ELEM     |  |T_ELEM ||)tuple
+1164                v8::PromiseState::Rejected => {
+                    |CASE                         |inner{
+1165                  let exception = promise.result(scope);
+                      |VAR_DECL     |assign         |apply
+                                                     |ARG|
+1166                  let err1 = exception_to_err_result::<()>(scope, exception, false)
+                      |VAR_DECL|assign                     |T_ARG
+                                                              |apply
+                                                               |ARG|  |ARG    |  |ARG|
+1167                    .map_err(|err| attach_handle_to_error(scope, err, exception))
+                                |apply
+                                 |ARG                                              |
+                                 |closure
+                                  |PARAM
+                                       |CLOSURE{            |
+                                       |RETURN              ||apply
+                                                              |ARG|  |ARG |ARG    ||}closure
+1168                    .unwrap_err();
+                                   |apply
+1169                  Some(Err((dyn_import_id, err1)))
+                          |apply
+                           |ARG                     |
+                              |apply
+                               |ARG                |
+                               |tuple(
+                                |T_ELEM     |  |T_ELEM
+                                                   |)tuple
+1170                }
+                    |}inner
+1171              }
+                  |}match
+1172            } else {
+                |}if
+                  |ELSE|else{
+1174            }
+                |else}
+1175          };
+              |}inner
+1177          if let Some(result) = maybe_result {
+              |IF|VAR_DECL
+                     |STRUCT()
+                          |ARG |  |assign        |if{
+1178            match result {
+                |MATCH       |match{
+1179              Ok((dyn_import_id, module_id)) => {
+                  |CASE
+                  |STRUCT()
+                     |ARG                     |
+                     |tuple
+                     |tuple(
+                      |T_ELEM     |  |T_ELEM ||)tuple
+                                                    |inner{
+1180                self.dyn_import_done(dyn_import_id, module_id);
+                                        |apply
+                                         |ARG        |  |ARG    |
+1181              }
+                  |}inner
+1182              Err((dyn_import_id, err1)) => {
+                  |CASE
+                  |STRUCT()
+                      |ARG                |
+                      |tuple
+                      |tuple(
+                       |T_ELEM     |  |T_ELEM
+                                          |)tuple
+                                                |inner{
+1183                self.dyn_import_error(dyn_import_id, err1);
+                                         |apply
+                                          |ARG        |  |ARG
+1184              }
+                  |}inner
+1185            }
+                |}match
+1186          } else {
+              |}if
+                |ELSE|else{
+1187            break;
+                |BREAK
+1188          }
+              |else}
+1189        }
+            |}loop
+1190      }
+          |}func
+1192      fn register_during_load(
+          |FUNCTION
+1193        &mut self,
+            |PARAM  |
+1194        info: ModuleSource,
+            |PARAM           |
+1195        load: &mut RecursiveModuleLoad,
+            |PARAM                       |
+1196      ) -> Result<(), AnyError> {
+                                    |func{
+1197        let ModuleSource {
+            |VAR_DECL
+                |STRUCT    | |struct{
+1198          code,
+              |FIELD
+1199          module_url_specified,
+              |FIELD             |
+1200          module_url_found,
+              |FIELD         |
+1201        } = info;
+            |}struct
+              |assign
+1203        let is_main =
+            |VAR_DECL   |assign
+1204          load.state == LoadState::LoadingRoot && !load.is_dynamic_import();
+                                                                             |apply
+1205        let referrer_specifier =
+            |VAR_DECL              |assign
+1206          ModuleSpecifier::resolve_url(&module_url_found).unwrap();
+                                          |apply
+                                           |ARG            |        |apply
+1208        let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+1220        if module_url_specified != module_url_found {
+            |IF                                         |if{
+1221          let mut state = state_rc.borrow_mut();
+              |VAR_DECL     |assign              |apply
+1224            .alias(&module_url_specified, &module_url_found);
+                      |apply
+                       |ARG                |  |ARG            |
+1225        }
+            |}if
+1227        let maybe_mod_id = {
+            |VAR_DECL        |assign
+                               |inner{
+1228          let state = state_rc.borrow();
+              |VAR_DECL |assign          |apply
+1229          state.modules.get_id(&module_url_found)
+                                  |apply
+                                   |ARG            |
+1230        };
+            |}inner
+1232        let module_id = match maybe_mod_id {
+            |VAR_DECL     |assign
+                            |MATCH             |match{
+1233          Some(id) => {
+              |CASE
+              |STRUCT()
+                   |ARG   |inner{
+1235            debug!(
+                |MACRO()
+                      |macro(){
+1238            );
+                |}macro()
+1240          }
+              |}inner
+1242          None => self.mod_new(is_main, &module_url_found, &code)?,
+              |CASE               |apply
+                                   |ARG  |  |ARG            |  |ARG|
+1243        };
+            |}match
+1246        let imports = {
+            |VAR_DECL   |assign
+                          |inner{
+1247          let state_rc = Self::state(self.v8_isolate());
+              |VAR_DECL    |assign      |apply
+                                         |ARG            |
+                                                        |apply
+1248          let state = state_rc.borrow();
+              |VAR_DECL |assign          |apply
+1249          state.modules.get_children(module_id).unwrap().clone()
+                                        |apply
+                                         |ARG    |        |apply  |apply
+1250        };
+            |}inner
+1252        for module_specifier in imports {
+            |FOR                            |for{
+1253          let is_registered = {
+              |VAR_DECL         |assign
+                                  |inner{
+1254            let state_rc = Self::state(self.v8_isolate());
+                |VAR_DECL    |assign      |apply
+                                           |ARG            |
+                                                          |apply
+1255            let state = state_rc.borrow();
+                |VAR_DECL |assign          |apply
+1256            state.modules.is_registered(&module_specifier)
+                                           |apply
+                                            |ARG            |
+1257          };
+              |}inner
+1258          if !is_registered {
+              |IF               |if{
+1260              .add_import(module_specifier.to_owned(), referrer_specifier.clone());
+                             |apply
+                              |ARG                      |
+                                                       |apply
+                                                           |ARG                     |
+                                                                                   |apply
+1261          }
+              |}if
+1262        }
+            |}for
+1265        if load.state == LoadState::LoadingRoot {
+            |IF                                     |if{
+1266          load.root_module_id = Some(module_id);
+                                  |assign
+                                        |apply
+                                         |ARG    |
+1267          load.state = LoadState::LoadingImports;
+                         |assign
+1268        }
+            |}if
+1270        if load.pending.is_empty() {
+            |IF                     |apply
+                                       |if{
+1271          load.state = LoadState::Done;
+                         |assign
+1272        }
+            |}if
+1274        Ok(())
+              |apply
+               |ARG
+               |tuple(
+                |)tuple
+1275      }
+          |}func
+1281      pub async fn load_module(
+                    |FUNCTION
+1282        &mut self,
+            |PARAM  |
+1283        specifier: &ModuleSpecifier,
+            |PARAM                    |
+1284        code: Option<String>,
+            |PARAM             |
+1285      ) -> Result<ModuleId, AnyError> {
+                                          |func{
+1286        self.shared_init();
+                            |apply
+1287        let loader = {
+            |VAR_DECL  |assign
+                         |inner{
+1288          let state_rc = Self::state(self.v8_isolate());
+              |VAR_DECL    |assign      |apply
+                                         |ARG            |
+                                                        |apply
+1289          let state = state_rc.borrow();
+              |VAR_DECL |assign          |apply
+1290          state.loader.clone()
+                                |apply
+1291        };
+            |}inner
+1293        let load = RecursiveModuleLoad::main(
+            |VAR_DECL|assign                    |apply
+1294          self.op_state(),
+              |ARG          |
+                           |apply
+1295          &specifier.to_string(),
+              |ARG                 |
+                                  |apply
+1296          code,
+              |ARG
+1297          loader,
+              |ARG |
+1299        let (_load_id, prepare_result) = load.prepare().await;
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM|  |T_ELEM      ||)tuple
+                                           |assign       |apply
+1301        let mut load = prepare_result?;
+            |VAR_DECL    |assign
+1303        while let Some(info_result) = load.next().await {
+            |LOOP |VAR_DECL
+                      |STRUCT()
+                           |ARG      |  |assign    |apply   |loop{
+1304          let info = info_result?;
+              |VAR_DECL|assign
+1305          self.register_during_load(info, &mut load)?;
+                                       |apply
+                                        |ARG  |ARG    |
+1306        }
+            |}loop
+1308        let root_id = load.root_module_id.expect("Root module id empty");
+            |VAR_DECL   |assign                     |apply
+                                                     |ARG                 |
+1309        self.mod_instantiate(root_id).map(|_| root_id)
+                                |apply
+                                 |ARG  |     |apply
+                                              |ARG      |
+                                              |closure
+                                               |param
+                                                  |CLOSURE{
+                                                  |RETURN
+                                                  |}CLOSURE
+1310      }
+          |}func
+1312      fn poll_pending_ops(
+          |FUNCTION
+1313        &mut self,
+            |PARAM  |
+1314        cx: &mut Context,
+            |PARAM         |
+1315      ) -> Option<(OpId, Box<[u8]>)> {
+                                         |func{
+1316        let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+1317        let mut overflow_response: Option<(OpId, Box<[u8]>)> = None;
+            |VAR_DECL                                            |assign
+1319        loop {
+            |LOOP|loop{
+1320          let mut state = state_rc.borrow_mut();
+              |VAR_DECL     |assign              |apply
+1322          state.have_unpolled_ops.set(false);
+                                         |apply
+                                          |ARG|
+1324          let pending_r = state.pending_ops.poll_next_unpin(cx);
+              |VAR_DECL     |assign                            |apply
+                                                                |ARG
+1325          match pending_r {
+              |MATCH          |match{
+1326            Poll::Ready(None) => break,
+                |CASE
+                |STRUCT()   |ARG     |BREAK
+1327            Poll::Pending => break,
+                |CASE            |BREAK
+1328            Poll::Ready(Some((op_id, buf))) => {
+                |CASE
+                |STRUCT()   |ARG             |
+                            |STRUCT()
+                                 |ARG       |
+                                 |tuple
+                                 |tuple(
+                                  |T_ELEM|T_ELEM
+                                            |)tuple|inner{
+1329              let successful_push = state.shared.push(op_id, &buf);
+                  |VAR_DECL           |assign            |apply
+                                                          |ARG|  |ARG
+1330              if !successful_push {
+                  |IF                 |if{
+1334                overflow_response = Some((op_id, buf));
+                                      |assign
+                                            |apply
+                                             |ARG       |
+                                             |tuple(
+                                              |T_ELEM|T_ELEM
+                                                        |)tuple
+1335                break;
+                    |BREAK
+1336              }
+                  |}if
+1337            }
+                |}inner
+1338          };
+              |}match
+1339        }
+            |}loop
+1341        loop {
+            |LOOP|loop{
+1342          let mut state = state_rc.borrow_mut();
+              |VAR_DECL     |assign              |apply
+1343          let unref_r = state.pending_unref_ops.poll_next_unpin(cx);
+              |VAR_DECL   |assign                                  |apply
+                                                                    |ARG
+1344          #[allow(clippy::match_wild_err_arm)]
+              |OUTER_ATTR                        |
+1345          match unref_r {
+              |MATCH        |match{
+1346            Poll::Ready(None) => break,
+                |CASE
+                |STRUCT()   |ARG     |BREAK
+1347            Poll::Pending => break,
+                |CASE            |BREAK
+1348            Poll::Ready(Some((op_id, buf))) => {
+                |CASE
+                |STRUCT()   |ARG             |
+                            |STRUCT()
+                                 |ARG       |
+                                 |tuple
+                                 |tuple(
+                                  |T_ELEM|T_ELEM
+                                            |)tuple|inner{
+1349              let successful_push = state.shared.push(op_id, &buf);
+                  |VAR_DECL           |assign            |apply
+                                                          |ARG|  |ARG
+1350              if !successful_push {
+                  |IF                 |if{
+1354                overflow_response = Some((op_id, buf));
+                                      |assign
+                                            |apply
+                                             |ARG       |
+                                             |tuple(
+                                              |T_ELEM|T_ELEM
+                                                        |)tuple
+1355                break;
+                    |BREAK
+1356              }
+                  |}if
+1357            }
+                |}inner
+1358          };
+              |}match
+1359        }
+            |}loop
+1362      }
+          |}func
+1364      fn check_promise_exceptions(&mut self) -> Result<(), AnyError> {
+          |FUNCTION                   |PARAM  |                          |func{
+1365        let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+1366        let mut state = state_rc.borrow_mut();
+            |VAR_DECL     |assign              |apply
+1368        if state.pending_promise_exceptions.is_empty() {
+            |IF                                         |apply
+                                                           |if{
+1369          return Ok(());
+              |RETURN  |apply
+                        |ARG
+                        |tuple(
+                         |)tuple
+1370        }
+            |}if
+1372        let key = {
+            |VAR_DECL
+                    |assign
+                      |inner{
+1375            .keys()
+                     |apply
+1376            .next()
+                     |apply
+1377            .unwrap()
+                       |apply
+1378            .clone()
+                      |apply
+1379        };
+            |}inner
+1380        let handle = state.pending_promise_exceptions.remove(&key).unwrap();
+            |VAR_DECL  |assign                                  |apply
+                                                                 |ARG        |apply
+1381        drop(state);
+                |apply
+                 |ARG|
+1383        let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+1384        let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+1386        let exception = v8::Local::new(scope, handle);
+            |VAR_DECL     |assign         |apply
+                                           |ARG|  |ARG |
+1387        exception_to_err_result(scope, exception, true)
+                                   |apply
+                                    |ARG|  |ARG    |  |ARG
+1388      }
+          |}func
+1391      fn async_op_response(
+          |FUNCTION
+1392        &mut self,
+            |PARAM  |
+1393        maybe_overflown_response: Option<(OpId, Box<[u8]>)>,
+            |PARAM                                            |
+1394      ) -> Result<(), AnyError> {
+                                    |func{
+1395        let state_rc = Self::state(self.v8_isolate());
+            |VAR_DECL    |assign      |apply
+                                       |ARG            |
+                                                      |apply
+1397        let shared_queue_size = state_rc.borrow().shared.size();
+            |VAR_DECL             |assign          |apply        |apply
+1399        if shared_queue_size == 0 && maybe_overflown_response.is_none() {
+            |IF                                                          |apply
+                                                                            |if{
+1400          return Ok(());
+              |RETURN  |apply
+                        |ARG
+                        |tuple(
+                         |)tuple
+1401        }
+            |}if
+1406        let js_recv_cb_handle = state_rc
+            |VAR_DECL             |assign
+1407          .borrow()
+                     |apply
+1409          .clone()
+                    |apply
+1410          .expect("Deno.core.recv has not been called.");
+                     |apply
+                      |ARG                                |
+1412        let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+1413        let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+1414        let context = scope.get_current_context();
+            |VAR_DECL   |assign                    |apply
+1415        let global: v8::Local<v8::Value> = context.global(scope).into();
+            |VAR_DECL                        |assign         |apply
+                                                              |ARG|      |apply
+1416        let js_recv_cb = js_recv_cb_handle.get(scope);
+            |VAR_DECL      |assign                |apply
+                                                   |ARG|
+1418        let tc_scope = &mut v8::TryCatch::new(scope);
+            |VAR_DECL    |assign                 |apply
+                                                  |ARG|
+1420        if shared_queue_size > 0 {
+            |IF                      |if{
+1421          js_recv_cb.call(tc_scope, global, &[]);
+                             |apply
+                              |ARG   |  |ARG |  |ARG
+                                                 |array{
+                                                  |}array
+1423          let shared_queue_size = state_rc.borrow().shared.size();
+              |VAR_DECL             |assign          |apply        |apply
+1424          assert_eq!(shared_queue_size, 0);
+              |MACRO()| |macro(){            |}macro()
+1425        }
+            |}if
+1427        if let Some(overflown_response) = maybe_overflown_response {
+            |IF|VAR_DECL
+                   |STRUCT()
+                        |ARG             |  |assign                    |if{
+1428          let (op_id, buf) = overflown_response;
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM|T_ELEM
+                             |)tuple
+                               |assign
+1429          let op_id: v8::Local<v8::Value> =
+              |VAR_DECL                       |assign
+1430            v8::Integer::new(tc_scope, op_id as i32).into();
+                                |apply
+                                 |ARG   |  |ARG       |      |apply
+1431          let ui8: v8::Local<v8::Value> =
+              |VAR_DECL                     |assign
+1432            bindings::boxed_slice_to_uint8array(tc_scope, buf).into();
+                                                   |apply
+                                                    |ARG   |  |ARG     |apply
+1433          js_recv_cb.call(tc_scope, global, &[op_id, ui8]);
+                             |apply
+                              |ARG   |  |ARG |  |ARG        |
+                                                 |array{
+                                                  |ARRAY_ELEM
+                                                         |ARRAY_ELEM
+                                                            |}array
+1434        }
+            |}if
+1436        match tc_scope.exception() {
+            |MATCH                  |apply
+                                       |match{
+1437          None => Ok(()),
+              |CASE     |apply
+                         |ARG
+                         |tuple(
+                          |)tuple
+1438          Some(exception) => exception_to_err_result(tc_scope, exception, false),
+              |CASE
+              |STRUCT()
+                   |ARG    |                            |apply
+                                                         |ARG   |  |ARG    |  |ARG|
+1439        }
+            |}match
+1440      }
+          |}func
+1442      fn drain_macrotasks(&mut self) -> Result<(), AnyError> {
+          |FUNCTION           |PARAM  |                          |func{
+1443        let js_macrotask_cb_handle =
+            |VAR_DECL                  |assign
+1444          match &Self::state(self.v8_isolate()).borrow().js_macrotask_cb {
+              |MATCH            |apply
+                                 |ARG            |
+                                                |apply    |apply             |match{
+1445            Some(handle) => handle.clone(),
+                |CASE
+                |STRUCT()
+                     |ARG |                 |apply
+1446            None => return Ok(()),
+                |CASE   |RETURN  |apply
+                                  |ARG
+                                  |tuple(
+                                   |)tuple
+1447          };
+              |}match
+1449        let context = self.global_context();
+            |VAR_DECL   |assign              |apply
+1450        let scope = &mut v8::HandleScope::with_context(self.v8_isolate(), context);
+            |VAR_DECL |assign                             |apply
+                                                           |ARG            |
+                                                                          |apply
+                                                                              |ARG  |
+1451        let context = scope.get_current_context();
+            |VAR_DECL   |assign                    |apply
+1452        let global: v8::Local<v8::Value> = context.global(scope).into();
+            |VAR_DECL                        |assign         |apply
+                                                              |ARG|      |apply
+1453        let js_macrotask_cb = js_macrotask_cb_handle.get(scope);
+            |VAR_DECL           |assign                     |apply
+                                                             |ARG|
+1458        let tc_scope = &mut v8::TryCatch::new(scope);
+            |VAR_DECL    |assign                 |apply
+                                                  |ARG|
+1460        loop {
+            |LOOP|loop{
+1461          let is_done = js_macrotask_cb.call(tc_scope, global, &[]);
+              |VAR_DECL   |assign               |apply
+                                                 |ARG   |  |ARG |  |ARG
+                                                                    |array{
+                                                                     |}array
+1463          if let Some(exception) = tc_scope.exception() {
+              |IF|VAR_DECL
+                     |STRUCT()
+                          |ARG    |  |assign             |apply
+                                                            |if{
+1464            return exception_to_err_result(tc_scope, exception, false);
+                |RETURN                       |apply
+                                               |ARG   |  |ARG    |  |ARG|
+1465          }
+              |}if
+1467          let is_done = is_done.unwrap();
+              |VAR_DECL   |assign         |apply
+1468          if is_done.is_true() {
+              |IF               |apply
+                                   |if{
+1469            break;
+                |BREAK
+1470          }
+              |}if
+1471        }
+            |}loop
+1473        Ok(())
+              |apply
+               |ARG
+               |tuple(
+                |)tuple
+1474      }
+          |}func
+1475    }
+        |}impl
+1477    #[cfg(test)]
+        |OUTER_ATTR|
+1478    pub mod tests {
+            |MODULE   |module{
+1479      use super::*;
+          |USE       |use_item
+1480      use crate::modules::ModuleSourceFuture;
+          |USE|USE_ITEM                        |
+1481      use crate::BufVec;
+          |USE|USE_ITEM   |
+1482      use futures::future::lazy;
+          |USE|USE_ITEM           |
+1483      use futures::FutureExt;
+          |USE|USE_ITEM        |
+1484      use std::io;
+          |USE|USE_ITEM
+1485      use std::ops::FnOnce;
+          |USE|USE_ITEM      |
+1486      use std::rc::Rc;
+          |USE|USE_ITEM |
+1487      use std::sync::atomic::{AtomicUsize, Ordering};
+          |USE                    |USE_ITEM |  |USE_ITEM
+1488      use std::sync::Arc;
+          |USE|USE_ITEM    |
+1490      pub fn run_in_task<F>(f: F)
+              |FUNCTION      |<t>
+                                |PARAM
+1493      {
+          |func{
+1494        futures::executor::block_on(lazy(move |cx| f(cx)));
+                                       |apply
+                                        |ARG                |
+                                            |apply
+                                             |ARG          |
+                                             |CLOSURE
+                                                   |PARAM
+                                                       |closure{
+                                                       |return
+                                                        |apply
+                                                         |ARG
+                                                           |}closure
+1495      }
+          |}func
+1497      fn poll_until_ready(
+          |FUNCTION
+1498        runtime: &mut JsRuntime,
+            |PARAM                |
+1499        max_poll_count: usize,
+            |PARAM              |
+1500      ) -> Result<(), AnyError> {
+                                    |func{
+1501        let mut cx = Context::from_waker(futures::task::noop_waker_ref());
+            |VAR_DECL  |assign              |apply
+                                             |ARG                          |
+                                                                          |apply
+1502        for _ in 0..max_poll_count {
+            |FOR                       |for{
+1503          match runtime.poll_event_loop(&mut cx) {
+              |MATCH                       |apply
+                                            |ARG  |  |match{
+1504            Poll::Pending => continue,
+                |CASE
+1505            Poll::Ready(val) => return val,
+                |CASE
+                |STRUCT()   |ARG    |RETURN
+1506          }
+              |}match
+1507        }
+            |}for
+1508        panic!(
+            |MACRO()
+                  |macro(){
+1511        )
+            |}macro()
+1512      }
+          |}func
+1514      enum Mode {
+          |ENUM     |enum{
+1515        Async,
+            |ENUM_ITEM
+1516        AsyncUnref,
+            |ENUM_ITEM
+1517        AsyncZeroCopy(u8),
+            |ENUM_ITEM  ||tuple(
+                          |T_ELEM
+                            |)tuple
+1518        OverflowReqSync,
+            |ENUM_ITEM    |
+1519        OverflowResSync,
+            |ENUM_ITEM    |
+1520        OverflowReqAsync,
+            |ENUM_ITEM     |
+1521        OverflowResAsync,
+            |ENUM_ITEM     |
+1522      }
+          |}enum
+1524      struct TestState {
+          |STRUCT          |struct{
+1525        mode: Mode,
+            |FIELD
+1526        dispatch_count: Arc<AtomicUsize>,
+            |FIELD       |
+1527      }
+          |}struct
+1529      fn dispatch(op_state: Rc<RefCell<OpState>>, bufs: BufVec) -> Op {
+          |FUNCTION   |PARAM                       |  |PARAM     |        |func{
+1530        let op_state_ = op_state.borrow();
+            |VAR_DECL     |assign          |apply
+1531        let test_state = op_state_.borrow::<TestState>();
+            |VAR_DECL      |assign              |T_ARG  | |apply
+1532        test_state.dispatch_count.fetch_add(1, Ordering::Relaxed);
+                                               |apply
+                                                |arg
+                                                   |ARG            |
+1533        match test_state.mode {
+            |MATCH                |match{
+1534          Mode::Async => {
+              |CASE          |inner{
+1535            assert_eq!(bufs.len(), 1);
+                |MACRO()| |macro(){     |}macro()
+1536            assert_eq!(bufs[0].len(), 1);
+                |MACRO()| |macro(){        |}macro()
+1537            assert_eq!(bufs[0][0], 42);
+                |MACRO()| |macro(){      |}macro()
+1538            let buf = vec![43u8].into_boxed_slice();
+                |VAR_DECL
+                        |assign
+                          |MACRO()
+                              |macro(){
+                                   |}macro()         |apply
+1539            Op::Async(futures::future::ready(buf).boxed())
+                         |apply
+                          |ARG                              |
+                                                |apply
+                                                 |ARG      |apply
+1540          }
+              |}inner
+1541          Mode::AsyncUnref => {
+              |CASE               |inner{
+1542            assert_eq!(bufs.len(), 1);
+                |MACRO()| |macro(){     |}macro()
+1543            assert_eq!(bufs[0].len(), 1);
+                |MACRO()| |macro(){        |}macro()
+1544            assert_eq!(bufs[0][0], 42);
+                |MACRO()| |macro(){      |}macro()
+1545            let fut = async {
+                |VAR_DECL
+                        |assign |inner{
+1547              futures::future::pending::<()>().await;
+                                             |T_ARG
+                                                |apply
+1548              vec![43u8].into_boxed_slice()
+                  |MACRO()
+                      |macro(){
+                           |}macro()         |apply
+1549            };
+                |}inner
+1550            Op::AsyncUnref(fut.boxed())
+                              |apply
+                               |ARG      |
+                                        |apply
+1551          }
+              |}inner
+1552          Mode::AsyncZeroCopy(count) => {
+              |CASE
+              |STRUCT()           |ARG|     |inner{
+1553            assert_eq!(bufs.len(), count as usize);
+                |MACRO()| |macro(){                  |}macro()
+1554            bufs.iter().enumerate().for_each(|(idx, buf)| {
+                         |apply      |apply     |apply
+                                                 |ARG
+                                                 |closure
+                                                  |param
+                                                  |tuple
+                                                  |tuple(
+                                                   |T_ELEM
+                                                        |T_ELEM
+                                                           |)tuple
+                                                              |closure{
+                                                              |return
+                                                              |inner{
+1555              assert_eq!(buf.len(), 1);
+                  |MACRO()| |macro(){    |}macro()
+1556              assert_eq!(idx, buf[0] as usize);
+                  |MACRO()| |macro(){            |}macro()
+1557            });
+                |}inner
+                |}closure
+1559            let buf = vec![43u8].into_boxed_slice();
+                |VAR_DECL
+                        |assign
+                          |MACRO()
+                              |macro(){
+                                   |}macro()         |apply
+1560            Op::Async(futures::future::ready(buf).boxed())
+                         |apply
+                          |ARG                              |
+                                                |apply
+                                                 |ARG      |apply
+1561          }
+              |}inner
+1562          Mode::OverflowReqSync => {
+              |CASE                    |inner{
+1563            assert_eq!(bufs.len(), 1);
+                |MACRO()| |macro(){     |}macro()
+1564            assert_eq!(bufs[0].len(), 100 * 1024 * 1024);
+                |MACRO()| |macro(){                        |}macro()
+1565            let buf = vec![43u8].into_boxed_slice();
+                |VAR_DECL
+                        |assign
+                          |MACRO()
+                              |macro(){
+                                   |}macro()         |apply
+1566            Op::Sync(buf)
+                        |apply
+                         |ARG
+1567          }
+              |}inner
+1568          Mode::OverflowResSync => {
+              |CASE                    |inner{
+1569            assert_eq!(bufs.len(), 1);
+                |MACRO()| |macro(){     |}macro()
+1570            assert_eq!(bufs[0].len(), 1);
+                |MACRO()| |macro(){        |}macro()
+1571            assert_eq!(bufs[0][0], 42);
+                |MACRO()| |macro(){      |}macro()
+1572            let mut vec = vec![0u8; 100 * 1024 * 1024];
+                |VAR_DECL   |assign
+                              |MACRO()
+                                  |macro(){              |}macro()
+1573            vec[0] = 99;
+                       |assign
+1574            let buf = vec.into_boxed_slice();
+                |VAR_DECL
+                        |assign               |apply
+1575            Op::Sync(buf)
+                        |apply
+                         |ARG
+1576          }
+              |}inner
+1577          Mode::OverflowReqAsync => {
+              |CASE                     |inner{
+1578            assert_eq!(bufs.len(), 1);
+                |MACRO()| |macro(){     |}macro()
+1579            assert_eq!(bufs[0].len(), 100 * 1024 * 1024);
+                |MACRO()| |macro(){                        |}macro()
+1580            let buf = vec![43u8].into_boxed_slice();
+                |VAR_DECL
+                        |assign
+                          |MACRO()
+                              |macro(){
+                                   |}macro()         |apply
+1581            Op::Async(futures::future::ready(buf).boxed())
+                         |apply
+                          |ARG                              |
+                                                |apply
+                                                 |ARG      |apply
+1582          }
+              |}inner
+1583          Mode::OverflowResAsync => {
+              |CASE                     |inner{
+1584            assert_eq!(bufs.len(), 1);
+                |MACRO()| |macro(){     |}macro()
+1585            assert_eq!(bufs[0].len(), 1);
+                |MACRO()| |macro(){        |}macro()
+1586            assert_eq!(bufs[0][0], 42);
+                |MACRO()| |macro(){      |}macro()
+1587            let mut vec = vec![0u8; 100 * 1024 * 1024];
+                |VAR_DECL   |assign
+                              |MACRO()
+                                  |macro(){              |}macro()
+1588            vec[0] = 4;
+                       |assign
+1589            let buf = vec.into_boxed_slice();
+                |VAR_DECL
+                        |assign               |apply
+1590            Op::Async(futures::future::ready(buf).boxed())
+                         |apply
+                          |ARG                              |
+                                                |apply
+                                                 |ARG      |apply
+1591          }
+              |}inner
+1592        }
+            |}match
+1593      }
+          |}func
+1595      fn setup(mode: Mode) -> (JsRuntime, Arc<AtomicUsize>) {
+          |FUNCTION|PARAM   |                                   |func{
+1596        let dispatch_count = Arc::new(AtomicUsize::new(0));
+            |VAR_DECL          |assign   |apply
+                                          |ARG              |
+                                                          |apply
+                                                           |arg
+1597        let mut runtime = JsRuntime::new(Default::default());
+            |VAR_DECL       |assign         |apply
+                                             |ARG             |
+                                                             |apply
+1598        let op_state = runtime.op_state();
+            |VAR_DECL    |assign           |apply
+1599        op_state.borrow_mut().put(TestState {
+                               |apply|apply
+                                      |ARG
+                                      |STRUCT()
+1600          mode,
+              |ARG
+1601          dispatch_count: dispatch_count.clone(),
+              |ARG                                 |
+                                                  |apply
+1604        runtime.register_op("test", dispatch);
+                               |apply
+                                |ARG |  |ARG   |
+1607          .execute(
+                      |apply
+1608            "setup.js",
+                |ARG     |
+1609            r#"
+                |ARG
+1617          .unwrap();
+                     |apply
+1618        assert_eq!(dispatch_count.load(Ordering::Relaxed), 0);
+            |MACRO()| |macro(){                                 |}macro()
+1619        (runtime, dispatch_count)
+            |tuple(
+             |T_ELEM  |T_ELEM      ||)tuple
+1620      }
+          |}func
+1622      #[test]
+          |OUTER_ATTR
+1623      fn test_dispatch() {
+          |FUNCTION          |func{
+1624        let (mut runtime, dispatch_count) = setup(Mode::Async);
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM      |T_ELEM      ||)tuple
+                                              |assign|apply
+                                                      |ARG      |
+1626          .execute(
+                      |apply
+1627            "filename.js",
+                |ARG        |
+1628            r#"
+                |ARG
+1637          .unwrap();
+                     |apply
+1638        assert_eq!(dispatch_count.load(Ordering::Relaxed), 2);
+            |MACRO()| |macro(){                                 |}macro()
+1639      }
+          |}func
+1641      #[test]
+          |OUTER_ATTR
+1642      fn test_dispatch_no_zero_copy_buf() {
+          |FUNCTION                           |func{
+1643        let (mut runtime, dispatch_count) = setup(Mode::AsyncZeroCopy(0));
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM      |T_ELEM      ||)tuple
+                                              |assign|apply
+                                                      |ARG                 |
+                                                                         |apply
+                                                                          |arg
+1645          .execute(
+                      |apply
+1646            "filename.js",
+                |ARG        |
+1647            r#"
+                |ARG
+1651          .unwrap();
+                     |apply
+1652        assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+            |MACRO()| |macro(){                                 |}macro()
+1653      }
+          |}func
+1655      #[test]
+          |OUTER_ATTR
+1656      fn test_dispatch_stack_zero_copy_bufs() {
+          |FUNCTION                               |func{
+1657        let (mut runtime, dispatch_count) = setup(Mode::AsyncZeroCopy(2));
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM      |T_ELEM      ||)tuple
+                                              |assign|apply
+                                                      |ARG                 |
+                                                                         |apply
+                                                                          |arg
+1659          .execute(
+                      |apply
+1660            "filename.js",
+                |ARG        |
+1661            r#"
+                |ARG
+1667          .unwrap();
+                     |apply
+1668        assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+            |MACRO()| |macro(){                                 |}macro()
+1669      }
+          |}func
+1671      #[test]
+          |OUTER_ATTR
+1672      fn test_dispatch_heap_zero_copy_bufs() {
+          |FUNCTION                              |func{
+1673        let (mut runtime, dispatch_count) = setup(Mode::AsyncZeroCopy(5));
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM      |T_ELEM      ||)tuple
+                                              |assign|apply
+                                                      |ARG                 |
+                                                                         |apply
+                                                                          |arg
+1674        runtime.execute(
+                           |apply
+1675          "filename.js",
+              |ARG        |
+1676          r#"
+              |ARG
+1684        ).unwrap();
+                    |apply
+1685        assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+            |MACRO()| |macro(){                                 |}macro()
+1686      }
+          |}func
+1688      #[test]
+          |OUTER_ATTR
+1689      fn test_poll_async_delayed_ops() {
+          |FUNCTION                        |func{
+1690        run_in_task(|cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                             |closure{
+                             |return
+                             |inner{
+1691          let (mut runtime, dispatch_count) = setup(Mode::Async);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM      ||)tuple
+                                                |assign|apply
+                                                        |ARG      |
+1694            .execute(
+                        |apply
+1695              "setup2.js",
+                  |ARG      |
+1696              r#"
+                  |ARG
+1703            .unwrap();
+                       |apply
+1704          assert_eq!(dispatch_count.load(Ordering::Relaxed), 0);
+              |MACRO()| |macro(){                                 |}macro()
+1706            .execute(
+                        |apply
+1707              "check1.js",
+                  |ARG      |
+1708              r#"
+                  |ARG
+1715            .unwrap();
+                       |apply
+1716          assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+              |MACRO()| |macro(){                                 |}macro()
+1717          assert!(matches!(runtime.poll_event_loop(cx), Poll::Ready(Ok(_))));
+              |MACRO()
+                     |macro(){                                                 |}macro()
+1718          assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+              |MACRO()| |macro(){                                 |}macro()
+1720            .execute(
+                        |apply
+1721              "check2.js",
+                  |ARG      |
+1722              r#"
+                  |ARG
+1728            .unwrap();
+                       |apply
+1729          assert_eq!(dispatch_count.load(Ordering::Relaxed), 2);
+              |MACRO()| |macro(){                                 |}macro()
+1730          assert!(matches!(runtime.poll_event_loop(cx), Poll::Ready(Ok(_))));
+              |MACRO()
+                     |macro(){                                                 |}macro()
+1731          runtime.execute("check3.js", "assert(nrecv == 2)").unwrap();
+                             |apply
+                              |ARG      |  |ARG               |        |apply
+1732          assert_eq!(dispatch_count.load(Ordering::Relaxed), 2);
+              |MACRO()| |macro(){                                 |}macro()
+1734          assert!(matches!(runtime.poll_event_loop(cx), Poll::Ready(Ok(_))));
+              |MACRO()
+                     |macro(){                                                 |}macro()
+1735        });
+            |}inner
+            |}closure
+1736      }
+          |}func
+1738      #[test]
+          |OUTER_ATTR
+1739      fn test_poll_async_optional_ops() {
+          |FUNCTION                         |func{
+1740        run_in_task(|cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                             |closure{
+                             |return
+                             |inner{
+1741          let (mut runtime, dispatch_count) = setup(Mode::AsyncUnref);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM      ||)tuple
+                                                |assign|apply
+                                                        |ARG           |
+1743            .execute(
+                        |apply
+1744              "check1.js",
+                  |ARG      |
+1745              r#"
+                  |ARG
+1754            .unwrap();
+                       |apply
+1755          assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+              |MACRO()| |macro(){                                 |}macro()
+1758          assert!(matches!(runtime.poll_event_loop(cx), Poll::Ready(Ok(_))));
+              |MACRO()
+                     |macro(){                                                 |}macro()
+1759        })
+            |}inner
+            |}closure
+1760      }
+          |}func
+1762      #[test]
+          |OUTER_ATTR
+1763      fn terminate_execution() {
+          |FUNCTION                |func{
+1764        let (mut isolate, _dispatch_count) = setup(Mode::Async);
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM      |T_ELEM       ||)tuple
+                                               |assign|apply
+                                                       |ARG      |
+1767        let v8_isolate_handle = isolate.v8_isolate().thread_safe_handle();
+            |VAR_DECL             |assign             |apply               |apply
+1769        let terminator_thread = std::thread::spawn(move || {
+            |VAR_DECL             |assign             |apply
+                                                       |ARG
+                                                       |CLOSURE|closure{
+                                                               |return
+                                                               |inner{
+1771          std::thread::sleep(std::time::Duration::from_millis(100));
+                                |apply
+                                 |ARG                                |
+                                                                 |apply
+                                                                  |ARG
+1774          let ok = v8_isolate_handle.terminate_execution();
+              |VAR_DECL
+                     |assign                                |apply
+1775          assert!(ok);
+              |MACRO()
+                     |macro(){
+                        |}macro()
+1776        });
+            |}inner
+            |}closure
+1779        match isolate.execute("infinite_loop.js", "for(;;) {}") {
+            |MATCH               |apply
+                                  |ARG             |  |ARG       |  |match{
+1780          Ok(_) => panic!("execution should be terminated"),
+              |CASE
+              |STRUCT()
+                 |arg  |MACRO()
+                             |macro(){                        |}macro()
+1781          Err(e) => {
+              |CASE
+              |STRUCT()
+                  |arg  |inner{
+1782            assert_eq!(e.to_string(), "Uncaught Error: execution terminated")
+                |MACRO()| |macro(){                                             |}macro()
+1783          }
+              |}inner
+1784        };
+            |}match
+1790        let ok = isolate
+            |VAR_DECL
+                   |assign
+1791          .v8_isolate()
+                         |apply
+1792          .thread_safe_handle()
+                                 |apply
+1793          .cancel_terminate_execution();
+                                         |apply
+1794        assert!(ok);
+            |MACRO()
+                   |macro(){
+                      |}macro()
+1798          .execute("simple.js", "1 + 1")
+                      |apply
+                       |ARG      |  |ARG  |
+1799          .expect("execution should be possible again");
+                     |apply
+                      |ARG                               |
+1801        terminator_thread.join().unwrap();
+                                  |apply   |apply
+1802      }
+          |}func
+1804      #[test]
+          |OUTER_ATTR
+1805      fn dangling_shared_isolate() {
+          |FUNCTION                    |func{
+1806        let v8_isolate_handle = {
+            |VAR_DECL             |assign
+                                    |inner{
+1808          let (mut runtime, _dispatch_count) = setup(Mode::Async);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM       ||)tuple
+                                                 |assign|apply
+                                                         |ARG      |
+1811          runtime.v8_isolate().thread_safe_handle()
+                                |apply               |apply
+1812        };
+            |}inner
+1815        v8_isolate_handle.terminate_execution();
+                                                 |apply
+1816      }
+          |}func
+1818      #[test]
+          |OUTER_ATTR
+1819      fn overflow_req_sync() {
+          |FUNCTION              |func{
+1820        let (mut runtime, dispatch_count) = setup(Mode::OverflowReqSync);
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM      |T_ELEM      ||)tuple
+                                              |assign|apply
+                                                      |ARG                |
+1822          .execute(
+                      |apply
+1823            "overflow_req_sync.js",
+                |ARG                 |
+1824            r#"
+                |ARG
+1836          .unwrap();
+                     |apply
+1837        assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+            |MACRO()| |macro(){                                 |}macro()
+1838      }
+          |}func
+1840      #[test]
+          |OUTER_ATTR
+1841      fn overflow_res_sync() {
+          |FUNCTION              |func{
+1844        let (mut runtime, dispatch_count) = setup(Mode::OverflowResSync);
+            |VAR_DECL
+                |tuple
+                |tuple(
+                 |T_ELEM      |T_ELEM      ||)tuple
+                                              |assign|apply
+                                                      |ARG                |
+1846          .execute(
+                      |apply
+1847            "overflow_res_sync.js",
+                |ARG                 |
+1848            r#"
+                |ARG
+1860          .unwrap();
+                     |apply
+1861        assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+            |MACRO()| |macro(){                                 |}macro()
+1862      }
+          |}func
+1864      #[test]
+          |OUTER_ATTR
+1865      fn overflow_req_async() {
+          |FUNCTION               |func{
+1866        run_in_task(|cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                             |closure{
+                             |return
+                             |inner{
+1867          let (mut runtime, dispatch_count) = setup(Mode::OverflowReqAsync);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM      ||)tuple
+                                                |assign|apply
+                                                        |ARG                 |
+1869            .execute(
+                        |apply
+1870              "overflow_req_async.js",
+                  |ARG                  |
+1871              r#"
+                  |ARG
+1886            .unwrap();
+                       |apply
+1887          assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+              |MACRO()| |macro(){                                 |}macro()
+1888          assert!(matches!(runtime.poll_event_loop(cx), Poll::Ready(Ok(_))));
+              |MACRO()
+                     |macro(){                                                 |}macro()
+1890            .execute("check.js", "assert(asyncRecv == 1);")
+                        |apply
+                         |ARG     |  |ARG                    |
+1891            .unwrap();
+                       |apply
+1892        });
+            |}inner
+            |}closure
+1893      }
+          |}func
+1895      #[test]
+          |OUTER_ATTR
+1896      fn overflow_res_async() {
+          |FUNCTION               |func{
+1897        run_in_task(|_cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                              |closure{
+                              |return
+                              |inner{
+1900          let (mut runtime, dispatch_count) = setup(Mode::OverflowResAsync);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM      ||)tuple
+                                                |assign|apply
+                                                        |ARG                 |
+1902            .execute(
+                        |apply
+1903              "overflow_res_async.js",
+                  |ARG                  |
+1904              r#"
+                  |ARG
+1918            .unwrap();
+                       |apply
+1919          assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+              |MACRO()| |macro(){                                 |}macro()
+1920          poll_until_ready(&mut runtime, 3).unwrap();
+                              |apply
+                               |ARG       |  |arg     |apply
+1922            .execute("check.js", "assert(asyncRecv == 1);")
+                        |apply
+                         |ARG     |  |ARG                    |
+1923            .unwrap();
+                       |apply
+1924        });
+            |}inner
+            |}closure
+1925      }
+          |}func
+1927      #[test]
+          |OUTER_ATTR
+1928      fn overflow_res_multiple_dispatch_async() {
+          |FUNCTION                                 |func{
+1931        run_in_task(|_cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                              |closure{
+                              |return
+                              |inner{
+1932          let (mut runtime, dispatch_count) = setup(Mode::OverflowResAsync);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM      ||)tuple
+                                                |assign|apply
+                                                        |ARG                 |
+1934            .execute(
+                        |apply
+1935              "overflow_res_multiple_dispatch_async.js",
+                  |ARG                                    |
+1936              r#"
+                  |ARG
+1953            .unwrap();
+                       |apply
+1954          assert_eq!(dispatch_count.load(Ordering::Relaxed), 2);
+              |MACRO()| |macro(){                                 |}macro()
+1955          poll_until_ready(&mut runtime, 3).unwrap();
+                              |apply
+                               |ARG       |  |arg     |apply
+1957            .execute("check.js", "assert(asyncRecv == 2);")
+                        |apply
+                         |ARG     |  |ARG                    |
+1958            .unwrap();
+                       |apply
+1959        });
+            |}inner
+            |}closure
+1960      }
+          |}func
+1962      #[test]
+          |OUTER_ATTR
+1963      fn test_pre_dispatch() {
+          |FUNCTION              |func{
+1964        run_in_task(|mut cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM  |closure{
+                                 |return
+                                 |inner{
+1965          let (mut runtime, _dispatch_count) = setup(Mode::OverflowResAsync);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM       ||)tuple
+                                                 |assign|apply
+                                                         |ARG                 |
+1967            .execute(
+                        |apply
+1968              "bad_op_id.js",
+                  |ARG         |
+1969              r#"
+                  |ARG
+1979            .unwrap();
+                       |apply
+1980          if let Poll::Ready(Err(_)) = runtime.poll_event_loop(&mut cx) {
+              |IF|VAR_DECL
+                     |STRUCT()   |ARG |
+                                 |STRUCT()
+                                     |arg|assign                  |apply
+                                                                   |ARG  |  |if{
+1981            unreachable!();
+                |MACRO()  | |macro(){
+                             |}macro()
+1982          }
+              |}if
+1983        });
+            |}inner
+            |}closure
+1984      }
+          |}func
+1986      #[test]
+          |OUTER_ATTR
+1987      fn core_test_js() {
+          |FUNCTION         |func{
+1988        run_in_task(|mut cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM  |closure{
+                                 |return
+                                 |inner{
+1989          let (mut runtime, _dispatch_count) = setup(Mode::Async);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM       ||)tuple
+                                                 |assign|apply
+                                                         |ARG      |
+1991            .execute("core_test.js", include_str!("core_test.js"))
+                        |apply
+                         |ARG         |  |ARG                       |
+                                         |MACRO()  | |macro(){      |}macro()
+1992            .unwrap();
+                       |apply
+1993          if let Poll::Ready(Err(_)) = runtime.poll_event_loop(&mut cx) {
+              |IF|VAR_DECL
+                     |STRUCT()   |ARG |
+                                 |STRUCT()
+                                     |arg|assign                  |apply
+                                                                   |ARG  |  |if{
+1994            unreachable!();
+                |MACRO()  | |macro(){
+                             |}macro()
+1995          }
+              |}if
+1996        });
+            |}inner
+            |}closure
+1997      }
+          |}func
+1999      #[test]
+          |OUTER_ATTR
+2000      fn syntax_error() {
+          |FUNCTION         |func{
+2001        let mut runtime = JsRuntime::new(Default::default());
+            |VAR_DECL       |assign         |apply
+                                             |ARG             |
+                                                             |apply
+2002        let src = "hocuspocus(";
+            |VAR_DECL
+                    |assign
+2003        let r = runtime.execute("i.js", src);
+            |VAR_DECL
+                  |assign          |apply
+                                    |ARG |  |ARG
+2004        let e = r.unwrap_err();
+            |VAR_DECL
+                  |assign       |apply
+2005        let js_error = e.downcast::<JsError>().unwrap();
+            |VAR_DECL    |assign        |T_ARG| |apply   |apply
+2006        assert_eq!(js_error.end_column, Some(11));
+            |MACRO()| |macro(){                     |}macro()
+2007      }
+          |}func
+2009      #[test]
+          |OUTER_ATTR
+2010      fn test_encode_decode() {
+          |FUNCTION               |func{
+2011        run_in_task(|mut cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM  |closure{
+                                 |return
+                                 |inner{
+2012          let (mut runtime, _dispatch_count) = setup(Mode::Async);
+              |VAR_DECL
+                  |tuple
+                  |tuple(
+                   |T_ELEM      |T_ELEM       ||)tuple
+                                                 |assign|apply
+                                                         |ARG      |
+2014            .execute(
+                        |apply
+2015              "encode_decode_test.js",
+                  |ARG                  |
+2016              include_str!("encode_decode_test.js"),
+                  |ARG                                |
+                  |MACRO()  | |macro(){               |}macro()
+2018            .unwrap();
+                       |apply
+2019          if let Poll::Ready(Err(_)) = runtime.poll_event_loop(&mut cx) {
+              |IF|VAR_DECL
+                     |STRUCT()   |ARG |
+                                 |STRUCT()
+                                     |arg|assign                  |apply
+                                                                   |ARG  |  |if{
+2020            unreachable!();
+                |MACRO()  | |macro(){
+                             |}macro()
+2021          }
+              |}if
+2022        });
+            |}inner
+            |}closure
+2023      }
+          |}func
+2025      #[test]
+          |OUTER_ATTR
+2026      fn will_snapshot() {
+          |FUNCTION          |func{
+2027        let snapshot = {
+            |VAR_DECL    |assign
+                           |inner{
+2028          let mut runtime = JsRuntime::new(RuntimeOptions {
+              |VAR_DECL       |assign         |apply
+                                               |ARG
+                                               |STRUCT()    |
+2029            will_snapshot: true,
+                |ARG              |
+2030            ..Default::default()
+                                  |apply
+2032          runtime.execute("a.js", "a = 1 + 2").unwrap();
+                             |apply
+                              |ARG |  |ARG      |        |apply
+2033          runtime.snapshot()
+                              |apply
+2034        };
+            |}inner
+2036        let snapshot = Snapshot::JustCreated(snapshot);
+            |VAR_DECL    |assign                |apply
+                                                 |ARG   |
+2037        let mut runtime2 = JsRuntime::new(RuntimeOptions {
+            |VAR_DECL        |assign         |apply
+                                              |ARG
+                                              |STRUCT()    |
+2038          startup_snapshot: Some(snapshot),
+              |ARG                           |
+                                    |apply
+                                     |ARG   |
+2039          ..Default::default()
+                                |apply
+2042          .execute("check.js", "if (a != 3) throw Error('x')")
+                      |apply
+                       |ARG     |  |ARG                         |
+2043          .unwrap();
+                     |apply
+2044      }
+          |}func
+2046      #[test]
+          |OUTER_ATTR
+2047      fn test_from_boxed_snapshot() {
+          |FUNCTION                     |func{
+2048        let snapshot = {
+            |VAR_DECL    |assign
+                           |inner{
+2049          let mut runtime = JsRuntime::new(RuntimeOptions {
+              |VAR_DECL       |assign         |apply
+                                               |ARG
+                                               |STRUCT()    |
+2050            will_snapshot: true,
+                |ARG              |
+2051            ..Default::default()
+                                  |apply
+2053          runtime.execute("a.js", "a = 1 + 2").unwrap();
+                             |apply
+                              |ARG |  |ARG      |        |apply
+2054          let snap: &[u8] = &*runtime.snapshot();
+              |VAR_DECL       |assign             |apply
+2055          Vec::from(snap).into_boxed_slice()
+                       |apply
+                        |ARG                  |apply
+2056        };
+            |}inner
+2058        let snapshot = Snapshot::Boxed(snapshot);
+            |VAR_DECL    |assign          |apply
+                                           |ARG   |
+2059        let mut runtime2 = JsRuntime::new(RuntimeOptions {
+            |VAR_DECL        |assign         |apply
+                                              |ARG
+                                              |STRUCT()    |
+2060          startup_snapshot: Some(snapshot),
+              |ARG                           |
+                                    |apply
+                                     |ARG   |
+2061          ..Default::default()
+                                |apply
+2064          .execute("check.js", "if (a != 3) throw Error('x')")
+                      |apply
+                       |ARG     |  |ARG                         |
+2065          .unwrap();
+                     |apply
+2066      }
+          |}func
+2068      #[test]
+          |OUTER_ATTR
+2069      fn test_heap_limits() {
+          |FUNCTION             |func{
+2070        let create_params = v8::Isolate::create_params().heap_limits(0, 20 * 1024);
+            |VAR_DECL         |assign                     |apply        |apply
+                                                                         |arg
+                                                                            |ARG    |
+2071        let mut runtime = JsRuntime::new(RuntimeOptions {
+            |VAR_DECL       |assign         |apply
+                                             |ARG
+                                             |STRUCT()    |
+2072          create_params: Some(create_params),
+              |ARG                             |
+                                 |apply
+                                  |ARG        |
+2073          ..Default::default()
+                                |apply
+2075        let cb_handle = runtime.v8_isolate().thread_safe_handle();
+            |VAR_DECL     |assign             |apply               |apply
+2077        let callback_invoke_count = Rc::new(AtomicUsize::default());
+            |VAR_DECL                 |assign  |apply
+                                                |ARG                 |
+                                                                    |apply
+2078        let inner_invoke_count = Rc::clone(&callback_invoke_count);
+            |VAR_DECL              |assign    |apply
+                                               |ARG                 |
+2080        runtime.add_near_heap_limit_callback(
+                                                |apply
+2081          move |current_limit, _initial_limit| {
+              |ARG
+              |CLOSURE
+                    |PARAM      |  |PARAM       |  |closure{
+                                                   |return
+                                                   |inner{
+2082            inner_invoke_count.fetch_add(1, Ordering::SeqCst);
+                                            |apply
+                                             |arg
+                                                |ARG           |
+2083            cb_handle.terminate_execution();
+                                             |apply
+2085          },
+              |}inner
+              |}closure
+2087        let err = runtime
+            |VAR_DECL
+                    |assign
+2088          .execute(
+                      |apply
+2089            "script name",
+                |ARG        |
+2090            r#"let s = ""; while(true) { s += "Hello"; }"#,
+                |ARG                                         |
+2092          .expect_err("script should fail");
+                         |apply
+                          |ARG               |
+2093        assert_eq!(
+            |MACRO()| |macro(){
+2096        );
+            |}macro()
+2097        assert!(callback_invoke_count.load(Ordering::SeqCst) > 0)
+            |MACRO()
+                   |macro(){                                        |}macro()
+2098      }
+          |}func
+2100      #[test]
+          |OUTER_ATTR
+2101      fn test_heap_limit_cb_remove() {
+          |FUNCTION                      |func{
+2102        let mut runtime = JsRuntime::new(Default::default());
+            |VAR_DECL       |assign         |apply
+                                             |ARG             |
+                                                             |apply
+2104        runtime.add_near_heap_limit_callback(|current_limit, _initial_limit| {
+                                                |apply
+                                                 |ARG
+                                                 |closure
+                                                  |PARAM      |  |PARAM       |  |closure{
+                                                                                 |return
+                                                                                 |inner{
+2106        });
+            |}inner
+            |}closure
+2107        runtime.remove_near_heap_limit_callback(20 * 1024);
+                                                   |apply
+                                                    |ARG    |
+2108        assert!(runtime.allocations.near_heap_limit_callback_data.is_none());
+            |MACRO()
+                   |macro(){                                                   |}macro()
+2109      }
+          |}func
+2111      #[test]
+          |OUTER_ATTR
+2112      fn test_heap_limit_cb_multiple() {
+          |FUNCTION                        |func{
+2113        let create_params = v8::Isolate::create_params().heap_limits(0, 20 * 1024);
+            |VAR_DECL         |assign                     |apply        |apply
+                                                                         |arg
+                                                                            |ARG    |
+2114        let mut runtime = JsRuntime::new(RuntimeOptions {
+            |VAR_DECL       |assign         |apply
+                                             |ARG
+                                             |STRUCT()    |
+2115          create_params: Some(create_params),
+              |ARG                             |
+                                 |apply
+                                  |ARG        |
+2116          ..Default::default()
+                                |apply
+2118        let cb_handle = runtime.v8_isolate().thread_safe_handle();
+            |VAR_DECL     |assign             |apply               |apply
+2120        let callback_invoke_count_first = Rc::new(AtomicUsize::default());
+            |VAR_DECL                       |assign  |apply
+                                                      |ARG                 |
+                                                                          |apply
+2121        let inner_invoke_count_first = Rc::clone(&callback_invoke_count_first);
+            |VAR_DECL                    |assign    |apply
+                                                     |ARG                       |
+2122        runtime.add_near_heap_limit_callback(
+                                                |apply
+2123          move |current_limit, _initial_limit| {
+              |ARG
+              |CLOSURE
+                    |PARAM      |  |PARAM       |  |closure{
+                                                   |return
+                                                   |inner{
+2124            inner_invoke_count_first.fetch_add(1, Ordering::SeqCst);
+                                                  |apply
+                                                   |arg
+                                                      |ARG           |
+2126          },
+              |}inner
+              |}closure
+2129        let callback_invoke_count_second = Rc::new(AtomicUsize::default());
+            |VAR_DECL                        |assign  |apply
+                                                       |ARG                 |
+                                                                           |apply
+2130        let inner_invoke_count_second = Rc::clone(&callback_invoke_count_second);
+            |VAR_DECL                     |assign    |apply
+                                                      |ARG                        |
+2131        runtime.add_near_heap_limit_callback(
+                                                |apply
+2132          move |current_limit, _initial_limit| {
+              |ARG
+              |CLOSURE
+                    |PARAM      |  |PARAM       |  |closure{
+                                                   |return
+                                                   |inner{
+2133            inner_invoke_count_second.fetch_add(1, Ordering::SeqCst);
+                                                   |apply
+                                                    |arg
+                                                       |ARG           |
+2134            cb_handle.terminate_execution();
+                                             |apply
+2136          },
+              |}inner
+              |}closure
+2139        let err = runtime
+            |VAR_DECL
+                    |assign
+2140          .execute(
+                      |apply
+2141            "script name",
+                |ARG        |
+2142            r#"let s = ""; while(true) { s += "Hello"; }"#,
+                |ARG                                         |
+2144          .expect_err("script should fail");
+                         |apply
+                          |ARG               |
+2145        assert_eq!(
+            |MACRO()| |macro(){
+2148        );
+            |}macro()
+2149        assert_eq!(0, callback_invoke_count_first.load(Ordering::SeqCst));
+            |MACRO()| |macro(){                                             |}macro()
+2150        assert!(callback_invoke_count_second.load(Ordering::SeqCst) > 0);
+            |MACRO()
+                   |macro(){                                               |}macro()
+2151      }
+          |}func
+2153      #[test]
+          |OUTER_ATTR
+2154      fn test_mods() {
+          |FUNCTION      |func{
+2155        #[derive(Default)]
+            |OUTER_ATTR      |
+2156        struct ModsLoader {
+            |STRUCT           |struct{
+2157          pub count: Arc<AtomicUsize>,
+              |FIELD
+2158        }
+            |}struct
+2160        impl ModuleLoader for ModsLoader {
+            |IMPL                            |impl{
+2161          fn resolve(
+              |FUNCTION
+2162            &self,
+                |PARAM
+2163            _op_state: Rc<RefCell<OpState>>,
+                |PARAM                        |
+2164            specifier: &str,
+                |PARAM        |
+2165            referrer: &str,
+                |PARAM       |
+2166            _is_main: bool,
+                |PARAM       |
+2167          ) -> Result<ModuleSpecifier, AnyError> {
+                                                     |func{
+2168            self.count.fetch_add(1, Ordering::Relaxed);
+                                    |apply
+                                     |arg
+                                        |ARG            |
+2169            assert_eq!(specifier, "./b.js");
+                |MACRO()| |macro(){           |}macro()
+2170            assert_eq!(referrer, "file:///a.js");
+                |MACRO()| |macro(){                |}macro()
+2171            let s = ModuleSpecifier::resolve_import(specifier, referrer).unwrap();
+                |VAR_DECL
+                      |assign                          |apply
+                                                        |ARG    |  |ARG   |        |apply
+2172            Ok(s)
+                  |apply
+                   |arg
+2173          }
+              |}func
+2175          fn load(
+              |FUNCTION
+2176            &self,
+                |PARAM
+2177            _op_state: Rc<RefCell<OpState>>,
+                |PARAM                        |
+2178            _module_specifier: &ModuleSpecifier,
+                |PARAM                            |
+2179            _maybe_referrer: Option<ModuleSpecifier>,
+                |PARAM                                 |
+2180            _is_dyn_import: bool,
+                |PARAM             |
+2181          ) -> Pin<Box<ModuleSourceFuture>> {
+                                                |func{
+2182            unreachable!()
+                |MACRO()  | |macro(){
+                             |}macro()
+2183          }
+              |}func
+2184        }
+            |}impl
+2186        let loader = Rc::new(ModsLoader::default());
+            |VAR_DECL  |assign  |apply
+                                 |ARG                |
+                                                    |apply
+2188        let resolve_count = loader.count.clone();
+            |VAR_DECL         |assign             |apply
+2189        let dispatch_count = Arc::new(AtomicUsize::new(0));
+            |VAR_DECL          |assign   |apply
+                                          |ARG              |
+                                                          |apply
+                                                           |arg
+2190        let dispatch_count_ = dispatch_count.clone();
+            |VAR_DECL           |assign               |apply
+2192        let dispatcher = move |_state: Rc<RefCell<OpState>>, bufs: BufVec| -> Op {
+            |VAR_DECL      |assign
+                             |CLOSURE
+                                   |PARAM                        |PARAM              |closure{
+2193          dispatch_count_.fetch_add(1, Ordering::Relaxed);
+                                       |apply
+                                        |arg
+                                           |ARG            |
+2194          assert_eq!(bufs.len(), 1);
+              |MACRO()| |macro(){     |}macro()
+2195          assert_eq!(bufs[0].len(), 1);
+              |MACRO()| |macro(){        |}macro()
+2196          assert_eq!(bufs[0][0], 42);
+              |MACRO()| |macro(){      |}macro()
+2197          let buf = [43u8, 0, 0, 0][..].into();
+              |VAR_DECL
+                      |assign
+                        |array{
+                         |ARRAY_ELEM
+                               |array_elem
+                                  |array_elem
+                                     |array_elem
+                                      |}array   |apply
+2198          Op::Async(futures::future::ready(buf).boxed())
+                       |apply
+                        |ARG                              |
+                                              |apply
+                                               |ARG      |apply
+2199        };
+            |}closure
+2201        let mut runtime = JsRuntime::new(RuntimeOptions {
+            |VAR_DECL       |assign         |apply
+                                             |ARG
+                                             |STRUCT()    |
+2202          module_loader: Some(loader),
+              |ARG                      |
+                                 |apply
+                                  |ARG |
+2203          ..Default::default()
+                                |apply
+2205        runtime.register_op("test", dispatcher);
+                               |apply
+                                |ARG |  |ARG     |
+2208          .execute(
+                      |apply
+2209            "setup.js",
+                |ARG     |
+2210            r#"
+                |ARG
+2218          .unwrap();
+                     |apply
+2220        assert_eq!(dispatch_count.load(Ordering::Relaxed), 0);
+            |MACRO()| |macro(){                                 |}macro()
+2222        let specifier_a = "file:///a.js".to_string();
+            |VAR_DECL       |assign                   |apply
+2223        let mod_a = runtime
+            |VAR_DECL |assign
+2224          .mod_new(
+                      |apply
+2225            true,
+                |ARG
+2226            &specifier_a,
+                |ARG       |
+2227            r#"
+                |ARG
+2234          .unwrap();
+                     |apply
+2235        assert_eq!(dispatch_count.load(Ordering::Relaxed), 0);
+            |MACRO()| |macro(){                                 |}macro()
+2237        let state_rc = JsRuntime::state(runtime.v8_isolate());
+            |VAR_DECL    |assign           |apply
+                                            |ARG               |
+                                                              |apply
+2238        {
+            |inner{
+2239          let state = state_rc.borrow();
+              |VAR_DECL |assign          |apply
+2240          let imports = state.modules.get_children(mod_a);
+              |VAR_DECL   |assign                     |apply
+                                                       |ARG|
+2241          assert_eq!(
+              |MACRO()| |macro(){
+2244          );
+              |}macro()
+2245        }
+            |}inner
+2246        let mod_b = runtime
+            |VAR_DECL |assign
+2247          .mod_new(false, "file:///b.js", "export function b() { return 'b' }")
+                      |apply
+                       |ARG|  |ARG         |  |ARG                               |
+2248          .unwrap();
+                     |apply
+2249        {
+            |inner{
+2250          let state = state_rc.borrow();
+              |VAR_DECL |assign          |apply
+2251          let imports = state.modules.get_children(mod_b).unwrap();
+              |VAR_DECL   |assign                     |apply
+                                                       |ARG|        |apply
+2252          assert_eq!(imports.len(), 0);
+              |MACRO()| |macro(){        |}macro()
+2253        }
+            |}inner
+2255        runtime.mod_instantiate(mod_b).unwrap();
+                                   |apply
+                                    |ARG|        |apply
+2256        assert_eq!(dispatch_count.load(Ordering::Relaxed), 0);
+            |MACRO()| |macro(){                                 |}macro()
+2257        assert_eq!(resolve_count.load(Ordering::SeqCst), 1);
+            |MACRO()| |macro(){                               |}macro()
+2259        runtime.mod_instantiate(mod_a).unwrap();
+                                   |apply
+                                    |ARG|        |apply
+2260        assert_eq!(dispatch_count.load(Ordering::Relaxed), 0);
+            |MACRO()| |macro(){                                 |}macro()
+2262        runtime.mod_evaluate_inner(mod_a);
+                                      |apply
+                                       |ARG|
+2263        assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
+            |MACRO()| |macro(){                                 |}macro()
+2264      }
+          |}func
+2266      #[test]
+          |OUTER_ATTR
+2267      fn dyn_import_err() {
+          |FUNCTION           |func{
+2268        #[derive(Clone, Default)]
+            |OUTER_ATTR             |
+2269        struct DynImportErrLoader {
+            |STRUCT                   |struct{
+2270          pub count: Arc<AtomicUsize>,
+              |FIELD
+2271        }
+            |}struct
+2273        impl ModuleLoader for DynImportErrLoader {
+            |IMPL                                    |impl{
+2274          fn resolve(
+              |FUNCTION
+2275            &self,
+                |PARAM
+2276            _op_state: Rc<RefCell<OpState>>,
+                |PARAM                        |
+2277            specifier: &str,
+                |PARAM        |
+2278            referrer: &str,
+                |PARAM       |
+2279            _is_main: bool,
+                |PARAM       |
+2280          ) -> Result<ModuleSpecifier, AnyError> {
+                                                     |func{
+2281            self.count.fetch_add(1, Ordering::Relaxed);
+                                    |apply
+                                     |arg
+                                        |ARG            |
+2282            assert_eq!(specifier, "/foo.js");
+                |MACRO()| |macro(){            |}macro()
+2283            assert_eq!(referrer, "file:///dyn_import2.js");
+                |MACRO()| |macro(){                          |}macro()
+2284            let s = ModuleSpecifier::resolve_import(specifier, referrer).unwrap();
+                |VAR_DECL
+                      |assign                          |apply
+                                                        |ARG    |  |ARG   |        |apply
+2285            Ok(s)
+                  |apply
+                   |arg
+2286          }
+              |}func
+2288          fn load(
+              |FUNCTION
+2289            &self,
+                |PARAM
+2290            _op_state: Rc<RefCell<OpState>>,
+                |PARAM                        |
+2291            _module_specifier: &ModuleSpecifier,
+                |PARAM                            |
+2292            _maybe_referrer: Option<ModuleSpecifier>,
+                |PARAM                                 |
+2293            _is_dyn_import: bool,
+                |PARAM             |
+2294          ) -> Pin<Box<ModuleSourceFuture>> {
+                                                |func{
+2295            async { Err(io::Error::from(io::ErrorKind::NotFound).into()) }.boxed()
+                      |inner{
+                           |apply
+                            |ARG                                          |
+                                           |apply
+                                            |ARG                  |      |apply
+                                                                             |}inner|apply
+2296          }
+              |}func
+2297        }
+            |}impl
+2300        run_in_task(|cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                             |closure{
+                             |return
+                             |inner{
+2301          let loader = Rc::new(DynImportErrLoader::default());
+              |VAR_DECL  |assign  |apply
+                                   |ARG                        |
+                                                              |apply
+2302          let count = loader.count.clone();
+              |VAR_DECL |assign             |apply
+2303          let mut runtime = JsRuntime::new(RuntimeOptions {
+              |VAR_DECL       |assign         |apply
+                                               |ARG
+                                               |STRUCT()    |
+2304            module_loader: Some(loader),
+                |ARG                      |
+                                   |apply
+                                    |ARG |
+2305            ..Default::default()
+                                  |apply
+2309            .execute(
+                        |apply
+2310              "file:///dyn_import2.js",
+                  |ARG                   |
+2311              r#"
+                  |ARG
+2317            .unwrap();
+                       |apply
+2319          assert_eq!(count.load(Ordering::Relaxed), 0);
+              |MACRO()| |macro(){                        |}macro()
+2321          let result = runtime.poll_event_loop(cx);
+              |VAR_DECL  |assign                  |apply
+                                                   |ARG
+2322          if let Poll::Ready(Ok(_)) = result {
+              |IF|VAR_DECL
+                     |STRUCT()   |ARG|
+                                 |STRUCT()
+                                    |arg|assign  |if{
+2323            unreachable!();
+                |MACRO()  | |macro(){
+                             |}macro()
+2324          }
+              |}if
+2325          assert_eq!(count.load(Ordering::Relaxed), 2);
+              |MACRO()| |macro(){                        |}macro()
+2326        })
+            |}inner
+            |}closure
+2327      }
+          |}func
+2329      #[derive(Clone, Default)]
+          |OUTER_ATTR             |
+2330      struct DynImportOkLoader {
+          |STRUCT                  |struct{
+2331        pub prepare_load_count: Arc<AtomicUsize>,
+            |FIELD
+2332        pub resolve_count: Arc<AtomicUsize>,
+            |FIELD
+2333        pub load_count: Arc<AtomicUsize>,
+            |FIELD
+2334      }
+          |}struct
+2336      impl ModuleLoader for DynImportOkLoader {
+          |IMPL                                   |impl{
+2337        fn resolve(
+            |FUNCTION
+2338          &self,
+              |PARAM
+2339          _op_state: Rc<RefCell<OpState>>,
+              |PARAM                        |
+2340          specifier: &str,
+              |PARAM        |
+2341          referrer: &str,
+              |PARAM       |
+2342          _is_main: bool,
+              |PARAM       |
+2343        ) -> Result<ModuleSpecifier, AnyError> {
+                                                   |func{
+2344          let c = self.resolve_count.fetch_add(1, Ordering::Relaxed);
+              |VAR_DECL
+                    |assign                       |apply
+                                                   |arg
+                                                      |ARG            |
+2345          assert!(c < 4);
+              |MACRO()
+                     |macro(){
+                           |}macro()
+2346          assert_eq!(specifier, "./b.js");
+              |MACRO()| |macro(){           |}macro()
+2347          assert_eq!(referrer, "file:///dyn_import3.js");
+              |MACRO()| |macro(){                          |}macro()
+2348          let s = ModuleSpecifier::resolve_import(specifier, referrer).unwrap();
+              |VAR_DECL
+                    |assign                          |apply
+                                                      |ARG    |  |ARG   |        |apply
+2349          Ok(s)
+                |apply
+                 |arg
+2350        }
+            |}func
+2352        fn load(
+            |FUNCTION
+2353          &self,
+              |PARAM
+2354          _op_state: Rc<RefCell<OpState>>,
+              |PARAM                        |
+2355          specifier: &ModuleSpecifier,
+              |PARAM                    |
+2356          _maybe_referrer: Option<ModuleSpecifier>,
+              |PARAM                                 |
+2357          _is_dyn_import: bool,
+              |PARAM             |
+2358        ) -> Pin<Box<ModuleSourceFuture>> {
+                                              |func{
+2359          self.load_count.fetch_add(1, Ordering::Relaxed);
+                                       |apply
+                                        |arg
+                                           |ARG            |
+2360          let info = ModuleSource {
+              |VAR_DECL|assign
+                         |STRUCT()  |
+2361            module_url_specified: specifier.to_string(),
+                |ARG                                      |
+                                                         |apply
+2362            module_url_found: specifier.to_string(),
+                |ARG                                  |
+                                                     |apply
+2363            code: "export function b() { return 'b' }".to_owned(),
+                |ARG                                                |
+                                                                   |apply
+2365          async move { Ok(info) }.boxed()
+                         |inner{
+                             |apply
+                              |ARG  |}inner|apply
+2366        }
+            |}func
+2368        fn prepare_load(
+            |FUNCTION
+2369          &self,
+              |PARAM
+2370          _op_state: Rc<RefCell<OpState>>,
+              |PARAM                        |
+2371          _load_id: ModuleLoadId,
+              |PARAM               |
+2372          _module_specifier: &ModuleSpecifier,
+              |PARAM                            |
+2373          _maybe_referrer: Option<String>,
+              |PARAM                        |
+2374          _is_dyn_import: bool,
+              |PARAM             |
+2375        ) -> Pin<Box<dyn Future<Output = Result<(), AnyError>>>> {
+                                                                     |func{
+2376          self.prepare_load_count.fetch_add(1, Ordering::Relaxed);
+                                               |apply
+                                                |arg
+                                                   |ARG            |
+2377          async { Ok(()) }.boxed_local()
+                    |inner{
+                        |apply
+                         |ARG
+                         |tuple(
+                          |)tuple
+                             |}inner      |apply
+2378        }
+            |}func
+2379      }
+          |}impl
+2381      #[test]
+          |OUTER_ATTR
+2382      fn dyn_import_ok() {
+          |FUNCTION          |func{
+2383        run_in_task(|cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                             |closure{
+                             |return
+                             |inner{
+2384          let loader = Rc::new(DynImportOkLoader::default());
+              |VAR_DECL  |assign  |apply
+                                   |ARG                       |
+                                                             |apply
+2385          let prepare_load_count = loader.prepare_load_count.clone();
+              |VAR_DECL              |assign                          |apply
+2386          let resolve_count = loader.resolve_count.clone();
+              |VAR_DECL         |assign                     |apply
+2387          let load_count = loader.load_count.clone();
+              |VAR_DECL      |assign                  |apply
+2388          let mut runtime = JsRuntime::new(RuntimeOptions {
+              |VAR_DECL       |assign         |apply
+                                               |ARG
+                                               |STRUCT()    |
+2389            module_loader: Some(loader),
+                |ARG                      |
+                                   |apply
+                                    |ARG |
+2390            ..Default::default()
+                                  |apply
+2395            .execute(
+                        |apply
+2396              "file:///dyn_import3.js",
+                  |ARG                   |
+2397              r#"
+                  |ARG
+2411            .unwrap();
+                       |apply
+2414          assert!(matches!(runtime.poll_event_loop(cx), Poll::Pending));
+              |MACRO()
+                     |macro(){                                            |}macro()
+2415          assert_eq!(prepare_load_count.load(Ordering::Relaxed), 1);
+              |MACRO()| |macro(){                                     |}macro()
+2418          assert!(matches!(runtime.poll_event_loop(cx), Poll::Ready(Ok(_))));
+              |MACRO()
+                     |macro(){                                                 |}macro()
+2419          assert_eq!(resolve_count.load(Ordering::Relaxed), 4);
+              |MACRO()| |macro(){                                |}macro()
+2420          assert_eq!(load_count.load(Ordering::Relaxed), 2);
+              |MACRO()| |macro(){                             |}macro()
+2421          assert!(matches!(runtime.poll_event_loop(cx), Poll::Ready(Ok(_))));
+              |MACRO()
+                     |macro(){                                                 |}macro()
+2422          assert_eq!(resolve_count.load(Ordering::Relaxed), 4);
+              |MACRO()| |macro(){                                |}macro()
+2423          assert_eq!(load_count.load(Ordering::Relaxed), 2);
+              |MACRO()| |macro(){                             |}macro()
+2424        })
+            |}inner
+            |}closure
+2425      }
+          |}func
+2427      #[test]
+          |OUTER_ATTR
+2428      fn dyn_import_borrow_mut_error() {
+          |FUNCTION                        |func{
+2430        run_in_task(|cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                             |closure{
+                             |return
+                             |inner{
+2431          let loader = Rc::new(DynImportOkLoader::default());
+              |VAR_DECL  |assign  |apply
+                                   |ARG                       |
+                                                             |apply
+2432          let prepare_load_count = loader.prepare_load_count.clone();
+              |VAR_DECL              |assign                          |apply
+2433          let mut runtime = JsRuntime::new(RuntimeOptions {
+              |VAR_DECL       |assign         |apply
+                                               |ARG
+                                               |STRUCT()    |
+2434            module_loader: Some(loader),
+                |ARG                      |
+                                   |apply
+                                    |ARG |
+2435            ..Default::default()
+                                  |apply
+2438            .execute(
+                        |apply
+2439              "file:///dyn_import3.js",
+                  |ARG                   |
+2440              r#"
+                  |ARG
+2451            .unwrap();
+                       |apply
+2453          let _ = runtime.poll_event_loop(cx);
+              |VAR_DECL
+                    |assign                  |apply
+                                              |ARG
+2454          assert_eq!(prepare_load_count.load(Ordering::Relaxed), 1);
+              |MACRO()| |macro(){                                     |}macro()
+2456          let _ = runtime.poll_event_loop(cx);
+              |VAR_DECL
+                    |assign                  |apply
+                                              |ARG
+2457        })
+            |}inner
+            |}closure
+2458      }
+          |}func
+2460      #[test]
+          |OUTER_ATTR
+2461      fn es_snapshot() {
+          |FUNCTION        |func{
+2462        #[derive(Default)]
+            |OUTER_ATTR      |
+2463        struct ModsLoader;
+            |STRUCT
+2465        impl ModuleLoader for ModsLoader {
+            |IMPL                            |impl{
+2466          fn resolve(
+              |FUNCTION
+2467            &self,
+                |PARAM
+2468            _op_state: Rc<RefCell<OpState>>,
+                |PARAM                        |
+2469            specifier: &str,
+                |PARAM        |
+2470            referrer: &str,
+                |PARAM       |
+2471            _is_main: bool,
+                |PARAM       |
+2472          ) -> Result<ModuleSpecifier, AnyError> {
+                                                     |func{
+2473            assert_eq!(specifier, "file:///main.js");
+                |MACRO()| |macro(){                    |}macro()
+2474            assert_eq!(referrer, ".");
+                |MACRO()| |macro(){     |}macro()
+2475            let s = ModuleSpecifier::resolve_import(specifier, referrer).unwrap();
+                |VAR_DECL
+                      |assign                          |apply
+                                                        |ARG    |  |ARG   |        |apply
+2476            Ok(s)
+                  |apply
+                   |arg
+2477          }
+              |}func
+2479          fn load(
+              |FUNCTION
+2480            &self,
+                |PARAM
+2481            _op_state: Rc<RefCell<OpState>>,
+                |PARAM                        |
+2482            _module_specifier: &ModuleSpecifier,
+                |PARAM                            |
+2483            _maybe_referrer: Option<ModuleSpecifier>,
+                |PARAM                                 |
+2484            _is_dyn_import: bool,
+                |PARAM             |
+2485          ) -> Pin<Box<ModuleSourceFuture>> {
+                                                |func{
+2486            unreachable!()
+                |MACRO()  | |macro(){
+                             |}macro()
+2487          }
+              |}func
+2488        }
+            |}impl
+2490        let loader = std::rc::Rc::new(ModsLoader::default());
+            |VAR_DECL  |assign           |apply
+                                          |ARG                |
+                                                             |apply
+2491        let mut runtime = JsRuntime::new(RuntimeOptions {
+            |VAR_DECL       |assign         |apply
+                                             |ARG
+                                             |STRUCT()    |
+2492          module_loader: Some(loader),
+              |ARG                      |
+                                 |apply
+                                  |ARG |
+2493          will_snapshot: true,
+              |ARG              |
+2494          ..Default::default()
+                                |apply
+2497        let specifier = ModuleSpecifier::resolve_url("file:///main.js").unwrap();
+            |VAR_DECL     |assign                       |apply
+                                                         |ARG            |        |apply
+2498        let source_code = "Deno.core.print('hello\\n')".to_string();
+            |VAR_DECL       |assign                                  |apply
+2500        let module_id = futures::executor::block_on(
+            |VAR_DECL     |assign                      |apply
+2501          runtime.load_module(&specifier, Some(source_code)),
+              |ARG                                             |
+                                 |apply
+                                  |ARG     |  |ARG            |
+                                                  |apply
+                                                   |ARG      |
+2503        .unwrap();
+                   |apply
+2505        futures::executor::block_on(runtime.mod_evaluate(module_id)).unwrap();
+                                       |apply
+                                        |ARG                          |
+                                                            |apply
+                                                             |ARG    |         |apply
+2507        let _snapshot = runtime.snapshot();
+            |VAR_DECL     |assign           |apply
+2508      }
+          |}func
+2510      #[test]
+          |OUTER_ATTR
+2511      fn test_error_without_stack() {
+          |FUNCTION                     |func{
+2512        let mut runtime = JsRuntime::new(RuntimeOptions::default());
+            |VAR_DECL       |assign         |apply
+                                             |ARG                    |
+                                                                    |apply
+2514        let result = runtime.execute(
+            |VAR_DECL  |assign          |apply
+2515          "error_without_stack.js",
+              |ARG                   |
+2516          r#"
+              |ARG
+2523        let expected_error = r#"Uncaught SyntaxError: Invalid or unexpected token
+            |VAR_DECL          |assign
+2525        assert_eq!(result.unwrap_err().to_string(), expected_error);
+            |MACRO()| |macro(){                                       |}macro()
+2526      }
+          |}func
+2528      #[test]
+          |OUTER_ATTR
+2529      fn test_error_stack() {
+          |FUNCTION             |func{
+2530        let mut runtime = JsRuntime::new(RuntimeOptions::default());
+            |VAR_DECL       |assign         |apply
+                                             |ARG                    |
+                                                                    |apply
+2531        let result = runtime.execute(
+            |VAR_DECL  |assign          |apply
+2532          "error_stack.js",
+              |ARG           |
+2533          r#"
+              |ARG
+2545        let expected_error = r#"Error: assert
+            |VAR_DECL          |assign
+2549        assert_eq!(result.unwrap_err().to_string(), expected_error);
+            |MACRO()| |macro(){                                       |}macro()
+2550      }
+          |}func
+2552      #[test]
+          |OUTER_ATTR
+2553      fn test_error_async_stack() {
+          |FUNCTION                   |func{
+2554        run_in_task(|cx| {
+                       |apply
+                        |ARG
+                        |closure
+                         |PARAM
+                             |closure{
+                             |return
+                             |inner{
+2555          let mut runtime = JsRuntime::new(RuntimeOptions::default());
+              |VAR_DECL       |assign         |apply
+                                               |ARG                    |
+                                                                      |apply
+2557            .execute(
+                        |apply
+2558              "error_async_stack.js",
+                  |ARG                 |
+2559              r#"
+                  |ARG
+2574            .unwrap();
+                       |apply
+2575          let expected_error = r#"Error: async
+              |VAR_DECL          |assign
+2580          match runtime.poll_event_loop(cx) {
+              |MATCH                       |apply
+                                            |ARG|match{
+2581            Poll::Ready(Err(e)) => {
+                |CASE
+                |STRUCT()   |ARG |
+                            |STRUCT()
+                                |arg   |inner{
+2582              assert_eq!(e.to_string(), expected_error);
+                  |MACRO()| |macro(){                     |}macro()
+2583            }
+                |}inner
+2584            _ => panic!(),
+                |case|MACRO()
+                           |macro(){
+                            |}macro()
+2585          };
+              |}match
+2586        })
+            |}inner
+            |}closure
+2587      }
+          |}func
+2589      #[test]
+          |OUTER_ATTR
+2590      fn test_core_js_stack_frame() {
+          |FUNCTION                     |func{
+2591        let mut runtime = JsRuntime::new(RuntimeOptions::default());
+            |VAR_DECL       |assign         |apply
+                                             |ARG                    |
+                                                                    |apply
+2593        let error = runtime
+            |VAR_DECL |assign
+2594          .execute(
+                      |apply
+2595            "core_js_stack_frame.js",
+                |ARG                   |
+2596            "Deno.core.dispatchByName('non_existent');",
+                |ARG                                      |
+2598          .unwrap_err();
+                         |apply
+2599        let error_string = error.to_string();
+            |VAR_DECL        |assign          |apply
+2601        assert!(error_string.contains("deno:core/core.js"));
+            |MACRO()
+                   |macro(){                                  |}macro()
+2602      }
+          |}func
+2603    }
+        |}module
+        |<eof>