Changeset 138

Show
Ignore:
Timestamp:
07/24/08 17:04:30 (2 years ago)
Author:
hak
Message:

- Added CCilVm::reset()
- Fixed VM status management (ticket #5)
- Fixed API names not to have upper case as 1st letter.
- Fixed sample build break
- Added new sample, "vm_contol" to demonstrate VM status control API

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • SDK-archive.txt

    r32 r138  
    6464CriScript\samples\property_bind\mkwin32\property_bind.sln 
    6565CriScript\samples\property_bind\mkwin32\property_bind.vcproj 
     66CriScript\samples\vm_control\vm_control.cpp 
     67CriScript\samples\vm_control\stdafx.cpp 
     68CriScript\samples\vm_control\stdafx.h 
     69CriScript\samples\vm_control\mkwin32\vm_control.sln 
     70CriScript\samples\vm_control\mkwin32\vm_control.vcproj 
     71CriScript\samples\build_all\criscriptsamples.sln 
    6672 
    6773//TOOL 
  • inc/cilBuiltinObject.h

    r110 r138  
    634634                bool init(); 
    635635        protected: 
    636                 //Override TokenFound 
    637                 //void TokenFound( const int32_t iToken, const int32_t iLine, const int32_t iColumm); 
     636                //Override tokenFound 
     637                //void tokenFound( const int32_t iToken, const int32_t iLine, const int32_t iColumm); 
    638638        }; 
    639639 
  • inc/cilCodegen.h

    r110 r138  
    145145                                                                        */ 
    146146                TARGET_ENDIANNESS getTargetEndianness(); 
    147                                                                         /*EN< Gets 'target' endianess setting. 
     147                                                                        /*EN< gets 'target' endianess setting. 
    148148                                                                        */ 
    149149                TARGET_ENDIANNESS getCurrentEndianness(); 
    150                                                                         /*EN< Gets 'current' platform's endianess setting. 
     150                                                                        /*EN< gets 'current' platform's endianess setting. 
    151151                                                                        CRIScript can work for cross platform development 
    152152                                                                        so the endianness of current platform and target platform can differ. 
     
    290290                CCgNodeData* unaryIncOperator( CCgNodeData*, bool bDup  ); 
    291291                CCgNodeData* unaryDecOperator( CCgNodeData*, bool bDup  ); 
    292                 CCgNodeData* unarybitwiseNotOperator( CCgNodeData* ); 
    293                 CCgNodeData* unarylogicalNotOperator( CCgNodeData* ); 
     292                CCgNodeData* unaryBitwiseNotOperator( CCgNodeData* ); 
     293                CCgNodeData* unaryLogicalNotOperator( CCgNodeData* ); 
    294294                CCgNodeData* unaryVoidOperator( CCgNodeData* ); 
    295295                CCgNodeData* unaryDeleteOperator( CCgNodeData* ); 
     
    368368                //Code gen functions     
    369369                //--------------------------------------------------------------------------- 
    370                 CCgNodeData* EmitVariableDeclaration( CCgNodeData* nodetree, 
     370                CCgNodeData* emitVariableDeclaration( CCgNodeData* nodetree, 
    371371                                                                                        const OPERAND_TYPE type = OPERAND_UNDEFINED, 
    372372                                                                                        const OPERAND_FLAG flag = OPERAND_FLAG_NONE, 
    373                                                                                         const RID ridConstraintType = 0 );      //Emit CIL code 
    374                 CCgNodeData* EmitTypedVariableDeclaration( CCgNodeData* nodetree );            //Emit CIL code 
    375                 CCgNodeData* EmitVariableAssignment( CCgNodeData* nodetree );                  //Emit CIL code 
    376                 CCgNodeData* EmitAddOperator( CCgNodeData* nodetree );                                 //Emit CIL code 
    377                 CCgNodeData* EmitSubtractOperator( CCgNodeData* nodetree );                            //Emit CIL code 
    378                 CCgNodeData* EmitMultiplyOperator( CCgNodeData* nodetree );                            //Emit CIL code 
    379                 CCgNodeData* EmitDivisionOperator( CCgNodeData* nodetree );                            //Emit CIL code 
    380                 CCgNodeData* EmitReminderOperator( CCgNodeData* nodetree );                            //Emit CIL code 
    381  
    382                 CCgNodeData* EmitbitwiseAndOperator( CCgNodeData* nodetree );                          //Emit CIL code 
    383                 CCgNodeData* EmitbitwiseOrOperator( CCgNodeData* nodetree );                           //Emit CIL code 
    384                 CCgNodeData* EmitlogicalAndOperator( CCgNodeData* nodetree );                          //Emit CIL code 
    385                 CCgNodeData* EmitlogicalOrOperator( CCgNodeData* nodetree );                           //Emit CIL code 
    386                 CCgNodeData* EmitbitwiseXorOperator( CCgNodeData* nodetree );                          //Emit CIL code 
    387                 CCgNodeData* EmitshiftLeftOperator( CCgNodeData* nodetree );                           //Emit CIL code 
    388                 CCgNodeData* EmitshiftRightOperator( CCgNodeData* nodetree );                          //Emit CIL code 
    389                 CCgNodeData* EmitshiftRightUnsignedOperator( CCgNodeData* nodetree );          //Emit CIL code 
    390  
    391                 CCgNodeData* EmitunaryPlusOperator( CCgNodeData* nodetree );                           //Emit CIL code 
    392                 CCgNodeData* EmitunaryMinusOperator( CCgNodeData* nodetree );                          //Emit CIL code 
    393                 CCgNodeData* EmitunaryIncOperator( CCgNodeData* nodetree, bool bDup  );                //Emit CIL code 
    394                 CCgNodeData* EmitunaryDecOperator( CCgNodeData* nodetree, bool bDup  );                //Emit CIL code 
    395                 CCgNodeData* EmitunarybitwiseNotOperator( CCgNodeData* nodetree );                     //Emit CIL code 
    396                 CCgNodeData* EmitunarylogicalNotOperator( CCgNodeData* nodetree );                     //Emit CIL code 
    397                 CCgNodeData* EmitunaryVoidOperator( CCgNodeData* nodetree );                           //Emit CIL code 
    398                 CCgNodeData* EmitunaryDeleteOperator( CCgNodeData* nodetree );                         //Emit CIL code 
    399                 CCgNodeData* EmitunaryTypeofOperator( CCgNodeData* nodetree );                         //Emit CIL code 
    400  
    401                 CCgNodeData* EmitCmpOperator( CCgNodeData* nodetree, uint32_t iOpCode );                                       //Emit CIL code 
    402                 CCgNodeData* EmitStrictCmpOperator( CCgNodeData* nodetree, uint32_t iOpCode ); 
    403                 CCgNodeData* EmitcallExpression( CCgNodeData* nodetree ); 
    404                 CCgNodeData* EmitArgumentList( CCgNodeData* nodetree, uint32_t& iNumArgumentparsed ); 
    405                 CCgNodeData* EmitAccessPropertyById( CCgNodeData* nodetree, CCgNodeData* parentnode ); 
    406                 CCgNodeData* EmitAccessPropertyByExp( CCgNodeData* nodetree, CCgNodeData* parentnode ); 
    407                 CCgNodeData* EmitobjectLiteral( CCgNodeData* nodetree ); 
    408                 CCgNodeData* EmitarrayLiteral( CCgNodeData* nodetree ); 
    409                 CCgNodeData* EmitConditionalExpression( CCgNodeData* conditionalnode ); 
    410                 CCgNodeData* EmitnewOperator( CCgNodeData* nodetree ); 
    411                 CCgNodeData* EmitinOperator( CCgNodeData* nodetree ); 
    412                 CCgNodeData* EmitinstanceOfOperator( CCgNodeData* nodetree ); 
    413  
    414                 CCgNodeData* EmitLoadStack( CCgNodeData* ptr ); 
    415  
    416                 void EmitLoadInteger( const int64_t value); 
    417                 void EmitLoadBoolean( const bool value); 
    418                 void EmitLoadFloat( const double value); 
    419                 void EmitLoadStringObject( const RID ridString ); 
    420                 void EmitLoadRegexObject( CCgNodeData* nodetree ); 
    421  
    422                 void EmitLoadArgument( CG_SYMBOL_INFORMATION* pInfo ); 
    423                 void EmitStoreArgument( CG_SYMBOL_INFORMATION* pInfo ); 
    424                 void EmitLoadLocal( CG_SYMBOL_INFORMATION* pInfo ); 
    425                 void EmitStoreLocal( CG_SYMBOL_INFORMATION* pInfo ); 
     373                                                                                        const RID ridConstraintType = 0 );      //emit CIL code 
     374                CCgNodeData* emitTypedVariableDeclaration( CCgNodeData* nodetree );            //emit CIL code 
     375                CCgNodeData* emitVariableAssignment( CCgNodeData* nodetree );                  //emit CIL code 
     376                CCgNodeData* emitAddOperator( CCgNodeData* nodetree );                                 //emit CIL code 
     377                CCgNodeData* emitSubtractOperator( CCgNodeData* nodetree );                            //emit CIL code 
     378                CCgNodeData* emitMultiplyOperator( CCgNodeData* nodetree );                            //emit CIL code 
     379                CCgNodeData* emitDivisionOperator( CCgNodeData* nodetree );                            //emit CIL code 
     380                CCgNodeData* emitReminderOperator( CCgNodeData* nodetree );                            //emit CIL code 
     381 
     382                CCgNodeData* emitBitwiseAndOperator( CCgNodeData* nodetree );                          //emit CIL code 
     383                CCgNodeData* emitBitwiseOrOperator( CCgNodeData* nodetree );                           //emit CIL code 
     384                CCgNodeData* emitLogicalAndOperator( CCgNodeData* nodetree );                          //emit CIL code 
     385                CCgNodeData* emitLogicalOrOperator( CCgNodeData* nodetree );                           //emit CIL code 
     386                CCgNodeData* emitBitwiseXorOperator( CCgNodeData* nodetree );                          //emit CIL code 
     387                CCgNodeData* emitShiftLeftOperator( CCgNodeData* nodetree );                           //emit CIL code 
     388                CCgNodeData* emitShiftRightOperator( CCgNodeData* nodetree );                          //emit CIL code 
     389                CCgNodeData* emitShiftRightUnsignedOperator( CCgNodeData* nodetree );          //emit CIL code 
     390 
     391                CCgNodeData* emitUnaryPlusOperator( CCgNodeData* nodetree );                           //emit CIL code 
     392                CCgNodeData* emitUnaryMinusOperator( CCgNodeData* nodetree );                          //emit CIL code 
     393                CCgNodeData* emitUnaryIncOperator( CCgNodeData* nodetree, bool bDup  );                //emit CIL code 
     394                CCgNodeData* emitUnaryDecOperator( CCgNodeData* nodetree, bool bDup  );                //emit CIL code 
     395                CCgNodeData* emitUnaryBitwiseNotOperator( CCgNodeData* nodetree );                     //emit CIL code 
     396                CCgNodeData* emitUnaryLogicalNotOperator( CCgNodeData* nodetree );                     //emit CIL code 
     397                CCgNodeData* emitUnaryVoidOperator( CCgNodeData* nodetree );                           //emit CIL code 
     398                CCgNodeData* emitUnaryDeleteOperator( CCgNodeData* nodetree );                         //emit CIL code 
     399                CCgNodeData* emitUnaryTypeofOperator( CCgNodeData* nodetree );                         //emit CIL code 
     400 
     401                CCgNodeData* emitCmpOperator( CCgNodeData* nodetree, uint32_t iOpCode );                                       //emit CIL code 
     402                CCgNodeData* emitStrictCmpOperator( CCgNodeData* nodetree, uint32_t iOpCode ); 
     403                CCgNodeData* emitCallExpression( CCgNodeData* nodetree ); 
     404                CCgNodeData* emitArgumentList( CCgNodeData* nodetree, uint32_t& iNumArgumentparsed ); 
     405                CCgNodeData* emitAccessPropertyById( CCgNodeData* nodetree, CCgNodeData* parentnode ); 
     406                CCgNodeData* emitAccessPropertyByExp( CCgNodeData* nodetree, CCgNodeData* parentnode ); 
     407                CCgNodeData* emitObjectLiteral( CCgNodeData* nodetree ); 
     408                CCgNodeData* emitArrayLiteral( CCgNodeData* nodetree ); 
     409                CCgNodeData* emitConditionalExpression( CCgNodeData* conditionalnode ); 
     410                CCgNodeData* emitNewOperator( CCgNodeData* nodetree ); 
     411                CCgNodeData* emitInOperator( CCgNodeData* nodetree ); 
     412                CCgNodeData* emitInstanceOfOperator( CCgNodeData* nodetree ); 
     413 
     414                CCgNodeData* emitLoadStack( CCgNodeData* ptr ); 
     415 
     416                void emitLoadInteger( const int64_t value); 
     417                void emitLoadBoolean( const bool value); 
     418                void emitLoadFloat( const double value); 
     419                void emitLoadStringObject( const RID ridString ); 
     420                void emitLoadRegexObject( CCgNodeData* nodetree ); 
     421 
     422                void emitLoadArgument( CG_SYMBOL_INFORMATION* pInfo ); 
     423                void emitStoreArgument( CG_SYMBOL_INFORMATION* pInfo ); 
     424                void emitLoadLocal( CG_SYMBOL_INFORMATION* pInfo ); 
     425                void emitStoreLocal( CG_SYMBOL_INFORMATION* pInfo ); 
    426426 
    427427                //--------------------------------------------------------------------------- 
     
    436436                //Argumentlist 
    437437                //--------------------------------------------------------------------------- 
    438                 void PushArgumentList( const uint32_t iParam ); 
    439                 void EmitArgumentList( void ); 
     438                void pushArgumentList( const uint32_t iParam ); 
     439                void emitArgumentList( void ); 
    440440                vector< uint32_t > m_vecArgumentListStack; 
    441441 
     
    443443                //Scope name related staff 
    444444                //--------------------------------------------------------------------------- 
    445                 bool                    IsInGlobalScope( void ); 
    446                 wstring&                GetCurrentScopeName( void ); 
    447                 ILFRAGMENTINFO* GetCurrentScopeInformation( void ); 
    448                 void                    EnterNewScope( wstring& strScopedFunctionName, RID ridMethod ); 
    449                 void                    LeaveScope(); 
     445                bool                    isInGlobalScope( void ); 
     446                wstring&                getCurrentScopeName( void ); 
     447                ILFRAGMENTINFO* getCurrentScopeInformation( void ); 
     448                void                    enterNewScope( wstring& strScopedFunctionName, RID ridMethod ); 
     449                void                    leaveScope(); 
    450450                 
    451451                int32_t m_iCurrentEHNestLevel;  /*EN<Current Exception Handler Nesting Level*/ 
     
    465465                // Helper 
    466466                //--------------------------------------------------------------------------- 
    467                 void InitializeConstantPools(); 
    468                 bool IsValue( CCgNodeData* object ); 
    469                 bool IsFloat( CCgNodeData* object ); 
    470                 bool IsString( CCgNodeData* object ); 
    471                 void Emit( uint32_t i ); 
    472                 void Emit( OP_CODE opcode ); 
    473                 void Emit( OP_CODE opcode, int8_t iParam ); 
    474                 void Emit( OP_CODE opcode, uint8_t iParam ); 
    475                 void Emit( OP_CODE opcode, int32_t iParam ); 
    476                 void Emit( OP_CODE opcode, uint32_t iParam ); 
    477                 void Emit( OP_CODE opcode, float iParam ); 
    478                 void Emit( OP_CODE opcode, double iParam ); 
    479                 void Emit( OP_CODE opcode, int64_t iParam ); 
    480                 void Emit( OP_CODE opcode, RID ridMethod, RID ridArg, int32_t iIndex ); 
    481                 void EmitArglist( OP_CODE opcode, uint8_t iParam ); 
    482                 void EmitArglist( OP_CODE opcode, uint32_t iParam ); 
    483  
    484                 void Emit( ILFRAGMENTINFO* pIL, OP_CODE opcode, int8_t iParam ); 
    485                 void Emit( ILFRAGMENTINFO* pIL, OP_CODE opcode, int32_t iParam ); 
     467                void initializeConstantPools(); 
     468                bool isValue( CCgNodeData* object ); 
     469                bool isFloat( CCgNodeData* object ); 
     470                bool isString( CCgNodeData* object ); 
     471                void emit( uint32_t i ); 
     472                void emit( OP_CODE opcode ); 
     473                void emit( OP_CODE opcode, int8_t iParam ); 
     474                void emit( OP_CODE opcode, uint8_t iParam ); 
     475                void emit( OP_CODE opcode, int32_t iParam ); 
     476                void emit( OP_CODE opcode, uint32_t iParam ); 
     477                void emit( OP_CODE opcode, float iParam ); 
     478                void emit( OP_CODE opcode, double iParam ); 
     479                void emit( OP_CODE opcode, int64_t iParam ); 
     480                void emit( OP_CODE opcode, RID ridMethod, RID ridArg, int32_t iIndex ); 
     481                void emitArglist( OP_CODE opcode, uint8_t iParam ); 
     482                void emitArglist( OP_CODE opcode, uint32_t iParam ); 
     483 
     484                void emit( ILFRAGMENTINFO* pIL, OP_CODE opcode, int8_t iParam ); 
     485                void emit( ILFRAGMENTINFO* pIL, OP_CODE opcode, int32_t iParam ); 
    486486                void UpdateILOffsetCache( void ); 
    487                 void ClearILOffsetCache( void ); 
    488                 void AdjustEvalStack( ILFRAGMENTINFO* pIL, OPCODE_TABLEENTRY* opcodeparam, int32_t iParam ); 
    489                 void AdjustEvalStack( int32_t i ); 
     487                void clearILOffsetCache( void ); 
     488                void adjustEvalStack( ILFRAGMENTINFO* pIL, OPCODE_TABLEENTRY* opcodeparam, int32_t iParam ); 
     489                void adjustEvalStack( int32_t i ); 
    490490 
    491491                CCgNodeData* parseNodeTreeSub( CCgNodeData* Formula, 
    492492                                                                                CCgNodeData* parentnode, 
    493493                                                                                bool bStackAdjustment );                //Node tree parser 
    494                 uint32_t GetCurrentILOffset(); 
    495                 ILFRAGMENTINFO& GetCurrentILInfo() { return m_ILPool[ m_iCurrentILPoolIndex ]; } 
    496                 int32_t GetILOffsetValue( int32_t iTarget, int32_t iCurrent, int32_t iSizeOfInstruction ) { return iTarget - iCurrent + iSizeOfInstruction; } 
     494                uint32_t getCurrentILOffset(); 
     495                ILFRAGMENTINFO& getCurrentILInfo() { return m_ILPool[ m_iCurrentILPoolIndex ]; } 
     496                int32_t getILOffsetValue( int32_t iTarget, int32_t iCurrent, int32_t iSizeOfInstruction ) { return iTarget - iCurrent + iSizeOfInstruction; } 
    497497 
    498498                //--------------------------------------------------------------------------- 
    499499                //CodeGen management 
    500500                //--------------------------------------------------------------------------- 
    501                 void CheckCurrentEndianness( void); 
     501                void checkCurrentEndianness( void); 
    502502                 
    503503                //--------------------------------------------------------------------------- 
    504504                //Symbol information/Debug line information 
    505505                //--------------------------------------------------------------------------- 
    506                 RID LookUpSymbolInformation( wstring& strScopedVariableName ); 
    507                 RID LookUpSymbolInformation( wstring& strScopedVariableName, CG_SYMBOL_INFORMATION**ppInfo ); 
    508                 RID LookUpSymbolInformationSub( wstring& strScopedVariableName, CG_SYMBOL_INFORMATION**ppInfo ); 
    509                 RID LookUpSymbolInformationInCurrentScope( wstring& strScopedVariableName ); 
    510                 RID LookUpSymbolInformationInCurrentScope( wstring& strScopedVariableName, CG_SYMBOL_INFORMATION**ppInfo ); 
     506                RID lookUpSymbolInformation( wstring& strScopedVariableName ); 
     507                RID lookUpSymbolInformation( wstring& strScopedVariableName, CG_SYMBOL_INFORMATION**ppInfo ); 
     508                RID lookUpSymbolInformationSub( wstring& strScopedVariableName, CG_SYMBOL_INFORMATION**ppInfo ); 
     509                RID lookUpSymbolInformationInCurrentScope( wstring& strScopedVariableName ); 
     510                RID lookUpSymbolInformationInCurrentScope( wstring& strScopedVariableName, CG_SYMBOL_INFORMATION**ppInfo ); 
    511511                uint32_t tagTheLine(); 
    512512 
     
    514514                //Label management 
    515515                //--------------------------------------------------------------------------- 
    516                 uint32_t CreateNewLabelID(); 
    517                 uint32_t CreateNewLabelIDAndInsertTag(); 
    518                 void InsertLabelTag( uint32_t iLabelID ); 
     516                uint32_t createNewLabelID(); 
     517                uint32_t createNewLabelIDAndInsertTag(); 
     518                void insertLabelTag( uint32_t iLabelID ); 
    519519                uint32_t m_iNumLabel; 
    520                 void SetBranchTargetInformation( const int32_t iLabel ); 
    521                 const BRANCH_TARGET_INFO& GetBranchTargetInformation( int32_t iLabel ); 
     520                void setBranchTargetInformation( const int32_t iLabel ); 
     521                const BRANCH_TARGET_INFO& getBranchTargetInformation( int32_t iLabel ); 
    522522 
    523523                /*EN branch target information table*/ 
     
    527527                //Temporary variable management 
    528528                //--------------------------------------------------------------------------- 
    529                 RID ReserveTemporaryVariable( CG_SYMBOL_FLAG VariableTypeToReserve ); 
    530                 void ReleaseTemporaryVariable( RID ridToRelease ); 
     529                RID reserveTemporaryVariable( CG_SYMBOL_FLAG VariableTypeToReserve ); 
     530                void releaseTemporaryVariable( RID ridToRelease ); 
    531531                multimap< CG_SYMBOL_FLAG, RID> m_mapFreeTemporaryVariables; 
    532532                map< RID, CG_SYMBOL_FLAG > m_mapReservedTemporaryVariables; 
     
    572572                //Linkage 
    573573                //--------------------------------------------------------------------------- 
    574                 bool LinkPass1( V_ILFRAGMENTINFO& vecILPool, ILFRAGMENTINFO& ILResolvedPool ); 
    575                 bool LinkPass2( ILFRAGMENTINFO& SourceILPool, ILFRAGMENTINFO& ILResolvedPool ); 
    576                 bool LinkFinalPass( ILFRAGMENTINFO& SourceILPool, ILFRAGMENTINFO& ILResolvedPool ); 
    577                 bool ResolveMethodRID(); 
    578                 void AdjustJumpTargetAddresses( uint32_t iAddress, int32_t iOffset ); 
     574                bool linkPass1( V_ILFRAGMENTINFO& vecILPool, ILFRAGMENTINFO& ILResolvedPool ); 
     575                bool linkPass2( ILFRAGMENTINFO& SourceILPool, ILFRAGMENTINFO& ILResolvedPool ); 
     576                bool linkFinalPass( ILFRAGMENTINFO& SourceILPool, ILFRAGMENTINFO& ILResolvedPool ); 
     577                bool resolveMethodRID(); 
     578                void adjustJumpTargetAddresses( uint32_t iAddress, int32_t iOffset ); 
    579579                map< uint32_t, uint32_t > m_mapLabelID2ILAddress; 
    580580                map< uint32_t, uint32_t > m_mapAddress2LabelID; 
    581                 void PutPinToCurrentAddress( uint32_t iAddress, uint32_t iTargetLabelID ); 
    582                 uint8_t GetCharFromILPool( ILFRAGMENTINFO& SourceILPool, uint32_t& iIndex ); 
    583                 uint32_t GetIntFromILPool( ILFRAGMENTINFO& SourceILPool, uint32_t& iIndex ); 
    584  
    585                 bool ResolveLoadArgument( ILFRAGMENTINFO* ilinfo, RID ridMethod, RID ridArglist, uint32_t iIndex ); 
    586                 bool ResolveStoreArgument( ILFRAGMENTINFO* ilinfo, RID ridMethod, RID ridArglist, uint32_t iIndex ); 
    587                 bool ResolveLoadLocal( ILFRAGMENTINFO* ilinfo, RID ridMethod, RID ridArglist, uint32_t iIndex ); 
    588  
    589                 bool ResolveStoreLocal( ILFRAGMENTINFO* ilinfo, RID ridMethod, RID ridArglist, uint32_t iIndex ); 
     581                void putPinToCurrentAddress( uint32_t iAddress, uint32_t iTargetLabelID ); 
     582                uint8_t getCharFromILPool( ILFRAGMENTINFO& SourceILPool, uint32_t& iIndex ); 
     583                uint32_t getIntFromILPool( ILFRAGMENTINFO& SourceILPool, uint32_t& iIndex ); 
     584 
     585                bool resolveLoadArgument( ILFRAGMENTINFO* ilinfo, RID ridMethod, RID ridArglist, uint32_t iIndex ); 
     586                bool resolveStoreArgument( ILFRAGMENTINFO* ilinfo, RID ridMethod, RID ridArglist, uint32_t iIndex ); 
     587                bool resolveLoadLocal( ILFRAGMENTINFO* ilinfo, RID ridMethod, RID ridArglist, uint32_t iIndex ); 
     588 
     589                bool resolveStoreLocal( ILFRAGMENTINFO* ilinfo, RID ridMethod, RID ridArglist, uint32_t iIndex ); 
    590590 
    591591                //--------------------------------------------------------- 
  • inc/cilDebugger.h

    r110 r138  
    4343                void terminate() {}; 
    4444 
    45                 void Execute(); 
    46                 int32_t PutBreakPoint(); 
    47                 void RemoveBreakPoint( int32_t i); 
    48                 int32_t StepOver(); 
    49                 int32_t StepInto(); 
     45                void execute(); 
     46                int32_t putBreakPoint(); 
     47                void removeBreakPoint( int32_t i); 
     48                int32_t stepOver(); 
     49                int32_t stepInto(); 
    5050 
    51                 bool Attach( CCilVm * pVM ); 
    52                 bool Detach(); 
    53                 void SetSymbolInformation( hash_map<wstring, CG_SYMBOL_INFORMATION>& symbolinfo ); 
    54                 void SetMetaData( CMetaData& MetaData ) { m_pMetaData = &MetaData; } 
     51                bool attach( CCilVm * pVM ); 
     52                bool detach(); 
     53                void setSymbolInformation( hash_map<wstring, CG_SYMBOL_INFORMATION>& symbolinfo ); 
     54                void setMetaData( CMetaData& MetaData ) { m_pMetaData = &MetaData; } 
    5555 
    5656                //---------------------------------------------------------------------- 
    5757                //Debug functions 
    5858                //---------------------------------------------------------------------- 
    59                 void DebugDumpStats( void ); 
    60                 void DebugDumpStaticFields( uint32_t ); 
    61                 void DebugDumpObjects( uint32_t ); 
     59                void debugDumpStats( void ); 
     60                void debugDumpStaticFields( uint32_t ); 
     61                void debugDumpObjects( uint32_t ); 
    6262        private: 
    6363                CCilVm* m_pVM; 
     
    8484                void terminate() {}; 
    8585 
    86                 void DumpDisasm(); 
    87                 void SetMetaData( CMetaData& MetaData ); 
    88                 void SetSymbolInformation( hash_map<wstring, CG_SYMBOL_INFORMATION>& symbolinfo); 
    89                 void SetDumpByteCode( bool b ) { m_bDumpByteCode = b;} 
    90                 void SetDumpByteCodeData( bool b ) { m_bDumpByteCodeData = b;} 
    91                 void SetDumpSymbolInfo( bool b ) { m_bDumpSymbolInfo = b;} 
    92                 void SetILStream( ILFRAGMENT& ILStream); 
     86                void dumpDisasm(); 
     87                void setMetaData( CMetaData& MetaData ); 
     88                void setSymbolInformation( hash_map<wstring, CG_SYMBOL_INFORMATION>& symbolinfo); 
     89                void setDumpByteCode( bool b ) { m_bDumpByteCode = b;} 
     90                void setDumpByteCodeData( bool b ) { m_bDumpByteCodeData = b;} 
     91                void setDumpSymbolInfo( bool b ) { m_bDumpSymbolInfo = b;} 
     92                void setILStream( ILFRAGMENT& ILStream); 
    9393 
    9494        private: 
    95                 uint8_t GetCharFromILPool( ILFRAGMENTINFO& SourceILPool, uint32_t& iIndex ); 
    96                 uint32_t GetIntFromILPool( ILFRAGMENTINFO& SourceILPool, uint32_t& iIndex ); 
     95                uint8_t getCharFromILPool( ILFRAGMENTINFO& SourceILPool, uint32_t& iIndex ); 
     96                uint32_t getIntFromILPool( ILFRAGMENTINFO& SourceILPool, uint32_t& iIndex ); 
    9797 
    98                 void DumpTemporaryLabel( uint32_t iLabelID ); 
    99                 void DumpLabel( wstring& string ); 
    100                 void DumpTab( void ); 
    101                 void DumpBranch( OPCODE_TABLEENTRY* pInfo, uint32_t iLabelID ); 
    102                 void DumpInstruction( OPCODE_TABLEENTRY* pInfo, int32_t iParamIndex ); 
     98                void dumpTemporaryLabel( uint32_t iLabelID ); 
     99                void dumpLabel( wstring& string ); 
     100                void dumpTab( void ); 
     101                void dumpBranch( OPCODE_TABLEENTRY* pInfo, uint32_t iLabelID ); 
     102                void dumpInstruction( OPCODE_TABLEENTRY* pInfo, int32_t iParamIndex ); 
    103103 
    104104 
  • inc/cilOpcode.h

    r110 r138  
    6565#define RidFromToken(tk) ((RID) ((tk) & 0x00ffffff)) 
    6666#define TypeFromToken(tk) ((ULONG32)((tk) & 0xff000000)) 
    67 #define IsNilToken(tk) ((RidFromToken(tk)) == 0) 
    68 #define IsBuiltinRid(tk) ((tk) & 0x800000) 
     67#define isNilToken(tk) ((RidFromToken(tk)) == 0) 
     68#define isBuiltinRid(tk) ((tk) & 0x800000) 
    6969#define IndexFromBuiltinRid(tk) (int32_t)(-(int32_t)((tk) | 0xff000000) - 1) 
    7070 
  • inc/cilVm.h

    r110 r138  
    9292*/ 
    9393enum VM_STATUS_TYPE { 
    94         VM_EXECUTE_DONE,        /*EN< Byte code execution is finished successfully*/ 
    95         VM_EXECUTE_SUPEND,      /*EN< VM suspended by resume() call. Not implemented yet*/ 
    96         VM_EXECUTE_SWAPOUT,     /*EN< VM time slice is ended and current context is swapped out. not implemented yet.*/ 
    97         VM_EXECUTE_ERROR,       /*EN< VM is in the error state*/ 
     94        VM_EXECUTE_INITIALIZING,        /*EN< VM instance is created but still not initialized yet*/ 
     95        VM_EXECUTE_INITIALIZED,         /*EN< VM instance is initialized but still not executed yet*/ 
     96        VM_EXECUTE_EXECUTING,           /*EN< VM instance is initialized but still not executed yet*/ 
     97        VM_EXECUTE_DONE,                        /*EN< Byte code execution is finished successfully*/ 
     98        VM_EXECUTE_SUSPENDED,           /*EN< VM suspended by resume() call. Not implemented yet*/ 
     99        VM_EXECUTE_SWAPPEDOUT,          /*EN< VM time slice is ended and current context is swapped out. not implemented yet.*/ 
     100        VM_EXECUTE_ERROR,                       /*EN< VM is in the error state*/ 
    98101}; 
     102 
     103/*************************************************************************** 
     104 *      VM reset Type 
     105 ***************************************************************************/ 
     106/*EN VM reset type 
     107\ingroup MDL_LIB_VM 
     108*/ 
     109enum VM_RESET_TYPE { 
     110        VM_RESET_DEFAULT,       /*EN< Reset VM to the initialized status 
     111                                                                All the fields values, objects statuses are reset.*/ 
     112}; 
     113 
    99114 
    100115/*************************************************************************** 
     
    177192{ 
    178193        RET ret = ((RET (*)( void ) )pMethodBody)(); 
    179         pVm->PushEvalStack( ret ); 
     194        pVm->pushEvalStack( ret ); 
    180195 
    181196        return; 
     
    210225 
    211226        RET ret = ((RET (*)( P1 ) )pMethodBody)( param1 ); 
    212         pVm->PushEvalStack( ret ); 
     227        pVm->pushEvalStack( ret ); 
    213228 
    214229        return; 
     
    246261 
    247262        RET ret = ((RET (*)( P1, P2 ) )pMethodBody)( param1, param2 ); 
    248         pVm->PushEvalStack( ret ); 
     263        pVm->pushEvalStack( ret ); 
    249264 
    250265        return; 
     
    285300 
    286301        RET ret = ((RET (*)( P1, P2, P3 ) )pMethodBody)( param1, param2, param3 ); 
    287         pVm->PushEvalStack( ret ); 
     302        pVm->pushEvalStack( ret ); 
    288303 
    289304        return; 
     
    327342 
    328343        RET ret = ((RET (*)( P1, P2, P3, P4 ) )pMethodBody)( param1, param2, param3, param4 ); 
    329         pVm->PushEvalStack( ret ); 
     344        pVm->pushEvalStack( ret ); 
    330345 
    331346        return; 
     
    372387 
    373388        RET ret = ((RET (*)( P1, P2, P3, P4, P5 ) )pMethodBody)( param1, param2, param3, param4, param5 ); 
    374         pVm->PushEvalStack( ret ); 
     389        pVm->pushEvalStack( ret ); 
    375390 
    376391        return; 
     
    396411{ 
    397412        ((void (*)( void ) )pMethodBody)(); 
    398         pVm->PushEvalStackUndefined(); 
     413        pVm->pushEvalStackUndefined(); 
    399414 
    400415        return; 
     
    429444 
    430445        ((void (*)( P1 ) )pMethodBody)( param1 ); 
    431         pVm->PushEvalStackUndefined(); 
     446        pVm->pushEvalStackUndefined(); 
    432447 
    433448        return; 
     
    466481 
    467482        ((void (*)( P1, P2 ) )pMethodBody)( param1, param2 ); 
    468         pVm->PushEvalStackUndefined(); 
     483        pVm->pushEvalStackUndefined(); 
    469484 
    470485        return; 
     
    505520 
    506521        ((void (*)( P1, P2, P3 ) )pMethodBody)( param1, param2, param3 ); 
    507         pVm->PushEvalStackUndefined(); 
     522        pVm->pushEvalStackUndefined(); 
    508523 
    509524        return; 
     
    547562 
    548563        ((void (*)( P1, P2, P3, P4 ) )pMethodBody)( param1, param2, param3, param4 ); 
    549         pVm->PushEvalStackUndefined(); 
     564        pVm->pushEvalStackUndefined(); 
    550565 
    551566        return; 
     
    592607 
    593608        ((void (*)( P1, P2, P3, P4, P5 ) )pMethodBody)( param1, param2, param3, param4, param5 ); 
    594         pVm->PushEvalStackUndefined(); 
     609        pVm->pushEvalStackUndefined(); 
    595610 
    596611        return; 
     
    618633 
    619634        RET ret = ((RET (*)( CVariable* ) )pMethodBody)( pVar ); 
    620         pVm->PushEvalStack( ret ); 
     635        pVm->pushEvalStack( ret ); 
    621636 
    622637        return; 
     
    651666 
    652667        RET ret = ((RET (*)( CVariable*, P1 ) )pMethodBody)( pVar, param1 ); 
    653         pVm->PushEvalStack( ret ); 
     668        pVm->pushEvalStack( ret ); 
    654669 
    655670        return; 
     
    687702 
    688703        RET ret = ((RET (*)( CVariable*, P1, P2 ) )pMethodBody)( pVar, param1, param2 ); 
    689         pVm->PushEvalStack( ret ); 
     704        pVm->pushEvalStack( ret ); 
    690705 
    691706        return; 
     
    726741 
    727742        RET ret = ((RET (*)( CVariable*, P1, P2, P3 ) )pMethodBody)( pVar, param1, param2, param3 ); 
    728         pVm->PushEvalStack( ret ); 
     743        pVm->pushEvalStack( ret ); 
    729744 
    730745        return; 
     
    768783 
    769784        RET ret = ((RET (*)( CVariable*, P1, P2, P3, P4 ) )pMethodBody)( pVar, param1, param2, param3, param4 ); 
    770         pVm->PushEvalStack( ret ); 
     785        pVm->pushEvalStack( ret ); 
    771786 
    772787        return; 
     
    813828 
    814829        RET ret = ((RET (*)( CVariable*, P1, P2, P3, P4, P5 ) )pMethodBody)( pVar, param1, param2, param3, param4, param5 ); 
    815         pVm->PushEvalStack( ret ); 
     830        pVm->pushEvalStack( ret ); 
    816831 
    817832        return; 
     
    840855 
    841856        ((void (*)( CVariable* ) )pMethodBody)( pVar ); 
    842         pVm->PushEvalStackUndefined(); 
     857        pVm->pushEvalStackUndefined(); 
    843858 
    844859        return; 
     
    874889 
    875890        ((void (*)( CVariable*, P1 ) )pMethodBody)( pVar, param1 ); 
    876         pVm->PushEvalStackUndefined(); 
     891        pVm->pushEvalStackUndefined(); 
    877892 
    878893        return; 
     
    911926 
    912927        ((void (*)( CVariable*, P1, P2 ) )pMethodBody)( pVar, param1, param2 ); 
    913         pVm->PushEvalStackUndefined(); 
     928        pVm->pushEvalStackUndefined(); 
    914929 
    915930        return; 
     
    950965 
    951966        ((void (*)( CVariable*, P1, P2, P3 ) )pMethodBody)( pVar, param1, param2, param3 ); 
    952         pVm->PushEvalStackUndefined(); 
     967        pVm->pushEvalStackUndefined(); 
    953968 
    954969        return; 
     
    9921007 
    9931008        ((void (*)( CVariable*, P1, P2, P3, P4 ) )pMethodBody)( pVar, param1, param2, param3, param4 ); 
    994         pVm->PushEvalStackUndefined(); 
     1009        pVm->pushEvalStackUndefined(); 
    9951010 
    9961011        return; 
     
    10371052 
    10381053        ((void (*)( CVariable*, P1, P2, P3, P4, P5 ) )pMethodBody)( pVar, param1, param2, param3, param4, param5 ); 
    1039         pVm->PushEvalStackUndefined(); 
     1054        pVm->pushEvalStackUndefined(); 
    10401055 
    10411056        return; 
     
    10701085        \return current reference count value 
    10711086        */ 
    1072         int32_t AddRef(); 
     1087        int32_t addRef(); 
    10731088 
    10741089        /*EN Decrements a reference count of the object. 
    10751090        \return current reference count value 
    10761091        */ 
    1077         int32_t Release(); 
     1092        int32_t release(); 
    10781093 
    10791094        /*EN Enforce to set a reference count of the object. 
    10801095        \param iCount new reference count value to be set 
    10811096        */ 
    1082         void SetRefCount( int32_t iCount ) { m_iRefCount = iCount; } 
     1097        void setRefCount( int32_t iCount ) { m_iRefCount = iCount; } 
    10831098 
    10841099        /*EN Retrieves a reference count of the object. 
    10851100        \return areference count value 
    10861101        */ 
    1087         int32_t GetRefCount() { return m_iRefCount; } 
     1102        int32_t getRefCount() { return m_iRefCount; } 
    10881103 
    10891104        /*EN Clears a reference count value to 0. 
    10901105        */ 
    1091         void ClearRefCount( void ); 
     1106        void clearRefCount( void ); 
    10921107        /*EN Sets a prototype object. 
    10931108        \param pPrototype A pointer to the prototype VM Object 
     
    10951110        \param flag flags 
    10961111        */ 
    1097         void SetPrototypeObject( CVmObject* const pPrototype, 
     1112        void setPrototypeObject( CVmObject* const pPrototype, 
    10981113                                                                const OPERAND_TYPE type = OPERAND_OBJECTREF, 
    10991114                                                                const OPERAND_FLAG flag = OPERAND_FLAG( OPERAND_FLAG_DONTDELETE 
     
    11081123        A prototype object has a chain and finally goes to the Object prototype object. 
    11091124        */ 
    1110         CVmObject* GetPrototypeObject( void ) { return m_varPrototype.refObject; } 
     1125        CVmObject* getPrototypeObject( void ) { return m_varPrototype.refObject; } 
    11111126 
    11121127        /*EN Looks up the property with the given name 
     
    11151130        \return A pointers to a value of the property. Returns NULL if a requested property does not exist. 
    11161131        */ 
    1117         CVariable* LookupProperty( const wstring& str ); 
     1132        CVariable* lookupProperty( const wstring& str ); 
    11181133 
    11191134        /*EN Retrieves an iterator tothe property with the given name 
     
    11221137        \return An iterator of the property. Returns invalid iterator when the property does not exist. 
    11231138        */ 
    1124         hash_map< wstring, CVariable >::iterator LookupPropertyIterator( const wstring& str ); 
     1139        hash_map< wstring, CVariable >::iterator lookupPropertyIterator( const wstring& str ); 
    11251140 
    11261141        /*EN Sets the property value with the given name 
     
    11291144        \param value value of the property 
    11301145        */ 
    1131         void SetProperty( const wstring& str, CVariable& value ); 
     1146        void setProperty( const wstring& str, CVariable& value ); 
    11321147 
    11331148        /*EN Looks up the property with the given name. 
     
    11371152        \return A pointers to a value of the property. Returns NULL if a requested property does not exist. 
    11381153        */ 
    1139         CVariable* LookupProperty( CCilVm* const pVm, const wstring& str, CVariable* const pThis = NULL ); 
     1154        CVariable* lookupProperty( CCilVm* const pVm, const wstring& str, CVariable* const pThis = NULL ); 
    11401155 
    11411156        /*EN Sets the property value with the given name 
     
    11461161        \param value value of the property 
    11471162        */ 
    1148         void SetProperty( CCilVm* const pVm, const wstring& str, CVariable& value ); 
     1163        void setProperty( CCilVm* const pVm, const wstring& str, CVariable& value ); 
    11491164 
    11501165        /*EN Sets the method property with the given name 
     
    11541169        \param iLength A number of parameters that the method can accept. This value is set to method.length property. 
    11551170        */ 
    1156         void SetProperty( CCilVm* const pVm, 
     1171        void setProperty( CCilVm* const pVm, 
    11571172                                 const wstring& name, 
    11581173                                 const RID ridMethod, 
     
    11621177        \param name A name of the property to be removed 
    11631178        */ 
    1164         void RemoveProperty( const wstring& name ); 
     1179        void removeProperty( const wstring& name ); 
    11651180 
    11661181        /*EN Sets a property accessor. 
     
    11681183        \param pAccessro A pointer of the accessor callback 
    11691184        */ 
    1170         void SetPropertyAccessor( const wstring& name, PACCESSORMETHOD pAccessor ); 
     1185        void setPropertyAccessor( const wstring& name, PACCESSORMETHOD pAccessor ); 
    11711186 
    11721187        /*EN Retrieves a value of the object. 
    11731188        \return value of the object 
    11741189        */ 
    1175         CVariable& GetValue( void ) 
     1190        CVariable& getValue( void ) 
    11761191        { 
    11771192                return m_varValue; 
     
    11811196        \param var an object value 
    11821197        */ 
    1183         void SetValue( CVariable& var ) 
     1198        void setValue( CVariable& var ) 
    11841199        { 
    11851200                var.moveTo( m_varValue ); 
     
    11901205        \return value of the object 
    11911206        */ 
    1192         CVariable& GetParentVariable( void ) { return m_varParent; } 
     1207        CVariable& getParentVariable( void ) { return m_varParent; } 
    11931208 
    11941209        /*EN Set a parent value of the object. 
    11951210        \param variable a parent value of the object value 
    11961211        */ 
    1197         void SetParentVariable( const CVariable& variable ) { m_varParent = variable; } 
     1212        void setParentVariable( const CVariable& variable ) { m_varParent = variable; } 
    11981213 
    11991214}; 
     
    12231238                \return true when the verification succeeded. 
    12241239                */ 
    1225                 bool verify (); 
     1240                bool verify(); 
     1241 
     1242                /*EN reset VM status to Initilized status 
     1243                \param iResetType VM reset type 
     1244                \return true when the reset succeeded. 
     1245                */ 
     1246                bool reset( const VM_RESET_TYPE iResetType ); 
    12261247 
    12271248                /*EN Retrieve Version Number of the VM */ 
    1228                 const CRISCRIPT_VERSIONS& GetVersions(void) { return criscript_version_struct; } 
     1249                const CRISCRIPT_VERSIONS& getVersions(void) { return criscript_version_struct; } 
    12291250 
    12301251                //---------------------------------------------------------------------- 
    12311252                //VM Management 
    12321253                //---------------------------------------------------------------------- 
    1233                 /*EN Execute the byte code. 
     1254                /*EN execute the byte code. 
    12341255                \return current execution status. 
    12351256                */ 
    1236                 VM_STATUS_TYPE Execute(); 
     1257                VM_STATUS_TYPE execute(); 
    12371258 
    12381259                /*EN Retrieves an exit code of the script. 
     
    12401261                An exit code is set from the script variable 'System.Environment.ExitCode' . 
    12411262                */ 
    1242                 int32_t GetExitCode(); 
     1263                int32_t getExitCode(); 
    12431264 
    12441265                //---------------------------------------------------------------------- 
     
    12501271                \param pCallBack a callback pointer 
    12511272                */ 
    1252                 VM_HANDLER_CALLBACK RegisterHandler( VM_HANDLER_TYPE handlertype, VM_HANDLER_CALLBACK pCallBack ); 
     1273                VM_HANDLER_CALLBACK registerHandler( VM_HANDLER_TYPE handlertype, VM_HANDLER_CALLBACK pCallBack ); 
    12531274 
    12541275                //---------------------------------------------------------------------- 
     
    12581279                return: true when succeeded. 
    12591280                */ 
    1260                 bool SetILPool( const vector< uint8_t >& vecIL); 
     1281                bool setILPool( const vector< uint8_t >& vecIL); 
     1282                 
    12611283                /*EN Attaches a metadata for corresponding IL(intermediate language) stream to the VM. 
    12621284                \return true when succeeded. 
    12631285                */ 
    1264                 bool SetMetaData( CMetaData& MetaData ); 
     1286                bool setMetaData( CMetaData& MetaData ); 
    12651287 
    12661288                /*EN Retrieves currently set metadata. 
     
    12751297                \return true when the binding succeeded, false otherwise. 
    12761298                */ 
    1277                 bool BindBuiltinMethod( const wstring& strQualifiedName, 
     1299                bool bindBuiltinMethod( const wstring& strQualifiedName, 
    12781300                                                                PMETHOD const pMethod, 
    12791301                                                                const int32_t iLength ); 
     
    12851307                \return true when the binding succeeded, false otherwise. 
    12861308                */ 
    1287                 bool BindBuiltinMethod( const wstring& strQualifiedName, 
     1309                bool bindBuiltinMethod( const wstring& strQualifiedName, 
    12881310                                                                PMETHOD const pMethod, PMETHOD const pMethodBody ); 
    12891311 
     
    12931315                \return true when the binding succeeded, false otherwise. 
    12941316                */ 
    1295                 bool BindBuiltinVariable( const wstring& strQualifiedName, 
     1317                bool bindBuiltinVariable( const wstring& strQualifiedName, 
    12961318                                                                CVariable* const pvar ); 
    12971319 
     
    13031325                \return variable that with given RID 
    13041326                */ 
    1305                 CVariable& GetStaticField( const RID rid ); 
     1327                CVariable& getStaticField( const RID rid ); 
    13061328 
    13071329                /*EN Set a static field value with given RID. 
     
    13101332                \return true when the value is set successfully, false otherwise. 
    13111333                */ 
    1312                 bool SetStaticField( const RID rid, const CVariable& value ); 
     1334                bool setStaticField( const RID rid, const CVariable& value ); 
    13131335 
    13141336                /*EN Set a static field value with given RID. 
     
    13181340                \return true when the value is set successfully, false otherwise. 
    13191341                */ 
    1320                 bool SetStaticField( const RID rid, const CVariable& value, bool bForce ); 
     1342                bool setStaticField( const RID rid, const CVariable& value, bool bForce ); 
    13211343                 
    13221344                //---------------------------------------------------------------------- 
     
    13271349                \return true when the debugger successfully attached. false otherwise. 
    13281350                */ 
    1329                 bool AttachDebugger( CCilDebugger* const pDebugger ) { m_pDebugger = pDebugger; return true; } 
     1351                bool attachDebugger( CCilDebugger* const pDebugger ) { m_pDebugger = pDebugger; return true; } 
    13301352                 
    13311353                /*EN Dettaches a debugger interface from the VM. 
    13321354                \return true when the debugger successfully dettached. false otherwise. 
    13331355                */ 
    1334                 bool DetachDebugger() { m_pDebugger = NULL; } 
     1356                bool detachDebugger() { m_pDebugger = NULL; } 
    13351357                 
    13361358                /*EN Sets a map of symbol information. 
     
    13391361                \return true when the symbol information map successfully set. false otherwise. 
    13401362                */ 
    1341                 bool SetSymbolInformation( hash_map<wstring, CG_SYMBOL_INFORMATION>& symbolinfo); 
     1363                bool setSymbolInformation( hash_map<wstring, CG_SYMBOL_INFORMATION>& symbolinfo); 
    13421364 
    13431365                /*EN Query a symbol information 
     
    13451367                \return Information related to hte symbol 
    13461368                */ 
    1347                 CG_SYMBOL_INFORMATION& QuerySymbolInformation( const wstring& symbolName ); 
    1348  
    1349                 /*EN Dump current VM status including variables and IL stream to stdout. This API is for Debug purpose. 
    1350                 */ 
    1351                 void DebugDumpStats( void ); 
     1369                CG_SYMBOL_INFORMATION& querySymbolInformation( const wstring& symbolName ); 
     1370 
     1371                /*EN dump current VM status including variables and IL stream to stdout. This API is for Debug purpose. 
     1372                */ 
     1373                void debugDumpStats( void ); 
    13521374 
    13531375                //---------------------------------------------------------------------- 
     
    13611383                \param pArguments A pointer to the argument array 
    13621384                */ 
    1363                 CVariable* InvokeMethod( const RID ridMethod, const int32_t iNumArg, 
     1385                CVariable* invokeMethod( const RID ridMethod, const int32_t iNumArg, 
    13641386                                                                                           CVariable* pArguments ); 
    13651387 
     
    13701392                \return A reference to the object pool. An object pool is a implemented with STL::list 
    13711393                */ 
    1372                 list< CVmObject >& GetObjectPool() { return m_ObjectPool; } 
     1394                list< CVmObject >& getObjectPool() { return m_ObjectPool; } 
    13731395 
    13741396                /*EN Retrieves a prototype object for given RID 
    13751397                \return A reference to the prototype object. 
    13761398                */ 
    1377                 CVmObject& GetPrototypeObject( const RID ridPrototype ); 
     1399                CVmObject& getPrototypeObject( const RID ridPrototype ); 
    13781400 
    13791401                //---------------------------------------------------------------------- 
     
    13831405                \param errObject a pointer to the error object. 
    13841406                */ 
    1385                 void ThrowException( CVariable* errObject ); 
     1407                void throwException( CVariable* errObject ); 
    13861408                /*EN Throws an exception from inside of built-in functions. 
    13871409                \param pstrMessage A pointer to an error description 
     
    13891411                \param iNumber A pointer to an error number 
    13901412                */ 
    1391                 void ThrowException( wstring* pstrMessage, wstring* pstrName = NULL , int32_t iNumber = -1 ); 
     1413                void throwException( wstring* pstrMessage, wstring* pstrName = NULL , int32_t iNumber = -1 ); 
    13921414 
    13931415                //---------------------------------------------------------------------- 
     
    14001422                \return RID of created prototype object 
    14011423                */ 
    1402                 RID CreatePrototypeObject( const RID ridObject, 
     1424                RID createPrototypeObject( const RID ridObject, 
    14031425                                                                const RID ridObjectName, 
    14041426                                                                const RID ridPrototype ); 
     
    14081430                \return A pointer to the created object. An object resides in a object pool and has reference count for Garbage collector, 
    14091431                */ 
    1410                 VMOBJECTREF CreateObject( const RID ridObject ); 
     1432                VMOBJECTREF createObject( const RID ridObject ); 
    14111433 
    14121434                /*EN Retrieve an object from the variable. If the variable is not an object, a prototype object reference is returned. 
     
    14141436                \return A pointer to the object or prototype object that corresponds to the variable type 
    14151437                */ 
    1416                 VMOBJECTREF GetObjectPointer( CVariable& var ); 
     1438                VMOBJECTREF getObjectPointer( CVariable& var ); 
    14171439 
    14181440                //---------------------------------------------------------------------- 
     
    14221444                \return RID of the Object prototype object 
    14231445                */ 
    1424                 static RID GetObjectRID() { return m_ridObject; } 
     1446                static RID getObjectRID() { return m_ridObject; } 
    14251447                /*EN Retrieves Array prototype object RID 
    14261448                \return RID of the Array prototype object 
    14271449                */ 
    1428                 static RID GetArrayObjectRID() { return m_ridArrayObject; } 
     1450                static RID getArrayObjectRID() { return m_ridArrayObject; } 
    14291451                /*EN Retrieves String prototype object RID 
    14301452                \return RID of the String prototype object 
    14311453                */ 
    1432                 static RID GetStringObjectRID() { return m_ridStringObject; } 
     1454                static RID getStringObjectRID() { return m_ridStringObject; } 
    14331455                /*EN Retrieves Function prototype object RID 
    14341456                \return RID of the Function prototype object 
    14351457                */ 
    1436                 static RID GetFunctionObjectRID() { return m_ridFunctionObject; } 
     1458                static RID getFunctionObjectRID() { return m_ridFunctionObject; } 
    14371459                /*EN Retrieves System prototype object RID 
    14381460                \return RID of the System prototype object 
    14391461                */ 
    1440                 static RID GetSystemObjectRID() { return m_ridSystemObject; } 
     1462                static RID getSystemObjectRID() { return m_ridSystemObject; } 
    14411463                /*EN Retrieves Boolean prototype object RID 
    14421464                \return RID of the Boolean prototype object 
    14431465                */ 
    1444                 static RID GetBooleanObjectRID() { return m_ridBooleanObject; } 
     1466                static RID getBooleanObjectRID() { return m_ridBooleanObject; } 
    14451467                /*EN Retrieves Number prototype object RID 
    14461468                \return RID of the Number prototype object 
    14471469                */ 
    1448                 static RID GetNumberObjectRID() { return m_ridNumberObject; } 
     1470                static RID getNumberObjectRID() { return m_ridNumberObject; } 
    14491471                /*EN Retrieves Date prototype object RID 
    14501472                \return RID of the Date prototype object 
    14511473                */ 
    1452                 static RID GetDateObjectRID() { return m_ridDateObject; } 
     1474                static RID getDateObjectRID() { return m_ridDateObject; } 
    14531475                /*EN Retrieves Regex prototype object RID 
    14541476                \return RID of the Regex prototype object 
    14551477                */ 
    1456                 static RID GetRegexObjectRID() { return m_ridRegexObject; } 
     1478                static RID getRegexObjectRID() { return m_ridRegexObject; } 
    14571479                /*EN Retrieves Error prototype object RID 
    14581480                \return RID of the Error prototype object 
    14591481                */ 
    1460                 static RID GetErrorObjectRID() { return m_ridErrorObject; } 
     1482                static RID getErrorObjectRID() { return m_ridErrorObject; } 
    14611483                /*EN Retrieves Math prototype object RID 
    14621484                \return RID of the Math prototype object 
    14631485                */ 
    1464                 static RID GetMathObjectRID() { return m_ridMathObject; } 
     1486                static RID getMathObjectRID() { return m_ridMathObject; } 
    14651487 
    14661488                //---------------------------------------------------------------------- 
     
    14681490                //Those need to be exposed for built in/user supplied functions 
    14691491                //---------------------------------------------------------------------- 
    1470                 void PushEvalStack( const CVariable& operand ); 
    1471                 void PushEvalStack( const int32_t i ); 
    1472                 void PushEvalStack( const int64_t i ); 
    1473                 void PushEvalStack( const float f ); 
    1474                 void PushEvalStack( const double d ); 
    1475                 void PushEvalStack( const bool b ); 
    1476                 void PushEvalStackUndefined(); 
    1477                 void PushEvalStackNaN(); 
    1478                 void PushEvalStackInfinity(); 
    1479                 void PushEvalStackNull(); 
    1480                 void PushEvalStackObjectRef( const VMOBJECTREF refObject ); 
    1481                 void PushEvalStackVariable( const CVariable& var ); 
    1482                 void PushEvalStackString( const wchar_t* ); 
    1483                 void PushEvalStackString( const wstring* str ); 
    1484                 void PushEvalStackStringPointer( wstring* str );      //Pointer is stored directory and should not be deleted 
     1492                void pushEvalStack( const CVariable& operand ); 
     1493                void pushEvalStack( const int32_t i ); 
     1494                void pushEvalStack( const int64_t i ); 
     1495                void pushEvalStack( const float f ); 
     1496                void pushEvalStack( const double d ); 
     1497                void pushEvalStack( const bool b ); 
     1498                void pushEvalStackUndefined(); 
     1499                void pushEvalStackNaN(); 
     1500                void pushEvalStackInfinity(); 
     1501                void pushEvalStackNull(); 
     1502                void pushEvalStackObjectRef( const VMOBJECTREF refObject ); 
     1503                void pushEvalStackVariable( const CVariable& var ); 
     1504                void pushEvalStackString( const wchar_t* ); 
     1505                void pushEvalStackString( const wstring* str ); 
     1506                void pushEvalStackStringPointer( wstring* str );      //Pointer is stored directory and should not be deleted 
    14851507 
    14861508                //---------------------------------------------------------------------- 
    14871509                //Eval stack helpers 
    14881510                //---------------------------------------------------------------------- 
    1489                 void PopPushEvalStack( const int32_t i ) { PopEvalStack(); PopEvalStack(); PushEvalStack( i ); }; 
    1490                 void PopPushEvalStack( const int64_t i ) { PopEvalStack(); PopEvalStack(); PushEvalStack( i ); }; 
    1491                 void PopPushEvalStack( const float f ) { PopEvalStack(); PopEvalStack(); PushEvalStack( f ); }; 
    1492                 void PopPushEvalStack( const double d ) { PopEvalStack(); PopEvalStack(); PushEvalStack( d ); }; 
    1493                 void PopPushEvalStack( const bool b ) { PopEvalStack(); PopEvalStack(); PushEvalStack( b ); }; 
    1494                 void PopPushEvalStackUndefined() { PopEvalStack(); PopEvalStack(); PushEvalStackUndefined(); }; 
    1495                 void PopPushEvalStackNaN() { PopEvalStack(); PopEvalStack(); PushEvalStackNaN(); }; 
    1496                 void PopPushEvalStackNull() { PopEvalStack(); PopEvalStack(); PushEvalStackNull(); }; 
    1497                 void PopPushEvalStackInfinity() { PopEvalStack(); PopEvalStack(); PushEvalStackInfinity(); }; 
    1498                 void PopThrowTypeError() {     PopEvalStack(); 
    1499                                                                         PopEvalStack(); 
    1500                                                                         PushEvalStackNaN(); 
     1511                void popPushEvalStack( const int32_t i ) { popEvalStack(); popEvalStack(); pushEvalStack( i ); }; 
     1512                void popPushEvalStack( const int64_t i ) { popEvalStack(); popEvalStack(); pushEvalStack( i ); }; 
     1513                void popPushEvalStack( const float f ) { popEvalStack(); popEvalStack(); pushEvalStack( f ); }; 
     1514                void popPushEvalStack( const double d ) { popEvalStack(); popEvalStack(); pushEvalStack( d ); }; 
     1515                void popPushEvalStack( const bool b ) { popEvalStack(); popEvalStack(); pushEvalStack( b ); }; 
     1516                void popPushEvalStackUndefined() { popEvalStack(); popEvalStack(); pushEvalStackUndefined(); }; 
     1517                void popPushEvalStackNaN() { popEvalStack(); popEvalStack(); pushEvalStackNaN(); }; 
     1518                void popPushEvalStackNull() { popEvalStack(); popEvalStack(); pushEvalStackNull(); }; 
     1519                void popPushEvalStackInfinity() { popEvalStack(); popEvalStack(); pushEvalStackInfinity(); }; 
     1520                void popThrowTypeError() {     popEvalStack(); 
     1521                                                                        popEvalStack(); 
     1522                                                                        pushEvalStackNaN(); 
    15011523                                                                        ThrowExceptionFromVm( &wstring( ERRORSTRING_TYPEERROR_STORESTATICFIELD ), 
    15021524                                                                                &wstring( NAME_BUILTIN_ERROR_OBJECT ), 
     
    15041526                                                                }; 
    15051527 
    1506                 void PopEvalStack( void ); 
    1507                 void PopEvalStackFast( void ); 
    1508                 bool IsEvalStackEmpty(); 
    1509                 void DupEvalStack( void ); 
    1510                 size_t GetEvalStackSize(); 
    1511                 CVariable& GetEvalStackFirstEntry(); 
    1512                 CVariable& GetEvalStackSecondEntry(); 
    1513                 CVariable& GetEvalStackNewEntry(); 
    1514  
    1515                 void ClearEvalStack();                  /*EN< Clear eval stack*/ 
    1516                 void ClearLocalVariableList();  /*EN< Clear local variable list*/ 
    1517                 void ClearArgList();                    /*EN< Clear argument list*/ 
     1528                void popEvalStack( void ); 
     1529                void popEvalStackFast( void ); 
     1530                bool isEvalStackEmpty(); 
     1531                void dupEvalStack( void ); 
     1532                size_t getEvalStackSize(); 
     1533                CVariable& getEvalStackFirstEntry(); 
     1534                CVariable& getEvalStackSecondEntry(); 
     1535                CVariable& getEvalStackNewEntry(); 
     1536 
     1537                void clearEvalStack();                  /*EN< Clear eval stack*/ 
     1538                void clearLocalVariableList();  /*EN< Clear local variable list*/ 
     1539                void clearArgList();                    /*EN< Clear argument list*/ 
     1540                void clearCallStack();                  /*EN< Clear call stack*/ 
     1541                void clearStaticFields();               /*EN< Clear static field*/ 
    15181542 
    15191543                //---------------------------------------------------------------------- 
     
    15241548                \return reference of the array list 
    15251549                */  
    1526                 CVariable* GetArgumentList() { return m_ArgList; }; 
     1550                CVariable* getArgumentList() { return m_ArgList; }; 
    15271551 
    15281552                /*EN Retrieve a local variable list 
    15291553                \return reference of the local list 
    15301554                */  
    1531                 CVariable* GetLocalList() { return m_LocalVariableList; }; 
     1555                CVariable* getLocalList() { return m_LocalVariableList; }; 
    15321556 
    15331557                /*EN Takes a variable from the eval stack and stores it to the static field with given RID 
    15341558                \param rid RID of the static field that the value to be stored in. 
    15351559                */ 
    1536                 void StoreStaticField( const RID rid ); 
     1560                void storeStaticField( const RID rid ); 
    15371561 
    15381562                /*EN Takes a variable from static field with given RID and put the variable to the eval stack 
    15391563                \param rid RID of the static field that the value is to be loaded from. 
    15401564                */ 
    1541                 void LoadStaticField( const RID rid ); 
     1565                void loadStaticField( const RID rid ); 
    15421566 
    15431567                /*EN Takes a variable from the eval stack and stores it to the local variable with given index 
    15441568                \param iIndex An index of a local variable. Negative index means a local variable in the enclosing scope. 
    15451569                */ 
    1546                 void StoreLocalVariable( const int32_t iIndex ); 
     1570                void storeLocalVariable( const int32_t iIndex ); 
    15471571 
    15481572                /*EN Takes a variable of the local variable with given index and push it to the eval stack. 
    15491573                \param iIndex An index of a local variable. Negative index means a local variable in the enclosing scope. 
    15501574                */ 
    1551                 void LoadLocalVariable( const int32_t iIndex ); 
     1575                void loadLocalVariable( const int32_t iIndex ); 
    15521576 
    15531577                /*EN Takes a variable from the eval stack and stores it to the argument list with given index 
    15541578                \param iIndex An index of an argument list. 0 means this pointer, Negative index means a local variable in the enclosing scope. 
    15551579                */ 
    1556                 void StoreArgument( const int32_t iIndex ); 
     1580                void storeArgument( const int32_t iIndex ); 
    15571581 
    15581582                /*EN Takes a variable from the argument list with given index and push it to the eval stack. 
    15591583                \param iIndex An index of an argument list. 0 means this pointer, Negative index means a local variable in the enclosing scope. 
    15601584                */ 
    1561                 void LoadArgument( const int32_t iIndex ); 
     1585                void loadArgument( const int32_t iIndex ); 
    15621586 
    15631587                /*EN Retrieves a table of the static field vector 
    15641588                \return A vector of the static field variables 
    15651589                */ 
    1566                 CVariable* GetStaticFieldTable() { return m_pStaticFieldTable; } 
     1590                CVariable* getStaticFieldTable() { return m_pStaticFieldTable; } 
    15671591 
    15681592                /*EN Takes a variable from the eval stack and stores it to the destination variable with a respect of a type constraint. 
    15691593                \param varDest A reference of a variable that the value from an eval stack is stored in. 
    15701594                */ 
    1571                 void StoreAsRestrictedType( CVariable& varDest ); 
     1595                void storeAsRestrictedType( CVariable& varDest ); 
    15721596 
    15731597                /*EN Calls given RID, invoked from Function.apply*/  
     
    15761600                                                        const bool bConstructor = false ); 
    15771601                /*EN Stores a variable to argument list by hand. Invoked from Function.apply*/  
    1578                 void StoreArgumentList( const CVariable& var ); 
     1602                void storeArgumentList( const CVariable& var ); 
    15791603 
    15801604                /*EN Generates 'arguments' property based on current callstack and arguments list information on the fly. 
    15811605                */ 
    1582                 CVariable* GenerateArgumentsProperty(); 
     1606                CVariable* generateArgumentsProperty(); 
    15831607                 
    15841608                /*EN Generates 'restArguments' argument if the method signature requires it. 
    15851609                This helper should be called immediate before function call. 
    15861610                */ 
    1587                 void GenerateRestArguments( int32_t iNumArgsToStore ); 
     1611                void generateRestArguments( int32_t iNumArgsToStore ); 
    15881612 
    15891613                /*EN Generates 'caller' property based on current callstack and arguments list information on the fly. 
    15901614                */ 
    1591                 CVariable* GenerateCallerProperty(); 
     1615                CVariable* generateCallerProperty(); 
    15921616 
    15931617                /*EN Disposes arguments given to the API explicitly*/  
    1594                 void DisposeArgumentList(); 
     1618                void disposeArgumentList(); 
    15951619 
    15961620                /*EN Resets number of arguments in the list*/  
    1597                 void ResetArgumentList(); 
     1621                void resetArgumentList(); 
    15981622 
    15991623                /*EN Returns exception handler nesting level 
     
    16011625                        Return non zero if current code is inside an exception handler clause. 
    16021626                */ 
    1603                 int32_t GetExectipnHandlerNestingLevel() { return m_ExceptionHandlerNestingLevel; } 
     1627                int32_t getExectipnHandlerNestingLevel() { return m_ExceptionHandlerNestingLevel; } 
    16041628 
    16051629 
     
    16091633                /*EN Flush print() buffer if some strings are in the buffer, otherwise, do nothing.. 
    16101634                */ 
    1611                 void FlushPrintBuffer() { wprintf( m_strPrintBuffer.data() ); m_strPrintBuffer.clear(); } 
     1635                void flushPrintBuffer() { wprintf( m_strPrintBuffer.data() ); m_strPrintBuffer.clear(); } 
    16121636 
    16131637                /*EN Retrieves print() buffer if some strings are in the buffer, otherwise, do nothing.. 
    16141638                \return A reference for the wstring that is used for print() intermedeiate buffer 
    16151639                */ 
    1616                 wstring& GetPrintBuffer() { return m_strPrintBuffer; } 
     1640                wstring& getPrintBuffer() { return m_strPrintBuffer; } 
    16171641 
    16181642                /*EN Retrieves print() buffer if some strings are in the buffer, otherwise, do nothing.. 
    16191643                \param str wstring that will be printed. 
    16201644                */ 
    1621                 void AppendPrintBuffer( wstring& str ) { m_strPrintBuffer.append( str ); } 
     1645                void appendPrintBuffer( wstring& str ) { m_strPrintBuffer.append( str ); } 
    16221646 
    16231647        private: 
     
    16251649                //Initialize engines 
    16261650                //---------------------------------------------------------------------- 
    1627                 bool SetStaticFieldTypeTable( vector< OPERAND_TYPE_FLAG >& vecSFType ); 
    1628                 void InitializePrototypeObjects(); 
     1651                bool setStaticFieldTypeTable( vector< OPERAND_TYPE_FLAG >& vecSFType ); 
     1652                void initializePrototypeObjects(); 
    16291653 
    16301654                /*EN Set a static field value with a function object with given method RID. 
     
    16341658                \return true when the value is set successfully, false otherwise. 
    16351659                */ 
    1636                 bool SetStaticFieldFunctionObject( const RID rid, const RID ridMethod ); 
     1660                bool setStaticFieldFunctionObject( const RID rid, const RID ridMethod ); 
    16371661 
    16381662                //---------------------------------------------------------------------- 
    16391663                //Garbage collector helper 
    16401664                //---------------------------------------------------------------------- 
    1641                 void ClearRefCount(); 
    1642                 void CleanObjectPool(); 
     1665                void clearRefCount(); 
     1666                void cleanObjectPool(); 
    16431667 
    16441668                //---------------------------------------------------------------------- 
     
    16501674                //Byte code stream accesser 
    16511675                //---------------------------------------------------------------------- 
    1652                 uint8_t GetNextBytecode( void );      /*EN< Retrieve next byte code from an attached byte code stream*/ 
    1653                 RID GetNextToken( void );                     /*EN< Retrieve next Token from an attached byte code stream*/ 
    1654                 int32_t GetNextInt32( void );         /*EN< Retrieve next int32_t value from an attached byte code stream*/ 
    1655                 int64_t GetNextInt64( void );         /*EN< Retrieve next int64_t value from an attached byte code stream*/ 
    1656                 int8_t GetNextInt8( void );                   /*EN< Retrieve next int8_t value from an attached byte code stream*/ 
    1657                 uint8_t GetNextUint8( void );         /*EN< Retrieve next uint8_t value from an attached byte code stream*/ 
    1658                 float GetNextFloat( void );                   /*EN< Retrieve next float value from an attached byte code stream*/ 
    1659                 double GetNextDouble( void );         /*EN< Retrieve next double value from an attached byte code stream*/ 
     1676                uint8_t getNextBytecode( void );      /*EN< Retrieve next byte code from an attached byte code stream*/ 
     1677                RID getNextToken( void );                     /*EN< Retrieve next Token from an attached byte code stream*/ 
     1678                int32_t getNextInt32( void );         /*EN< Retrieve next int32_t value from an attached byte code stream*/ 
     1679                int64_t getNextInt64( void );         /*EN< Retrieve next int64_t value from an attached byte code stream*/ 
     1680                int8_t getNextInt8( void );                   /*EN< Retrieve next int8_t value from an attached byte code stream*/ 
     1681                uint8_t getNextUint8( void );         /*EN< Retrieve next uint8_t value from an attached byte code stream*/ 
     1682                float getNextFloat( void );                   /*EN< Retrieve next float value from an attached byte code stream*/ 
     1683                double getNextDouble( void );         /*EN< Retrieve next double value from an attached byte code stream*/ 
    16601684 
    16611685                //---------------------------------------------------------------------- 
    16621686                //Private Field accessor 
    16631687                //---------------------------------------------------------------------- 
    1664                 CVariable& GetLocalVariable( const int32_t iIndex ); 
    1665                 bool SetLocalVariable( const int32_t iIndex, const CVariable& value ); 
    1666                 CVariable& GetArgument( const int32_t iIndex ); 
    1667                 bool SetArgument( const int32_t iIndex, const CVariable& value ); 
     1688                CVariable& getLocalVariable( const int32_t iIndex ); 
     1689                bool setLocalVariable( const int32_t iIndex, const CVariable& value ); 
     1690                CVariable& getArgument( const int32_t iIndex ); 
     1691                bool setArgument( const int32_t iIndex, const CVariable& value ); 
    16681692 
    16691693                //---------------------------------------------------------------------- 
     
    16741698                \return A pointer to the callstack top entry 
    16751699                */ 
    1676                 VM_CALLSTACK* GetCurrentCallStack() { return &m_CallStack.back(); } 
     1700                VM_CALLSTACK* getCurrentCallStack() { return &m_CallStack.back(); } 
    16771701 
    16781702                /*EN Search and retrieves a callstack entries with given argument criteria matches 
     
    16811705                \return A pointer to the callstack entry that matches an arguments criateria 
    16821706                */ 
    1683                 VM_CALLSTACK* GetCurrentCallStack( const VM_CALLSTACK_TYPE type, int iLevel = 1 ) 
     1707                VM_CALLSTACK* getCurrentCallStack( const VM_CALLSTACK_TYPE type, int iLevel = 1 ) 
    16841708                { 
    16851709                        vector< VM_CALLSTACK >::reverse_iterator it = m_CallStack.rbegin(); 
     
    17021726                void multiplyOperator(); 
    17031727                void divisionOperator(); 
    1704                 void NegOperator(); 
     1728                void negOperator(); 
    17051729                void reminderOperator(); 
    1706                 void IncStaticFieldOperator( const RID rid ); 
    1707                 void IncOperator(); 
    1708                 void DecOperator(); 
     1730                void incStaticFieldOperator( const RID rid ); 
     1731                void incOperator(); 
     1732                void decOperator(); 
    17091733 
    17101734                void bitwiseAndOperator(); 
     
    17531777                void FinallyOperator(); 
    17541778 
    1755                 void ConvertToBoolean(); 
     1779                void convertToBoolean(); 
    17561780 
    17571781                //---------------------------------------------------------------------- 
    17581782                //Local variables 
    17591783                //---------------------------------------------------------------------- 
    1760                 void ReserveLocalVariables( const RID ridLocalsToReserve ); 
    1761                 void DisposeLocalVariables( const uint32_t iLocalsToDispose ); 
    1762                 uint32_t GetCurrentLocalVariableIndex( void ) { return (uint32_t)m_iLocalVariableListIndex; } 
     1784                void reserveLocalVariables( const RID ridLocalsToReserve ); 
     1785                void disposeLocalVariables( const uint32_t iLocalsToDispose ); 
     1786                uint32_t getCurrentLocalVariableIndex( void ) { return (uint32_t)m_iLocalVariableListIndex; } 
    17631787 
    17641788                //---------------------------------------------------------------------- 
    17651789                //Argument list 
    17661790                //---------------------------------------------------------------------- 
    1767                 void StoreArgumentListWithThisPointer( const uint32_t iArgToStore ); 
    1768                 void StoreArgumentListWithoutThisPointer( const uint32_t iArgToStore ); 
    1769                 void DisposeArgumentList( const uint32_t iArgToDispose ); 
    1770                 uint32_t GetCurrentArgumentListIndex( void ) { return (uint32_t)m_iArgListIndex; } 
    1771                 void PushArgumentListUndefined( void ); 
    1772                 void PopArgumentList( void ); 
     1791                void storeArgumentListWithThisPointer( const uint32_t iArgToStore ); 
     1792                void storeArgumentListWithoutThisPointer( const uint32_t iArgToStore ); 
     1793                void disposeArgumentList( const uint32_t iArgToDispose ); 
     1794                uint32_t getCurrentArgumentListIndex( void ) { return (uint32_t)m_iArgListIndex; } 
     1795                void pushArgumentListUndefined( void ); 
     1796                void popArgumentList( void ); 
    17731797                 
    17741798                //---------------------------------------------------------------------- 
     
    18071831                uint32_t        m_iMaxArgListIndex; 
    18081832 
    1809                 void UpdateEvalStackIndex() { 
     1833                void updateEvalStackIndex() { 
    18101834                        m_pCurrentEvalStack++; 
    18111835#ifdef VM_TRACK_MAXSTACKUSAGE 
     
    18141838#endif 
    18151839                } 
    1816                 void UpdateLocalVariableListIndex() { 
     1840                void updateLocalVariableListIndex() { 
    18171841                        m_iLocalVariableListIndex++; 
    18181842#ifdef VM_TRACK_MAXSTACKUSAGE 
     
    18211845#endif 
    18221846                } 
    1823                 void UpdateArgListIndex() { 
     1847                void updateArgListIndex() { 
    18241848                        m_iArgListIndex++; 
    18251849#ifdef VM_TRACK_MAXSTACKUSAGE 
  • inc/error.h

    r110 r138  
    194194                \param strOtherInfo Supplemental information 
    195195                */ 
    196                 void Report( int32_t iErrorCode, int32_t iLineNumber, int32_t iColumnNumber, 
     196                void report( int32_t iErrorCode, int32_t iLineNumber, int32_t iColumnNumber, 
    197197                                         wstring & strFileName, wstring & strLine, wstring & strOtherInfo ); 
    198198 
    199                 /*EN Dumps the errors to stdout*/ 
    200                 void DumpError(); 
     199                /*EN dumps the errors to stdout*/ 
     200                void dumpError(); 
    201201 
    202202                /*EN Sets the error table 
     
    204204                \param iSize Number of table entries 
    205205                */ 
    206                 void SetErrorTable( const ERROR_DEF pErrorTable[], size_t iSize ); 
     206                void setErrorTable( const ERROR_DEF pErrorTable[], size_t iSize ); 
    207207 
    208208                /*EN Suppresses error line output for Eclipse usage which does not need error line 
    209209                \param b true: Suppress error line output False:Output error line 
    210210                */ 
    211                 void SuppressErrorLine( bool b ) { m_bSuppressErrorLine = b; } 
     211                void suppressErrorLine( const bool b ) { m_bsuppressErrorLine = b; } 
    212212 
    213213                /*EN Check if there was compile error 
    214214                \return True when compile error happened otherwise false. 
    215215                */ 
    216                 bool HasError( void ); 
     216                bool hasError( void ); 
    217217 
    218218                /*EN Check if there was compile information 
    219219                \return True when compile information generated otherwise false. 
    220220                */ 
    221                 bool HasInformation( void ); 
     221                bool hasInformation( void ); 
    222222 
    223223        private: 
     
    227227                vector< parserError > m_ErrorList; 
    228228                const ERROR_DEF* m_pErrorTable; 
    229                 bool GetErrorLevel( int32_t iErrorCode ); 
     229                bool getErrorLevel( int32_t iErrorCode ); 
    230230 
    231231                int32_t m_iNumErrors[ NUM_ERROR_LEVELS ]; 
    232232                map< int32_t,const ERROR_DEF * > m_mapErrorCode; 
    233                 bool m_bSuppressErrorLine; 
     233                bool m_bsuppressErrorLine; 
    234234        }; 
    235235 
  • inc/icodegen.h

    r110 r138  
    366366        \param value a value of the property 
    367367        */ 
    368         void AddProperty( const wstring& name, const CVariable& value ); 
     368        void addProperty( const wstring& name, const CVariable& value ); 
    369369 
    370370        /*EN Retrieves RID of the Object name 
    371371        \return Object name's RID 
    372372        */ 
    373         RID GetObjectName( void ); 
     373        RID getObjectName( void ); 
    374374 
    375375        /*EN Retrieves RID of the Object 
    376376        \return Object's RID 
    377377        */ 
    378         RID GetRID( void ) { return m_ridObject; } 
     378        RID getRID( void ) { return m_ridObject; } 
    379379         
    380380        /*EN Retrieves RID of the Object constructor 
    381381        \return An object constructor's RID 
    382382        */ 
    383         RID GetConstructor( void ) { return m_ridConstructor; } 
     383        RID getConstructor( void ) { return m_ridConstructor; } 
    384384 
    385385        /*EN Retrieves RID of the Object call attribute 
    386386        \return Object call attribute's RID 
    387387        */ 
    388         RID GetCall( void ) { return m_ridCall; } 
     388        RID getCall( void ) { return m_ridCall; } 
    389389         
    390390        /*EN Sets RID of the Object 
    391391        \param rid Object's RID 
    392392        */ 
    393         void SetRID( const RID rid ); 
     393        void setRID( const RID rid ); 
    394394 
    395395        /*EN Sets RID of the Object name 
    396396        \param rid Object name's RID 
    397397        */ 
    398         void SetObjectName( const RID rid ); 
     398        void setObjectName( const RID rid ); 
    399399 
    400400        /*EN Sets RID of the Object call attribute 
    401401        \param rid Object call attribute's RID 
    402402        */ 
    403         void SetCallProperty( const RID rid ) { m_ridCall = rid; } 
     403        void setCallProperty( const RID rid ) { m_ridCall = rid; } 
    404404 
    405405        /*EN Sets RID of the Object ctor attribute 
    406406        \param rid Object ctor attribute's RID 
    407407        */ 
    408         void SetConstructorProperty( const RID rid ) { m_ridConstructor = rid; } 
     408        void setConstructorProperty( const RID rid ) { m_ridConstructor = rid; } 
    409409 
    410410        /*EN Retrieves a reference of the property map of the object. 
    411411        \return Reference of the object proeprty./ 
    412412        */ 
    413         hash_map< wstring, CVariable >& GetPropertyMap() { return m_mapProperty; } 
     413        hash_map< wstring, CVariable >& getPropertyMap() { return m_mapProperty; } 
    414414private: 
    415415protected: 
     
    470470 
    471471                /*EN Initializes the metadata class*/ 
    472                 void Initialize( void ); 
     472                void initialize( void ); 
    473473 
    474474                /*EN Teminates the metadata class*/ 
     
    478478                \return Reference of the static fields table 
    479479                */ 
    480                 vector< OPERAND_TYPE_FLAG >& GetStaticFieldTypeTable() { return m_StaticFieldTypeTable; } 
     480                vector< OPERAND_TYPE_FLAG >& getStaticFieldTypeTable() { return m_StaticFieldTypeTable; } 
    481481 
    482482                /*EN Retrieves a table of methods 
    483483                \return Reference of the methods table 
    484484                */ 
    485                 vector< METHOD_DEF >& GetMethodTable() { return m_MethodTable; } 
     485                vector< METHOD_DEF >& getMethodTable() { return m_MethodTable; } 
    486486 
    487487                /*EN Retrieves a table of builtin methods 
    488488                \return Reference of the builtin methods 
    489489                */ 
    490                 vector< METHOD_DEF >& GetBuiltinMethodTable() { return m_BuiltinMethodTable; } 
     490                vector< METHOD_DEF >& getBuiltinMethodTable() { return m_BuiltinMethodTable; } 
    491491 
    492492                /*EN Retrieves a table of parameter list 
    493493                \return Reference of the parameter list 
    494494                */ 
    495                 vector< vector< OPERAND_TYPE_FLAG > >& GetParamListTable() { return m_ParamListTable; } 
     495                vector< vector< OPERAND_TYPE_FLAG > >& getParamListTable() { return m_ParamListTable; } 
    496496 
    497497                /*EN Retrieves a table of parameter list of built in function. 
    498498                \return Reference of the parameter list of built in function 
    499499                */ 
    500                 vector< vector< OPERAND_TYPE_FLAG > >& GetBuiltinParamListTable() { return m_BuiltinParamListTable; } 
     500                vector< vector< OPERAND_TYPE_FLAG > >& getBuiltinParamListTable() { return m_BuiltinParamListTable; } 
    501501 
    502502                /*EN Retrieves a table of an object list 
    503503                \return Reference of the object list 
    504504                */ 
    505                 vector< CObjectTypeInfo >& GetObjectTable() { return m_ObjectTable; } 
     505                vector< CObjectTypeInfo >& getObjectTable() { return m_ObjectTable; } 
    506506 
    507507                /*EN Retrieves a table of a builtin object list 
    508508                \return Reference of the builtint object list 
    509509                */ 
    510                 vector< CObjectTypeInfo >& GetBuiltinObjectTable() { return m_BuiltinObjectTable; } 
     510                vector< CObjectTypeInfo >& getBuiltinObjectTable() { return m_BuiltinObjectTable; } 
    511511 
    512512                /*EN Retrieves a table of string constants 
    513513                \return Reference of the table of string constants 
    514514                */ 
    515                 vector< wstring >& GetStringConstantPool() { return m_StringConstantPool; } 
     515                vector< wstring >& getStringConstantPool() { return m_StringConstantPool; } 
    516516 
    517517                /*EN Retrieves a table of builtin string constants 
    518518                \return Reference of the table of builtin string constants 
    519519                */ 
    520                 vector< wstring >& GetBuiltinStringConstantPool() { return m_BuiltinStringConstantPool; } 
     520                vector< wstring >& getBuiltinStringConstantPool() { return m_BuiltinStringConstantPool; } 
    521521 
    522522                //--------------------------------------------------------------------------- 
     
    527527                \return String value that has given RID value 
    528528                */ 
    529                 wstring& GetStringConstant( const RID rid ); 
     529                wstring& getStringConstant( const RID rid ); 
    530530 
    531531                /*EN Retrieves a method informationthat has given RID 
     
    533533                \return Method information that has given RID value 
    534534                */ 
    535                 METHOD_DEF& GetMethod( const RID rid ); 
     535                METHOD_DEF& getMethod( const RID rid ); 
    536536 
    537537                /*EN Retrieves an object informationthat has given RID 
     
    539539                \return Object information that has given RID value 
    540540                */ 
    541                 CObjectTypeInfo& GetObject( const RID rid ); 
     541                CObjectTypeInfo& getObject( const RID rid ); 
    542542 
    543543                /*EN Retrieves an object name RID has given Object RID 
     
    545545                \return Object name RID that has given Object RID value 
    546546                */ 
    547                 RID GetObjectNameRID( const RID ObjectRID ); 
     547                RID getObjectNameRID( const RID ObjectRID ); 
    548548 
    549549                /*EN Queries an object RID that has specific qualified name 
     
    551551                \return RID that has given Object name 
    552552                */ 
    553                 RID QueryBuiltinObjectRid( const wstring& strQualifiedName );  
     553                RID queryBuiltinObjectRid( const wstring& strQualifiedName );  
    554554 
    555555                /*EN Queries an stgring RID that has specific qualified name 
     
    557557                \return RID of given string 
    558558                */ 
    559                 RID QueryBuiltinStringRid( const wstring& strName );  
     559                RID queryBuiltinStringRid( const wstring& strName );  
    560560 
    561561                /*EN Queries an method RID that has specific qualified name 
     
    563563                \return RID of given method 
    564564                */ 
    565                 RID QueryBuiltinMethodRid( const wstring& strQualifiedName );  
     565                RID queryBuiltinMethodRid( const wstring& strQualifiedName );  
    566566 
    567567                /*EN Verifies object map information 
    568568                \return true if the object info that is attached is correct, false otherwise. 
    569569                */ 
    570                 bool VerifyObjectMap(); 
     570                bool verifyObjectMap(); 
    571571 
    572572                //--------------------------------------------------------------------------- 
     
    581581                //RID manipulation 
    582582                //--------------------------------------------------------------------------- 
    583                 RID ReserveBuiltinStringConstantRID( const RID ridBuiltinStringConstant, const wstring& s = wstring( L"" ) ); 
    584                 RID GenerateUserStringConstantRID( const wstring& s = wstring( L"" ) ); 
    585  
    586                 RID GenerateUserObjectRID(); 
    587                 RID GenerateBuiltinObjectRID(); 
    588                 RID GenerateBuiltinStringConstantRID(); 
    589                 RID GenerateBuiltinMethodRID(); 
    590  
    591                 RID GenerateStaticFieldRID( const OPERAND_TYPE type = OPERAND_UNDEFINED, 
     583                RID reserveBuiltinStringConstantRID( const RID ridBuiltinStringConstant, const wstring& s = wstring( L"" ) ); 
     584                RID generateUserStringConstantRID( const wstring& s = wstring( L"" ) ); 
     585 
     586                RID generateUserObjectRID(); 
     587                RID generateBuiltinObjectRID(); 
     588                RID generateBuiltinStringConstantRID(); 
     589                RID generateBuiltinMethodRID(); 
     590 
     591                RID generateStaticFieldRID( const OPERAND_TYPE type = OPERAND_UNDEFINED, 
    592592                                                                        const OPERAND_FLAG flag = OPERAND_FLAG_NONE, 
    593593                                                                        const RID ridConstraintType = 0 ); 
    594                 RID GenerateMethodRID( const METHOD_TYPE type, 
     594                RID generateMethodRID( const METHOD_TYPE type, 
    595595                                                                                 const RID ridScope, 
    596596                                                                                 const RID ridArg, 
    597597                                                                                 const RID ridLocalVariable ); 
    598                 RID GenerateEhRID( const METHOD_TYPE type, 
     598                RID generateEhRID( const METHOD_TYPE type, 
    599599                                                                                 const RID ridScope, 
    600600                                                                                 const RID ridArg, 
    601601                                                                                 const RID ridLocalVariable ); 
    602602 
    603                 RID GenerateParamListRID(); 
    604                 RID GeneratePropertyRID(); 
    605                 int32_t AddParamListEntry( const RID ridParamList, 
     603                RID generateParamListRID(); 
     604                RID generatePropertyRID(); 
     605                int32_t addParamListEntry( const RID ridParamList, 
    606606                                                                        const OPERAND_TYPE op, 
    607607                                                                        const OPERAND_FLAG flag = OPERAND_FLAG_NONE, 
    608608                                                                        const RID ridConstraintType = 0 ); 
    609                 size_t GetParamListSize( const RID ridParamList ); 
    610  
    611                 RID ReserveBuiltinParamListRID( const RID ridBuiltinObjectParamList ); 
    612                 RID ReserveBuiltinMethodRID(  const RID ridBuiltinMethod, 
     609                size_t getParamListSize( const RID ridParamList ); 
     610 
     611                RID reserveBuiltinParamListRID( const RID ridBuiltinObjectParamList ); 
     612                RID reserveBuiltinMethodRID(  const RID ridBuiltinMethod, 
    613613                                                                                const METHOD_TYPE type, 
    614614                                                                                PMETHOD const pFunction, 
     
    617617                                                                                const RID       ridLocalVariable ); 
    618618 
    619                 bool SetBuiltinString(  const RID ridObjectName, 
     619                bool setBuiltinString(  const RID ridObjectName, 
    620620                                                                const wstring& strString ); 
    621621        private: 
     
    623623                //RID manipulation 
    624624                //--------------------------------------------------------------------------- 
    625                 RID ReserveBuiltinObjectRID( const RID ridBuiltinObject ); 
     625                RID reserveBuiltinObjectRID( const RID ridBuiltinObject ); 
    626626 
    627627                //--------------------------------------------------------------------------- 
    628628                //High level helpers 
    629629                //--------------------------------------------------------------------------- 
    630                 bool SetBuiltinObject(  const RID ridObject, 
     630                bool setBuiltinObject(  const RID ridObject, 
    631631                                                                const RID ridObjectName, 
    632632                                                                const RID ridCtor = (RID)0, 
    633633                                                                const RID ridCall = (RID)0      ); 
    634                 bool SetBuiltinMethod(  const RID ridMethod, 
     634                bool setBuiltinMethod(  const RID ridMethod, 
    635635                                                                const METHOD_TYPE methodType, 
    636636                                                                const PMETHOD pMethod, 
     
    668668                hash_map< wstring, CVariable > m_ObjectMap; 
    669669                //Helper function 
    670                 CVariable* RegisterVariable( hash_map< wstring, CVariable >& map, const wstring& strName ); 
    671                 CVariable* QueryVariable( hash_map< wstring, CVariable >& map, const wstring& strName ); 
     670                CVariable* registerVariable( hash_map< wstring, CVariable >& map, const wstring& strName ); 
     671                CVariable* queryVariable( hash_map< wstring, CVariable >& map, const wstring& strName ); 
    672672                 
    673673        }; 
     
    746746                virtual CCgNodeData* unaryIncOperator( CCgNodeData*, bool bDup ) = 0; 
    747747                virtual CCgNodeData* unaryDecOperator( CCgNodeData*, bool bDup  ) = 0; 
    748                 virtual CCgNodeData* unarybitwiseNotOperator( CCgNodeData* ) = 0; 
    749                 virtual CCgNodeData* unarylogicalNotOperator( CCgNodeData* ) = 0; 
     748                virtual CCgNodeData* unaryBitwiseNotOperator( CCgNodeData* ) = 0; 
     749                virtual CCgNodeData* unaryLogicalNotOperator( CCgNodeData* ) = 0; 
    750750                virtual CCgNodeData* unaryVoidOperator( CCgNodeData* ) = 0; 
    751751                virtual CCgNodeData* unaryDeleteOperator( CCgNodeData* ) = 0; 
  • inc/lexer.h

    r110 r138  
    3333extern int32_t yychar; 
    3434 
    35 #define AUTOSEMICOLON if( cri::CParser::Getparser()->GetLexer()->IsAutoSemicolonAllowed() )\ 
     35#define AUTOSEMICOLON if( cri::CParser::getparser()->getLexer()->isAutoSemicolonAllowed() )\ 
    3636                {\ 
    3737                        yychar = ';';\ 
    38                         cri::CParser::Getparser()->GetLexer()->DuplicateToken();\ 
     38                        cri::CParser::getparser()->getLexer()->duplicateToken();\ 
    3939                } 
    4040 
     
    6464                //Virtual functions 
    6565                /*EN pure virtual function to reset a token stream */ 
    66                 virtual bool ResetStream () = 0; 
     66                virtual bool resetStream () = 0; 
    6767 
    6868                /*EN pure virtual function to retrieve current compiling line */ 
    69                 virtual wstring& GetCurrentLineString() = 0; 
     69                virtual wstring& getCurrentLineString() = 0; 
    7070 
    7171                /*EN pure virtual function to retrieve a specific line */ 
    72                 virtual wstring& GetLineString( const uint32_t iLineNumber ) = 0; 
    73                 //m_bInitialized needs to be set inside SetStream() API 
     72                virtual wstring& getLineString( const uint32_t iLineNumber ) = 0; 
     73                //m_bInitialized needs to be set inside setStream() API 
    7474 
    7575                /*EN Initializes the lexer */ 
     
    102102 
    103103                /*EN Processes a token stream 
    104                 \par Token stream need to be attached prior Process() call 
     104                \par Token stream need to be attached prior process() call 
    105105                \return 0:Success 
    106106                */ 
    107                 int32_t Process( void ); 
    108  
    109                 int32_t GetToken( void ); 
    110                 void DuplicateToken(); 
    111                 bool IsAutoSemicolonAllowed(); 
    112                 void DebugRecentlyReduced( uint32_t iLineNumber ) 
     107                int32_t process( void ); 
     108 
     109                int32_t getToken( void ); 
     110                void duplicateToken(); 
     111                bool isAutoSemicolonAllowed(); 
     112                void debugRecentlyReduced( const uint32_t iLineNumber ) 
    113113                { 
    114114        #ifdef _DEBUG 
     
    116116        #endif 
    117117                } 
    118                 void AllowRegexLiteral( bool b ) { m_AllowRegexLiteral = b; }  
     118                void allowRegexLiteral( const bool b ) { m_AllowRegexLiteral = b; }    
    119119                //--------------------------------------------------------- 
    120120                //Retrieve values 
    121121                //--------------------------------------------------------- 
    122                 wstring& GetIdentifier( void ) 
     122                wstring& getIdentifier( void ) 
    123123                { 
    124124                        assert( m_bInitialized == true ); 
     
    126126                } 
    127127 
    128                 int64_t GetIntegerTokenValue( void ) 
     128                int64_t getIntegerTokenValue( void ) 
    129129                { 
    130130                        assert( m_bInitialized == true ); 
     
    132132                } 
    133133 
    134                 double GetDecimalTokenValue( void ) 
     134                double getDecimalTokenValue( void ) 
    135135                { 
    136136                        assert( m_bInitialized == true ); 
    137137                        return m_dValue; 
    138138                } 
    139                 YYSTYPE GetTokenValue( void ); 
     139                YYSTYPE getTokenValue( void ); 
    140140 
    141141                //--------------------------------------------------------- 
     
    146146                \param b True:The target is Big Endian False: The target is Little Endian 
    147147                */ 
    148                 void SetEndianness( bool b ) { m_bBigEndianSource = b; } 
    149                 /*EN Gets target endianness setting 
     148                void setEndianness( const bool b ) { m_bBigEndianSource = b; } 
     149                /*EN gets target endianness setting 
    150150                \return Target endian setting 
    151151                */ 
    152                 bool GetEndianness() { return m_bBigEndianSource; } 
    153  
    154                 wstring& GetCurrentStreamName() { return m_strFileName; } 
    155                 void SetCurrentStreamName( wstring& str ) { m_strFileName = str; } 
    156  
    157                 int32_t GetLineNumber( void ) 
     152                bool getEndianness() { return m_bBigEndianSource; } 
     153 
     154                wstring& getCurrentStreamName() { return m_strFileName; } 
     155                void setCurrentStreamName( wstring& str ) { m_strFileName = str; } 
     156 
     157                int32_t getLineNumber( void ) 
    158158                { 
    159159                        assert( m_bInitialized == true ); 
     
    161161                } 
    162162 
    163                 void SetLineNumber( int32_t iLineNumber ) 
     163                void setLineNumber( const int32_t iLineNumber ) 
    164164                { 
    165165                        assert( m_bInitialized == true ); 
     
    168168                } 
    169169 
    170                 int32_t GetColumn( void ) { 
     170                int32_t getColumn( void ) { 
    171171                        assert( m_bInitialized == true ); 
    172172                        return m_iCurrentTokenColumn; 
    173173                } 
    174174                 
    175                 int32_t GetLastTokenColumn( void ) { 
     175                int32_t getLastTokenColumn( void ) { 
    176176                        assert( m_bInitialized == true ); 
    177177                        return m_iLastTokenColumn; 
    178178                } 
    179179 
    180                 int32_t GetLastTokenLine( void ) { 
     180                int32_t getLastTokenLine( void ) { 
    181181                        assert( m_bInitialized == true ); 
    182182                        return m_iLastTokenLine; 
    183183                } 
    184184 
    185                 void SetErrorHandler( CErrorPool * pError ) 
     185                void setErrorHandler( CErrorPool * pError ) 
    186186                { 
    187187                        m_pError = pError; 
     
    190190                } 
    191191 
    192                 void SetErrorOutput( bool bEnable ) 
     192                void setErrorOutput( bool bEnable ) 
    193193                { 
    194194                        m_bEnableErrorOutput = bEnable; 
    195195                } 
    196196 
    197                 wstring& GetErrorInfo() { return m_strErrorInfo;} 
    198  
    199                 bool GetTokenDuplication() { return m_bDuplicateToken; } 
    200                 void SetTokenDuplication(bool b) { m_bDuplicateToken = b; return; } 
     197                wstring& getErrorInfo() { return m_strErrorInfo;} 
     198 
     199                bool getTokenDuplication() { return m_bDuplicateToken; } 
     200                void setTokenDuplication( const bool b ) { m_bDuplicateToken = b; return; } 
    201201 
    202202        protected: 
     
    207207                virtual void reportError( int32_t iErrorCoed, const wstring& strErrorInfo ); 
    208208 
    209                 virtual wchar_t GetNextInt8( void ) = 0; 
    210                 virtual wchar_t FetchNextChar( void ) = 0; 
    211                 virtual void UngetChar( wchar_t c ) = 0; 
    212  
    213                 virtual void TokenFound( const int32_t iToken, const int32_t iLine, const int32_t iColumm); 
     209                virtual wchar_t getNextInt8( void ) = 0; 
     210                virtual wchar_t fetchNextChar( void ) = 0; 
     211                virtual void ungetChar( const wchar_t c ) = 0; 
     212 
     213                virtual void tokenFound( const int32_t iToken, const int32_t iLine, const int32_t iColumm); 
    214214 
    215215                //--------------------------------------------------------- 
    216216                //Helpers 
    217217                //--------------------------------------------------------- 
    218                 bool IsDigit( wchar_t c ); 
    219                 bool IsHex( wchar_t c ); 
    220                 bool IsOctal( wchar_t c ); 
    221                 bool IsOctalStart( wchar_t c ); 
    222                 int32_t  GetHexValue( wchar_t c ); 
    223                 int32_t  GetDigitValue( wchar_t c ); 
    224                 bool IsLowerCase( wchar_t c ); 
    225                 bool IsUpperCase( wchar_t c ); 
    226                 bool IsWhiteSpace( wchar_t c ); 
    227                 bool IsAlphabet( wchar_t c ) { return IsLowerCase(c) || IsUpperCase(c); }; 
    228                 bool IsIdentifierStart( wchar_t c ); 
    229                 bool IsIdentifier( wchar_t c ); 
    230                 bool IsAtIdentifierStart( wchar_t c ); 
    231                 bool IsLineTerminator( wchar_t c ); 
    232                 int32_t ProcessEscapeSequence( wstring &s ); 
    233                 int32_t ProcessRegExpEscapeSequence( wstring &s ); 
    234                 void UpdateLine( const int32_t iLine, const int32_t iColumn ); 
    235  
    236                 static const LEX_WORD_ITEM ReservedWordTable[]; 
    237                 static const LEX_WORD_ITEM KeywordTable[]; 
    238                 static const LEX_WORD_ITEM_EX LiteralTable[]; 
    239                 static const LEX_WORD_ITEM OperatorTable[]; 
     218                bool isDigit( const wchar_t c ); 
     219                bool isHex( const wchar_t c ); 
     220                bool isOctal( const wchar_t c ); 
     221                bool isOctalStart( const wchar_t c ); 
     222                int32_t  getHexValue( const wchar_t c ); 
     223                int32_t  getDigitValue( const wchar_t c ); 
     224                bool isLowerCase( const wchar_t c ); 
     225                bool isUpperCase( const wchar_t c ); 
     226                bool isWhiteSpace( const wchar_t c ); 
     227                bool isAlphabet( const wchar_t c ) { return isLowerCase(c) || isUpperCase(c); }; 
     228                bool isIdentifierStart( const wchar_t c ); 
     229                bool isIdentifier( const wchar_t c ); 
     230                bool isAtIdentifierStart( const wchar_t c ); 
     231                bool isLineTerminator( const wchar_t c ); 
     232                int32_t processEscapeSequence( wstring &s ); 
     233                int32_t processRegExpEscapeSequence( wstring &s ); 
     234                void updateLine( const int32_t iLine, const int32_t iColumn ); 
     235 
     236                static const LEX_WORD_ITEM s_ReservedWordTable[]; 
     237                static const LEX_WORD_ITEM s_KeywordTable[]; 
     238                static const LEX_WORD_ITEM_EX s_LiteralTable[]; 
     239                static const LEX_WORD_ITEM s_OperatorTable[]; 
    240240 
    241241                hash_map< wstring, int32_t > m_mapReservedWord; 
     
    311311                \return 0:Success 
    312312                */ 
    313                 bool SetStream ( istream *pstream, const wstring* pFilename = NULL ); 
     313                bool setStream( istream *pstream, const wstring* pFilename = NULL ); 
    314314 
    315315                /*EN Resets the streamistream pointer to the lexer 
     
    317317                \return 0:Success 
    318318                */ 
    319                 bool ResetStream (); 
    320  
    321                 wstring& GetCurrentLineString(); 
    322                 wstring& GetLineString( const uint32_t iLineNumber ); 
     319                bool resetStream (); 
     320 
     321                wstring& getCurrentLineString(); 
     322                wstring& getLineString( const uint32_t iLineNumber ); 
    323323        private: 
    324                 wchar_t GetNextInt8( void ); 
    325                 wchar_t FetchNextChar( void ); 
    326                 void UngetChar( wchar_t c ); 
    327                 void UpdateLine( const int32_t iLine, const int32_t iColumn ); 
     324                wchar_t getNextInt8( void ); 
     325                wchar_t fetchNextChar( void ); 
     326                void ungetChar( const wchar_t c ); 
     327                void updateLine( const int32_t iLine, const int32_t iColumn ); 
    328328 
    329329                //--------------------------------------------------------- 
     
    351351                }; 
    352352 
    353                 bool SetStream ( wstring* pString ); 
    354                 bool ResetStream (); 
    355  
    356                 wstring& GetCurrentLineString(); 
    357                 wstring& GetLineString( const uint32_t iLineNumber ); 
     353                bool setStream ( wstring* pString ); 
     354                bool resetStream (); 
     355 
     356                wstring& getCurrentLineString(); 
     357                wstring& getLineString( const uint32_t iLineNumber ); 
    358358        private: 
    359                 wchar_t GetNextInt8( void ); 
    360                 wchar_t FetchNextChar( void ); 
    361                 void UngetChar( wchar_t c ); 
    362                 void UpdateLine( const int32_t iLine, const int32_t iColumn ); 
     359                wchar_t getNextInt8( void ); 
     360                wchar_t fetchNextChar( void ); 
     361                void ungetChar( const wchar_t c ); 
     362                void updateLine( const int32_t iLine, const int32_t iColumn ); 
    363363 
    364364                //--------------------------------------------------------- 
  • inc/parser.h

    r110 r138  
    6060 
    6161                /*EN Retrieve Version Number of the parser*/ 
    62                 const CRISCRIPT_VERSIONS& GetVersions(void) { return criscript_version_struct; } 
     62                const CRISCRIPT_VERSIONS& getVersions(void) { return criscript_version_struct; } 
    6363 
    6464                bool init( CLexer* pCLexer, ICodeGen* pCodeGen, CErrorPool * pError ); 
     
    8585                                                                        \return true: success, false: failuree 
    8686                                                                */ 
    87                 int32_t Process( void ); 
     87                int32_t process( void ); 
    8888                                                                /*EN< Processes the attached script stream 
    8989                                                                        \return 0: success 
     
    9494                                                                */ 
    9595 
    96                 ICodeGen* GetCodeGen(void) { assert( m_bInitialized ); return m_pCodeGen; } 
     96                ICodeGen* getCodeGen(void) { assert( m_bInitialized ); return m_pCodeGen; } 
    9797                                                                /*EN< Retrieves an interface 
    9898                                                                        \return Pointer to ICodeGen interface set to the parser 
    9999                                                                */ 
    100                 CLexer* GetLexer(void) { assert( m_bInitialized ); return m_pLex; } 
     100                CLexer* getLexer(void) { assert( m_bInitialized ); return m_pLex; } 
    101101                                                                /*EN< Retrieves an interface 
    102102                                                                        \return Pointer to CLexer interface set to the parser 
     
    122122                                                                */ 
    123123 
    124                 /*EN Get a singleton instance of the parser */ 
    125                 static CParser* Getparser() { 
     124                /*EN get a singleton instance of the parser */ 
     125                static CParser* getparser() { 
    126126                        assert( m_pparser ); 
    127127                        return m_pparser; 
    128128                }; 
    129129 
    130                 int32_t ProcessToken( void ); 
    131                 int32_t GetToken( void ); 
    132                 YYSTYPE GetTokenValue( void );         
     130                int32_t processToken( void ); 
     131                int32_t getToken( void ); 
     132                YYSTYPE getTokenValue( void );         
    133133        private: 
    134134                static CParser* m_pparser; 
  • inc/variable.h

    r110 r138  
    312312                \return flags 
    313313                */ 
    314                 OPERAND_FLAG GetFlag() { return (OPERAND_FLAG)iOperandFlag; } 
     314                OPERAND_FLAG getFlag() { return (OPERAND_FLAG)iOperandFlag; } 
    315315 
    316316                /*EN Retrieves a stricted type of VM Object ref. 
  • inc/win32/StopWatch.h

    r1 r138  
    3737        void Stop(); 
    3838        void Reset(); 
    39         float GetResult(); 
     39        float getResult(); 
    4040}; 
    4141 
  • samples/basic_native_userapi_bind/basic_native_userapi_bind.cpp

    r110 r138  
    4545 
    4646        //Push a value to EvalStack 
    47         pVm->PushEvalStack( var.fValue * 2.0f );       
     47        pVm->pushEvalStack( var.fValue * 2.0f );       
    4848        return; 
    4949} 
     
    8282        //Set filestream to the lexer 
    8383        //---------------------------------------------------------------- 
    84         lex->SetStream( & in ); 
     84        lex->setStream( & in ); 
    8585 
    8686        //---------------------------------------------------------------- 
    8787        //Compile the  script 
    8888        //---------------------------------------------------------------- 
    89         iRet = parser->Process(); 
     89        iRet = parser->process(); 
    9090 
    91         if( error->HasError() ) 
     91        if( error->hasError() ) 
    9292        { 
    93                 error->DumpError(); 
     93                error->dumpError(); 
    9494                iRet = 1; 
    9595        } 
    9696        else 
    9797        { 
    98                 if( error->HasInformation() ) 
    99                         error->DumpError(); 
     98                if( error->hasInformation() ) 
     99                        error->dumpError(); 
    100100 
    101101                //---------------------------------------------------------------- 
     
    107107                //Bind IL and meta data 
    108108                //---------------------------------------------------------------- 
    109                 vm->SetILPool( parser->getILPool() ); 
     109                vm->setILPool( parser->getILPool() ); 
    110110 
    111                 vm->SetSymbolInformation( parser->getSymbolInformation() ); 
    112                 vm->SetMetaData( parser->getMetaData() ); 
     111                vm->setSymbolInformation( parser->getSymbolInformation() ); 
     112                vm->setMetaData( parser->getMetaData() ); 
    113113 
    114114                //---------------------------------------------------------------- 
     
    118118                //API binding should be done after binding Metadata. 
    119119                //Since the binding information is in the Metadata 
    120                 vm->BindBuiltinMethod( wstring( L"TestAPI" ), 
     120                vm->bindBuiltinMethod( wstring( L"TestAPI" ), 
    121121                        (cri::PMETHOD)Test, 
    122122                        cri::RID_BUILTINPARAM_DEFAULT_ONE 
     
    124124 
    125125                //---------------------------------------------------------------- 
    126                 //Execute the script 
     126                //execute the script 
    127127                //---------------------------------------------------------------- 
    128                 iRet = vm->Execute(); 
    129                 iRet = vm->GetExitCode();  
     128                iRet = vm->execute(); 
     129                iRet = vm->getExitCode();  
    130130 
    131131                delete( vm ); 
  • samples/basic_userapi_bind/basic_userapi_bind.cpp

    r110 r138  
    8484        //Set filestream to the lexer 
    8585        //---------------------------------------------------------------- 
    86         lex->SetStream( &in ); 
     86        lex->setStream( &in ); 
    8787 
    8888        //---------------------------------------------------------------- 
    8989        //Compile the  script 
    9090        //---------------------------------------------------------------- 
    91         iRet = parser->Process(); 
     91        iRet = parser->process(); 
    9292 
    93         if( error->HasError() ) 
     93        if( error->hasError() ) 
    9494        { 
    95                 error->DumpError(); 
     95                error->dumpError(); 
    9696                iRet = 1; 
    9797        } 
    9898        else 
    9999        { 
    100                 if( error->HasInformation() ) 
    101                         error->DumpError(); 
     100                if( error->hasInformation() ) 
     101                        error->dumpError(); 
    102102 
    103103                //---------------------------------------------------------------- 
     
    109109                //Bind IL and meta data 
    110110                //---------------------------------------------------------------- 
    111                 vm->SetILPool( parser->getILPool() ); 
     111                vm->setILPool( parser->getILPool() ); 
    112112 
    113                 vm->SetSymbolInformation( parser->getSymbolInformation() ); 
    114                 vm->SetMetaData( parser->getMetaData() ); 
     113                vm->setSymbolInformation( parser->getSymbolInformation() ); 
     114                vm->setMetaData( parser->getMetaData() ); 
    115115 
    116116                //---------------------------------------------------------------- 
     
    120120                //API binding should be done after binding Metadata. 
    121121                //Since the binding information is in the Metadata 
    122                 vm->BindBuiltinMethod( wstring( L"TestAPI" ), 
     122                vm->bindBuiltinMethod( wstring( L"TestAPI" ), 
    123123                        (cri::PMETHOD)cri::MakeWrapperStdP1< VMRET_FLOAT, VMARG_FLOAT >, 
    124124                        (cri::PMETHOD)Test ); 
    125125 
    126                 vm->BindBuiltinMethod( wstring( L"TestAPINoReturn" ), 
     126                vm->bindBuiltinMethod( wstring( L"TestAPINoReturn" ), 
    127127                        (cri::PMETHOD)cri::MakeWrapperStdVoidP1< VMARG_FLOAT >, 
    128128                        (cri::PMETHOD)TestNoReturn ); 
    129129 
    130130                //---------------------------------------------------------------- 
    131                 //Execute the script 
     131                //execute the script 
    132132                //---------------------------------------------------------------- 
    133                 iRet = vm->Execute(); 
    134                 iRet = vm->GetExitCode();  
     133                iRet = vm->execute(); 
     134                iRet = vm->getExitCode();  
    135135 
    136136                delete( vm ); 
  • samples/helloworld/helloworld.cpp

    r50 r138  
    4747        cri::CCilCodeGen *codegen = new cri::CCilCodeGen; 
    4848        cri::CErrorPool *error = new cri::CErrorPool; 
    49         parser->Init( lex, codegen, error ); 
     49        parser->init( lex, codegen, error ); 
    5050         
    5151        //---------------------------------------------------------------- 
    5252        //Set filestream to the lexer 
    5353        //---------------------------------------------------------------- 
    54         lex->SetStream( & in ); 
     54        lex->setStream( & in ); 
    5555 
    5656        //---------------------------------------------------------------- 
    5757        //Compile the  script 
    5858        //---------------------------------------------------------------- 
    59         iRet = parser->Process();                     //Compile the script 
     59        iRet = parser->process();                     //Compile the script 
    6060 
    61         if( error->HasError() ) 
     61        if( error->hasError() ) 
    6262        { 
    63                 error->DumpError(); 
     63                error->dumpError(); 
    6464                iRet = 1; 
    6565        } 
    6666        else 
    6767        { 
    68                 if( error->HasInformation() ) 
    69                         error->DumpError(); 
     68                if( error->hasInformation() ) 
     69                        error->dumpError(); 
    7070 
    7171                //---------------------------------------------------------------- 
     
    7474                cri::CCilVm *vm = new cri::CCilVm; 
    7575 
    76                 vm->SetILPool( parser->GetILPool() ); //Set compiled byte code stream 
     76                vm->setILPool( parser->getILPool() ); //Set compiled byte code stream 
    7777 
    7878                //Set metadata and debug information to VM 
    79                 vm->SetSymbolInformation( parser->GetSymbolInformation() ); 
    80                 vm->SetMetaData( parser->GetMetaData() ); 
     79                vm->setSymbolInformation( parser->getSymbolInformation() ); 
     80                vm->setMetaData( parser->getMetaData() ); 
    8181 
    8282                //---------------------------------------------------------------- 
    8383                //Execute the script 
    8484                //---------------------------------------------------------------- 
    85                 iRet = vm->Execute();         //execute the script 
    86                 iRet = vm->GetExitCode();     //retrieve an exit code 
     85                iRet = vm->execute();         //execute the script 
     86                iRet = vm->getExitCode();     //retrieve an exit code 
    8787 
    8888                delete( vm );   //delete VM instance 
  • samples/invoke_script_function/invoke_script_function.cpp

    r110 r138  
    5757        //Set filestream to the lexer 
    5858        //---------------------------------------------------------------- 
    59         lex->SetStream( (istream*)&in ); 
     59        lex->setStream( (istream*)&in ); 
    6060 
    6161        //---------------------------------------------------------------- 
    6262        //Compile the  script 
    6363        //---------------------------------------------------------------- 
    64         iRet = parser->Process(); 
     64        iRet = parser->process(); 
    6565 
    66         if( error->HasError() ) 
     66        if( error->hasError() ) 
    6767        { 
    68                 error->DumpError(); 
     68                error->dumpError(); 
    6969                iRet = 1; 
    7070        } 
    7171        else 
    7272        { 
    73                 if( error->HasInformation() ) 
    74                         error->DumpError(); 
     73                if( error->hasInformation() ) 
     74                        error->dumpError(); 
    7575 
    7676                //---------------------------------------------------------------- 
     
    8282                //Bind IL and meta data 
    8383                //---------------------------------------------------------------- 
    84                 vm->SetILPool( parser->getILPool() ); 
    85                 vm->SetSymbolInformation( parser->getSymbolInformation() ); 
    86                 vm->SetMetaData( parser->getMetaData() ); 
     84                vm->setILPool( parser->getILPool() ); 
     85                vm->setSymbolInformation( parser->getSymbolInformation() ); 
     86                vm->setMetaData( parser->getMetaData() ); 
    8787 
    8888                //---------------------------------------------------------------- 
    89                 //Execute the script 
     89                //execute the script 
    9090                //---------------------------------------------------------------- 
    91                 iRet = vm->Execute(); 
    92                 iRet = vm->GetExitCode();  
     91                iRet = vm->execute(); 
     92                iRet = vm->getExitCode();  
    9393 
    9494                //---------------------------------------------------------------- 
    9595                //Invoke the Script method 
    9696                //---------------------------------------------------------------- 
    97                 CG_SYMBOL_INFORMATION info = vm->QuerySymbolInformation( wstring( L"Test" ) ); 
     97                CG_SYMBOL_INFORMATION info = vm->querySymbolInformation( wstring( L"Test" ) ); 
    9898                CVariable var; 
    99                 vm->InvokeMethod( info.rid, 0, &var ); 
     99                vm->invokeMethod( info.rid, 0, &var ); 
    100100 
    101                 vm->InvokeMethod( info.rid, 0, &var ); 
     101                vm->invokeMethod( info.rid, 0, &var ); 
    102102 
    103                 vm->InvokeMethod( info.rid, 0, &var ); 
     103                vm->invokeMethod( info.rid, 0, &var ); 
    104104 
    105105                delete( vm ); 
  • samples/property_bind/property_bind.cpp

    r110 r138  
    5454        //Set filestream to the lexer 
    5555        //---------------------------------------------------------------- 
    56         lex->SetStream( (istream*)&in ); 
     56        lex->setStream( (istream*)&in ); 
    5757 
    5858        //---------------------------------------------------------------- 
    5959        //Compile the  script 
    6060        //---------------------------------------------------------------- 
    61         iRet = parser->Process(); 
     61        iRet = parser->process(); 
    6262 
    63         if( error->HasError() ) 
     63        if( error->hasError() ) 
    6464        { 
    65                 error->DumpError(); 
     65                error->dumpError(); 
    6666                iRet = 1; 
    6767        } 
    6868        else 
    6969        { 
    70                 if( error->HasInformation() ) 
    71                         error->DumpError(); 
     70                if( error->hasInformation() ) 
     71                        error->dumpError(); 
    7272 
    7373                //---------------------------------------------------------------- 
     
    7979                //Bind IL and meta data 
    8080                //---------------------------------------------------------------- 
    81                 vm->SetILPool( parser->getILPool() ); 
    82                 vm->SetSymbolInformation( parser->getSymbolInformation() ); 
    83                 vm->SetMetaData( parser->getMetaData() ); 
     81                vm->setILPool( parser->getILPool() ); 
     82                vm->setSymbolInformation( parser->getSymbolInformation() ); 
     83                vm->setMetaData( parser->getMetaData() ); 
    8484 
    8585                //---------------------------------------------------------------- 
     
    8787                //---------------------------------------------------------------- 
    8888                CVariable var( 8960 ); 
    89                 vm->BindBuiltinVariable( wstring( L"System.MyProperty" ), &var ); 
     89                vm->bindBuiltinVariable( wstring( L"System.MyProperty" ), &var ); 
    9090 
    9191                //---------------------------------------------------------------- 
    92                 //Execute the script 
     92                //execute the script 
    9393                //---------------------------------------------------------------- 
    94                 iRet = vm->Execute(); 
    95                 iRet = vm->GetExitCode();  
     94                iRet = vm->execute(); 
     95                iRet = vm->getExitCode();  
    9696 
    9797                //---------------------------------------------------------------- 
     
    101101                //Need to know RID of the field. 
    102102                //To get the RID, currently need to invoke the debugger API 
    103                 CG_SYMBOL_INFORMATION info = vm->QuerySymbolInformation( wstring( L"scriptVar" ) ); 
    104                 CVariable varScript = vm->GetStaticField( info.rid ); 
     103                CG_SYMBOL_INFORMATION info = vm->querySymbolInformation( wstring( L"scriptVar" ) ); 
     104                CVariable varScript = vm->getStaticField( info.rid ); 
    105105 
    106106                delete( vm ); 
  • source-archive-win32.txt

    r111 r138  
    7979CriScript\samples\property_bind\mkwin32\property_bind.sln 
    8080CriScript\samples\property_bind\mkwin32\property_bind.vcproj 
     81CriScript\samples\vm_control\vm_control.cpp 
     82CriScript\samples\vm_control\stdafx.cpp 
     83CriScript\samples\vm_control\stdafx.h 
     84CriScript\samples\vm_control\mkwin32\vm_control.sln 
     85CriScript\samples\vm_control\mkwin32\vm_control.vcproj 
     86CriScript\samples\build_all\criscriptsamples.sln 
    8187 
    8288//Sources 
  • src/BuiltInObject/cil/cilBuiltinArrayObject.cpp

    r110 r138  
    106106 
    107107        //Initialize Global 'Array' object ref 
    108         RID rid = CodeGen.getMetaData().GenerateStaticFieldRID( OPERAND_OBJECTREF, 
     108        RID rid = CodeGen.getMetaData().generateStaticFieldRID( OPERAND_OBJECTREF, 
    109109                                                                                                                        OPERAND_FLAG( OPERAND_FLAG_DONTDELETE 
    110110                                                                                                                                                        | OPERAND_FLAG_DONTENUM 
     
    137137bool CArrayObject::InitializeVm( CCilVm& vm ) 
    138138{ 
    139         int32_t iIndex = IndexFromBuiltinRid( vm.GetArrayObjectRID() ); 
    140         RID ridObjectName = vm.getMetaData().GetBuiltinObjectTable()[ iIndex ].GetObjectName(); 
     139        int32_t iIndex = IndexFromBuiltinRid( vm.getArrayObjectRID() ); 
     140        RID ridObjectName = vm.getMetaData().getBuiltinObjectTable()[ iIndex ].getObjectName(); 
    141141        assert( ridObjectName != RID_NOTDEFINED ); 
    142142         
    143         RID rid = vm.CreatePrototypeObject( vm.GetArrayObjectRID(), 
     143        RID rid = vm.createPrototypeObject( vm.getArrayObjectRID(), 
    144144                                                                                ridObjectName, 
    145                                                                                 vm.GetObjectRID() ); 
    146         assert( rid == vm.GetArrayObjectRID() ); 
     145                                                                                vm.getObjectRID() ); 
     146        assert( rid == vm.getArrayObjectRID() ); 
    147147 
    148148        //--------------------------------------------------------------------------- 
    149149        //Bind global object 
    150150        //--------------------------------------------------------------------------- 
    151         CVmObject* pObj = vm.CreateObject( vm.GetArrayObjectRID() ); 
     151        CVmObject* pObj = vm.createObject( vm.getArrayObjectRID() ); 
    152152        CVariable obj( pObj, OPERAND_FLAG( OPERAND_FLAG_DONTDELETE 
    153153                                                                        | OPERAND_FLAG_DONTENUM 
     
    155155 
    156156        //Set true as an object value.. 
    157         pObj->SetValue( CVariable( true ) ); 
    158  
    159         CG_SYMBOL_INFORMATION info = vm.QuerySymbolInformation( NAME_BUILTIN_ARRAY_OBJECT ); 
    160         vm.SetStaticField( info.rid, obj, true );     //Force over write it 
     157        pObj->setValue( CVariable( true ) ); 
     158 
     159        CG_SYMBOL_INFORMATION info = vm.querySymbolInformation( NAME_BUILTIN_ARRAY_OBJECT ); 
     160        vm.setStaticField( info.rid, obj, true );     //Force over write it 
    161161 
    162162        //--------------------------------------------------------------------------- 
     
    167167                int32_t iParams; 
    168168                iParams = (int32_t)RidFromToken( initParams[ i ].ridParam ); 
    169                 if( IsBuiltinRid( initParams[ i ].ridParam ) ) 
     169                if( isBuiltinRid( initParams[ i ].ridParam ) ) 
    170170                { 
    171171                        iParams = RidFromToken( -iParams ) - 1; 
     
    175175                //Register methods 
    176176                //----------------------------------------------------------------------- 
    177                 bool b = vm.BindBuiltinMethod( 
     177                bool b = vm.bindBuiltinMethod( 
    178178                                                                        wstring( initParams[ i ].pStrSymbol ), 
    179179                                                                        initParams[ i ].pMethod, 
     
    205205 
    206206        //Set prototype: Array prototype object 
    207         var.refObject->SetPrototypeObject(  
    208                 &pVm->GetPrototypeObject( pVm->GetArrayObjectRID() ) ); 
    209  
    210         //SetProperty Accessor 
    211         var.refObject->SetPropertyAccessor( STRING_INTERNAL_LENGTH, 
     207        var.refObject->setPrototypeObject(  
     208                &pVm->getPrototypeObject( pVm->getArrayObjectRID() ) ); 
     209 
     210        //setProperty Accessor 
     211        var.refObject->setPropertyAccessor( STRING_INTERNAL_LENGTH, 
    212212                                                                                lengthAccessor ); 
    213         //SetProperty Accessor 
    214         var.refObject->SetPropertyAccessor( STRING_PROPERTY_INTERNAL_ANY, 
     213        //setProperty Accessor 
     214        var.refObject->setPropertyAccessor( STRING_PROPERTY_INTERNAL_ANY, 
    215215                                                                                anyAccessor ); 
    216216 
     
    228228                        { 
    229229                                //Throw TypeError 
    230                                 pVm->ThrowException( &wstring( ERRORSTRING_OUTOFMEMORY ), 
     230                                pVm->throwException( &wstring( ERRORSTRING_OUTOFMEMORY ), 
    231231                                        &wstring( NAME_BUILTIN_ERROR_OBJECT ), 
    232232                                        ERROR_OUT_OF_MEMORY ); 
     
    237237                        { 
    238238                                //Throw TypeError 
    239                                 pVm->ThrowException( &wstring( ERRORSTRING_ARRAY_LENGTH ), 
     239                                pVm->throwException( &wstring( ERRORSTRING_ARRAY_LENGTH ), 
    240240                                        &wstring( NAME_BUILTIN_ERROR_OBJECT ), 
    241241                                        ERROR_ARRAY_LENGTH ); 
     
    254254                                //Argument: 1) value of the property 
    255255                                swprintf( strBuffer, 22, L"%d", i ); 
    256                                 var.refObject->SetProperty( strBuffer, *pArguments ); 
     256                                var.refObject->setProperty( strBuffer, *pArguments ); 
    257257                                pArguments++; 
    258258                        } 
     
    261261                //Just set length 
    262262                //Set to ".lengh" 
    263                 var.refObject->SetProperty( STRING_PROPERTY_INTERNAL_LENGTH, 
     263                var.refObject->setProperty( STRING_PROPERTY_INTERNAL_LENGTH, 
    264264                        CVariable( (int32_t)iArrayLength, 
    265265                                                OPERAND_FLAG( OPERAND_FLAG_DONTDELETE | OPERAND_FLAG_DONTENUM ) ) ); 
     
    274274                        //Argument: 1) value of the property 
    275275                        swprintf( strBuffer, 22, L"%d", i ); 
    276                         var.refObject->SetProperty( strBuffer, *pArguments ); 
     276                        var.refObject->setProperty( strBuffer, *pArguments ); 
    277277                        pArguments++; 
    278278                } 
    279279 
    280280                //Set to ".lengh" 
    281                 var.refObject->SetProperty( STRING_PROPERTY_INTERNAL_LENGTH, 
     281                var.refObject->setProperty( STRING_PROPERTY_INTERNAL_LENGTH, 
    282282                        CVariable( (int32_t)iNumArguments - 1, 
    283283                                                OPERAND_FLAG( OPERAND_FLAG_DONTDELETE | OPERAND_FLAG_DONTENUM ) ) 
     
    299299 
    300300        if( OperandType( pArguments->iOperandType ) != OPERAND_OBJECTREF 
    301                 || pArguments->refObject->GetRID() != pVm->GetArrayObjectRID() ) 
     301                || pArguments->refObject->getRID() != pVm->getArrayObjectRID() ) 
    302302        { 
    303303                //Throw TypeError 
    304                 pVm->ThrowException( &wstring( ERRORSTRING_TYPEERROR_ARRAY_TOSTRING ), 
     304                pVm->throwException( &wstring( ERRORSTRING_TYPEERROR_ARRAY_TOSTRING ), 
    305305                        &wstring( NAME_BUILTIN_ERROR_OBJECT ), 
    306306                        ERROR_TYPEERROR_ARRAY_TOSTRING ); 
     
    337337 
    338338        //Initialize destination variable in the eval stack 
    339         pVm->PushEvalStackUndefined(); 
     339        pVm->pushEvalStackUndefined(); 
    340340         
    341         CVariable& var = pVm->GetEvalStackFirstEntry(); 
     341        CVariable& var = pVm->getEvalStackFirstEntry(); 
    342342        var.iOperandType = OPERAND_STRING; 
    343343        var.pString = new wstring(L""); 
     
    345345        uint32_t iIndex = 0; 
    346346        uint32_t iLength = 0; 
    347         hash_map< wstring, CVariable >::iterator itStart = varThis.refObject->GetPropertyMap().begin(); 
    348         hash_map< wstring, CVariable >::iterator itEnd = varThis.refObject->GetPropertyMap().end(); 
     347        hash_map< wstring, CVariable >::iterator itStart = varThis.refObject->getPropertyMap().begin(); 
     348        hash_map< wstring, CVariable >::iterator itEnd = varThis.refObject->getPropertyMap().end(); 
    349349        while( itStart != itEnd ) 
    350350        { 
     
    361361                swprintf( strIndex, 16, L"%d", iIndex ); 
    362362                CVariable* pvar; 
    363                 pvar = varThis.refObject->LookupProperty( strIndex ); 
     363                pvar = varThis.refObject->lookupProperty( strIndex ); 
    364364                if( iIndex ) 
    365365                        var.pString->append( sSeparator ); 
     
    398398 
    399399        if( OperandType( pArguments->iOperandType ) != OPERAND_OBJECTREF 
    400                 || pArguments->refObject->GetRID() != pVm->GetArrayObjectRID() ) 
     400                || pArguments->refObject->getRID() != pVm->getArrayObjectRID() ) 
    401401        { 
    402402                //Throw TypeError 
    403                 pVm->ThrowException( &wstring( ERRORSTRING_TYPEERROR_ARRAY_TOSTRING ), 
     403                pVm->throwException( &wstring( ERRORSTRING_TYPEERROR_ARRAY_TOSTRING ), 
    404404                        &wstring( NAME_BUILTIN_ERROR_OBJECT ), 
    405405                        ERROR_TYPEERROR_ARRAY_TOSTRING ); 
     
    408408        } 
    409409 
    410         hash_map< wstring, CVariable >& map = varThis.refObject->GetPropertyMap(); 
     410        hash_map< wstring, CVariable >& map = varThis.refObject->getPropertyMap(); 
    411411 
    412412        hash_map< wstring, CVariable >::iterator itBegin = map.begin(); 
     
    439439                pArguments++; 
    440440                if( pArguments->iOperandType == OPERAND_OBJECTREF 
    441                         && pArguments->refObject->GetCall() ) 
     441                        && pArguments->refObject->getCall() ) 
    442442                { 
    443443                        //Cmp function is given as 1st argument 
    444                         g_ridPredicater = pArguments->refObject->GetCall(); 
     444                        g_ridPredicater = pArguments->refObject->getCall(); 
    445445                        g_pVm = pVm; 
    446446                        std::sort( itVecBegin, itVecEnd, CilPredicater ); 
     
    479479        } 
    480480 
    481         pVm->PushEvalStack( varThis ); 
     481        pVm->pushEvalStack( varThis ); 
    482482        return; 
    483483} 
     
    494494        vars[ 2 ] = elem2; 
    495495 
    496         CVariable* pResult = g_pVm->InvokeMethod( g_ridPredicater, 
     496        CVariable* pResult = g_pVm->invokeMethod( g_ridPredicater, 
    497497                                                                                        3, 
    498498                                                                                        vars ); 
     
    589589        { 
    590590                //Getter implementation 
    591                 return pObject->LookupProperty( STRING_PROPERTY_INTERNAL_LENGTH ); 
     591                return pObject->lookupProperty( STRING_PROPERTY_INTERNAL_LENGTH ); 
    592592        } 
    593593        else 
     
    597597 
    598598                //Check existing length 
    599                 CVariable* pCurrentLengthVar = pObject->LookupProperty( STRING_PROPERTY_INTERNAL_LENGTH ); 
     599                CVariable* pCurrentLengthVar = pObject->lookupProperty( STRING_PROPERTY_INTERNAL_LENGTH ); 
    600600 
    601601                if( pCurrentLengthVar != NULL  ) 
     
    607607 
    608608                //Just expanding the array, nothing to do 
    609                 pObject->SetProperty( STRING_PROPERTY_INTERNAL_LENGTH, 
     609                pObject->setProperty( STRING_PROPERTY_INTERNAL_LENGTH, 
    610610                                                                CVariable( iGivenIndex, 
    611611                                                                        OPERAND_FLAG( OPERAND_FLAG_DONTDELETE | OPERAND_FLAG_DONTENUM ) ) ); 
     
    617617 
    618618                        hash_map< wstring, CVariable >::iterator itStart = 
    619                                                                                 pObject->GetPropertyMap().begin(); 
     619                                                                                pObject->getPropertyMap().begin(); 
    620620                        hash_map< wstring, CVariable >::iterator itEnd = 
    621                                                                                 pObject->GetPropertyMap().end(); 
     621                                                                                pObject->getPropertyMap().end(); 
    622622                        while( itStart != itEnd && iNumToEliminate ) 
    623623                        { 
     
    633633                                        if( _wtoi( String.data() ) >= iGivenIndex ) 
    634634                                        { 
    635                                                 pObject->RemoveProperty( String ); 
     635                                                pObject->removeProperty( String ); 
    636636                                                iNumToEliminate--; 
    637637                                        } 
     
    662662        else 
    663663        { 
    664                 pObject->SetProperty( *pName, *pVar ); 
     664                pObject->setProperty( *pName, *pVar ); 
    665665 
    666666                //Setter implementation 
     
    668668 
    669669                //Check existing length 
    670                 CVariable* pCurrentLengthVar = pObject->LookupProperty( STRING_PROPERTY_INTERNAL_LENGTH ); 
     670                CVariable* pCurrentLengthVar = pObject->lookupProperty( STRING_PROPERTY_INTERNAL_LENGTH ); 
    671671 
    672672                if( pCurrentLengthVar != NULL  ) 
     
    679679                if( iGivenIndex > iLength ) 
    680680                { 
    681                         pObject->SetProperty( STRING_PROPERTY_INTERNAL_LENGTH, 
     681                        pObject->setProperty( STRING_PROPERTY_INTERNAL_LENGTH, 
    682682                                CVariable( iGivenIndex, OPERAND_FLAG( OPERAND_FLAG_DONTDELETE | OPERAND_FLAG_DONTENUM ) ) ); 
    683683                } 
  • src/BuiltInObject/cil/cilBuiltinBooleanObject.cpp

    r110 r138  
    7979 
    8080        //Initialize Global 'Boolean' object ref 
    81         RID rid = CodeGen.getMetaData().GenerateStaticFieldRID( OPERAND_OBJECTREF, 
     81        RID rid = CodeGen.getMetaData().generateStaticFieldRID( OPERAND_OBJECTREF, 
    8282                                                                                                                        OPERAND_FLAG( 
    8383                                                                                                                                        OPERAND_FLAG_DONTDELETE 
     
    111111bool CBooleanObject::InitializeVm( CCilVm& vm ) 
    112112{ 
    113         RID rid = vm.CreatePrototypeObject( vm.GetBooleanObjectRID(), 
    114                                                                                 vm.getMetaData().GetObjectNameRID( vm.GetBooleanObjectRID() ), 
    115                                                                                 vm.GetObjectRID() ); 
    116  
    117         assert( rid == vm.GetBooleanObjectRID() ); 
     113        RID rid = vm.createPrototypeObject( vm.getBooleanObjectRID(), 
     114                                                                                vm.getMetaData().getObjectNameRID( vm.getBooleanObjectRID() ), 
     115                                                                                vm.getObjectRID() ); 
     116 
     117        assert( rid == vm.getBooleanObjectRID() ); 
    118118 
    119119        //--------------------------------------------------------------------------- 
    120120        //Bind global object 
    121121        //--------------------------------------------------------------------------- 
    122         CVmObject* pObj = vm.CreateObject( vm.GetBooleanObjectRID() ); 
     122        CVmObject* pObj = vm.createObject( vm.getBooleanObjectRID() ); 
    123123        CVariable obj( pObj, OPERAND_FLAG( OPERAND_FLAG_DONTDELETE 
    124124                                                                        | OPERAND_FLAG_DONTENUM 
     
    126126 
    127127        //Set true as an object value.. 
    128         pObj->SetValue( CVariable( true ) ); 
    129  
    130         CG_SYMBOL_INFORMATION info = vm.QuerySymbolInformation( NAME_BUILTIN_BOOLEAN_OBJECT ); 
    131         vm.SetStaticField( info.rid, obj, true );     //Force over write it 
     128        pObj->setValue( CVariable( true ) ); 
     129 
     130        CG_SYMBOL_INFORMATION info = vm.querySymbolInformation( NAME_BUILTIN_BOOLEAN_OBJECT ); 
     131        vm.setStaticField( info.rid, obj, true );     //Force over write it 
    132132 
    133133        //Add properties of prototype object here 
     
    139139                int32_t iParams; 
    140140                iParams = (int32_t)RidFromToken( initParams[ i ].ridParam ); 
    141                 if( IsBuiltinRid( initParams[ i ].ridParam ) ) 
     141                if( isBuiltinRid( initParams[ i ].ridParam ) ) 
    142142                { 
    143143                        iParams = RidFromToken( -iParams ) - 1; 
     
    147147                //Register methods 
    148148                //----------------------------------------------------------------------- 
    149                 bool b = vm.BindBuiltinMethod( 
     149                bool b = vm.bindBuiltinMethod( 
    150150                                                                        wstring( initParams[ i ].pStrSymbol ), 
    151151                                                                        initParams[ i ].pMethod, 
     
    170170        assert( OperandType(thisobj.iOperandType) == OPERAND_OBJECTREF ); 
    171171 
    172         thisobj.refObject->SetRID( pVm->GetBooleanObjectRID() ); 
     172        thisobj.refObject->setRID( pVm->getBooleanObjectRID() ); 
    173173 
    174174        //Set prototype: String prototype object 
    175         thisobj.refObject->SetPrototypeObject(  
    176                 &pVm->GetPrototypeObject( pVm->GetBooleanObjectRID() ) ); 
     175        thisobj.refObject->setPrototypeObject(  
     176                &pVm->getPrototypeObject( pVm->getBooleanObjectRID() ) ); 
    177177 
    178178        if( iNumArguments > 1 ) 
     
    188188                case OPERAND_DOUBLE: 
    189189                case OPERAND_BOOLEAN: 
    190                         thisobj.refObject->SetValue( *pArguments ); 
     190                        thisobj.refObject->setValue( *pArguments ); 
    191191                        break; 
    192192                case OPERAND_STRING: 
     
    194194                case OPERAND_NULL: 
    195195                case OPERAND_OBJECTREF: 
    196                         thisobj.refObject->SetValue( CVariable( pArguments->toBoolean() ) ); 
     196                        thisobj.refObject->setValue( CVariable( pArguments->toBoolean() ) ); 
    197197                        break; 
    198198                default: 
     
    213213        assert( iNumArguments >= 1 ); 
    214214        CVariable varRet( 0 ); 
    215         pVm->PushEvalStackVariable( varRet ); 
     215        pVm->pushEvalStackVariable( varRet ); 
    216216 
    217217        if( iNumArguments > 1 ) 
     
    228228                case OPERAND_DOUBLE: 
    229229                case OPERAND_BOOLEAN: 
    230                         var.moveTo( pVm->GetEvalStackFirstEntry() ); 
     230                        var.moveTo( pVm->getEvalStackFirstEntry() ); 
    231231                        break; 
    232232                case OPERAND_UNDEFINED: 
     
    268268                { 
    269269                CVmObject* pObj = pArguments->refObject; 
    270                 b = pObj->GetValue().toBoolean(); 
     270                b = pObj->getValue().toBoolean(); 
    271271                } 
    272272                break; 
     
    275275        } 
    276276        if( b ) 
    277                 pVm->PushEvalStackString( STRING_INTERNAL_TRUE ); 
     277                pVm->pushEvalStackString( STRING_INTERNAL_TRUE ); 
    278278        else 
    279                 pVm->PushEvalStackString( STRING_INTERNAL_FALSE ); 
     279                pVm->pushEvalStackString( STRING_INTERNAL_FALSE ); 
    280280        return; 
    281281} 
  • src/BuiltInObject/cil/cilBuiltinDateObject.cpp

    r110 r138  
    197197 
    198198        //Initialize Global 'Date' object ref 
    199         RID rid = CodeGen.getMetaData().GenerateStaticFieldRID( OPERAND_OBJECTREF, 
     199        RID rid = CodeGen.getMetaData().generateStaticFieldRID( OPERAND_OBJECTREF, 
    200200                                                                                                                        OPERAND_FLAG( 
    201201                                                                                                                                        OPERAND_FLAG_DONTDELETE 
     
    229229bool CDateObject::InitializeVm( CCilVm& vm ) 
    230230{ 
    231         RID rid = vm.CreatePrototypeObject( vm.GetDateObjectRID(), 
    232                                                                                 vm.getMetaData().GetObjectNameRID( vm.GetDateObjectRID() ), 
    233                                                                                 vm.GetObjectRID() ); 
    234  
    235         assert( rid == vm.GetDateObjectRID() ); 
     231        RID rid = vm.createPrototypeObject( vm.getDateObjectRID(), 
     232                                                                                vm.getMetaData().getObjectNameRID( vm.g