-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[move] add return locations to source map #19885
[move] add return locations to source map #19885
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
6f95874
to
33204de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great to me modulo the comments on naming. Once that's fixed though you're good to land :)
@@ -47,6 +47,11 @@ macro_rules! record_src_loc { | |||
.source_map | |||
.add_parameter_mapping($context.current_function_definition_index(), source_name)?; | |||
}}; | |||
(_return: $context:expr, $_type:expr) => {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd probably use return_
here. We usually have the convention of "suffix _
to shadow a keyword" and "prefix _
to mean an unused or ignored variable".
@@ -907,6 +914,9 @@ fn compile_function_body_impl( | |||
for (var, _) in ast_function.signature.formals.into_iter() { | |||
record_src_loc!(parameter: context, var) | |||
} | |||
for _type in ast_function.signature.return_type.into_iter() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Same thing here on using a suffix _
for this variable name.
@@ -1726,6 +1741,9 @@ fn compile_function_body_bytecode( | |||
function_frame.define_local(&var.value, sig.clone())?; | |||
record_src_loc!(parameter: context, var); | |||
} | |||
for _type in return_type { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto here on naming.
33204de
to
39d21ae
Compare
Description
Describe the changes or additions included in this PR.
Test plan
How did you test the new or updated feature?
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.