@@ -156,27 +156,27 @@ internal string Compute(bool isCacheable)
156156 //Pre-first-order:
157157 while ( ( operatorIndex = GetFreestandingNotOperation ( out _ ) ) != - 1 )
158158 {
159- var preParsedCacheSlot = _parentExpression . State . ConsumeNextPreParsedCacheSlot ( ) ;
159+ var placeholderCacheSlot = _parentExpression . State . ConsumeNextPlaceholderCacheSlot ( ) ;
160160
161- if ( _parentExpression . State . TryGetPreParsedCache ( preParsedCacheSlot , out PreParsedCacheItem cachedObj ) )
161+ if ( _parentExpression . State . TryGetPlaceholderCache ( placeholderCacheSlot , out PlaceholderCacheItem cachedObj ) )
162162 {
163163 StorePreComputed ( cachedObj . BeginPosition , cachedObj . EndPosition , cachedObj . ParsedValue ) ;
164164 }
165165 else
166166 {
167- var rightValue = GetRightValue ( operatorIndex + 1 , out int outParsedLength , out bool isOperCacheable ) ;
167+ var rightValue = GetRightValue ( operatorIndex + 1 , out int outParsedLength , out bool isOperationCacheable ) ;
168168 int ? calculatedResult = rightValue == null ? null : ( rightValue == 0 ) ? 1 : 0 ;
169169 StorePreComputed ( operatorIndex , operatorIndex + outParsedLength , calculatedResult ) ;
170170
171- if ( isCacheable && isOperCacheable )
171+ if ( isCacheable && isOperationCacheable )
172172 {
173- var parsedNumber = new PreParsedCacheItem
173+ var parsedNumber = new PlaceholderCacheItem
174174 {
175175 ParsedValue = calculatedResult ,
176176 BeginPosition = operatorIndex ,
177177 EndPosition = operatorIndex + outParsedLength
178178 } ;
179- _parentExpression . State . StorePreParsedCache ( preParsedCacheSlot , parsedNumber ) ;
179+ _parentExpression . State . StorePlaceholderCache ( placeholderCacheSlot , parsedNumber ) ;
180180 }
181181 }
182182 }
@@ -185,30 +185,30 @@ internal string Compute(bool isCacheable)
185185 operatorIndex = GetIndexOfOperation ( Utility . FirstOrderOperations , out string operation ) ;
186186 if ( operatorIndex > 0 )
187187 {
188- var preParsedCacheSlot = _parentExpression . State . ConsumeNextPreParsedCacheSlot ( ) ;
188+ var placeholderCacheSlot = _parentExpression . State . ConsumeNextPlaceholderCacheSlot ( ) ;
189189
190- if ( _parentExpression . State . TryGetPreParsedCache ( preParsedCacheSlot , out PreParsedCacheItem cachedObj ) )
190+ if ( _parentExpression . State . TryGetPlaceholderCache ( placeholderCacheSlot , out PlaceholderCacheItem cachedObj ) )
191191 {
192192 StorePreComputed ( cachedObj . BeginPosition , cachedObj . EndPosition , cachedObj . ParsedValue ) ;
193193 }
194194 else
195195 {
196196 double ? calculatedResult = null ;
197- if ( GetLeftAndRightValues ( operation , operatorIndex , out double leftValue , out double rightValue , out int beginPosition , out int endPosition , out bool isOperCacheable ) )
197+ if ( GetLeftAndRightValues ( operation , operatorIndex , out double leftValue , out double rightValue , out int beginPosition , out int endPosition , out bool isOperationCacheable ) )
198198 {
199199 calculatedResult = Utility . ComputePrivative ( leftValue , operation , rightValue ) ;
200200 }
201201
202202 StorePreComputed ( beginPosition , endPosition , calculatedResult ) ;
203- if ( isCacheable && isOperCacheable )
203+ if ( isCacheable && isOperationCacheable )
204204 {
205- var parsedNumber = new PreParsedCacheItem
205+ var parsedNumber = new PlaceholderCacheItem
206206 {
207207 ParsedValue = calculatedResult ,
208208 BeginPosition = beginPosition ,
209209 EndPosition = endPosition
210210 } ;
211- _parentExpression . State . StorePreParsedCache ( preParsedCacheSlot , parsedNumber ) ;
211+ _parentExpression . State . StorePlaceholderCache ( placeholderCacheSlot , parsedNumber ) ;
212212 }
213213 }
214214
@@ -219,30 +219,30 @@ internal string Compute(bool isCacheable)
219219 operatorIndex = GetIndexOfOperation ( Utility . SecondOrderOperations , out operation ) ;
220220 if ( operatorIndex > 0 )
221221 {
222- var preParsedCacheSlot = _parentExpression . State . ConsumeNextPreParsedCacheSlot ( ) ;
222+ var placeholderCacheSlot = _parentExpression . State . ConsumeNextPlaceholderCacheSlot ( ) ;
223223
224- if ( _parentExpression . State . TryGetPreParsedCache ( preParsedCacheSlot , out PreParsedCacheItem cachedObj ) )
224+ if ( _parentExpression . State . TryGetPlaceholderCache ( placeholderCacheSlot , out PlaceholderCacheItem cachedObj ) )
225225 {
226226 StorePreComputed ( cachedObj . BeginPosition , cachedObj . EndPosition , cachedObj . ParsedValue ) ;
227227 }
228228 else
229229 {
230230 double ? calculatedResult = null ;
231- if ( GetLeftAndRightValues ( operation , operatorIndex , out double leftValue , out double rightValue , out int beginPosition , out int endPosition , out bool isOperCacheable ) )
231+ if ( GetLeftAndRightValues ( operation , operatorIndex , out double leftValue , out double rightValue , out int beginPosition , out int endPosition , out bool isOperationCacheable ) )
232232 {
233233 calculatedResult = Utility . ComputePrivative ( leftValue , operation , rightValue ) ;
234234 }
235235
236236 StorePreComputed ( beginPosition , endPosition , calculatedResult ) ;
237- if ( isCacheable && isOperCacheable )
237+ if ( isCacheable && isOperationCacheable )
238238 {
239- var parsedNumber = new PreParsedCacheItem
239+ var parsedNumber = new PlaceholderCacheItem
240240 {
241241 ParsedValue = calculatedResult ,
242242 BeginPosition = beginPosition ,
243243 EndPosition = endPosition
244244 } ;
245- _parentExpression . State . StorePreParsedCache ( preParsedCacheSlot , parsedNumber ) ;
245+ _parentExpression . State . StorePlaceholderCache ( placeholderCacheSlot , parsedNumber ) ;
246246 }
247247 }
248248 continue ;
@@ -252,31 +252,31 @@ internal string Compute(bool isCacheable)
252252 operatorIndex = GetIndexOfOperation ( Utility . ThirdOrderOperations , out operation ) ;
253253 if ( operatorIndex > 0 )
254254 {
255- var preParsedCacheSlot = _parentExpression . State . ConsumeNextPreParsedCacheSlot ( ) ;
255+ var placeholderCacheSlot = _parentExpression . State . ConsumeNextPlaceholderCacheSlot ( ) ;
256256
257- if ( _parentExpression . State . TryGetPreParsedCache ( preParsedCacheSlot , out PreParsedCacheItem cachedObj ) )
257+ if ( _parentExpression . State . TryGetPlaceholderCache ( placeholderCacheSlot , out PlaceholderCacheItem cachedObj ) )
258258 {
259259 StorePreComputed ( cachedObj . BeginPosition , cachedObj . EndPosition , cachedObj . ParsedValue ) ;
260260 }
261261 else
262262 {
263263 double ? calculatedResult = null ;
264264
265- if ( GetLeftAndRightValues ( operation , operatorIndex , out double leftValue , out double rightValue , out int beginPosition , out int endPosition , out bool isOperCacheable ) )
265+ if ( GetLeftAndRightValues ( operation , operatorIndex , out double leftValue , out double rightValue , out int beginPosition , out int endPosition , out bool isOperationCacheable ) )
266266 {
267267 calculatedResult = Utility . ComputePrivative ( leftValue , operation , rightValue ) ;
268268 }
269269
270270 StorePreComputed ( beginPosition , endPosition , calculatedResult ) ;
271- if ( isCacheable && isOperCacheable )
271+ if ( isCacheable && isOperationCacheable )
272272 {
273- var parsedNumber = new PreParsedCacheItem
273+ var parsedNumber = new PlaceholderCacheItem
274274 {
275275 ParsedValue = calculatedResult ,
276276 BeginPosition = beginPosition ,
277277 EndPosition = endPosition
278278 } ;
279- _parentExpression . State . StorePreParsedCache ( preParsedCacheSlot , parsedNumber ) ;
279+ _parentExpression . State . StorePlaceholderCache ( placeholderCacheSlot , parsedNumber ) ;
280280 }
281281 }
282282 continue ;
0 commit comments