From 51728d9334f642958f80bf442b40a76decdccafe Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 19 Aug 2017 05:53:31 -0700 Subject: 3971 --- html/036refcount.cc.html | 180 +++++++++++++++++++++++------------------------ 1 file changed, 90 insertions(+), 90 deletions(-) (limited to 'html/036refcount.cc.html') diff --git a/html/036refcount.cc.html b/html/036refcount.cc.html index f665d640..d9b94297 100644 --- a/html/036refcount.cc.html +++ b/html/036refcount.cc.html @@ -234,7 +234,7 @@ if ('onhashchange' in window) { 169 :(after "Write Memory in PUT_INDEX in Run") 170 reagent/*local*/ element; 171 element.set_value(address); - 172 element.type = copy_array_element(base.type); + 172 element.type = copy_array_element(base.type); 173 update_any_refcounts(element, value); 174 175 :(scenario refcounts_maybe_convert) @@ -407,7 +407,7 @@ if ('onhashchange' in window) { 342 ¦ if (type->left->name == "address") 343 ¦ ¦ compute_container_address_offsets(payload_type(type), location_for_error_messages); 344 ¦ else if (type->left->name == "array") - 345 ¦ ¦ compute_container_address_offsets(array_element(type), location_for_error_messages); + 345 ¦ ¦ compute_container_address_offsets(array_element(type), location_for_error_messages); 346 ¦ // End compute_container_address_offsets Non-atom Special-cases 347 } 348 const type_tree* base_type = type; @@ -459,9 +459,9 @@ if ('onhashchange' in window) { 394 ¦ ¦ } 395 ¦ ¦ else if (is_mu_array(element)) { 396 ¦ ¦ ¦ curr_offset += /*array length*/1; - 397 ¦ ¦ ¦ const type_tree* array_element_type = array_element(element.type); + 397 ¦ ¦ ¦ const type_tree* array_element_type = array_element(element.type); 398 ¦ ¦ ¦ int array_element_size = size_of(array_element_type); - 399 ¦ ¦ ¦ for (int i = 0; i < static_array_length(element.type); ++i) { + 399 ¦ ¦ ¦ for (int i = 0; i < static_array_length(element.type); ++i) { 400 ¦ ¦ ¦ ¦ append_addresses(curr_offset, array_element_type, out, key, location_for_error_messages); 401 ¦ ¦ ¦ ¦ curr_offset += array_element_size; 402 ¦ ¦ ¦ } @@ -510,14 +510,14 @@ if ('onhashchange' in window) { 445 compute_container_address_offsets(r, ""); 446 // global metadata contains just the entry for foo 447 // no entries for non-container types or other junk - 448 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 448 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 449 // the reagent we scanned knows it has no addresses - 450 CHECK(r.metadata.address.empty()); + 450 CHECK(r.metadata.address.empty()); 451 // the global table contains an identical entry - 452 CHECK(contains_key(Container_metadata, r.type)); - 453 CHECK(get(Container_metadata, r.type).address.empty()); + 452 CHECK(contains_key(Container_metadata, r.type)); + 453 CHECK(get(Container_metadata, r.type).address.empty()); 454 // compute_container_address_offsets creates no new entries - 455 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 455 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 456 } 457 458 void test_container_address_offsets() { @@ -532,24 +532,24 @@ if ('onhashchange' in window) { 467 compute_container_address_offsets(r, ""); 468 // global metadata contains just the entry for foo 469 // no entries for non-container types or other junk - 470 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 470 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 471 // the reagent we scanned knows it has an address at offset 0 - 472 CHECK_EQ(SIZE(r.metadata.address), 1); - 473 CHECK(contains_key(r.metadata.address, set<tag_condition_info>())); + 472 CHECK_EQ(SIZE(r.metadata.address), 1); + 473 CHECK(contains_key(r.metadata.address, set<tag_condition_info>())); 474 const set<address_element_info>& address_offsets = get(r.metadata.address, set<tag_condition_info>()); // unconditional for containers - 475 CHECK_EQ(SIZE(address_offsets), 1); - 476 CHECK_EQ(address_offsets.begin()->offset, 0); - 477 CHECK(address_offsets.begin()->payload_type->atom); - 478 CHECK_EQ(address_offsets.begin()->payload_type->name, "number"); + 475 CHECK_EQ(SIZE(address_offsets), 1); + 476 CHECK_EQ(address_offsets.begin()->offset, 0); + 477 CHECK(address_offsets.begin()->payload_type->atom); + 478 CHECK_EQ(address_offsets.begin()->payload_type->name, "number"); 479 // the global table contains an identical entry - 480 CHECK(contains_key(Container_metadata, r.type)); + 480 CHECK(contains_key(Container_metadata, r.type)); 481 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, r.type).address, set<tag_condition_info>()); - 482 CHECK_EQ(SIZE(address_offsets2), 1); - 483 CHECK_EQ(address_offsets2.begin()->offset, 0); - 484 CHECK(address_offsets2.begin()->payload_type->atom); - 485 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 482 CHECK_EQ(SIZE(address_offsets2), 1); + 483 CHECK_EQ(address_offsets2.begin()->offset, 0); + 484 CHECK(address_offsets2.begin()->payload_type->atom); + 485 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 486 // compute_container_address_offsets creates no new entries - 487 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 487 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 488 } 489 490 void test_container_address_offsets_2() { @@ -563,26 +563,26 @@ if ('onhashchange' in window) { 498 compute_container_sizes(r, ""); // need to first pre-populate the metadata 499 // global metadata contains just the entry for foo 500 // no entries for non-container types or other junk - 501 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 501 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 502 // scan 503 compute_container_address_offsets(r, ""); 504 // compute_container_address_offsets creates no new entries - 505 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 505 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 506 // the reagent we scanned knows it has an address at offset 1 - 507 CHECK_EQ(SIZE(r.metadata.address), 1); - 508 CHECK(contains_key(r.metadata.address, set<tag_condition_info>())); + 507 CHECK_EQ(SIZE(r.metadata.address), 1); + 508 CHECK(contains_key(r.metadata.address, set<tag_condition_info>())); 509 const set<address_element_info>& address_offsets = get(r.metadata.address, set<tag_condition_info>()); - 510 CHECK_EQ(SIZE(address_offsets), 1); - 511 CHECK_EQ(address_offsets.begin()->offset, 1); // - 512 CHECK(address_offsets.begin()->payload_type->atom); - 513 CHECK_EQ(address_offsets.begin()->payload_type->name, "number"); + 510 CHECK_EQ(SIZE(address_offsets), 1); + 511 CHECK_EQ(address_offsets.begin()->offset, 1); // + 512 CHECK(address_offsets.begin()->payload_type->atom); + 513 CHECK_EQ(address_offsets.begin()->payload_type->name, "number"); 514 // the global table contains an identical entry - 515 CHECK(contains_key(Container_metadata, r.type)); + 515 CHECK(contains_key(Container_metadata, r.type)); 516 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, r.type).address, set<tag_condition_info>()); - 517 CHECK_EQ(SIZE(address_offsets2), 1); - 518 CHECK_EQ(address_offsets2.begin()->offset, 1); // - 519 CHECK(address_offsets2.begin()->payload_type->atom); - 520 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 517 CHECK_EQ(SIZE(address_offsets2), 1); + 518 CHECK_EQ(address_offsets2.begin()->offset, 1); // + 519 CHECK(address_offsets2.begin()->payload_type->atom); + 520 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 521 } 522 523 void test_container_address_offsets_nested() { @@ -600,26 +600,26 @@ if ('onhashchange' in window) { 535 compute_container_sizes(r, ""); // need to first pre-populate the metadata 536 // global metadata contains entries for bar and included types: point and foo 537 // no entries for non-container types or other junk - 538 CHECK_EQ(SIZE(Container_metadata)-old_size, 3); + 538 CHECK_EQ(SIZE(Container_metadata)-old_size, 3); 539 // scan 540 compute_container_address_offsets(r, ""); 541 // the reagent we scanned knows it has an address at offset 2 - 542 CHECK_EQ(SIZE(r.metadata.address), 1); - 543 CHECK(contains_key(r.metadata.address, set<tag_condition_info>())); + 542 CHECK_EQ(SIZE(r.metadata.address), 1); + 543 CHECK(contains_key(r.metadata.address, set<tag_condition_info>())); 544 const set<address_element_info>& address_offsets = get(r.metadata.address, set<tag_condition_info>()); - 545 CHECK_EQ(SIZE(address_offsets), 1); - 546 CHECK_EQ(address_offsets.begin()->offset, 2); // - 547 CHECK(address_offsets.begin()->payload_type->atom); - 548 CHECK_EQ(address_offsets.begin()->payload_type->name, "number"); + 545 CHECK_EQ(SIZE(address_offsets), 1); + 546 CHECK_EQ(address_offsets.begin()->offset, 2); // + 547 CHECK(address_offsets.begin()->payload_type->atom); + 548 CHECK_EQ(address_offsets.begin()->payload_type->name, "number"); 549 // the global table also knows its address offset - 550 CHECK(contains_key(Container_metadata, r.type)); + 550 CHECK(contains_key(Container_metadata, r.type)); 551 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, r.type).address, set<tag_condition_info>()); - 552 CHECK_EQ(SIZE(address_offsets2), 1); - 553 CHECK_EQ(address_offsets2.begin()->offset, 2); // - 554 CHECK(address_offsets2.begin()->payload_type->atom); - 555 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 552 CHECK_EQ(SIZE(address_offsets2), 1); + 553 CHECK_EQ(address_offsets2.begin()->offset, 2); // + 554 CHECK(address_offsets2.begin()->payload_type->atom); + 555 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 556 // compute_container_address_offsets creates no new entries - 557 CHECK_EQ(SIZE(Container_metadata)-old_size, 3); + 557 CHECK_EQ(SIZE(Container_metadata)-old_size, 3); 558 } 559 560 void test_container_address_offsets_from_address() { @@ -632,19 +632,19 @@ if ('onhashchange' in window) { 567 compute_container_sizes(r, ""); // need to first pre-populate the metadata 568 // global metadata contains just the entry for foo 569 // no entries for non-container types or other junk - 570 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 570 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 571 // scan an address to the container 572 compute_container_address_offsets(r, ""); 573 // compute_container_address_offsets creates no new entries - 574 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 574 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 575 // scanning precomputed metadata for the container 576 reagent container("x:foo"); - 577 CHECK(contains_key(Container_metadata, container.type)); + 577 CHECK(contains_key(Container_metadata, container.type)); 578 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, container.type).address, set<tag_condition_info>()); - 579 CHECK_EQ(SIZE(address_offsets2), 1); - 580 CHECK_EQ(address_offsets2.begin()->offset, 0); - 581 CHECK(address_offsets2.begin()->payload_type->atom); - 582 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 579 CHECK_EQ(SIZE(address_offsets2), 1); + 580 CHECK_EQ(address_offsets2.begin()->offset, 0); + 581 CHECK(address_offsets2.begin()->payload_type->atom); + 582 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 583 } 584 585 void test_container_address_offsets_from_array() { @@ -657,19 +657,19 @@ if ('onhashchange' in window) { 592 compute_container_sizes(r, ""); // need to first pre-populate the metadata 593 // global metadata contains just the entry for foo 594 // no entries for non-container types or other junk - 595 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 595 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 596 // scan an array of the container 597 compute_container_address_offsets(r, ""); 598 // compute_container_address_offsets creates no new entries - 599 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 599 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 600 // scanning precomputed metadata for the container 601 reagent container("x:foo"); - 602 CHECK(contains_key(Container_metadata, container.type)); + 602 CHECK(contains_key(Container_metadata, container.type)); 603 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, container.type).address, set<tag_condition_info>()); - 604 CHECK_EQ(SIZE(address_offsets2), 1); - 605 CHECK_EQ(address_offsets2.begin()->offset, 0); - 606 CHECK(address_offsets2.begin()->payload_type->atom); - 607 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 604 CHECK_EQ(SIZE(address_offsets2), 1); + 605 CHECK_EQ(address_offsets2.begin()->offset, 0); + 606 CHECK(address_offsets2.begin()->payload_type->atom); + 607 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 608 } 609 610 void test_container_address_offsets_from_address_to_array() { @@ -682,19 +682,19 @@ if ('onhashchange' in window) { 617 compute_container_sizes(r, ""); // need to first pre-populate the metadata 618 // global metadata contains just the entry for foo 619 // no entries for non-container types or other junk - 620 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 620 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 621 // scan an address to an array of the container 622 compute_container_address_offsets(r, ""); 623 // compute_container_address_offsets creates no new entries - 624 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 624 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 625 // scanning precomputed metadata for the container 626 reagent container("x:foo"); - 627 CHECK(contains_key(Container_metadata, container.type)); + 627 CHECK(contains_key(Container_metadata, container.type)); 628 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, container.type).address, set<tag_condition_info>()); - 629 CHECK_EQ(SIZE(address_offsets2), 1); - 630 CHECK_EQ(address_offsets2.begin()->offset, 0); - 631 CHECK(address_offsets2.begin()->payload_type->atom); - 632 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 629 CHECK_EQ(SIZE(address_offsets2), 1); + 630 CHECK_EQ(address_offsets2.begin()->offset, 0); + 631 CHECK(address_offsets2.begin()->payload_type->atom); + 632 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 633 } 634 635 void test_container_address_offsets_from_static_array() { @@ -707,19 +707,19 @@ if ('onhashchange' in window) { 642 compute_container_sizes(r, ""); // need to first pre-populate the metadata 643 // global metadata contains just the entry for foo 644 // no entries for non-container types or other junk - 645 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 645 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 646 // scan a static array of the container 647 compute_container_address_offsets(r, ""); 648 // compute_container_address_offsets creates no new entries - 649 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 649 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 650 // scanning precomputed metadata for the container 651 reagent container("x:foo"); - 652 CHECK(contains_key(Container_metadata, container.type)); + 652 CHECK(contains_key(Container_metadata, container.type)); 653 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, container.type).address, set<tag_condition_info>()); - 654 CHECK_EQ(SIZE(address_offsets2), 1); - 655 CHECK_EQ(address_offsets2.begin()->offset, 0); - 656 CHECK(address_offsets2.begin()->payload_type->atom); - 657 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 654 CHECK_EQ(SIZE(address_offsets2), 1); + 655 CHECK_EQ(address_offsets2.begin()->offset, 0); + 656 CHECK(address_offsets2.begin()->payload_type->atom); + 657 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 658 } 659 660 void test_container_address_offsets_from_address_to_static_array() { @@ -732,19 +732,19 @@ if ('onhashchange' in window) { 667 compute_container_sizes(r, ""); // need to first pre-populate the metadata 668 // global metadata contains just the entry for foo 669 // no entries for non-container types or other junk - 670 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 670 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 671 // scan an address to a static array of the container 672 compute_container_address_offsets(r, ""); 673 // compute_container_address_offsets creates no new entries - 674 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 674 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 675 // scanning precomputed metadata for the container 676 reagent container("x:foo"); - 677 CHECK(contains_key(Container_metadata, container.type)); + 677 CHECK(contains_key(Container_metadata, container.type)); 678 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, container.type).address, set<tag_condition_info>()); - 679 CHECK_EQ(SIZE(address_offsets2), 1); - 680 CHECK_EQ(address_offsets2.begin()->offset, 0); - 681 CHECK(address_offsets2.begin()->payload_type->atom); - 682 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 679 CHECK_EQ(SIZE(address_offsets2), 1); + 680 CHECK_EQ(address_offsets2.begin()->offset, 0); + 681 CHECK(address_offsets2.begin()->payload_type->atom); + 682 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 683 } 684 685 void test_container_address_offsets_from_repeated_address_and_array_types() { @@ -758,18 +758,18 @@ if ('onhashchange' in window) { 693 compute_container_sizes(r, ""); // need to first pre-populate the metadata 694 // global metadata contains just the entry for foo 695 // no entries for non-container types or other junk - 696 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 696 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 697 compute_container_address_offsets(r, ""); 698 // compute_container_address_offsets creates no new entries - 699 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); + 699 CHECK_EQ(SIZE(Container_metadata)-old_size, 1); 700 // scanning precomputed metadata for the container 701 reagent container("x:foo"); - 702 CHECK(contains_key(Container_metadata, container.type)); + 702 CHECK(contains_key(Container_metadata, container.type)); 703 const set<address_element_info>& address_offsets2 = get(get(Container_metadata, container.type).address, set<tag_condition_info>()); - 704 CHECK_EQ(SIZE(address_offsets2), 1); - 705 CHECK_EQ(address_offsets2.begin()->offset, 0); - 706 CHECK(address_offsets2.begin()->payload_type->atom); - 707 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); + 704 CHECK_EQ(SIZE(address_offsets2), 1); + 705 CHECK_EQ(address_offsets2.begin()->offset, 0); + 706 CHECK(address_offsets2.begin()->payload_type->atom); + 707 CHECK_EQ(address_offsets2.begin()->payload_type->name, "number"); 708 } 709 710 //: use metadata.address to update refcounts within containers, arrays and -- cgit 1.4.1-2-gfad0 b38830217fa268e678d9637116ec516bf0e'>^
6bd78b38 ^
8ce6b560 ^

















4b034492 ^

e087f6d4
c812b42f ^

e087f6d4
c3ec4181 ^
c812b42f ^
c3ec4181 ^
e087f6d4
4b034492 ^

e087f6d4
c3ec4181 ^

e087f6d4
4b034492 ^

e087f6d4
c3ec4181 ^





e087f6d4
4b034492 ^

e087f6d4
c3ec4181 ^





e087f6d4
4b034492 ^


e087f6d4
4b034492 ^








e4409c40 ^
4b034492 ^
















b63d287c ^

4b034492 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
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
330
331
332
333
334
335
336
337
338
339
340
341
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
427
428
429