Changeset 77
- Timestamp:
- 03/24/07 09:01:46 (20 months ago)
- Location:
- NEWT0/trunk/src/newt_core
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
NEWT0/trunk/src/newt_core/NewtBC.c
r76 r77 74 74 75 75 #ifndef _MSC_VER 76 76 77 #pragma mark - 78 77 79 #pragma mark ローカル変数 78 80 #endif 81 82 79 83 80 84 /* ローカル変数 */ … … 2084 2088 numArgs = NBCCountNumArgs(stree, node->op2); 2085 2089 2086 #ifdef FIXME_MATTHIAS 2087 // Newton expects the arguments to "send" in thisorder.2088 // I have not checked if the NEWT VM "send" interprter 2089 // needs arguments to be swapped as well2090 // There is a mistake in NewtonFormats. We push arguments in the Newton's 2091 // natural order. 2092 2093 // receiver の生成 2090 2094 NBCGenReceiver(stree, receiver); 2091 NBCGenPUSH(node->op1);2092 #else2093 2095 // message の生成 2094 2096 NBCGenPUSH(node->op1); 2095 2096 // receiver の生成2097 NBCGenReceiver(stree, receiver);2098 #endif2099 2097 2100 2098 // メッセージ呼出しの生成 … … 2668 2666 2669 2667 #ifndef _MSC_VER 2668 2670 2669 #pragma mark - 2670 2671 2671 #endif 2672 2672 2673 2673 2674 /*------------------------------------------------------------------------*/ -
NEWT0/trunk/src/newt_core/NewtVM.c
r71 r77 40 40 41 41 #ifndef _MSC_VER 42 42 43 #pragma mark - 44 43 45 #endif 46 44 47 45 48 /* マクロ */ … … 69 72 70 73 #ifndef _MSC_VER 74 71 75 #pragma mark - 76 72 77 #endif 78 73 79 74 80 /* 関数プロトタイプ */ … … 352 358 353 359 #ifndef _MSC_VER 360 354 361 #pragma mark - 362 355 363 #endif 364 356 365 357 366 /*------------------------------------------------------------------------*/ … … 586 595 587 596 #ifndef _MSC_VER 597 588 598 #pragma mark - 599 589 600 #endif 601 590 602 591 603 /*------------------------------------------------------------------------*/ … … 632 644 #ifndef _MSC_VER 633 645 #pragma mark *** 呼出しスタック 646 634 647 #endif 635 648 /*------------------------------------------------------------------------*/ … … 705 718 706 719 720 707 721 #ifndef _MSC_VER 708 722 #pragma mark *** スタック 723 709 724 #endif 725 710 726 711 727 /*------------------------------------------------------------------------*/ … … 808 824 809 825 #ifndef _MSC_VER 826 810 827 #pragma mark *** 例外ハンドラスタック 828 811 829 #endif 830 812 831 813 832 /*------------------------------------------------------------------------*/ … … 904 923 905 924 #ifndef _MSC_VER 925 906 926 #pragma mark *** Literals 927 907 928 #endif 929 908 930 909 931 /*------------------------------------------------------------------------*/ … … 929 951 930 952 #ifndef _MSC_VER 953 931 954 #pragma mark *** Iterator 955 932 956 #endif 957 933 958 934 959 /*------------------------------------------------------------------------*/ … … 1075 1100 1076 1101 #ifndef _MSC_VER 1102 1077 1103 #pragma mark - 1104 1078 1105 #endif 1106 1079 1107 1080 1108 /*------------------------------------------------------------------------*/ … … 1827 1855 newtRef vm_send(int16_t b, newtErr * errP) 1828 1856 { 1857 // NewtonFormats say: 1829 1858 // arg1 arg2 ... argN name receiver -- result 1859 // But in the Newton, this is: 1860 // arg1 arg2 ... argN receiver name -- result 1830 1861 1831 1862 newtRefVar receiver; … … 1838 1869 *errP = kNErrNone; 1839 1870 1871 name = stk_pop(); 1840 1872 receiver = stk_pop(); 1841 name = stk_pop(); 1873 1874 if (! NewtRefIsSymbol(name)) 1875 { 1876 NVMThrowBC(kNErrNotASymbol, name, b, true); 1877 return name; 1878 } 1842 1879 1843 1880 if (! NewtRefIsFrame(receiver)) 1844 1881 { 1845 1882 NVMThrowBC(kNErrNotAFrame, receiver, b, true); 1846 return name;1847 }1848 1849 if (! NewtRefIsSymbol(name))1850 {1851 NVMThrowBC(kNErrNotASymbol, name, b, true);1852 1883 return name; 1853 1884 } … … 1930 1961 1931 1962 #ifndef _MSC_VER 1963 1932 1964 #pragma mark - 1965 1933 1966 #pragma mark *** Simple instructions 1934 1967 #endif 1968 1969 1935 1970 1936 1971 /*------------------------------------------------------------------------*/ … … 2048 2083 2049 2084 #ifndef _MSC_VER 2085 2050 2086 #pragma mark - 2087 2051 2088 #pragma mark *** Primitive functions 2052 2089 #endif 2090 2091 2053 2092 2054 2093 /*------------------------------------------------------------------------*/ … … 2499 2538 2500 2539 #ifndef _MSC_VER 2540 2501 2541 #pragma mark - 2542 2502 2543 #pragma mark *** Instructions 2503 2544 #endif 2545 2546 2504 2547 2505 2548 /*------------------------------------------------------------------------*/ … … 3120 3163 3121 3164 #ifndef _MSC_VER 3165 3122 3166 #pragma mark *** ダンプ 3167 3123 3168 #endif 3169 3124 3170 3125 3171 /*------------------------------------------------------------------------*/ … … 3364 3410 3365 3411 #ifndef _MSC_VER 3412 3366 3413 #pragma mark - 3414 3367 3415 #pragma mark *** インタプリタ 3368 3416 #endif 3417 3418 3369 3419 3370 3420 /*------------------------------------------------------------------------*/ … … 3850 3900 3851 3901 #ifndef _MSC_VER 3902 3852 3903 #pragma mark - 3904 3853 3905 #endif 3906 3854 3907 3855 3908 /*------------------------------------------------------------------------*/
