Changeset 69 in dev for BasicCompiler64


Ignore:
Timestamp:
Mar 13, 2007, 4:52:59 AM (17 years ago)
Author:
dai_9181
Message:

一時文字列をNewしたときに、bUseHeapフラグを立たせないようにした(bUseHeapが立つのは一時構造体のときのみ)。
DEF_PTR_CHARを廃止し、typeOfPtrCharを導入。

Location:
BasicCompiler64
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_Var.cpp

    r65 r69  
    899899            *(float *)(initGlobalBuf+offset)=(float)dbl;
    900900    else if(type==DEF_INT64||type==DEF_QWORD||IsPtrType(type)){
    901         if(type==DEF_PTR_CHAR&&lpCalcIndex==LITERAL_STRING){
     901        if(type==typeOfPtrChar&&lpCalcIndex==LITERAL_STRING){
    902902            //文字列定数のとき
    903903
     
    10481048    }
    10491049    else if(type==DEF_INT64||type==DEF_QWORD||IsPtrType(type)){
    1050         if(type==DEF_PTR_CHAR&&lpCalcIndex==LITERAL_STRING){
     1050        if(type==typeOfPtrChar&&lpCalcIndex==LITERAL_STRING){
    10511051            //文字列定数のとき
    10521052
  • BasicCompiler64/NumOpe.cpp

    r68 r69  
    1414    //////////////////////////////////////////////////////
    1515
    16         char *parameter = (char *)malloc( lstrlen( lpszText ) + 3 );
    17         lstrcpy( parameter, lpszText );
     16        char *parameter = (char *)malloc( lstrlen( lpszText ) + 32 );
     17        sprintf( parameter, "\"%s\"%c%c*Char", lpszText, 1, ESC_AS );
    1818        SetStringQuotes( parameter );
    1919
     
    222222                            type[sp]=DEF_OBJECT;
    223223                            index_stack[sp]=(LONG_PTR)pobj_StringClass;
    224                             bUseHeap[sp]=1;
    225224                            bLiteralCalculation=0;
    226225
     
    233232                    }
    234233
    235                     type[sp]=DEF_PTR_CHAR;
     234                    type[sp]=typeOfPtrChar;
    236235                    bLiteralCalculation=0;
    237236
  • BasicCompiler64/varlist.cpp

    r64 r69  
    4949    }
    5050    else{
    51         if(type==DEF_PTR_CHAR||type==MAKE_PTR_TYPE(DEF_BYTE,1)){
     51        if(type==MAKE_PTR_TYPE(DEF_SBYTE,1)||type==MAKE_PTR_TYPE(DEF_BYTE,1)){
    5252            if(ReadProcessMemory(hDebugProcess,(void *)offset,&pData,sizeof(void *),&stAccBytes)){
    5353                for(i2=0;;i2++){
Note: See TracChangeset for help on using the changeset viewer.