Skip to content

ast/parser: avoid duplicate loc copies#8142

Merged
srenatus merged 1 commit intoopen-policy-agent:mainfrom
srenatus:sr/xrzzylolkpmp
Dec 19, 2025
Merged

ast/parser: avoid duplicate loc copies#8142
srenatus merged 1 commit intoopen-policy-agent:mainfrom
srenatus:sr/xrzzylolkpmp

Conversation

@srenatus
Copy link
Copy Markdown
Contributor

Those two changes share a location, and those are read-only, so there should be no need to create two separate copies via calling p.s.Loc().


Not the answer to why parsing "every" allocates more when it doesn't contain a string literal, but fine. It should still be correct.

Those two changes share a location, and those are read-only,
so there should be no need to create two separate copies via
calling `p.s.Loc()`.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 17, 2025

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 8e15830
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/69430e178add4700088cb782
😎 Deploy Preview https://deploy-preview-8142--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@srenatus srenatus merged commit cf30a66 into open-policy-agent:main Dec 19, 2025
31 checks passed
@srenatus srenatus deleted the sr/xrzzylolkpmp branch December 19, 2025 17:26
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