Changeset 25

Show
Ignore:
Timestamp:
02/06/06 23:30:15 (3 years ago)
Author:
krobillard
Message:

series which/index renamed to n/it.

Location:
trunk/orca
Files:
18 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/TODO

    r22 r25  
    2727  * Words are stored in single string. 
    2828  * UCell union 
    29   * Series.which/index -> series.n/it 
    3029  * Value structure hidden more using macros (ur_int(), etc.) 
    3130  * Tokenizer has no nested block limit. 
  • trunk/orca/bytecode.c

    r1 r25  
    142142        { 
    143143            OBlock* blk = orBLOCKS + val->index; 
    144             OValue* it  = blk->values + val->series.index; 
     144            OValue* it  = blk->values + val->series.it; 
    145145            OValue* end = blk->values + blk->used; 
    146146            int len = end - it; 
     
    176176        { 
    177177            OString* str = orSTRINGS + val->index; 
    178             int len = str->used - val->series.index; 
     178            int len = str->used - val->series.it; 
    179179 
    180180            if( len > 255 ) 
     
    197197            *cp++ = len & 0xff; 
    198198 
    199             memCpy( cp, str->charArray + val->series.index, len ); 
     199            memCpy( cp, str->charArray + val->series.it, len ); 
    200200        } 
    201201            break; 
  • trunk/orca/context.c

    r1 r25  
    298298        if( (it->type == OT_BLOCK) || (it->type == OT_PAREN) ) 
    299299        { 
    300             OBlock* blk = orCopyBlock( it->index, it->series.index, 1 ); 
     300            OBlock* blk = orCopyBlock( it->index, it->series.it, 1 ); 
    301301            orSetSeries( copy, orBlockN(blk), 0 );  
    302302        } 
     
    696696 
    697697        blk = orBLOCK( a1 ); 
    698         it  = blk->values + a1->series.index; 
     698        it  = blk->values + a1->series.it; 
    699699        end = blk->values + blk->used; 
    700700 
     
    725725    orRefPop( 1 ); 
    726726 
    727     orEvalBlock( orBlockPtr( a2->index ), a2->series.index ); 
     727    orEvalBlock( orBlockPtr( a2->index ), a2->series.it ); 
    728728} 
    729729 
     
    975975    OValue* a2 = a1 + 1; 
    976976    OIndex serN = a2->index; 
    977     OIndex si   = a2->series.index; 
     977    OIndex si   = a2->series.it; 
    978978    OIndex send; 
    979979    OIndex body = (a1 + 2)->index; 
    980     OIndex bi   = (a1 + 2)->series.index; 
     980    OIndex bi   = (a1 + 2)->series.it; 
    981981    OValue saveA1; 
    982982 
     
    984984    { 
    985985        blk = orBLOCK( a1 ); 
    986         wval = blk->values + a1->series.index; 
     986        wval = blk->values + a1->series.it; 
    987987        wend = blk->values + blk->used; 
    988988 
     
    10851085            orResultNONE; 
    10861086 
    1087             if( a2->series.index ) 
     1087            if( a2->series.it ) 
    10881088            { 
    10891089                OValue* begin; 
     
    10941094                blk = orBLOCK(a2); 
    10951095                begin = blk->values; 
    1096                 it    = begin + a2->series.index; 
     1096                it    = begin + a2->series.it; 
    10971097 
    10981098                while( it->LIST_NEXT > 0 ) 
  • trunk/orca/files.c

    r2 r25  
    8282    OString* str = orSTRING(a1); 
    8383    orCTermStr( str ); 
    84     if( orIsDir( str->charArray + a1->series.index ) > -1 ) 
     84    if( orIsDir( str->charArray + a1->series.it ) > -1 ) 
    8585        logic = 1; 
    8686    orResult( OT_LOGIC, logic ); 
     
    9393    OString* str = orSTRING(a1); 
    9494    orCTermStr( str ); 
    95     size = orFileSize( str->charArray + a1->series.index ); 
     95    size = orFileSize( str->charArray + a1->series.it ); 
    9696    if( size < 0 ) 
    9797    { 
     
    110110    OString* str = orSTRING(a1); 
    111111    orCTermStr( str ); 
    112     status = orIsDir( str->charArray + a1->series.index ); 
     112    status = orIsDir( str->charArray + a1->series.it ); 
    113113    if( status < 0 ) 
    114114        status = 0; 
     
    122122    OString* str = orSTRING(a1); 
    123123    orCTermStr( str ); 
    124     status = orFileModified( str->charArray + a1->series.index, orRESULT ); 
     124    status = orFileModified( str->charArray + a1->series.it, orRESULT ); 
    125125    if( status < 0 ) 
    126126    { 
     
    254254        orCTermStr( str ); 
    255255 
    256         fn = str->charArray + a1->series.index; 
     256        fn = str->charArray + a1->series.it; 
    257257        n = orIsDir( fn ); 
    258258        if( n < 0 ) 
     
    506506 
    507507    str = orSTRING(a1); 
    508     len = str->used - a1->series.index; 
     508    len = str->used - a1->series.it; 
    509509    blen = len + (len / 99) + 600; 
    510510    bin = orMakeString( blen /*+ 4*/ ); 
     
    513513    { 
    514514        ret = BZ2_bzBuffToBuffCompress( bin->charArray /*+ 4*/, &blen, 
    515                                         str->charArray + a1->series.index, len, 
     515                                        str->charArray + a1->series.it, len, 
    516516                                        3, 0, 0 ); 
    517517        if( ret == BZ_OUTBUFF_FULL ) 
  • trunk/orca/gl/dlist.c

    r1 r25  
    313313            case DLP_TEXT_STR: 
    314314                // TODO: Hold string. 
    315                 RP_ADD_ARG( ROP_TEXT, 0, cbp.values[1].series.index ); 
     315                RP_ADD_ARG( ROP_TEXT, 0, cbp.values[1].series.it ); 
    316316                pc->list = cbp.values[1].index; 
    317317                RP_INC; 
     
    327327            case DLP_VERTS: 
    328328                // TODO: Hold block. 
    329                 RP_ADD_ARG( ROP_VERTS, 0, cbp.values[1].series.index ); 
     329                RP_ADD_ARG( ROP_VERTS, 0, cbp.values[1].series.it ); 
    330330                pc->list = cbp.values[1].index; 
    331331                RP_INC; 
     
    334334            case DLP_NORMALS: 
    335335                // TODO: Hold block. 
    336                 RP_ADD_ARG( ROP_NORMALS, 0, cbp.values[1].series.index ); 
     336                RP_ADD_ARG( ROP_NORMALS, 0, cbp.values[1].series.it ); 
    337337                pc->list = cbp.values[1].index; 
    338338                RP_INC; 
     
    341341            case DLP_COLORS: 
    342342                // TODO: Hold block. 
    343                 RP_ADD_ARG( ROP_COLORS, 0, cbp.values[1].series.index ); 
     343                RP_ADD_ARG( ROP_COLORS, 0, cbp.values[1].series.it ); 
    344344                pc->list = cbp.values[1].index; 
    345345                RP_INC; 
     
    348348            case DLP_UVS: 
    349349                // TODO: Hold block. 
    350                 RP_ADD_ARG( ROP_UVS, 0, cbp.values[1].series.index ); 
     350                RP_ADD_ARG( ROP_UVS, 0, cbp.values[1].series.it ); 
    351351                pc->list = cbp.values[1].index; 
    352352                RP_INC; 
     
    355355            case DLP_QUADS: 
    356356                // TODO: Hold block. 
    357                 RP_ADD_ARG( ROP_QUADS, 0, cbp.values[2].series.index ); 
     357                RP_ADD_ARG( ROP_QUADS, 0, cbp.values[2].series.it ); 
    358358                pc->list = cbp.values[2].index; 
    359359                RP_INC; 
     
    364364            case DLP_TRIS: 
    365365                // TODO: Hold block. 
    366                 RP_ADD_ARG( ROP_TRIS, 0, cbp.values[2].series.index ); 
     366                RP_ADD_ARG( ROP_TRIS, 0, cbp.values[2].series.it ); 
    367367                pc->list = cbp.values[2].index; 
    368368                RP_INC; 
     
    373373            case DLP_STRIP: 
    374374                // TODO: Hold block. 
    375                 RP_ADD_ARG( ROP_TRISTRIP, 0, cbp.values[2].series.index ); 
     375                RP_ADD_ARG( ROP_TRISTRIP, 0, cbp.values[2].series.it ); 
    376376                pc->list = cbp.values[2].index; 
    377377                RP_INC; 
     
    382382            case DLP_FAN: 
    383383                // TODO: Hold block. 
    384                 RP_ADD_ARG( ROP_TRIFAN, 0, cbp.values[2].series.index ); 
     384                RP_ADD_ARG( ROP_TRIFAN, 0, cbp.values[2].series.it ); 
    385385                pc->list = cbp.values[2].index; 
    386386                RP_INC; 
     
    391391            case DLP_POINTS: 
    392392                // TODO: Hold block. 
    393                 RP_ADD_ARG( ROP_POINTS, 0, cbp.values[2].series.index ); 
     393                RP_ADD_ARG( ROP_POINTS, 0, cbp.values[2].series.it ); 
    394394                pc->list = cbp.values[2].index; 
    395395                RP_INC; 
     
    400400            case DLP_LINES: 
    401401                // TODO: Hold block. 
    402                 RP_ADD_ARG( ROP_LINES, 0, cbp.values[2].series.index ); 
     402                RP_ADD_ARG( ROP_LINES, 0, cbp.values[2].series.it ); 
    403403                pc->list = cbp.values[2].index; 
    404404                RP_INC; 
     
    510510    orArrayInit( &prog, sizeof(RenderWord), orSeriesLen(blk,a2) ); 
    511511 
    512     error = compileProg( blk->values + a2->series.index, 
     512    error = compileProg( blk->values + a2->series.it, 
    513513                         blk->values + blk->used, &prog ); 
    514514    if( error ) 
  • trunk/orca/gl/gx.c

    r1 r25  
    197197                iv[ INPUT_MY ].integer   = gView->height - event->y - 1; 
    198198 
    199                 orEvalBlock( orBLOCKS + blkV->index, blkV->series.index ); 
     199                orEvalBlock( orBLOCKS + blkV->index, blkV->series.it ); 
    200200                gxHandleError(); 
    201201            } 
     
    214214                iv[ INPUT_MY ].integer   = gView->height - event->y - 1; 
    215215 
    216                 orEvalBlock( orBLOCKS + blkV->index, blkV->series.index ); 
     216                orEvalBlock( orBLOCKS + blkV->index, blkV->series.it ); 
    217217                gxHandleError(); 
    218218            } 
     
    244244                } 
    245245 
    246                 orEvalBlock( orBLOCKS + blkV->index, blkV->series.index ); 
     246                orEvalBlock( orBLOCKS + blkV->index, blkV->series.it ); 
    247247                gxHandleError(); 
    248248            } 
     
    262262                iv[ INPUT_DY ].integer = event->y; 
    263263 
    264                 orEvalBlock( orBLOCKS + blkV->index, blkV->series.index ); 
     264                orEvalBlock( orBLOCKS + blkV->index, blkV->series.it ); 
    265265                gxHandleError(); 
    266266            } 
     
    276276                if( hval ) 
    277277                { 
    278                     orEvalBlock( orBLOCKS + hval->index, hval->series.index ); 
     278                    orEvalBlock( orBLOCKS + hval->index, hval->series.it ); 
    279279                    gxHandleError(); 
    280280                } 
     
    291291                if( hval ) 
    292292                { 
    293                     orEvalBlock( orBLOCKS + hval->index, hval->series.index ); 
     293                    orEvalBlock( orBLOCKS + hval->index, hval->series.it ); 
    294294                    gxHandleError(); 
    295295                } 
     
    662662    orArrayInit( &prog, sizeof(RenderWord), blk->used ); 
    663663 
    664     error = compileProg( blk->values + a1->series.index, 
     664    error = compileProg( blk->values + a1->series.it, 
    665665                         blk->values + blk->used, &prog ); 
    666666    if( error ) 
     
    14801480void keyHandlerNative( OValue* a1 ) 
    14811481{ 
    1482     if( validKeyHandlerBlock( a1->index, a1->series.index ) ) 
    1483     { 
    1484         OBlock* blk2 = orCopyBlock( a1->index, a1->series.index, 0 ); 
     1482    if( validKeyHandlerBlock( a1->index, a1->series.it ) ) 
     1483    { 
     1484        OBlock* blk2 = orCopyBlock( a1->index, a1->series.it, 0 ); 
    14851485        mapKeyAtoms( blk2 ); 
    14861486        orSetSeries( a1, orBlockN(blk2), 0 ); 
  • trunk/orca/gl/project.r

    r1 r25  
    1111    include_from %.. 
    1212    include_from %../util 
    13     libs_from %.. %orca 
     13    libs_from %.. %orca0 
    1414 
    1515    macx [ 
  • trunk/orca/math.c

    r1 r25  
    138138                { 
    139139                    rn = genrand_int32(); 
    140                     used -= a1->series.index; 
    141                     a1->series.index += rn % used; 
     140                    used -= a1->series.it; 
     141                    a1->series.it += rn % used; 
    142142                    return; 
    143143                } 
     
    280280        case OT_BITSET: 
    281281        { 
    282             OString* bin = orCopyString( a1->index, a1->series.index ); 
     282            OString* bin = orCopyString( a1->index, a1->series.it ); 
    283283            uint8_t* it  = bin->byteArray; 
    284284            uint8_t* end = bin->byteArray + bin->used; 
  • trunk/orca/math3d.c

    r1 r25  
    279279 
    280280    OBlock* blk = orBLOCK(blkV); 
    281     OValue* it  = blk->values + blkV->series.index; 
     281    OValue* it  = blk->values + blkV->series.it; 
    282282    OValue* end = blk->values + blk->used; 
    283283    float* vend = vec + count; 
  • trunk/orca/op.c

    r1 r25  
    437437            case OT_SETPATH: 
    438438                // TODO: compare all values. 
    439                 if( (a->index == b->index) && 
    440                     (a->series.index == b->series.index) ) 
     439                if( (a->series.n == b->series.n) && 
     440                    (a->series.it == b->series.it) ) 
    441441                    logic = 1; 
    442442                break; 
     
    568568        else if( orIsSeries(a->type) ) 
    569569        { 
    570             if( (a->index == b->index) && 
    571                 (a->series.index == b->series.index) ) 
     570            if( (a->series.n == b->series.n) && 
     571                (a->series.it == b->series.it) ) 
    572572                logic = 1; 
    573573        } 
  • trunk/orca/ovalue.c

    r3 r25  
    617617                OContext ctx; 
    618618                OString* str = orSTRING( from ); 
    619                 int start = from->series.index; 
     619                int start = from->series.it; 
    620620 
    621621                orGlobalCtx( ctx ); 
     
    658658            { 
    659659                OString* str = orSTRING(from); 
    660                 char* it  = str->charArray + from->series.index; 
     660                char* it  = str->charArray + from->series.it; 
    661661                char* end = str->charArray + str->used; 
    662662                const char* fin; 
     
    677677            { 
    678678                OString* str = orSTRING(from); 
    679                 char* it  = str->charArray + from->series.index; 
     679                char* it  = str->charArray + from->series.it; 
    680680                char* end = str->charArray + str->used; 
    681681                const char* fin; 
     
    690690            { 
    691691                OBlock* blk = orBLOCK( from ); 
    692                 OValue* it  = blk->values + from->series.index; 
     692                OValue* it  = blk->values + from->series.it; 
    693693                OValue* end = blk->values + blk->used; 
    694694                if( (end - it) == 2 && 
     
    709709            { 
    710710                OBlock* blk = orBLOCK( from ); 
    711                 OValue* it  = blk->values + from->series.index; 
     711                OValue* it  = blk->values + from->series.it; 
    712712                OValue* end = blk->values + blk->used; 
    713713                uint8_t* tuple = res->tuple; 
     
    771771                { 
    772772                    OContext ctx; 
    773                     if( orMakeObject( orBLOCK(a2), a2->series.index, &ctx ) ) 
     773                    if( orMakeObject( orBLOCK(a2), a2->series.it, &ctx ) ) 
    774774                    { 
    775775                        orSetTF( a1, OT_OBJECT ); 
     
    787787                { 
    788788                case OT_STRING: 
    789                     bin = orMakeCharset( orSTRING(a2), a2->series.index ); 
     789                    bin = orMakeCharset( orSTRING(a2), a2->series.it ); 
    790790                    break; 
    791791 
    792792                case OT_BINARY: 
    793                     bin = orCopyString( a2->index, a2->series.index ); 
     793                    bin = orCopyString( a2->index, a2->series.it ); 
    794794                    break; 
    795795 
    796796                case OT_BLOCK: 
    797                     bin = _makeBitset( orBLOCK(a2), a2->series.index ); 
     797                    bin = _makeBitset( orBLOCK(a2), a2->series.it ); 
    798798                    break; 
    799799                } 
     
    811811                { 
    812812                    OBlock* blk = orBLOCK( a2 ); 
    813                     OValue* it  = blk->values + a2->series.index; 
     813                    OValue* it  = blk->values + a2->series.it; 
    814814                    OValue* end = blk->values + blk->used; 
    815815                    int len = end - it; 
     
    884884        { 
    885885            OContext ctx; 
    886             if( orMakeClone( &a1->ctx, &ctx, a2->index, a2->series.index ) ) 
     886            if( orMakeClone( &a1->ctx, &ctx, a2->index, a2->series.it ) ) 
    887887            { 
    888888                orSetTF( a1, OT_OBJECT ); 
     
    955955            orSetSeries( res, orBlockN(blk), 0 ); 
    956956 
    957             if( bin->used > a2->series.index ) 
     957            if( bin->used > a2->series.it ) 
    958958            { 
    959959                OIndex len; 
    960960                const uint8_t* code; 
    961                 code = bin->byteArray + a2->series.index; 
     961                code = bin->byteArray + a2->series.it; 
    962962                if( orByteCodeBlock( &code, &len ) ) 
    963963                    orRevaluateByteCodes( code, len, blk ); 
     
    987987            OString* str; 
    988988            OBlock* blk = orBLOCK(a2); 
    989             OValue* it  = blk->values + a2->series.index; 
     989            OValue* it  = blk->values + a2->series.it; 
    990990            OValue* end = blk->values + blk->used; 
    991991 
     
    11821182    { 
    11831183        OString* str = orSTRING( a1 ); 
    1184         blk = orTokenize( str->charArray + a1->series.index, 
     1184        blk = orTokenize( str->charArray + a1->series.it, 
    11851185                          str->charArray + str->used ); 
    11861186        if( blk ) 
     
    13161316    if( orIs(a1, OT_BLOCK) || orIs(a1, OT_PAREN) ) 
    13171317    { 
    1318         orEvalBlock( orBLOCK( a1 ), a1->series.index ); 
     1318        orEvalBlock( orBLOCK( a1 ), a1->series.it ); 
    13191319    } 
    13201320    else if( orIs(a1, OT_FILE) ) 
     
    14071407    { 
    14081408        OBlock* blk = orBLOCK(a1); 
    1409         OValue* it  = blk->values + a1->series.index; 
     1409        OValue* it  = blk->values + a1->series.it; 
    14101410        OValue* end = blk->values + blk->used; 
    14111411        while( it != end ) 
     
    14771477        { 
    14781478            OValue* a2 = a1 + 1; 
    1479             orEvalBlock( orBLOCK( a2 ), a2->series.index ); 
     1479            orEvalBlock( orBLOCK( a2 ), a2->series.it ); 
    14801480            return; 
    14811481        } 
     
    14911491    { 
    14921492        OValue* a2 = a1 + 1; 
    1493         orEvalBlock( orBLOCK( a2 ), a2->series.index ); 
     1493        orEvalBlock( orBLOCK( a2 ), a2->series.it ); 
    14941494        return; 
    14951495    } 
     
    15061506            --blkArg; 
    15071507    } 
    1508     orEvalBlock( orBLOCK( blkArg ), blkArg->series.index ); 
     1508    orEvalBlock( orBLOCK( blkArg ), blkArg->series.it ); 
    15091509} 
    15101510 
     
    15181518    ++a1; 
    15191519    body = a1->index; 
    1520     bi   = a1->series.index; 
     1520    bi   = a1->series.it; 
    15211521 
    15221522    while( n > 0 ) 
     
    15371537    OValue* a3 = a1 + 2; 
    15381538    OIndex body = a3->index; 
    1539     OIndex bi   = a3->series.index; 
     1539    OIndex bi   = a3->series.it; 
    15401540 
    15411541    orWordVal(