Overview
Comment: | s_expressions-generic_caches: implement Lockable.Descriptor interface on memory caches |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
660d5d43a435d000105540e8f5bca753 |
User & Date: | nat on 2014-03-07 21:53:10 |
Other Links: | manifest | tags |
Context
2014-03-08
| ||
14:11 | s_expressions-cache_tests: add a test for the new Lockable.Descriptor interface of cache objects check-in: 0faa8fc7d8 user: nat tags: trunk | |
2014-03-07
| ||
21:53 | s_expressions-generic_caches: implement Lockable.Descriptor interface on memory caches check-in: 660d5d43a4 user: nat tags: trunk | |
2014-03-06
| ||
17:23 | s_expressions-parsers-tests: add a test for the new Lockable interface of Subparser objects check-in: e1b283ce5a user: nat tags: trunk | |
Changes
Modified src/natools-s_expressions-generic_caches.adb from [3373c2a61e] to [18facc84e2].
︙ | |||
219 220 221 222 223 224 225 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | - - + + + + + - + - + + + - - - - - + + + + + - - - - - - - - - - + + + - + + + - + | N : Node_Access; begin if Cache.Exp.Is_Empty then return Cursor'(others => <>); else N := Cache.Exp.Query.Data.Root; pragma Assert (N /= null); |
︙ | |||
342 343 344 345 346 347 348 349 350 | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | Object.Position := Object.Position.Parent; Object.Opening := False; else Object.Position := null; end if; Event := Object.Current_Event; if Event = Events.Close_List and then Object.Absolute_Level < Lockable.Current_Level (Object.Stack) then Event := Events.End_Of_Input; Object.Locked := True; end if; end Next; |
Modified src/natools-s_expressions-generic_caches.ads from [d6fece5551] to [f6638058cf].
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + | -- The intended usage is efficient caching of S-expressions in memory. For -- -- more flexible in-memory S-expression objects, -- -- see Natools.S_Expressions.Holders. -- ------------------------------------------------------------------------------ with System.Storage_Pools; with Natools.S_Expressions.Lockable; with Natools.S_Expressions.Printers; private with Ada.Finalization; private with Ada.Unchecked_Deallocation; private with Natools.References; generic |
︙ | |||
48 49 50 51 52 53 54 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + + + + + + + + + | (Output : in out Reference; Data : in Atom); overriding procedure Close_List (Output : in out Reference); function Duplicate (Cache : Reference) return Reference; -- Create a new copy of the S-expression held in Cache and return it |
︙ | |||
127 128 129 130 131 132 133 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - + + + + + | type Reference is new Printers.Printer with record Exp : Trees.Reference; end record; |