Skip to content
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

handling number literals in value sharing #3048

Merged
merged 2 commits into from
Jun 19, 2023

Conversation

colombod
Copy link
Member

@colombod colombod commented Jun 19, 2023

image

@colombod
Copy link
Member Author

@shibbas

@colombod colombod linked an issue Jun 19, 2023 that may be closed by this pull request
17 tasks

}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs cleanup or is this unfinished code?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

return Infinity;
} else if (value === "-Infinity") {
return -Infinity;
} else if (value === "NaN") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Micro-optimization micro-nitpick: NaN will be by far the most common case here and might should be checked before the others.

Copy link
Member Author

Choose a reason for hiding this comment

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

indeed

Copy link
Member Author

Choose a reason for hiding this comment

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

done

}
return value;
});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we consolidate these multiple copies of the same logic?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@colombod colombod merged commit 403a2ce into dotnet:main Jun 19, 2023
@colombod colombod deleted the NaN_serialization branch June 19, 2023 19:57
@colombod colombod added bug Something isn't working Area-Variable sharing labels Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Variable sharing bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NaN values are not properly sharable
2 participants