Changeset 103 in dev for BasicCompiler32


Ignore:
Timestamp:
May 2, 2007, 4:08:58 AM (17 years ago)
Author:
dai_9181
Message:

名前空間機能をグローバル変数、定数と列挙型に適用。
一部、クラスの静的メンバと名前空間の相性が悪いコードが潜んでいるため、要改修

Location:
BasicCompiler32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler32/MakePeHdr.cpp

    r100 r103  
    351351
    352352    if(!bDll){
     353        // 名前空間が初期化されているかをチェック
     354        if( Smoothie::Lexical::liveingNamespaceScopes.size() ){
     355            SetError();
     356        }
     357
    353358        //ラベル用のメモリを確保
    354359        extern LABEL *pLabelNames;
     
    445450        HeapDefaultFree(WithInfo.ppName);
    446451        HeapDefaultFree(WithInfo.pWithCp);
     452
     453        // 名前空間が正しく閉じられているかをチェック
     454        if( Smoothie::Lexical::liveingNamespaceScopes.size() ){
     455            SetError(63,NULL,-1);
     456        }
     457
    447458    }
    448459    else{
  • BasicCompiler32/NumOpe.cpp

    r102 r103  
    257257        Type leftType;
    258258        if( !TermOpe( termLeft, baseType, leftType, isLiteral, pbUseHeap, &isClassName ) ){
    259             return false;
     259            goto globalArea;
    260260        }
    261261
     
    836836                    //////////////
    837837
    838                     i3 = CDBConst::obj.GetType(term);
     838                    i3 = CDBConst::obj.GetBasicType(term);
    839839                    if(i3){
     840                        if( CDBConst::obj.IsStringPtr( term ) ){
     841                            //リテラル文字列
     842
     843                            double dbl = CDBConst::obj.GetDoubleData(term);
     844                            memcpy(&i64data,&dbl,sizeof(double));
     845
     846                            //バイト数
     847                            i3=lstrlen((char *)i64data);
     848
     849                            memcpy(term,(char *)i64data,i3);
     850                            term[i3]=0;
     851                            goto StrLiteral;
     852                        }
     853
    840854                        type_stack[sp]=i3;
    841855                        if(IsRealNumberType(i3)){
     
    850864                            goto Literal;
    851865                        }
    852                         /*else if(i3==DEF_STRING){
    853                             //リテラル文字列
    854 
    855                             //バイト数
    856                             i3=(int)dbl;
    857 
    858                             memcpy(term,temporary,i3);
    859                             goto StrLiteral;
    860                         }*/
    861866                        else{
    862867                            SetError(300,NULL,cp);
Note: See TracChangeset for help on using the changeset viewer.