1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "ClassDeclaration", 6 "definition": { 7 "id": { 8 "type": "Identifier", 9 "name": "BitopsBitwiseAnd", 10 "decorators": [], 11 "loc": { 12 "start": { 13 "line": 16, 14 "column": 14 15 }, 16 "end": { 17 "line": 16, 18 "column": 30 19 } 20 } 21 }, 22 "superClass": null, 23 "implements": [], 24 "body": [ 25 { 26 "type": "ClassProperty", 27 "key": { 28 "type": "Identifier", 29 "name": "n", 30 "decorators": [], 31 "loc": { 32 "start": { 33 "line": 17, 34 "column": 3 35 }, 36 "end": { 37 "line": 17, 38 "column": 4 39 } 40 } 41 }, 42 "value": { 43 "type": "NumberLiteral", 44 "value": 600000, 45 "loc": { 46 "start": { 47 "line": 17, 48 "column": 12 49 }, 50 "end": { 51 "line": 17, 52 "column": 18 53 } 54 } 55 }, 56 "accessibility": "public", 57 "static": false, 58 "readonly": false, 59 "declare": false, 60 "optional": false, 61 "computed": false, 62 "typeAnnotation": { 63 "type": "ETSPrimitiveType", 64 "loc": { 65 "start": { 66 "line": 17, 67 "column": 6 68 }, 69 "end": { 70 "line": 17, 71 "column": 9 72 } 73 } 74 }, 75 "definite": false, 76 "decorators": [], 77 "loc": { 78 "start": { 79 "line": 17, 80 "column": 3 81 }, 82 "end": { 83 "line": 17, 84 "column": 18 85 } 86 } 87 }, 88 { 89 "type": "ClassProperty", 90 "key": { 91 "type": "Identifier", 92 "name": "expected", 93 "decorators": [], 94 "loc": { 95 "start": { 96 "line": 18, 97 "column": 19 98 }, 99 "end": { 100 "line": 18, 101 "column": 27 102 } 103 } 104 }, 105 "value": { 106 "type": "NumberLiteral", 107 "value": 0, 108 "loc": { 109 "start": { 110 "line": 18, 111 "column": 36 112 }, 113 "end": { 114 "line": 18, 115 "column": 37 116 } 117 } 118 }, 119 "accessibility": "public", 120 "static": true, 121 "readonly": true, 122 "declare": false, 123 "optional": false, 124 "computed": false, 125 "typeAnnotation": { 126 "type": "ETSPrimitiveType", 127 "loc": { 128 "start": { 129 "line": 18, 130 "column": 29 131 }, 132 "end": { 133 "line": 18, 134 "column": 33 135 } 136 } 137 }, 138 "definite": false, 139 "decorators": [], 140 "loc": { 141 "start": { 142 "line": 18, 143 "column": 19 144 }, 145 "end": { 146 "line": 18, 147 "column": 37 148 } 149 } 150 }, 151 { 152 "type": "MethodDefinition", 153 "key": { 154 "type": "Identifier", 155 "name": "run", 156 "decorators": [], 157 "loc": { 158 "start": { 159 "line": 20, 160 "column": 10 161 }, 162 "end": { 163 "line": 20, 164 "column": 13 165 } 166 } 167 }, 168 "kind": "method", 169 "accessibility": "public", 170 "static": false, 171 "optional": false, 172 "computed": false, 173 "value": { 174 "type": "FunctionExpression", 175 "function": { 176 "type": "ScriptFunction", 177 "id": { 178 "type": "Identifier", 179 "name": "run", 180 "decorators": [], 181 "loc": { 182 "start": { 183 "line": 20, 184 "column": 10 185 }, 186 "end": { 187 "line": 20, 188 "column": 13 189 } 190 } 191 }, 192 "generator": false, 193 "async": false, 194 "expression": false, 195 "params": [], 196 "returnType": { 197 "type": "ETSPrimitiveType", 198 "loc": { 199 "start": { 200 "line": 20, 201 "column": 17 202 }, 203 "end": { 204 "line": 20, 205 "column": 21 206 } 207 } 208 }, 209 "body": { 210 "type": "BlockStatement", 211 "statements": [ 212 { 213 "type": "VariableDeclaration", 214 "declarations": [ 215 { 216 "type": "VariableDeclarator", 217 "id": { 218 "type": "Identifier", 219 "name": "bitwiseAndValue", 220 "typeAnnotation": { 221 "type": "ETSPrimitiveType", 222 "loc": { 223 "start": { 224 "line": 21, 225 "column": 26 226 }, 227 "end": { 228 "line": 21, 229 "column": 30 230 } 231 } 232 }, 233 "decorators": [], 234 "loc": { 235 "start": { 236 "line": 21, 237 "column": 9 238 }, 239 "end": { 240 "line": 21, 241 "column": 24 242 } 243 } 244 }, 245 "init": { 246 "type": "NumberLiteral", 247 "value": 4294967296, 248 "loc": { 249 "start": { 250 "line": 21, 251 "column": 33 252 }, 253 "end": { 254 "line": 21, 255 "column": 43 256 } 257 } 258 }, 259 "loc": { 260 "start": { 261 "line": 21, 262 "column": 9 263 }, 264 "end": { 265 "line": 21, 266 "column": 43 267 } 268 } 269 } 270 ], 271 "kind": "let", 272 "loc": { 273 "start": { 274 "line": 21, 275 "column": 5 276 }, 277 "end": { 278 "line": 21, 279 "column": 44 280 } 281 } 282 }, 283 { 284 "type": "ForUpdateStatement", 285 "init": { 286 "type": "VariableDeclaration", 287 "declarations": [ 288 { 289 "type": "VariableDeclarator", 290 "id": { 291 "type": "Identifier", 292 "name": "i", 293 "typeAnnotation": { 294 "type": "ETSPrimitiveType", 295 "loc": { 296 "start": { 297 "line": 22, 298 "column": 17 299 }, 300 "end": { 301 "line": 22, 302 "column": 20 303 } 304 } 305 }, 306 "decorators": [], 307 "loc": { 308 "start": { 309 "line": 22, 310 "column": 14 311 }, 312 "end": { 313 "line": 22, 314 "column": 15 315 } 316 } 317 }, 318 "init": { 319 "type": "NumberLiteral", 320 "value": 0, 321 "loc": { 322 "start": { 323 "line": 22, 324 "column": 23 325 }, 326 "end": { 327 "line": 22, 328 "column": 24 329 } 330 } 331 }, 332 "loc": { 333 "start": { 334 "line": 22, 335 "column": 14 336 }, 337 "end": { 338 "line": 22, 339 "column": 24 340 } 341 } 342 } 343 ], 344 "kind": "let", 345 "loc": { 346 "start": { 347 "line": 22, 348 "column": 10 349 }, 350 "end": { 351 "line": 22, 352 "column": 24 353 } 354 } 355 }, 356 "test": { 357 "type": "BinaryExpression", 358 "operator": "<", 359 "left": { 360 "type": "Identifier", 361 "name": "i", 362 "decorators": [], 363 "loc": { 364 "start": { 365 "line": 22, 366 "column": 26 367 }, 368 "end": { 369 "line": 22, 370 "column": 27 371 } 372 } 373 }, 374 "right": { 375 "type": "MemberExpression", 376 "object": { 377 "type": "ThisExpression", 378 "loc": { 379 "start": { 380 "line": 22, 381 "column": 30 382 }, 383 "end": { 384 "line": 22, 385 "column": 34 386 } 387 } 388 }, 389 "property": { 390 "type": "Identifier", 391 "name": "n", 392 "decorators": [], 393 "loc": { 394 "start": { 395 "line": 22, 396 "column": 35 397 }, 398 "end": { 399 "line": 22, 400 "column": 36 401 } 402 } 403 }, 404 "computed": false, 405 "optional": false, 406 "loc": { 407 "start": { 408 "line": 22, 409 "column": 30 410 }, 411 "end": { 412 "line": 22, 413 "column": 36 414 } 415 } 416 }, 417 "loc": { 418 "start": { 419 "line": 22, 420 "column": 26 421 }, 422 "end": { 423 "line": 22, 424 "column": 36 425 } 426 } 427 }, 428 "update": { 429 "type": "UpdateExpression", 430 "operator": "++", 431 "prefix": false, 432 "argument": { 433 "type": "Identifier", 434 "name": "i", 435 "decorators": [], 436 "loc": { 437 "start": { 438 "line": 22, 439 "column": 38 440 }, 441 "end": { 442 "line": 22, 443 "column": 39 444 } 445 } 446 }, 447 "loc": { 448 "start": { 449 "line": 22, 450 "column": 38 451 }, 452 "end": { 453 "line": 22, 454 "column": 41 455 } 456 } 457 }, 458 "body": { 459 "type": "BlockStatement", 460 "statements": [ 461 { 462 "type": "ExpressionStatement", 463 "expression": { 464 "type": "AssignmentExpression", 465 "operator": "=", 466 "left": { 467 "type": "Identifier", 468 "name": "bitwiseAndValue", 469 "decorators": [], 470 "loc": { 471 "start": { 472 "line": 23, 473 "column": 7 474 }, 475 "end": { 476 "line": 23, 477 "column": 22 478 } 479 } 480 }, 481 "right": { 482 "type": "BinaryExpression", 483 "operator": "&", 484 "left": { 485 "type": "Identifier", 486 "name": "bitwiseAndValue", 487 "decorators": [], 488 "loc": { 489 "start": { 490 "line": 23, 491 "column": 25 492 }, 493 "end": { 494 "line": 23, 495 "column": 40 496 } 497 } 498 }, 499 "right": { 500 "type": "Identifier", 501 "name": "i", 502 "decorators": [], 503 "loc": { 504 "start": { 505 "line": 23, 506 "column": 43 507 }, 508 "end": { 509 "line": 23, 510 "column": 44 511 } 512 } 513 }, 514 "loc": { 515 "start": { 516 "line": 23, 517 "column": 25 518 }, 519 "end": { 520 "line": 23, 521 "column": 44 522 } 523 } 524 }, 525 "loc": { 526 "start": { 527 "line": 23, 528 "column": 7 529 }, 530 "end": { 531 "line": 23, 532 "column": 44 533 } 534 } 535 }, 536 "loc": { 537 "start": { 538 "line": 23, 539 "column": 7 540 }, 541 "end": { 542 "line": 23, 543 "column": 45 544 } 545 } 546 } 547 ], 548 "loc": { 549 "start": { 550 "line": 22, 551 "column": 43 552 }, 553 "end": { 554 "line": 24, 555 "column": 6 556 } 557 } 558 }, 559 "loc": { 560 "start": { 561 "line": 22, 562 "column": 5 563 }, 564 "end": { 565 "line": 24, 566 "column": 6 567 } 568 } 569 }, 570 { 571 "type": "AssertStatement", 572 "test": { 573 "type": "BinaryExpression", 574 "operator": "==", 575 "left": { 576 "type": "Identifier", 577 "name": "bitwiseAndValue", 578 "decorators": [], 579 "loc": { 580 "start": { 581 "line": 26, 582 "column": 12 583 }, 584 "end": { 585 "line": 26, 586 "column": 27 587 } 588 } 589 }, 590 "right": { 591 "type": "MemberExpression", 592 "object": { 593 "type": "Identifier", 594 "name": "BitopsBitwiseAnd", 595 "decorators": [], 596 "loc": { 597 "start": { 598 "line": 26, 599 "column": 31 600 }, 601 "end": { 602 "line": 26, 603 "column": 47 604 } 605 } 606 }, 607 "property": { 608 "type": "Identifier", 609 "name": "expected", 610 "decorators": [], 611 "loc": { 612 "start": { 613 "line": 26, 614 "column": 48 615 }, 616 "end": { 617 "line": 26, 618 "column": 56 619 } 620 } 621 }, 622 "computed": false, 623 "optional": false, 624 "loc": { 625 "start": { 626 "line": 26, 627 "column": 31 628 }, 629 "end": { 630 "line": 26, 631 "column": 56 632 } 633 } 634 }, 635 "loc": { 636 "start": { 637 "line": 26, 638 "column": 12 639 }, 640 "end": { 641 "line": 26, 642 "column": 56 643 } 644 } 645 }, 646 "second": { 647 "type": "StringLiteral", 648 "value": "Incorrect result", 649 "loc": { 650 "start": { 651 "line": 26, 652 "column": 58 653 }, 654 "end": { 655 "line": 26, 656 "column": 76 657 } 658 } 659 }, 660 "loc": { 661 "start": { 662 "line": 26, 663 "column": 5 664 }, 665 "end": { 666 "line": 26, 667 "column": 77 668 } 669 } 670 } 671 ], 672 "loc": { 673 "start": { 674 "line": 20, 675 "column": 22 676 }, 677 "end": { 678 "line": 27, 679 "column": 4 680 } 681 } 682 }, 683 "loc": { 684 "start": { 685 "line": 20, 686 "column": 13 687 }, 688 "end": { 689 "line": 27, 690 "column": 4 691 } 692 } 693 }, 694 "loc": { 695 "start": { 696 "line": 20, 697 "column": 13 698 }, 699 "end": { 700 "line": 27, 701 "column": 4 702 } 703 } 704 }, 705 "overloads": [], 706 "decorators": [], 707 "loc": { 708 "start": { 709 "line": 20, 710 "column": 3 711 }, 712 "end": { 713 "line": 27, 714 "column": 4 715 } 716 } 717 }, 718 { 719 "type": "MethodDefinition", 720 "key": { 721 "type": "Identifier", 722 "name": "constructor", 723 "decorators": [], 724 "loc": { 725 "start": { 726 "line": 1, 727 "column": 1 728 }, 729 "end": { 730 "line": 1, 731 "column": 1 732 } 733 } 734 }, 735 "kind": "constructor", 736 "static": false, 737 "optional": false, 738 "computed": false, 739 "value": { 740 "type": "FunctionExpression", 741 "function": { 742 "type": "ScriptFunction", 743 "id": { 744 "type": "Identifier", 745 "name": "constructor", 746 "decorators": [], 747 "loc": { 748 "start": { 749 "line": 1, 750 "column": 1 751 }, 752 "end": { 753 "line": 1, 754 "column": 1 755 } 756 } 757 }, 758 "generator": false, 759 "async": false, 760 "expression": false, 761 "params": [], 762 "body": { 763 "type": "BlockStatement", 764 "statements": [], 765 "loc": { 766 "start": { 767 "line": 1, 768 "column": 1 769 }, 770 "end": { 771 "line": 1, 772 "column": 1 773 } 774 } 775 }, 776 "loc": { 777 "start": { 778 "line": 1, 779 "column": 1 780 }, 781 "end": { 782 "line": 1, 783 "column": 1 784 } 785 } 786 }, 787 "loc": { 788 "start": { 789 "line": 1, 790 "column": 1 791 }, 792 "end": { 793 "line": 1, 794 "column": 1 795 } 796 } 797 }, 798 "overloads": [], 799 "decorators": [], 800 "loc": { 801 "start": { 802 "line": 28, 803 "column": 2 804 }, 805 "end": { 806 "line": 28, 807 "column": 2 808 } 809 } 810 } 811 ], 812 "loc": { 813 "start": { 814 "line": 16, 815 "column": 31 816 }, 817 "end": { 818 "line": 28, 819 "column": 2 820 } 821 } 822 }, 823 "loc": { 824 "start": { 825 "line": 16, 826 "column": 8 827 }, 828 "end": { 829 "line": 28, 830 "column": 2 831 } 832 } 833 }, 834 { 835 "type": "ClassDeclaration", 836 "definition": { 837 "id": { 838 "type": "Identifier", 839 "name": "ETSGLOBAL", 840 "decorators": [], 841 "loc": { 842 "start": { 843 "line": 1, 844 "column": 1 845 }, 846 "end": { 847 "line": 1, 848 "column": 1 849 } 850 } 851 }, 852 "superClass": null, 853 "implements": [], 854 "body": [ 855 { 856 "type": "MethodDefinition", 857 "key": { 858 "type": "Identifier", 859 "name": "_$init$_", 860 "decorators": [], 861 "loc": { 862 "start": { 863 "line": 1, 864 "column": 1 865 }, 866 "end": { 867 "line": 1, 868 "column": 1 869 } 870 } 871 }, 872 "kind": "method", 873 "accessibility": "public", 874 "static": true, 875 "optional": false, 876 "computed": false, 877 "value": { 878 "type": "FunctionExpression", 879 "function": { 880 "type": "ScriptFunction", 881 "id": { 882 "type": "Identifier", 883 "name": "_$init$_", 884 "decorators": [], 885 "loc": { 886 "start": { 887 "line": 1, 888 "column": 1 889 }, 890 "end": { 891 "line": 1, 892 "column": 1 893 } 894 } 895 }, 896 "generator": false, 897 "async": false, 898 "expression": false, 899 "params": [], 900 "body": { 901 "type": "BlockStatement", 902 "statements": [], 903 "loc": { 904 "start": { 905 "line": 1, 906 "column": 1 907 }, 908 "end": { 909 "line": 1, 910 "column": 1 911 } 912 } 913 }, 914 "loc": { 915 "start": { 916 "line": 1, 917 "column": 1 918 }, 919 "end": { 920 "line": 1, 921 "column": 1 922 } 923 } 924 }, 925 "loc": { 926 "start": { 927 "line": 1, 928 "column": 1 929 }, 930 "end": { 931 "line": 1, 932 "column": 1 933 } 934 } 935 }, 936 "overloads": [], 937 "decorators": [], 938 "loc": { 939 "start": { 940 "line": 1, 941 "column": 1 942 }, 943 "end": { 944 "line": 1, 945 "column": 1 946 } 947 } 948 }, 949 { 950 "type": "MethodDefinition", 951 "key": { 952 "type": "Identifier", 953 "name": "main", 954 "decorators": [], 955 "loc": { 956 "start": { 957 "line": 30, 958 "column": 10 959 }, 960 "end": { 961 "line": 30, 962 "column": 14 963 } 964 } 965 }, 966 "kind": "method", 967 "accessibility": "public", 968 "static": true, 969 "optional": false, 970 "computed": false, 971 "value": { 972 "type": "FunctionExpression", 973 "function": { 974 "type": "ScriptFunction", 975 "id": { 976 "type": "Identifier", 977 "name": "main", 978 "decorators": [], 979 "loc": { 980 "start": { 981 "line": 30, 982 "column": 10 983 }, 984 "end": { 985 "line": 30, 986 "column": 14 987 } 988 } 989 }, 990 "generator": false, 991 "async": false, 992 "expression": false, 993 "params": [], 994 "returnType": { 995 "type": "ETSPrimitiveType", 996 "loc": { 997 "start": { 998 "line": 30, 999 "column": 18 1000 }, 1001 "end": { 1002 "line": 30, 1003 "column": 22 1004 } 1005 } 1006 }, 1007 "body": { 1008 "type": "BlockStatement", 1009 "statements": [ 1010 { 1011 "type": "VariableDeclaration", 1012 "declarations": [ 1013 { 1014 "type": "VariableDeclarator", 1015 "id": { 1016 "type": "Identifier", 1017 "name": "a", 1018 "decorators": [], 1019 "loc": { 1020 "start": { 1021 "line": 31, 1022 "column": 7 1023 }, 1024 "end": { 1025 "line": 31, 1026 "column": 8 1027 } 1028 } 1029 }, 1030 "init": { 1031 "type": "ETSNewClassInstanceExpression", 1032 "typeReference": { 1033 "type": "ETSTypeReference", 1034 "part": { 1035 "type": "ETSTypeReferencePart", 1036 "name": { 1037 "type": "Identifier", 1038 "name": "BitopsBitwiseAnd", 1039 "decorators": [], 1040 "loc": { 1041 "start": { 1042 "line": 31, 1043 "column": 15 1044 }, 1045 "end": { 1046 "line": 31, 1047 "column": 31 1048 } 1049 } 1050 }, 1051 "loc": { 1052 "start": { 1053 "line": 31, 1054 "column": 15 1055 }, 1056 "end": { 1057 "line": 31, 1058 "column": 32 1059 } 1060 } 1061 }, 1062 "loc": { 1063 "start": { 1064 "line": 31, 1065 "column": 15 1066 }, 1067 "end": { 1068 "line": 31, 1069 "column": 32 1070 } 1071 } 1072 }, 1073 "arguments": [], 1074 "loc": { 1075 "start": { 1076 "line": 31, 1077 "column": 11 1078 }, 1079 "end": { 1080 "line": 31, 1081 "column": 32 1082 } 1083 } 1084 }, 1085 "loc": { 1086 "start": { 1087 "line": 31, 1088 "column": 7 1089 }, 1090 "end": { 1091 "line": 31, 1092 "column": 32 1093 } 1094 } 1095 } 1096 ], 1097 "kind": "let", 1098 "loc": { 1099 "start": { 1100 "line": 31, 1101 "column": 3 1102 }, 1103 "end": { 1104 "line": 31, 1105 "column": 32 1106 } 1107 } 1108 }, 1109 { 1110 "type": "ExpressionStatement", 1111 "expression": { 1112 "type": "CallExpression", 1113 "callee": { 1114 "type": "MemberExpression", 1115 "object": { 1116 "type": "Identifier", 1117 "name": "a", 1118 "decorators": [], 1119 "loc": { 1120 "start": { 1121 "line": 32, 1122 "column": 3 1123 }, 1124 "end": { 1125 "line": 32, 1126 "column": 4 1127 } 1128 } 1129 }, 1130 "property": { 1131 "type": "Identifier", 1132 "name": "run", 1133 "decorators": [], 1134 "loc": { 1135 "start": { 1136 "line": 32, 1137 "column": 5 1138 }, 1139 "end": { 1140 "line": 32, 1141 "column": 8 1142 } 1143 } 1144 }, 1145 "computed": false, 1146 "optional": false, 1147 "loc": { 1148 "start": { 1149 "line": 32, 1150 "column": 3 1151 }, 1152 "end": { 1153 "line": 32, 1154 "column": 8 1155 } 1156 } 1157 }, 1158 "arguments": [], 1159 "optional": false, 1160 "loc": { 1161 "start": { 1162 "line": 32, 1163 "column": 3 1164 }, 1165 "end": { 1166 "line": 32, 1167 "column": 10 1168 } 1169 } 1170 }, 1171 "loc": { 1172 "start": { 1173 "line": 32, 1174 "column": 3 1175 }, 1176 "end": { 1177 "line": 32, 1178 "column": 11 1179 } 1180 } 1181 } 1182 ], 1183 "loc": { 1184 "start": { 1185 "line": 30, 1186 "column": 23 1187 }, 1188 "end": { 1189 "line": 33, 1190 "column": 2 1191 } 1192 } 1193 }, 1194 "loc": { 1195 "start": { 1196 "line": 30, 1197 "column": 14 1198 }, 1199 "end": { 1200 "line": 33, 1201 "column": 2 1202 } 1203 } 1204 }, 1205 "loc": { 1206 "start": { 1207 "line": 30, 1208 "column": 14 1209 }, 1210 "end": { 1211 "line": 33, 1212 "column": 2 1213 } 1214 } 1215 }, 1216 "overloads": [], 1217 "decorators": [], 1218 "loc": { 1219 "start": { 1220 "line": 30, 1221 "column": 1 1222 }, 1223 "end": { 1224 "line": 33, 1225 "column": 2 1226 } 1227 } 1228 } 1229 ], 1230 "loc": { 1231 "start": { 1232 "line": 1, 1233 "column": 1 1234 }, 1235 "end": { 1236 "line": 1, 1237 "column": 1 1238 } 1239 } 1240 }, 1241 "loc": { 1242 "start": { 1243 "line": 1, 1244 "column": 1 1245 }, 1246 "end": { 1247 "line": 1, 1248 "column": 1 1249 } 1250 } 1251 } 1252 ], 1253 "loc": { 1254 "start": { 1255 "line": 1, 1256 "column": 1 1257 }, 1258 "end": { 1259 "line": 34, 1260 "column": 1 1261 } 1262 } 1263} 1264