#include "../BasicCompiler_Common/common.h" #include "Opcode.h" //////////////////////////////////// // 再配置が必要なステートメント //////////////////////////////////// int DimStatementInsertPoint; void InsertDimStatement_ToProcHead(char *lpszCommand){ char *temp_buffer; int temp_size; temp_size=obp-DimStatementInsertPoint; temp_buffer=(char *)HeapAlloc(hHeap,0,temp_size); memcpy(temp_buffer,OpBuffer+DimStatementInsertPoint,temp_size); //各種スケジューリング情報を再配置 NativeBuffer_StaticRelocation(DimStatementInsertPoint,temp_size,0x10000000); int back_obp; back_obp=obp; obp=DimStatementInsertPoint; //OpcodeDim(lpszCommand,0); OpBuffer[obp++]=(char)0xcc; OpcodeDim(lpszCommand,DIMFLAG_NONCALL_CONSTRACTOR); int obp_offset; obp_offset=obp-DimStatementInsertPoint; memcpy(OpBuffer+obp,temp_buffer,temp_size); HeapDefaultFree(temp_buffer); obp+=temp_size; //各種スケジューリング情報を再配置 NativeBuffer_StaticRelocation(DimStatementInsertPoint+0x10000000,temp_size,obp_offset-0x10000000); }