Changeset 94

Show
Ignore:
Timestamp:
03/17/06 22:41:34 (3 years ago)
Author:
krobillard
Message:

All natives now use the OR_NATIVE macro.

Location:
trunk/orca
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/context.c

    r84 r94  
    630630   /copy 
    631631*/ 
    632 void orBindNative( OValue* a1 ) 
     632OR_NATIVE_PUB( orBindNative ) 
    633633{ 
    634634#define REF_BIND_COPY   a1 + 2 
    … …  
    672672 
    673673 
    674 void orProtectNative( OValue* a1 ) 
     674OR_NATIVE_PUB( orProtectNative ) 
    675675{ 
    676676    OBlock* vblk; 
    … …  
    715715   word   [word!] 
    716716*/ 
    717 void orInNative( OValue* a1 ) 
     717OR_NATIVE_PUB( orInNative ) 
    718718{ 
    719719    OValue* a2 = a1 + 1; 
    … …  
    739739   body  [block!] 
    740740*/ 
    741 void orUseNative( OValue* a1 ) 
     741OR_NATIVE_PUB( orUseNative ) 
    742742{ 
    743743    OContext ctx; 
    … …  
    799799   body         [block!] 
    800800*/ 
    801 void orForeachNative( OValue* a1 ) 
     801OR_NATIVE_PUB( orForeachNative ) 
    802802{ 
    803803#ifdef OR_CONFIG_REBOL 
    … …  
    10321032#else  // -------------------------------------------------------------- 
    10331033    // 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). 
    10351035 
    10361036    OBlock* blk; 
    … …  
    12131213//see orForeachNative 
    12141214 
    1215 void orRemoveEachNative( OValue* a1 ) 
     1215OR_NATIVE_PUB( orRemoveEachNative ) 
    12161216{ 
    12171217    int rlen; 
    … …  
    15141514} 
    15151515 
     1516 
    15161517/*EOF*/ 
  • trunk/orca/error.c

    r54 r94  
    109109  Convert error! to object!. 
    110110*/ 
    111 void orDisarmNative( OValue* a1 ) 
     111OR_NATIVE_PUB( orDisarmNative ) 
    112112{ 
    113113    if( orIs(a1, OT_ERROR) ) 
  • trunk/orca/files.c

    r71 r94  
    4040 
    4141 
    42 void orOpenNative( OValue* a1 ) 
     42OR_NATIVE( orOpenNative ) 
    4343{ 
    4444    OArray* arr = &orEnv->devices; 
    … …  
    6868 
    6969 
    70 void orCloseNative( OValue* a1 ) 
     70OR_NATIVE( orCloseNative ) 
    7171{ 
    7272    OArray* arr = &orEnv->devices; 
    … …  
    7878 
    7979 
    80 void orExistsQNative( OValue* a1 ) 
     80OR_NATIVE( orExistsQNative ) 
    8181{ 
    8282    int logic = 0; 
    … …  
    8989 
    9090 
    91 void orSizeQNative( OValue* a1 ) 
     91OR_NATIVE( orSizeQNative ) 
    9292{ 
    9393    int size; 
    … …  
    106106 
    107107 
    108 void orDirQNative( OValue* a1 ) 
     108OR_NATIVE( orDirQNative ) 
    109109{ 
    110110    int status; 
    … …  
    118118 
    119119 
    120 void orModifiedQNative( OValue* a1 ) 
     120OR_NATIVE( orModifiedQNative ) 
    121121{ 
    122122    int status; 
    … …  
    245245#define REF_READ_SIZE       a1+6 
    246246 
    247 void orReadNative( OValue* a1 ) 
     247OR_NATIVE( orReadNative ) 
    248248{ 
    249249    if( a1->type == OT_FILE ) 
    … …  
    366366#define REF_APPEND    a1+3 
    367367 
    368 void orWriteNative( OValue* a1 ) 
     368OR_NATIVE( orWriteNative ) 
    369369{ 
    370370    if( a1->type == OT_FILE ) 
    … …  
    477477 
    478478 
    479 static void cleanPathNative( OValue* a1 ) 
     479OR_NATIVE( cleanPathNative ) 
    480480{ 
    481481    OString* str; 
    … …  
    498498 
    499499 
    500 void orCompressNative( OValue* a1 ) 
     500OR_NATIVE( orCompressNative ) 
    501501{ 
    502502    OString* str; 
    … …  
    528528 
    529529 
    530 void orDecompressNative( OValue* a1 ) 
     530OR_NATIVE( orDecompressNative ) 
    531531{ 
    532532#define BUF_LOW     32 
  • trunk/orca/gc.c

    r42 r94  
    810810 
    811811 
    812 void orMemoryNative( OValue* a1 ) 
     812OR_NATIVE_PUB( orMemoryNative ) 
    813813{ 
    814814    (void) a1; 
  • trunk/orca/math.c

    r54 r94  
    5353 
    5454 
    55 static void orSineNative( OValue* a1 ) 
     55OR_NATIVE( orSineNative ) 
    5656{ 
    5757    TRIG_FUNC( mathSine ) 
    … …  
    5959 
    6060 
    61 static void orCosineNative( OValue* a1 ) 
     61OR_NATIVE( orCosineNative ) 
    6262{ 
    6363    TRIG_FUNC( mathCosine ) 
    … …  
    6565 
    6666 
    67 static void orTangentNative( OValue* a1 ) 
     67OR_NATIVE( orTangentNative ) 
    6868{ 
    6969    TRIG_FUNC( mathTan ) 
    … …  
    7171 
    7272 
    73 static void orArcsineNative( OValue* a1 ) 
     73OR_NATIVE( orArcsineNative ) 
    7474{ 
    7575    TRIG_FUNC( mathASine ) 
    … …  
    7777 
    7878 
    79 static void orArccosineNative( OValue* a1 ) 
     79OR_NATIVE( orArccosineNative ) 
    8080{ 
    8181    TRIG_FUNC( mathACosine ) 
    … …  
    8383 
    8484 
    85 static void orArctangentNative( OValue* a1 ) 
     85OR_NATIVE( orArctangentNative ) 
    8686{ 
    8787    TRIG_FUNC( mathATan ) 
    … …  
    8989 
    9090 
    91 static void orSquareRootNative( OValue* a1 ) 
     91OR_NATIVE( orSquareRootNative ) 
    9292{ 
    9393    double n; 
    … …  
    109109 
    110110/* NOTE: random does not follow REBOL behavior. */ 
    111 static void orRandomNative( OValue* a1 ) 
     111OR_NATIVE( orRandomNative ) 
    112112{ 
    113113    if( orRefineSet(REF_RAND_SEED) ) 
    … …  
    266266 
    267267 
    268 static void orComplementNative( OValue* a1 ) 
     268OR_NATIVE( orComplementNative ) 
    269269{ 
    270270    switch( a1->type ) 
    … …  
    295295 
    296296 
    297 static void orAbsNative( OValue* a1 ) 
     297OR_NATIVE( orAbsNative ) 
    298298{ 
    299299    switch( a1->type ) 
    … …  
    323323 
    324324 
    325 static void orNegateNative( OValue* a1 ) 
     325OR_NATIVE( orNegateNative ) 
    326326{ 
    327327    switch( a1->type ) 
  • trunk/orca/math3d.c

    r54 r94  
    319319 
    320320 
    321 void orDotNative( OValue* a1 ) 
     321OR_NATIVE_PUB( orDotNative ) 
    322322{ 
    323323    float* a = &a1->vec3.x; 
    … …  
    329329 
    330330 
    331 void orCrossNative( OValue* a1 ) 
     331OR_NATIVE_PUB( orCrossNative ) 
    332332{ 
    333333    float* a = &a1->vec3.x; 
    … …  
    340340 
    341341 
    342 void orNormalizeNative( OValue* a1 ) 
     342OR_NATIVE_PUB( orNormalizeNative ) 
    343343{ 
    344344    orNormalize( &a1->vec3.x ); 
  • trunk/orca/ovalue.c

    r79 r94  
    936936 
    937937 
    938 void orToNative( OValue* a1 ) 
     938OR_NATIVE( orToNative ) 
    939939{ 
    940940    OValue* res; 
    … …  
    12131213 
    12141214 
    1215 void orLoadNative( OValue* a1 ) 
     1215OR_NATIVE( orLoadNative ) 
    12161216{ 
    12171217    OBlock* blk; 
    … …  
    13501350#define REF_DO_ARG      a1+2 
    13511351 
    1352 void orDoNative( OValue* a1 ) 
     1352OR_NATIVE_PUB( orDoNative ) 
    13531353{ 
    13541354    if( orIs(a1, OT_BLOCK) || orIs(a1, OT_PAREN) ) 
    … …  
    14151415 
    14161416 
    1417 void orSetNative( OValue* a1 ) 
     1417OR_NATIVE( orSetNative ) 
    14181418{ 
    14191419    if( orIsWord(a1->type) ) 
    … …  
    14321432 
    14331433 
    1434 void orUnsetNative( OValue* a1 ) 
     1434OR_NATIVE( orUnsetNative ) 
    14351435{ 
    14361436    OValue* val; 
    … …  
    14601460 
    14611461 
    1462 void orValueQNative( OValue* a1 ) 
     1462OR_NATIVE( orValueQNative ) 
    14631463{ 
    14641464    int logic = 0; 
    … …  
    14791479 
    14801480 
    1481 void orGetNative( OValue* a1 ) 
     1481OR_NATIVE( orGetNative ) 
    14821482{ 
    14831483    if( orIsWord(a1->type) ) 
    … …  
    14951495 
    14961496 
    1497 void orNotNative( OValue* a1 ) 
     1497OR_NATIVE( orNotNative ) 
    14981498{ 
    14991499    int logic; 
    … …  
    15081508 
    15091509 
    1510 void orIfNative( OValue* a1 ) 
     1510OR_NATIVE( orIfNative ) 
    15111511{ 
    15121512    if( orIfTrue(a1) ) 
    … …  
    15201520 
    15211521 
    1522 void orUnlessNative( OValue* a1 ) 
     1522OR_NATIVE( orUnlessNative ) 
    15231523{ 
    15241524    if( orIfFalse(a1) ) 
    … …  
    15321532 
    15331533 
    1534 void orEitherNative( OValue* a1 ) 
     1534OR_NATIVE( orEitherNative ) 
    15351535{ 
    15361536    OValue* blkArg = a1 + 2;; 
    … …  
    15441544 
    15451545 
    1546 void orLoopNative( OValue* a1 ) 
     1546OR_NATIVE( orLoopNative ) 
    15471547{ 
    15481548    OIndex body; 
    … …  
    15641564 
    15651565 
    1566 void orRepeatNative( OValue* a1 ) 
     1566OR_NATIVE( orRepeatNative ) 
    15671567{ 
    15681568    OValue* wval; 
    … …  
    16321632 
    16331633 
    1634 void orUntilNative( OValue* a1 ) 
     1634OR_NATIVE( orUntilNative ) 
    16351635{ 
    16361636    OValue* res; 
    … …  
    16571657 
    16581658 
    1659 void orWhileNative( OValue* a1 ) 
     1659OR_NATIVE( orWhileNative ) 
    16601660{ 
    16611661    OValue* res; 
    … …  
    17251725 
    17261726 
    1727 void orBreakNative( OValue* a1 ) 
     1727OR_NATIVE( orBreakNative ) 
    17281728{ 
    17291729    OValue* res = a1; 
    … …  
    17321732 
    17331733 
    1734 void orReturnNative( OValue* a1 ) 
     1734OR_NATIVE( orReturnNative ) 
    17351735{ 
    17361736    OValue* res = a1 + 1; 
    … …  
    17391739 
    17401740 
    1741 void orExitNative( OValue* a1 ) 
     1741OR_NATIVE( orExitNative ) 
    17421742{ 
    17431743    OValue* res = a1 + 1; 
    … …  
    17711771 
    17721772 
    1773 void orRecycleNative( OValue* a1 ) 
     1773OR_NATIVE( orRecycleNative ) 
    17741774{ 
    17751775#define REF_REC_OFF  a1 
    … …  
    17911791 
    17921792 
    1793 void orTypeQNative( OValue* a1 ) 
     1793OR_NATIVE( orTypeQNative ) 
    17941794{ 
    17951795#define REF_TYPEQ_WORD   a1+1 
    … …  
    18191819  try: native [ block [block!] ] 
    18201820*/ 
    1821 void orTryNative( OValue* a1 ) 
     1821OR_NATIVE( orTryNative ) 
    18221822{ 
    18231823   orEvalBlock( orBLOCK( a1 ), a1->series.it ); 
    … …  
    18351835  catch: native [ block [block!] /name word [word! block!] ] 
    18361836*/ 
    1837 void orCatchNative( OValue* a1 ) 
     1837OR_NATIVE( orCatchNative ) 
    18381838{ 
    18391839    //OIndex nameBlk = 0; 
    … …  
    18951895  throw: native [ value /name word [word!] ] 
    18961896*/ 
    1897 void orThrowNative( OValue* a1 ) 
     1897OR_NATIVE( orThrowNative ) 
    18981898{ 
    18991899#define REF_NAME   a1+1 
    … …  
    28922892 
    28932893 
    2894 void orReduceNative( OValue* a1 ) 
     2894OR_NATIVE_PUB( orReduceNative ) 
    28952895{ 
    28962896    if( (a1->type == OT_BLOCK) || 
    … …  
    29662966 
    29672967 
    2968 void orComposeNative( OValue* a1 ) 
     2968OR_NATIVE( orComposeNative ) 
    29692969{ 
    29702970#define REF_COMP_DEEP     a1+1 
    … …  
    29932993   Result is the first value that is not false or none! 
    29942994*/ 
    2995 void orAnyNative( OValue* a1 ) 
     2995OR_NATIVE( orAnyNative ) 
    29962996{ 
    29972997    OValue* res; 
    … …  
    30283028 
    30293029 
    3030 void orAllNative( OValue* a1 ) 
     3030OR_NATIVE( orAllNative ) 
    30313031{ 
    30323032    OValue* res; 
    … …  
    31943194 
    31953195 
    3196 void orDumpNative( OValue* a1 ) 
     3196OR_NATIVE( orDumpNative ) 
    31973197{ 
    31983198    if( orIsBlock(a1->type) || a1->type == OT_LIST ) 
    … …  
    41184118 
    41194119 
    4120 void orNativeNative( OValue* a1 ) 
     4120OR_NATIVE_PUB( orNativeNative ) 
    41214121{ 
    41224122    if( a1->type == OT_BLOCK ) 
    … …  
    42194219//extern void orRebindClosure( OIndex blkN ); 
    42204220 
    4221 void orDoesNative( OValue* a1 ) 
     4221OR_NATIVE( orDoesNative ) 
    42224222{ 
    42234223    if( a1->type == OT_BLOCK ) 
    … …  
    42464246 
    42474247//void orMakeFunction( OBlock* spec, OBlock* body ) 
    4248 void orFuncNative( OValue* a1 ) 
     4248OR_NATIVE( orFuncNative ) 
    42494249{ 
    42504250    OContext ctx; 
    … …  
    44544454    orNative( orDumpNative,    "dump" ); 
    44554455#endif 
    4456  
    4457  
    44584456} 
    44594457 
  • trunk/orca/parse.c

    r55 r94  
    972972   parse series rules 
    973973*/ 
    974 void orParseNative( OValue* a1 ) 
     974OR_NATIVE_PUB( orParseNative ) 
    975975{ 
    976976    OValue* rules = a1 + 1; 
  • trunk/orca/print.c

    r78 r94  
    11211121  Converts a value to a string. 
    11221122*/ 
    1123 void orFormNative( OValue* a1 ) 
     1123OR_NATIVE_PUB( orFormNative ) 
    11241124{ 
    11251125    OString* str = orMakeString( 0 ); 
    … …  
    11321132  Converts a value to a parseable string. 
    11331133*/ 
    1134 void orMoldNative( OValue* a1 ) 
     1134OR_NATIVE_PUB( orMoldNative ) 
    11351135{ 
    11361136    OString* str = orMakeString( 0 ); 
  • trunk/orca/series.c

    r83 r94  
    108108 
    109109 
    110 void orLengthQNative( OValue* a1 ) 
     110OR_NATIVE( orLengthQNative ) 
    111111{ 
    112112    int len; 
    … …  
    142142 
    143143 
    144 void orHeadNative( OValue* a1 ) 
     144OR_NATIVE( orHeadNative ) 
    145145{ 
    146146    if( a1->type == OT_LIST ) 
    … …  
    156156 
    157157 
    158 void orTailNative( OValue* a1 ) 
     158OR_NATIVE( orTailNative ) 
    159159{ 
    160160    if( a1->type == OT_LIST ) 
    … …  
    173173 
    174174 
    175 void orBackNative( OValue* a1 ) 
     175OR_NATIVE( orBackNative ) 
    176176{ 
    177177    if( a1->type == OT_LIST ) 
    … …  
    194194 
    195195 
    196 void orNextNative( OValue* a1 ) 
     196OR_NATIVE( orNextNative ) 
    197197{ 
    198198    if( a1->type == OT_LIST ) 
    … …  
    215215 
    216216 
    217 void orIndexQNative( OValue* a1 ) 
     217OR_NATIVE( orIndexQNative ) 
    218218{ 
    219219    if( a1->type == OT_LIST ) 
    … …  
    230230 
    231231 
    232 void orHeadQNative( OValue* a1  ) 
     232OR_NATIVE( orHeadQNative  ) 
    233233{ 
    234234    int logic = OR_FALSE; 
    … …  
    251251 
    252252 
    253 void orTailQNative( OValue* a1  ) 
     253OR_NATIVE( orTailQNative  ) 
    254254{ 
    255255    int logic = OR_FALSE; 
    … …  
    274274 
    275275 
    276 void orClearNative( OValue* a1 ) 
     276OR_NATIVE( orClearNative ) 
    277277{ 
    278278    switch( a1->type ) 
    … …  
    413413#define REF_INS_ONLY    a1+4 
    414414 
    415 void orInsertNative( OValue* a1 ) 
     415OR_NATIVE( orInsertNative ) 
    416416{ 
    417417    OValue* a2 = a1 + 1; 
    … …  
    584584#define REF_RM_RANGE   a1+2 
    585585 
    586 void orRemoveNative( OValue* a1 ) 
     586OR_NATIVE( orRemoveNative ) 
    587587{ 
    588588    int len; 
    … …  
    827827 
    828828 
    829 void orFirstNative( OValue* a1 ) 
     829OR_NATIVE( orFirstNative ) 
    830830{ 
    831831    if( a1->type == OT_OBJECT ) 
    … …  
    842842 
    843843 
    844 void orSecondNative( OValue* a1 ) 
     844OR_NATIVE( orSecondNative ) 
    845845{ 
    846846    orPick( a1, 1, orRESULT ); 
    â€