Changeset 94
- Timestamp:
- 03/17/06 22:41:34 (3 years ago)
- Location:
- trunk/orca
- Files:
-
- 11 modified
-
context.c (modified) (8 diffs)
-
error.c (modified) (1 diff)
-
files.c (modified) (11 diffs)
-
gc.c (modified) (1 diff)
-
math.c (modified) (11 diffs)
-
math3d.c (modified) (3 diffs)
-
ovalue.c (modified) (32 diffs)
-
parse.c (modified) (1 diff)
-
print.c (modified) (2 diffs)
-
series.c (modified) (27 diffs)
-
stdio.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/orca/context.c
r84 r94  630 630 /copy 631 631 */ 632  void orBindNative( OValue* a1) 632 OR_NATIVE_PUB( orBindNative ) 633 633 { 634 634 #define REF_BIND_COPY a1 + 2 … …  672 672  673 673  674  void orProtectNative( OValue* a1) 674 OR_NATIVE_PUB( orProtectNative ) 675 675 { 676 676 OBlock* vblk; … …  715 715 word [word!] 716 716 */ 717  void orInNative( OValue* a1) 717 OR_NATIVE_PUB( orInNative ) 718 718 { 719 719 OValue* a2 = a1 + 1; … …  739 739 body [block!] 740 740 */ 741  void orUseNative( OValue* a1) 741 OR_NATIVE_PUB( orUseNative ) 742 742 { 743 743 OContext ctx; … …  799 799 body [block!] 800 800 */ 801  void orForeachNative( OValue* a1) 801 OR_NATIVE_PUB( orForeachNative ) 802 802 { 803 803 #ifdef OR_CONFIG_REBOL … …  1032 1032 #else // -------------------------------------------------------------- 1033 1033 // Foreach without context creation overhead. 1034  // Executes in 25%-30% less time and does not allocate from heap. 1034 // (Does not bind or allocate from heap). 1035 1035  1036 1036 OBlock* blk; … …  1213 1213 //see orForeachNative 1214 1214  1215  void orRemoveEachNative( OValue* a1) 1215 OR_NATIVE_PUB( orRemoveEachNative ) 1216 1216 { 1217 1217 int rlen; … …  1514 1514 } 1515 1515   1516  1516 1517 /*EOF*/ -
trunk/orca/error.c
r54 r94  109 109 Convert error! to object!. 110 110 */ 111  void orDisarmNative( OValue* a1) 111 OR_NATIVE_PUB( orDisarmNative ) 112 112 { 113 113 if( orIs(a1, OT_ERROR) ) -
trunk/orca/files.c
r71 r94  40 40  41 41  42  void orOpenNative( OValue* a1) 42 OR_NATIVE( orOpenNative ) 43 43 { 44 44 OArray* arr = &orEnv->devices; … …  68 68  69 69  70  void orCloseNative( OValue* a1) 70 OR_NATIVE( orCloseNative ) 71 71 { 72 72 OArray* arr = &orEnv->devices; … …  78 78  79 79  80  void orExistsQNative( OValue* a1) 80 OR_NATIVE( orExistsQNative ) 81 81 { 82 82 int logic = 0; … …  89 89  90 90  91  void orSizeQNative( OValue* a1) 91 OR_NATIVE( orSizeQNative ) 92 92 { 93 93 int size; … …  106 106  107 107  108  void orDirQNative( OValue* a1) 108 OR_NATIVE( orDirQNative ) 109 109 { 110 110 int status; … …  118 118  119 119  120  void orModifiedQNative( OValue* a1) 120 OR_NATIVE( orModifiedQNative ) 121 121 { 122 122 int status; … …  245 245 #define REF_READ_SIZE a1+6 246 246  247  void orReadNative( OValue* a1) 247 OR_NATIVE( orReadNative ) 248 248 { 249 249 if( a1->type == OT_FILE ) … …  366 366 #define REF_APPEND a1+3 367 367  368  void orWriteNative( OValue* a1) 368 OR_NATIVE( orWriteNative ) 369 369 { 370 370 if( a1->type == OT_FILE ) … …  477 477  478 478  479  static void cleanPathNative( OValue* a1) 479 OR_NATIVE( cleanPathNative ) 480 480 { 481 481 OString* str; … …  498 498  499 499  500  void orCompressNative( OValue* a1) 500 OR_NATIVE( orCompressNative ) 501 501 { 502 502 OString* str; … …  528 528  529 529  530  void orDecompressNative( OValue* a1) 530 OR_NATIVE( orDecompressNative ) 531 531 { 532 532 #define BUF_LOW 32 -
trunk/orca/gc.c
r42 r94 Â 810 810 Â 811 811 Â 812 Â void orMemoryNative( OValue* a1)ÂÂ 812 OR_NATIVE_PUB( orMemoryNative )Â 813 813 {Â 814 814 (void) a1;Â -
trunk/orca/math.c
r54 r94  53 53  54 54  55  static void orSineNative( OValue* a1) 55 OR_NATIVE( orSineNative ) 56 56 { 57 57 TRIG_FUNC( mathSine ) … …  59 59  60 60  61  static void orCosineNative( OValue* a1) 61 OR_NATIVE( orCosineNative ) 62 62 { 63 63 TRIG_FUNC( mathCosine ) … …  65 65  66 66  67  static void orTangentNative( OValue* a1) 67 OR_NATIVE( orTangentNative ) 68 68 { 69 69 TRIG_FUNC( mathTan ) … …  71 71  72 72  73  static void orArcsineNative( OValue* a1) 73 OR_NATIVE( orArcsineNative ) 74 74 { 75 75 TRIG_FUNC( mathASine ) … …  77 77  78 78  79  static void orArccosineNative( OValue* a1) 79 OR_NATIVE( orArccosineNative ) 80 80 { 81 81 TRIG_FUNC( mathACosine ) … …  83 83  84 84  85  static void orArctangentNative( OValue* a1) 85 OR_NATIVE( orArctangentNative ) 86 86 { 87 87 TRIG_FUNC( mathATan ) … …  89 89  90 90  91  static void orSquareRootNative( OValue* a1) 91 OR_NATIVE( orSquareRootNative ) 92 92 { 93 93 double n; … …  109 109  110 110 /* NOTE: random does not follow REBOL behavior. */ 111  static void orRandomNative( OValue* a1) 111 OR_NATIVE( orRandomNative ) 112 112 { 113 113 if( orRefineSet(REF_RAND_SEED) ) … …  266 266  267 267  268  static void orComplementNative( OValue* a1) 268 OR_NATIVE( orComplementNative ) 269 269 { 270 270 switch( a1->type ) … …  295 295  296 296  297  static void orAbsNative( OValue* a1) 297 OR_NATIVE( orAbsNative ) 298 298 { 299 299 switch( a1->type ) … …  323 323  324 324  325  static void orNegateNative( OValue* a1) 325 OR_NATIVE( orNegateNative ) 326 326 { 327 327 switch( a1->type ) -
trunk/orca/math3d.c
r54 r94  319 319  320 320  321  void orDotNative( OValue* a1) 321 OR_NATIVE_PUB( orDotNative ) 322 322 { 323 323 float* a = &a1->vec3.x; … …  329 329  330 330  331  void orCrossNative( OValue* a1) 331 OR_NATIVE_PUB( orCrossNative ) 332 332 { 333 333 float* a = &a1->vec3.x; … …  340 340  341 341  342  void orNormalizeNative( OValue* a1) 342 OR_NATIVE_PUB( orNormalizeNative ) 343 343 { 344 344 orNormalize( &a1->vec3.x ); -
trunk/orca/ovalue.c
r79 r94  936 936  937 937  938  void orToNative( OValue* a1) 938 OR_NATIVE( orToNative ) 939 939 { 940 940 OValue* res; … …  1213 1213  1214 1214  1215  void orLoadNative( OValue* a1) 1215 OR_NATIVE( orLoadNative ) 1216 1216 { 1217 1217 OBlock* blk; … …  1350 1350 #define REF_DO_ARG a1+2 1351 1351  1352  void orDoNative( OValue* a1) 1352 OR_NATIVE_PUB( orDoNative ) 1353 1353 { 1354 1354 if( orIs(a1, OT_BLOCK) || orIs(a1, OT_PAREN) ) … …  1415 1415  1416 1416  1417  void orSetNative( OValue* a1) 1417 OR_NATIVE( orSetNative ) 1418 1418 { 1419 1419 if( orIsWord(a1->type) ) … …  1432 1432  1433 1433  1434  void orUnsetNative( OValue* a1) 1434 OR_NATIVE( orUnsetNative ) 1435 1435 { 1436 1436 OValue* val; … …  1460 1460  1461 1461  1462  void orValueQNative( OValue* a1) 1462 OR_NATIVE( orValueQNative ) 1463 1463 { 1464 1464 int logic = 0; … …  1479 1479  1480 1480  1481  void orGetNative( OValue* a1) 1481 OR_NATIVE( orGetNative ) 1482 1482 { 1483 1483 if( orIsWord(a1->type) ) … …  1495 1495  1496 1496  1497  void orNotNative( OValue* a1) 1497 OR_NATIVE( orNotNative ) 1498 1498 { 1499 1499 int logic; … …  1508 1508  1509 1509  1510  void orIfNative( OValue* a1) 1510 OR_NATIVE( orIfNative ) 1511 1511 { 1512 1512 if( orIfTrue(a1) ) … …  1520 1520  1521 1521  1522  void orUnlessNative( OValue* a1) 1522 OR_NATIVE( orUnlessNative ) 1523 1523 { 1524 1524 if( orIfFalse(a1) ) … …  1532 1532  1533 1533  1534  void orEitherNative( OValue* a1) 1534 OR_NATIVE( orEitherNative ) 1535 1535 { 1536 1536 OValue* blkArg = a1 + 2;; … …  1544 1544  1545 1545  1546  void orLoopNative( OValue* a1) 1546 OR_NATIVE( orLoopNative ) 1547 1547 { 1548 1548 OIndex body; … …  1564 1564  1565 1565  1566  void orRepeatNative( OValue* a1) 1566 OR_NATIVE( orRepeatNative ) 1567 1567 { 1568 1568 OValue* wval; … …  1632 1632  1633 1633  1634  void orUntilNative( OValue* a1) 1634 OR_NATIVE( orUntilNative ) 1635 1635 { 1636 1636 OValue* res; … …  1657 1657  1658 1658  1659  void orWhileNative( OValue* a1) 1659 OR_NATIVE( orWhileNative ) 1660 1660 { 1661 1661 OValue* res; … …  1725 1725  1726 1726  1727  void orBreakNative( OValue* a1) 1727 OR_NATIVE( orBreakNative ) 1728 1728 { 1729 1729 OValue* res = a1; … …  1732 1732  1733 1733  1734  void orReturnNative( OValue* a1) 1734 OR_NATIVE( orReturnNative ) 1735 1735 { 1736 1736 OValue* res = a1 + 1; … …  1739 1739  1740 1740  1741  void orExitNative( OValue* a1) 1741 OR_NATIVE( orExitNative ) 1742 1742 { 1743 1743 OValue* res = a1 + 1; … …  1771 1771  1772 1772  1773  void orRecycleNative( OValue* a1) 1773 OR_NATIVE( orRecycleNative ) 1774 1774 { 1775 1775 #define REF_REC_OFF a1 … …  1791 1791  1792 1792  1793  void orTypeQNative( OValue* a1) 1793 OR_NATIVE( orTypeQNative ) 1794 1794 { 1795 1795 #define REF_TYPEQ_WORD a1+1 … …  1819 1819 try: native [ block [block!] ] 1820 1820 */ 1821  void orTryNative( OValue* a1) 1821 OR_NATIVE( orTryNative ) 1822 1822 { 1823 1823 orEvalBlock( orBLOCK( a1 ), a1->series.it ); … …  1835 1835 catch: native [ block [block!] /name word [word! block!] ] 1836 1836 */ 1837  void orCatchNative( OValue* a1) 1837 OR_NATIVE( orCatchNative ) 1838 1838 { 1839 1839 //OIndex nameBlk = 0; … …  1895 1895 throw: native [ value /name word [word!] ] 1896 1896 */ 1897  void orThrowNative( OValue* a1) 1897 OR_NATIVE( orThrowNative ) 1898 1898 { 1899 1899 #define REF_NAME a1+1 … …  2892 2892  2893 2893  2894  void orReduceNative( OValue* a1) 2894 OR_NATIVE_PUB( orReduceNative ) 2895 2895 { 2896 2896 if( (a1->type == OT_BLOCK) || … …  2966 2966  2967 2967  2968  void orComposeNative( OValue* a1) 2968 OR_NATIVE( orComposeNative ) 2969 2969 { 2970 2970 #define REF_COMP_DEEP a1+1 … …  2993 2993 Result is the first value that is not false or none! 2994 2994 */ 2995  void orAnyNative( OValue* a1) 2995 OR_NATIVE( orAnyNative ) 2996 2996 { 2997 2997 OValue* res; … …  3028 3028  3029 3029  3030  void orAllNative( OValue* a1) 3030 OR_NATIVE( orAllNative ) 3031 3031 { 3032 3032 OValue* res; … …  3194 3194  3195 3195  3196  void orDumpNative( OValue* a1) 3196 OR_NATIVE( orDumpNative ) 3197 3197 { 3198 3198 if( orIsBlock(a1->type) || a1->type == OT_LIST ) … …  4118 4118  4119 4119  4120  void orNativeNative( OValue* a1) 4120 OR_NATIVE_PUB( orNativeNative ) 4121 4121 { 4122 4122 if( a1->type == OT_BLOCK ) … …  4219 4219 //extern void orRebindClosure( OIndex blkN ); 4220 4220  4221  void orDoesNative( OValue* a1) 4221 OR_NATIVE( orDoesNative ) 4222 4222 { 4223 4223 if( a1->type == OT_BLOCK ) … …  4246 4246  4247 4247 //void orMakeFunction( OBlock* spec, OBlock* body ) 4248  void orFuncNative( OValue* a1) 4248 OR_NATIVE( orFuncNative ) 4249 4249 { 4250 4250 OContext ctx; … …  4454 4454 orNative( orDumpNative, "dump" ); 4455 4455 #endif 4456  Â4457  Â4458 4456 } 4459 4457  -
trunk/orca/parse.c
r55 r94  972 972 parse series rules 973 973 */ 974  void orParseNative( OValue* a1) 974 OR_NATIVE_PUB( orParseNative ) 975 975 { 976 976 OValue* rules = a1 + 1; -
trunk/orca/print.c
r78 r94  1121 1121 Converts a value to a string. 1122 1122 */ 1123  void orFormNative( OValue* a1) 1123 OR_NATIVE_PUB( orFormNative ) 1124 1124 { 1125 1125 OString* str = orMakeString( 0 ); … …  1132 1132 Converts a value to a parseable string. 1133 1133 */ 1134  void orMoldNative( OValue* a1) 1134 OR_NATIVE_PUB( orMoldNative ) 1135 1135 { 1136 1136 OString* str = orMakeString( 0 ); -
trunk/orca/series.c
r83 r94  108 108  109 109  110  void orLengthQNative( OValue* a1) 110 OR_NATIVE( orLengthQNative ) 111 111 { 112 112 int len; … …  142 142  143 143  144  void orHeadNative( OValue* a1) 144 OR_NATIVE( orHeadNative ) 145 145 { 146 146 if( a1->type == OT_LIST ) … …  156 156  157 157  158  void orTailNative( OValue* a1) 158 OR_NATIVE( orTailNative ) 159 159 { 160 160 if( a1->type == OT_LIST ) … …  173 173  174 174  175  void orBackNative( OValue* a1) 175 OR_NATIVE( orBackNative ) 176 176 { 177 177 if( a1->type == OT_LIST ) … …  194 194  195 195  196  void orNextNative( OValue* a1) 196 OR_NATIVE( orNextNative ) 197 197 { 198 198 if( a1->type == OT_LIST ) … …  215 215  216 216  217  void orIndexQNative( OValue* a1) 217 OR_NATIVE( orIndexQNative ) 218 218 { 219 219 if( a1->type == OT_LIST ) … …  230 230  231 231  232  void orHeadQNative( OValue* a1) 232 OR_NATIVE( orHeadQNative ) 233 233 { 234 234 int logic = OR_FALSE; … …  251 251  252 252  253  void orTailQNative( OValue* a1) 253 OR_NATIVE( orTailQNative ) 254 254 { 255 255 int logic = OR_FALSE; … …  274 274  275 275  276  void orClearNative( OValue* a1) 276 OR_NATIVE( orClearNative ) 277 277 { 278 278 switch( a1->type ) … …  413 413 #define REF_INS_ONLY a1+4 414 414  415  void orInsertNative( OValue* a1) 415 OR_NATIVE( orInsertNative ) 416 416 { 417 417 OValue* a2 = a1 + 1; … …  584 584 #define REF_RM_RANGE a1+2 585 585  586  void orRemoveNative( OValue* a1) 586 OR_NATIVE( orRemoveNative ) 587 587 { 588 588 int len; … …  827 827  828 828  829  void orFirstNative( OValue* a1) 829 OR_NATIVE( orFirstNative ) 830 830 { 831 831 if( a1->type == OT_OBJECT ) … …  842 842  843 843  844  void orSecondNative( OValue* a1) 844 OR_NATIVE( orSecondNative ) 845 845 { 846 846 orPick( a1, 1, orRESULT ); â€
