Repository navigation
Train: #728 (parity batch 2 group A) on master a074f49 - #731
Merged
Merged
Conversation
…ivisibleby of a str 0306: a filter or test call with *args or **kwargs (a filter block too) is bound when it runs, as Python does: the parser keeps the call's arguments and UnpackingFilter/UnpackingTester make the filter or test from their values on each evaluation. FunctionBase binds either the Load-time expressions or those values (FunctionArgs, BoundArguments), and the filters that pass arguments on (map, select/reject, applymacro, format, environment filters and tests) keep them as ForwardedArgs. A call without unpacking is bound at Load as before. 0310: FunctionBase tells an argument passed as an undefined value from one left out (IsArgumentGiven, IsArgumentSet), and the filters that test an optional argument with `is not None` treat a given Undefined as Python does: trim, replace count, truncate end/leeway, urlize trim_url_limit, wordwrap wrapstring, the attribute of join/max/min/sort/sum/unique, sum's start and the fill_with of batch/slice. sum(start=None) now adds to None as Python does. 0308: `str is divisibleby n` formats the string with Python's %, raising its TypeErrors, and is False otherwise. Corpus: 40 new cases; six allow-list lines removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AWNL7oejcYgZdf6X4vtqUK
…t fixes
The verifier found that map('map', 'map', ...) nests a native call per argument with no
stack check; unpacked arguments made that a 40-byte template. Map::Filter now calls
CheckStack. truncate checks a StrictUndefined end where Python takes len(end), and reads
end once. FunctionBase::ParseParams no longer allocates a vector to check the bound
parameters; include and tidy fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWNL7oejcYgZdf6X4vtqUK
CallArgsInfo extends CallParamsInfo, so a call that unpacks nothing is passed to the filter as it was parsed; the filter's arguments are parsed in place (assigning an expected swapped them); forwarded arguments are filled in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AWNL7oejcYgZdf6X4vtqUK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AWNL7oejcYgZdf6X4vtqUK
The perf track measured +1-2% on Render/filters, strings and config_file. - ForwardedArgs holds plain CallParamsInfo and the values of an unpacking call behind a pointer, so a call bound at Load visits no variant. - GetArgumentValue(name, context, given) reads whether the call passes the parameter in the same lookup as its value; IsArgumentSet takes that bit, so there is no second scan of the table. - ParseParams, and the Map and Tester constructors that Visit both kinds of arguments, move out of filters.cpp (function_base.cpp, filter_factories.cpp): there they changed GCC's inlining of Join and Map. Every Render row is within +0.2% of base in callgrind; Load is at or below. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AWNL7oejcYgZdf6X4vtqUK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AWNL7oejcYgZdf6X4vtqUK
Resolve the divergence allow-lists: #721 removed the 0305 lines and #728 removes the 0306/0310 lines. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DTQTriEsFrrBgcYNKDUUF4
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks #728 (696c314) on master a074f49 so CI and the perf verdict run on the merged head. Conflicts were only the divergence allow-lists (calls.txt, filters.txt): #721 removed the 0305 lines, #728 removes the 0306/0310 lines; both removals kept.
Merging this marks #728 merged. Tasks 0306, 0308 and 0310 go to done in a follow-up index PR.
Generated by Claude Code