-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
20477: Improves locking around entities, particularly around opcodes …
…that do not read from two entities, unifies entity traversal code, MINOR (#153)
- Loading branch information
1 parent
7413d5a
commit 72bd910
Showing
11 changed files
with
335 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,12 @@ | ||
(seq | ||
|
||
(if 0 (seq | ||
(declare | ||
{_ (null)} | ||
(replace | ||
_ | ||
[] | ||
(lambda | ||
{o 6} | ||
) | ||
) | ||
) | ||
"\n") | ||
(conclude) | ||
) | ||
(create_entities "MergeEntity1" (lambda (associate "a" 3 "b" 4)) ) | ||
;(create_entities (list "MergeEntity1" "MergeEntityChild1") (lambda (associate "x" 3 "y" 4)) ) | ||
;(create_entities (list "MergeEntity1" "MergeEntityChild2") (lambda (associate "p" 3 "q" 4)) ) | ||
;(create_entities (list "MergeEntity1") (lambda (associate "E" 3 "F" 4)) ) | ||
;(create_entities (list "MergeEntity1") (lambda (associate "e" 3 "f" 4 "g" 5 "h" 6)) ) | ||
|
||
(store_entity "amlg_code/module_test_c.caml" "MergeEntity1") | ||
(load_entity "amlg_code/module_test_c.caml" "MergeEntity1Decompressed") | ||
(print "Compression difference: [" (difference_entities "MergeEntity1" "MergeEntity1Decompressed") "]\n") | ||
) | ||
|
||
(create_entities "DiffEntity1" (lambda (assoc "c" 3 "b" 4)) ) | ||
(create_entities (list "DiffEntity1" "DiffEntityChild1") (lambda (assoc "x" 3 "y" 4 "z" 6)) ) | ||
(create_entities (list "DiffEntity1" "DiffEntityChild1" "DiffEntityChild2") (lambda (assoc "p" 3 "q" 4 "u" 5 "v" 6 "w" 7)) ) | ||
(create_entities (list "DiffEntity1" "DiffEntityChild1" "DiffEntityChild2" "DiffEntityChild3") (lambda (assoc "e" 3 "p" 4 "a" 5 "o" 6 "w" 7)) ) | ||
(create_entities (list "DiffEntity1" "OnlyIn1") (lambda (assoc "m" 4)) ) | ||
(create_entities (list "DiffEntity1") (lambda (assoc "E" 3 "F" 4)) ) | ||
(create_entities (list "DiffEntity1") (lambda (assoc "e" 3 "f" 4 "g" 5 "h" 6)) ) | ||
|
||
(create_entities "DiffEntity2" (lambda (assoc "c" 3 "b" 4)) ) | ||
(create_entities (list "DiffEntity2" "DiffEntityChild1") (lambda (assoc "x" 3 "y" 4 "z" 5)) ) | ||
(create_entities (list "DiffEntity2" "DiffEntityChild1" "DiffEntityChild2") (lambda (assoc "p" 3 "q" 4 "u" 5 "v" 6 "w" 7)) ) | ||
(create_entities (list "DiffEntity2" "DiffEntityChild1" "DiffEntityChild2" "DiffEntityChild3") (lambda (assoc "e" 3 "p" 4 "a" 5 "o" 6 "w" 7)) ) | ||
(create_entities (list "DiffEntity2" "OnlyIn2") (lambda (assoc "o" 6)) ) | ||
(create_entities (list "DiffEntity2") (lambda (assoc "E" 3 "F" 4 "G" 5 "H" 6)) ) | ||
(create_entities (list "DiffEntity2") (lambda (assoc "e" 3 "f" 4)) ) | ||
|
||
(print (contained_entities "DiffEntity2")) | ||
|
||
(print (difference_entities "DiffEntity1" "DiffEntity2")) | ||
|
||
(let (assoc new_entity | ||
(call (difference_entities "DiffEntity1" "DiffEntity2") (assoc _ "DiffEntity1"))) | ||
(print "new_entity: " new_entity "\n") | ||
(print "new_entity root: " (retrieve_entity_root new_entity)) | ||
(print "DiffEntityChild1 root:\n" (retrieve_entity_root (list new_entity "DiffEntityChild1"))) | ||
(print "contained_entities new_entity: " (contained_entities new_entity)) | ||
(print "difference between DiffEntity2 and new_entity:\n" (difference_entities "DiffEntity2" new_entity)) | ||
;(print "DiffEntity2:\n" (flatten_entity "DiffEntity2")) | ||
;(print "new_entity:\n" (flatten_entity new_entity)) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.