)]}'
{"id":"depot~10039","triplet_id":"depot~canon~I6179b8abb2ea0492180fcb347f37595a14665777","project":"depot","branch":"canon","attention_set":{},"removed_from_attention_set":{"1000066":{"account":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"last_update":"2023-12-06 06:53:01.000000000","reason":"Change was submitted"},"1000034":{"account":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"last_update":"2023-12-06 06:53:01.000000000","reason":"Change was submitted"},"1000001":{"account":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"last_update":"2023-11-29 14:25:07.000000000","reason":"removed on reply"}},"hashtags":[],"change_id":"I6179b8abb2ea0492180fcb347f37595a14665777","subject":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form","status":"MERGED","created":"2023-11-14 18:29:41.000000000","updated":"2023-12-06 06:53:01.000000000","submitted":"2023-12-06 06:53:01.000000000","submitter":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"total_comment_count":5,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"10039","meta_rev_id":"de8c5f7a04abe297164d89c5fc4849f261d4aeec","_number":10039,"virtual_id_number":10039,"owner":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"actions":{},"labels":{"Code-Review":{"approved":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"all":[{"value":0,"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},{"tag":"autogenerated:gerrit:merged","value":2,"date":"2023-12-06 06:53:01.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{"-2":"This shall not be merged","-1":"I would prefer this is not merged as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","default_value":0},"Verified":{"approved":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"tag":"autogenerated:gerrit:merged","value":1,"date":"2023-12-06 06:53:01.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{"-1":"Fails"," 0":"No score","+1":"Verified"},"description":"","default_value":0},"Autosubmit":{"all":[{"value":0,"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{" 0":"Submit manually","+1":"Submit automatically"},"description":"","default_value":0,"optional":true},"All-Comments-Resolved":{"approved":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"all":[{"value":0,"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}]},"Conformant-Commit-Message":{"approved":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"all":[{"value":0,"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}]}},"removable_reviewers":[{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}],"reviewers":{"REVIEWER":[{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2023-11-14 18:29:43.000000000","updated_by":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"state":"CC"},{"updated":"2023-11-14 18:34:26.000000000","updated_by":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2023-11-14 18:35:40.000000000","updated_by":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"reviewer":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"state":"REVIEWER"},{"updated":"2023-11-14 18:35:40.000000000","updated_by":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"reviewer":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"state":"REVIEWER"}],"messages":[{"id":"caeafbfc55e140609075cbb143280fb3562fc218","tag":"autogenerated:gerrit:newWipPatchSet","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-11-14 18:29:41.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"3d3e9ffddf50c200fa6f3aae4c21c3a9c10af4a6","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-11-14 18:29:43.000000000","message":"Patch Set 1:\n\nStarted build for patchset #1 on: https://buildkite.com/tvl/depot/builds/28189","accounts_in_message":[],"_revision_number":1},{"id":"7b101cea7f19bb53d17606a29ee8bc6d88f5ce6f","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-11-14 18:34:26.000000000","message":"Patch Set 1: Verified+1\n\nBuild of patchset 1 passed: https://buildkite.com/tvl/depot/builds/28189","accounts_in_message":[],"_revision_number":1},{"id":"c397eb6596e5f643933e4abccb0c8d5d3edd10e9","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-11-14 18:35:40.000000000","message":"Patch Set 1:\n\nThis change is ready for review.","accounts_in_message":[],"_revision_number":1},{"id":"b4987a7210021d460a4789d6f9e3daf2ccc2b0b9","tag":"autogenerated:gerrit:code-owners:addReviewer","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-11-14 18:35:40.000000000","message":"\u003cGERRIT_ACCOUNT_1000001\u003e, who was added as reviewer owns the following files:\n* `tvix/eval/src/value/mod.rs`\n* `tvix/eval/src/value/thunk.rs`\n* `tvix/eval/src/vm/mod.rs`\n\n\u003cGERRIT_ACCOUNT_1000034\u003e, who was added as reviewer owns the following files:\n* `tvix/eval/src/value/mod.rs`\n* `tvix/eval/src/value/thunk.rs`\n* `tvix/eval/src/vm/mod.rs`\n","accounts_in_message":[{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}],"_revision_number":1},{"id":"b85e2abcc7e2cc1eef5137e95b8ce55632e331f0","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2023-11-19 09:39:21.000000000","message":"Patch Set 1:\n\n(2 comments)","accounts_in_message":[],"_revision_number":1},{"id":"7d461a2d959d40003c8316894752441498442c0a","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-11-25 03:03:29.000000000","message":"Patch Set 1:\n\n(2 comments)","accounts_in_message":[],"_revision_number":1},{"id":"edf3232e5cd4086445cf161a47568d3c71751b94","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-11-25 03:04:09.000000000","message":"Uploaded patch set 2.\n\nOutdated Votes:\n* Verified+1 (copy condition: \"(**is:ANY** AND changekind:NO_CODE_CHANGE) OR changekind:NO_CHANGE\")\n","accounts_in_message":[],"_revision_number":2},{"id":"c2afabd4dec1a4207ee33d8df84bde916caa83a7","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-11-25 03:04:10.000000000","message":"Patch Set 2:\n\nStarted build for patchset #2 on: https://buildkite.com/tvl/depot/builds/28346","accounts_in_message":[],"_revision_number":2},{"id":"4a56a7f07ec75c3a16b0df56ac3a5705b1956a28","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-11-25 03:07:44.000000000","message":"Patch Set 2: Verified+1\n\nBuild of patchset 2 passed: https://buildkite.com/tvl/depot/builds/28346","accounts_in_message":[],"_revision_number":2},{"id":"3aa0db9ee229239895cd4734d9a15d0e5de859a8","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-11-25 05:51:12.000000000","message":"Uploaded patch set 3.\n\nOutdated Votes:\n* Verified+1 (copy condition: \"(**is:ANY** AND changekind:NO_CODE_CHANGE) OR changekind:NO_CHANGE\")\n","accounts_in_message":[],"_revision_number":3},{"id":"78dba00b0e361008c531568f57fa6847a05f262b","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-11-25 05:51:13.000000000","message":"Patch Set 3:\n\nStarted build for patchset #3 on: https://buildkite.com/tvl/depot/builds/28347","accounts_in_message":[],"_revision_number":3},{"id":"ddfea8ce27ca9fce2340b7130242de7ab49ac8ef","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-11-25 05:55:04.000000000","message":"Patch Set 3: Verified+1\n\nBuild of patchset 3 passed: https://buildkite.com/tvl/depot/builds/28347","accounts_in_message":[],"_revision_number":3},{"id":"8f0988a80739f5048987030b50bd355dbebb2b3c","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-11-25 05:57:03.000000000","message":"Patch Set 3:\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"c244d7d4f2f3ef9bb11db686a4e4bfa6d065ed17","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-11-25 06:54:44.000000000","message":"Uploaded patch set 4: Commit message was updated.\n\nCopied Votes:\n* Verified+1 (copy condition: \"(**is:ANY** AND **changekind:NO_CODE_CHANGE**) OR changekind:NO_CHANGE\")\n","accounts_in_message":[],"_revision_number":4},{"id":"a27a242d44085d4d43471b9aa7c06e9a37e7f3f0","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2023-11-29 14:25:07.000000000","message":"Patch Set 4: Code-Review+2","accounts_in_message":[],"_revision_number":4},{"id":"de8c5f7a04abe297164d89c5fc4849f261d4aeec","tag":"autogenerated:gerrit:merged","author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"date":"2023-12-06 06:53:01.000000000","message":"Change has been successfully rebased and submitted as 49b34183e3f2591c6e18d44689acb6fd70eab1bf","accounts_in_message":[],"_revision_number":5}],"current_revision_number":5,"current_revision":"49b34183e3f2591c6e18d44689acb6fd70eab1bf","revisions":{"50fdb8e2aafc46d8a16f131e0972f5b8332e4ede":{"kind":"REWORK","_number":1,"created":"2023-11-14 18:29:41.000000000","uploader":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"ref":"refs/changes/39/10039/1","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/39/10039/1","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/39/10039/1"}}},"commit":{"parents":[{"commit":"d7184071c85774683613556bc4feccc7bdb5dc3d","subject":"refactor(tvix/eval): add ThunkRepr::is_forced()","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dd7184071c85774683613556bc4feccc7bdb5dc3d"}]}],"author":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-14 18:23:42.000000000","tz":-480},"committer":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-14 18:29:31.000000000","tz":-480},"subject":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form","message":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form\n\nThis commit rewrites Thunk::force() so that it is not (directly)\nself-recursive.  It maintains a Vec of all the\npreviously-encountered thunks which point to the one it is currently\nforcing, rather than recursively calling itself.\n\nIt is still possible for Thunk::force() to recurse, indirectly, by\nway of generators::request_enter_lambda().  I have ideas about how\nto avoid that.\n\nChange-Id: I6179b8abb2ea0492180fcb347f37595a14665777\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d50fdb8e2aafc46d8a16f131e0972f5b8332e4ede"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d50fdb8e2aafc46d8a16f131e0972f5b8332e4ede"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"d7184071c85774683613556bc4feccc7bdb5dc3d","is_merged_in_target_branch":false,"change_id":"I4eab5c81fb82337da06327248845cd2f3a4490d3","change_number":10038,"patch_set_number":1,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"8a86029be1fc37e779093ff22f51d4d8d71aefdf":{"kind":"REWORK","_number":2,"created":"2023-11-25 03:04:09.000000000","uploader":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"ref":"refs/changes/39/10039/2","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/39/10039/2","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/39/10039/2"}}},"commit":{"parents":[{"commit":"512346ba0b85c89fc0d16558962c3a946a8c98c3","subject":"refactor(tvix/eval): add ThunkRepr::is_forced()","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d512346ba0b85c89fc0d16558962c3a946a8c98c3"}]}],"author":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-14 18:23:42.000000000","tz":-480},"committer":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-25 03:03:41.000000000","tz":-480},"subject":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form","message":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form\n\nThis commit rewrites Thunk::force() so that it is not (directly)\nself-recursive.  It maintains a Vec of all the\npreviously-encountered thunks which point to the one it is currently\nforcing, rather than recursively calling itself.\n\nIt is still possible for Thunk::force() to recurse, indirectly, by\nway of generators::request_enter_lambda().  I have ideas about how\nto avoid that.\n\nThis saves the cost of a round-trip through the generator machinery\nfor the generators::request_force() which is removed by this commit.\n\nOnce a similar transformation has been applied to nix_cmp(),\nnix_add(), nix_eq(), and coerce_to_string(), those four functions,\nalong with Thunk::force(), will make non-tail calls only to each\nother.  If they are then merged into a single function\nValue::walk(), that function will be tail-recursive, and will not\nneed to use the generator machinery at all.\n\nThe goal here is to use generators for builtins only, so that the\ninner \"tight loop\" of the interpreter doesn\u0027t pay the costs that\ncome with it in terms of performance or complex nonlocal flow\ncontrol.\n\nChange-Id: I6179b8abb2ea0492180fcb347f37595a14665777\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d8a86029be1fc37e779093ff22f51d4d8d71aefdf"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d8a86029be1fc37e779093ff22f51d4d8d71aefdf"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"512346ba0b85c89fc0d16558962c3a946a8c98c3","is_merged_in_target_branch":true,"change_id":"I4eab5c81fb82337da06327248845cd2f3a4490d3","change_number":10038,"patch_set_number":3,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"078018f5ac2fa0f5bbf9a5cec7ba497a8ace0174":{"kind":"REWORK","_number":3,"created":"2023-11-25 05:51:12.000000000","uploader":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"ref":"refs/changes/39/10039/3","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/39/10039/3","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/39/10039/3"}}},"commit":{"parents":[{"commit":"512346ba0b85c89fc0d16558962c3a946a8c98c3","subject":"refactor(tvix/eval): add ThunkRepr::is_forced()","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d512346ba0b85c89fc0d16558962c3a946a8c98c3"}]}],"author":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-14 18:23:42.000000000","tz":-480},"committer":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-25 05:51:01.000000000","tz":-480},"subject":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form","message":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form\n\nThis commit rewrites Thunk::force() so that it is not (directly)\nself-recursive.  It maintains a Vec of all the\npreviously-encountered thunks which point to the one it is currently\nforcing, rather than recursively calling itself.\n\nIt is still possible for Thunk::force() to recurse, indirectly, by\nway of generators::request_enter_lambda().  I have ideas about how\nto avoid that.\n\nThis saves the cost of a round-trip through the generator machinery\nfor the generators::request_force() which is removed by this commit.\n\nOnce a similar transformation has been applied to nix_cmp(),\nnix_add(), nix_eq(), and coerce_to_string(), those four functions,\nalong with Thunk::force(), will make non-tail calls only to each\nother.  If they are then merged into a single function\nValue::walk(), that function will be tail-recursive, and will not\nneed to use the generator machinery at all.\n\nThe goal here is to use generators for **builtins only**, so that\nthe inner \"tight loop\" of the interpreter doesn\u0027t pay the costs that\ncome with it in terms of performance or complex nonlocal flow\ncontrol.  Calls from the VM to these builtins can then be blocking\ncalls, allowing to eliminate `async` from the parts of tvix that\naren\u0027t actually concurrent (i.e. non-builtins).\n\nKey point: these blocking calls from the VM to the builtins don\u0027t\nneed to be tail-recursive!  Cppnix will overflow the stack if you\nmanage to do a MAX_STACK_DEPTH-deep nested recursion which passes\nthrough a builtin (e.g. builtins.sort()) on each call.\n\nChange-Id: I6179b8abb2ea0492180fcb347f37595a14665777\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d078018f5ac2fa0f5bbf9a5cec7ba497a8ace0174"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d078018f5ac2fa0f5bbf9a5cec7ba497a8ace0174"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"512346ba0b85c89fc0d16558962c3a946a8c98c3","is_merged_in_target_branch":true,"change_id":"I4eab5c81fb82337da06327248845cd2f3a4490d3","change_number":10038,"patch_set_number":3,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"84ef79500e1182a63db0d3cde2209e5c17795228":{"kind":"NO_CODE_CHANGE","_number":4,"created":"2023-11-25 06:54:44.000000000","uploader":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"ref":"refs/changes/39/10039/4","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/39/10039/4","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/39/10039/4"}}},"commit":{"parents":[{"commit":"512346ba0b85c89fc0d16558962c3a946a8c98c3","subject":"refactor(tvix/eval): add ThunkRepr::is_forced()","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d512346ba0b85c89fc0d16558962c3a946a8c98c3"}]}],"author":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-14 18:23:42.000000000","tz":-480},"committer":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-25 06:40:47.000000000","tz":-480},"subject":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form","message":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form\n\nThis commit rewrites Thunk::force() so that it is not (directly)\nself-recursive.  It maintains a Vec of all the\npreviously-encountered thunks which point to the one it is currently\nforcing, rather than recursively calling itself.\n\nBenefits:\n\n- Short term:\n\n  This commit saves the cost of a round-trip through the generator\n  machinery for the generators::request_force() which is removed by\n  this commit.\n\n- Medium term:\n\n  Once a similar transformation has been applied to nix_cmp(),\n  nix_add(), nix_eq(), and coerce_to_string(), those four functions,\n  along with Thunk::force(), will make non-tail calls only to each\n  other.  They can then be merged into a single tail-recursive\n  function which does not use the generator machinery at all:\n\n    enum Task { Cmp, Add, Eq, CoerceToString, Force};\n\n    fn Value::walk(task:Task, v1:Value, v2:Value) {\n      // ...\n\n- Long term:\n\n  The long-term goal here is to use generators **only for builtins**\n  and [Marionette]-style remote control of the VM.  In other words:\n  use `async` for things that actually involve concurrency.  Calls\n  from the VM to builtins can then be blocking calls, because even\n  cppnix will overflow the stack if you make a MAX_STACK_DEPTH-deep\n  recursive call which passes through a builtin at every stack frame\n  (e.g. `{ func \u003d builtins.sort (a: b: ... func ...) ...}`).\n\n  This way the inner \"tight loop\" of the interpreter doesn\u0027t pay the\n  costs of `async` and generators.  These costs manifest in terms\n  of: performance, complex nonlocal control flow, and language\n  impediments (async Rust is a restricted subset of real Rust, and\n  is missing things like traits).\n\n[Marionette]: https://firefox-source-docs.mozilla.org/testing/marionette/Intro.html\n\nChange-Id: I6179b8abb2ea0492180fcb347f37595a14665777\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d84ef79500e1182a63db0d3cde2209e5c17795228"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d84ef79500e1182a63db0d3cde2209e5c17795228"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"512346ba0b85c89fc0d16558962c3a946a8c98c3","is_merged_in_target_branch":true,"change_id":"I4eab5c81fb82337da06327248845cd2f3a4490d3","change_number":10038,"patch_set_number":3,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"49b34183e3f2591c6e18d44689acb6fd70eab1bf":{"kind":"REWORK","_number":5,"created":"2023-12-06 06:53:01.000000000","uploader":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"ref":"refs/changes/39/10039/5","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/39/10039/5","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/5 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/5 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/39/10039/5 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/39/10039/5"}}},"commit":{"parents":[{"commit":"8135a8d38cefdc4632b3c85fdbb663d067f91248","subject":"fix(tvix/eval): Return error rather than panicking on bad substring","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d8135a8d38cefdc4632b3c85fdbb663d067f91248"}]}],"author":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-11-14 18:23:42.000000000","tz":-480},"committer":{"name":"Adam Joseph","email":"adam@westernsemico.com","date":"2023-12-06 06:53:01.000000000","tz":0},"subject":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form","message":"feat(tvix/eval): rewrite Thunk::force() in nonrecursive form\n\nThis commit rewrites Thunk::force() so that it is not (directly)\nself-recursive.  It maintains a Vec of all the\npreviously-encountered thunks which point to the one it is currently\nforcing, rather than recursively calling itself.\n\nBenefits:\n\n- Short term:\n\n  This commit saves the cost of a round-trip through the generator\n  machinery for the generators::request_force() which is removed by\n  this commit.\n\n- Medium term:\n\n  Once a similar transformation has been applied to nix_cmp(),\n  nix_add(), nix_eq(), and coerce_to_string(), those four functions,\n  along with Thunk::force(), will make non-tail calls only to each\n  other.  They can then be merged into a single tail-recursive\n  function which does not use the generator machinery at all:\n\n    enum Task { Cmp, Add, Eq, CoerceToString, Force};\n\n    fn Value::walk(task:Task, v1:Value, v2:Value) {\n      // ...\n\n- Long term:\n\n  The long-term goal here is to use generators **only for builtins**\n  and [Marionette]-style remote control of the VM.  In other words:\n  use `async` for things that actually involve concurrency.  Calls\n  from the VM to builtins can then be blocking calls, because even\n  cppnix will overflow the stack if you make a MAX_STACK_DEPTH-deep\n  recursive call which passes through a builtin at every stack frame\n  (e.g. `{ func \u003d builtins.sort (a: b: ... func ...) ...}`).\n\n  This way the inner \"tight loop\" of the interpreter doesn\u0027t pay the\n  costs of `async` and generators.  These costs manifest in terms\n  of: performance, complex nonlocal control flow, and language\n  impediments (async Rust is a restricted subset of real Rust, and\n  is missing things like traits).\n\n[Marionette]: https://firefox-source-docs.mozilla.org/testing/marionette/Intro.html\n\nChange-Id: I6179b8abb2ea0492180fcb347f37595a14665777\nReviewed-on: https://cl.tvl.fyi/c/depot/+/10039\nReviewed-by: tazjin \u003ctazjin@tvl.su\u003e\nTested-by: BuildkiteCI\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d49b34183e3f2591c6e18d44689acb6fd70eab1bf"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d49b34183e3f2591c6e18d44689acb6fd70eab1bf"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"8135a8d38cefdc4632b3c85fdbb663d067f91248","is_merged_in_target_branch":true,"change_id":"I5a4261f2ff250874cd36489ef598dcf886669d04","change_number":10199,"patch_set_number":2,"change_status":"MERGED"}],"branch":"refs/heads/canon","description":"Rebase"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~PrologRule","status":"CLOSED","labels":[{"label":"Autosubmit","status":"MAY"},{"label":"Conformant-Commit-Message","status":"OK","applied_by":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"}},{"label":"All-Comments-Resolved","status":"OK","applied_by":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"}},{"label":"Verified","status":"OK","applied_by":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"OK","applied_by":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"}}]},{"rule_name":"Code-Owners","status":"CLOSED"}],"submit_requirements":[{"name":"All-Comments-Resolved","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:All-Comments-Resolved\u003dgerrit~PrologRule","fulfilled":true,"status":"PASS","passing_atoms":["label:All-Comments-Resolved\u003dgerrit~PrologRule"],"failing_atoms":[]}},{"name":"Verified","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Verified\u003dgerrit~PrologRule","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dgerrit~PrologRule"],"failing_atoms":[]}},{"name":"Code-Owners","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"rule:Code-Owners","fulfilled":true,"status":"PASS","passing_atoms":["Code-Owners"],"failing_atoms":[]}},{"name":"Conformant-Commit-Message","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Conformant-Commit-Message\u003dgerrit~PrologRule","fulfilled":true,"status":"PASS","passing_atoms":["label:Conformant-Commit-Message\u003dgerrit~PrologRule"],"failing_atoms":[]}},{"name":"Code-Review","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Code-Review\u003dgerrit~PrologRule","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dgerrit~PrologRule"],"failing_atoms":[]}}]}
