Skip to content

disable implicit conversions from JSValue to integer #89

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nektro
Copy link
Member

@nektro nektro commented Jun 4, 2025

changes that found oven-sh/bun#20175

@nektro nektro requested review from 190n and dylan-conway June 4, 2025 06:13
Copy link

@190n 190n left a comment

Choose a reason for hiding this comment

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

LGTM. upstream?

@@ -71,7 +71,7 @@ ALWAYS_INLINE Register& Register::operator=(JSCell* object)

ALWAYS_INLINE Register& Register::operator=(JSScope* scope)
{
*this = JSValue(scope);
*this = JSValue::encode(JSValue(scope));
Copy link
Member

Choose a reason for hiding this comment

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

is this unnecessary with the new JSValue overload?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, good point

@@ -111,7 +112,7 @@ namespace JSC {
ALWAYS_INLINE Register::Register()
{
#ifndef NDEBUG
*this = JSValue();
u.value = JSValue::encode(JSValue());
Copy link
Member

Choose a reason for hiding this comment

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

same here?

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.

3 participants