Skip to content

refactor(transformer/decorators): get statement address with GetAddress::address#9264

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-21-refactor_transformer_decorators_get_statement_address_with_getaddress_address_
Feb 21, 2025
Merged

refactor(transformer/decorators): get statement address with GetAddress::address#9264
graphite-app[bot] merged 1 commit intomainfrom
02-21-refactor_transformer_decorators_get_statement_address_with_getaddress_address_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 21, 2025

Follow-on after #9062. Pure refactor.

In all these cases, class / export is a Box, so we can use class.address() to get the address, instead of Address::from_ptr(class.as_ref()).

These 2 both do exactly the same thing, but personally I think it's preferable to avoid Address::from_ptr where we can. Address::GetAddress always produces a valid, permanent Address, whereas Address::from_ptr is a bit of a hack and can give you an unreliable Address in some cases. If we only use Address::from_ptr where we have to, it's easier to see where we have a potential sources of bugs.

Copy link
Member Author

overlookmotel commented Feb 21, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 21, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 21, 2025

CodSpeed Performance Report

Merging #9264 will not alter performance

Comparing 02-21-refactor_transformer_decorators_get_statement_address_with_getaddress_address_ (f7d95cb) with main (bad08cf)

Summary

✅ 33 untouched benchmarks

@overlookmotel overlookmotel marked this pull request as ready for review February 21, 2025 11:17
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Feb 21, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 21, 2025

Merge activity

…ess::address` (#9264)

Follow-on after #9062. Pure refactor.

In all these cases, `class` / `export` is a `Box`, so we can use `class.address()` to get the address, instead of `Address::from_ptr(class.as_ref())`.

These 2 both do exactly the same thing, but personally I think it's preferable to avoid `Address::from_ptr` where we can. `Address::GetAddress` always produces a valid, permanent `Address`, whereas `Address::from_ptr` is a bit of a hack and can give you an unreliable `Address` in some cases. If we only use `Address::from_ptr` where we *have* to, it's easier to see where we have a potential sources of bugs.
@graphite-app graphite-app bot force-pushed the 02-21-refactor_transformer_decorators_get_statement_address_with_getaddress_address_ branch from ca62ce6 to f7d95cb Compare February 21, 2025 12:47
@graphite-app graphite-app bot merged commit f7d95cb into main Feb 21, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-21-refactor_transformer_decorators_get_statement_address_with_getaddress_address_ branch February 21, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant