Ignore:
Timestamp:
Jul 21, 2007, 11:47:40 PM (17 years ago)
Author:
dai_9181
Message:

CodeGeneratorクラスのベースを実装

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/include/NativeCode.h

    r224 r225  
    22
    33#include <vector>
     4
     5#include <BoostSerializationSupport.h>
    46
    57class Schedule
     
    911    {
    1012        None,
     13        GlobalVar,      // グローバル変数スケジュール
     14        LocalVar,       // ローカル変数スケジュール
     15        Relocation,     // リロケーション情報スケジュール
    1116    };
    1217
     
    123128        memcpy( this->codeBuffer + this->size, codeBuffer, size );
    124129        this->size += size;
     130
     131        // 未完成
     132        extern char *OpBuffer;
     133        extern int obp;
     134        memcpy( OpBuffer, codeBuffer, size );
     135        obp += size;
    125136    }
    126137    void Put( const NativeCode &nativeCode )
     
    132143        codeBuffer[size++] = c;
    133144        Realloc();
     145
     146
     147
     148        // 未完成
     149        extern char *OpBuffer;
     150        extern int obp;
     151        OpBuffer[obp++]=c;
    134152    }
    135153    void Put( long l, Schedule::Type scheduleType = Schedule::None )
     
    142160        *((long *)(codeBuffer+size))=l;
    143161        size += sizeof(long);
     162
     163
     164
     165        // 未完成
     166        extern char *OpBuffer;
     167        extern int obp;
     168        *((long *)(OpBuffer+obp))=l;
     169        obp+=sizeof(long);
    144170    }
    145171};
Note: See TracChangeset for help on using the changeset viewer.