[cfe-dev] [PATCH] Move some code into GRSimpleVals

Ted Kremenek kremenek at apple.com
Mon Aug 18 10:07:07 PDT 2008


On Aug 18, 2008, at 7:19 AM, Zhongxing Xu wrote:

> To make GRExprEngine unaware of the specific implementation of  
> GRStates and Stores, this patch moves some code from GRExprEngine  
> into GRSimpleVals. This is an initial refactoring. It moves some  
> code in GRExprEngine::getInitialState() into  
> GRSimpleVals::getInitialDeclState().

Hi Zhongxing,

This is an excellent idea, but I don't think putting this logic in  
GRSimpleVals is the right place.  This is really a property of the  
particular implementation of Store, since that handles the abstraction  
of "memory".  Specifically, this logic seems tied to BasicStore and  
BasicStoreManager respectively.

I think the most logical place would be to put it in  
BasicStoreManager's implementation of "getInitialStore()".  We can  
either pass LiveVariables& to getInitialStore(), or pass  
GRStateManager& to getInitialStore() (and migrate the LiveVariables&  
instance variable from GRExprEngine to GRStateManager).

Ted



More information about the cfe-dev mailing list