Changeset 56 in dev for BasicCompiler_Common
- Timestamp:
- Feb 15, 2007, 3:39:40 AM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Class.cpp
r53 r56 13 13 14 14 CMember *pCompilingMethod; 15 16 int AddDataTable(char *buffer,int length);17 15 18 16 … … 412 410 413 411 414 LONG_PTR CClass::AddVtblDataTable(SUBINFO **ppsi,int length){415 return AddDataTable((char *)ppsi,length);416 }417 412 int CClass::GetFuncNumInVtbl( const SUBINFO *psi ) const 418 413 { … … 454 449 } 455 450 456 vtbl_offset= AddDataTable((char*)ppsi,vtbl_num*sizeof(LONG_PTR));451 vtbl_offset=dataTable.AddBinary((void *)ppsi,vtbl_num*sizeof(LONG_PTR)); 457 452 458 453 for( int i=0; i < vtbl_num; i++ ){ … … 467 462 if(vtbl_offset==-1) return; 468 463 469 extern char *DataTable;470 464 LONG_PTR *pVtbl; 471 pVtbl=(LONG_PTR *)( DataTable+vtbl_offset);465 pVtbl=(LONG_PTR *)((char *)dataTable.GetPtr()+vtbl_offset); 472 466 473 467 int i; -
BasicCompiler_Common/Class.h
r53 r56 140 140 private: 141 141 long vtbl_offset; 142 LONG_PTR AddVtblDataTable(SUBINFO **ppsi,int length);143 142 public: 144 143 int GetFuncNumInVtbl( const SUBINFO *psi ) const; -
BasicCompiler_Common/Compile.cpp
r34 r56 30 30 GOTOLABELSCHEDULE *pGotoLabelSchedule; 31 31 int GotoLabelScheduleNum; 32 33 //データ テーブル34 char *DataTable;35 int DataTableSize;36 32 37 33 //グローバル変数初期バッファ -
BasicCompiler_Common/common.h
r55 r56 592 592 extern CLoopRefCheck *pobj_LoopRefCheck; 593 593 594 //DataTable.cpp 595 class DataTable{ 596 void *pdata; 597 int size; 598 599 public: 600 DataTable(); 601 ~DataTable(); 602 void Init(); 603 604 int AddBinary( const void *pdata, int size ); 605 int Add( _int64 i64data ); 606 int Add( int i32data ); 607 int Add( double dbl ); 608 int Add( float flt ); 609 int AddString( const char *str, int length ); 610 int AddString( const char *str ); 611 612 const void *GetPtr() const; 613 int GetSize() const; 614 }; 615 extern DataTable dataTable; 616 594 617 //error.cpp 595 618 void SetError(int ErrorNum,const char *KeyWord,int pos);
Note:
See TracChangeset
for help on using the changeset viewer.