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