Skip to content

Train: #728 (parity batch 2 group A) on master a074f49 - #731

Merged
rmorozov merged 7 commits into
masterfrom
claude/project-thread-53pwid
Nov 1, 2026
Merged

rmorozov merged 7 commits into
masterfrom
claude/project-thread-53pwid

Conversation

@rmorozov

@rmorozov rmorozov commented Nov 1, 2026

Copy link
Copy Markdown
Member

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

…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
@rmorozov
rmorozov marked this pull request as ready for review November 1, 2026 19:52
@rmorozov
rmorozov merged commit d629ac1 into master Nov 1, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants