Make renumber scratch runtime-owned #50
Reference in New Issue
Block a user
Delete Branch "12"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #12
Moves RENUMBER and target-prescan scratch storage into akbasic_Runtime, rewrites lines through one runtime-owned scratch line, and applies the mapping with in-place permutation cycles. The preflight and error behavior remain unchanged.
Verification: cmake --build build-34 --parallel 2; ctest --test-dir build-34 --output-on-failure (113/113 passed).
@@ -384,0 +389,4 @@if ( map[i] < 0 || obj->renumber_visited[i] ) {continue;}PASS(errctx, aksl_memcpy(&displaced, &obj->source[i], sizeof(displaced)));Couldn't all of these
aksl_memcpycalls in this loop beaksl_strncpy()calls sized toAKBASIC_MAX_LINE_LENGTH? That would be faster, since very few lines will fill all of the bytes in their line. We don't actually care if everything in the line gets initialized to zero, we just want the new null-terminated string in there. This would save cycles.@logikoma Couldn't all of these aksl_memcpy calls in this loop be aksl_strncpy() calls sized to AKBASIC_MAX_LINE_LENGTH? That would be faster, since very few lines will fill all of the bytes in their line. We don't actually care if everything in the line gets initialized to zero, we just want the new null-terminated string in there. This would save cycles.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.