[parser] Mark a few methods for inlining

Some recent changes to the parser looked like they should have cost
basically nothing but ended up costing a little bit anyway.
This CL marks the new functions for inlining recovering at least some of
the cost.

Change-Id: I599d557eb25bee892c8975d794618e837fec0caa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510320
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This commit is contained in:
Jens Johansen
2026-06-09 05:41:32 -07:00
parent ac477b9233
commit ba90c83168
@@ -6934,6 +6934,7 @@ class Parser {
return _parseExpression(token, /* allowCascades = */ false);
}
@pragma("vm:prefer-inline")
Token _parseExpression(Token token, bool allowCascades) {
if (isPatternsFeatureEnabled && looksLikeOuterPatternEquals(token)) {
return allowCascades
@@ -7454,6 +7455,7 @@ class Parser {
return token;
}
@pragma("vm:prefer-inline")
ConstantPatternContext _reportInvalidConstantPatternOperator(
ConstantPatternContext constantPatternContext,
int precedence,