Changeset 144 for trunk/orca/ovalue.h

Show
Ignore:
Timestamp:
05/11/06 14:23:03 (3 years ago)
Author:
krobillard
Message:

Native arguments are now kept on the stack until after the call and the
result is now always put into a1.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/ovalue.h

    r140 r144  
    292292    int (*open)( OValue* spec, OContext* ctx ); 
    293293    void (*close)( OContext* ); 
    294     void (*read)( OContext* ); 
     294    void (*read)( OContext*, OValue* a1 ); 
    295295    void (*write)( OContext*, OValue* a1 ); 
    296296} 
     
    457457#define orSTRINGS       ((OString*) orEnv->strings.buf) 
    458458#define orBLOCKS        ((OBlock*) orEnv->blocks.buf) 
    459 #define orRESULT        (orEnv->dataStack.values + orEnv->dataStack.used) 
     459#define orTOS           (orEnv->dataStack.values + orEnv->dataStack.used) 
    460460 
    461461#define orSTRING(val)   (orSTRINGS + (val)->index) 
     
    562562 
    563563#define orResult(t,v) \ 
    564    {OValue* _or_result = orRESULT; \ 
    565     orSetTF(_or_result, t); \ 
    566     _or_result->index = v;} 
    567  
    568 #define orResultCopy(v) \ 
    569     orEnv->dataStack.values[ orEnv->dataStack.used ] = v 
     564    orSetTF(a1, t); \ 
     565    a1->index = v; 
     566 
     567#define orResultCopy(v)     orCopyV(a1,v) 
    570568 
    571569#define orResultSeries(t,w,idx) \ 
    572    {OValue* _or_result = orRESULT; \ 
    573     orSetTF(_or_result, t); \ 
    574     orSetSeries(_or_result,w,idx);} 
     570    orSetTF(a1, t); \ 
     571    orSetSeries(a1,w,idx) 
    575572 
    576573#define orResultSTRING(i)   orResultSeries(OT_STRING,i,0) 
     
    584581 
    585582#define orResultDECIMAL(v) \ 
    586    {OValue* _or_result = orRESULT; \ 
    587     orSetTF( _or_result, OT_DECIMAL ); \ 
    588     _or_result->num.decimal = v;} 
     583    orSetTF(a1, OT_DECIMAL); \ 
     584    a1->num.decimal = v 
    589585 
    590586#define OR_NATIVE(func)     static void func( OValue* a1 )