Skip to content

native: fix int prints - #23747

Merged
spytheman merged 3 commits into
vlang:masterfrom
Eliyaan:fix-print-2-ints
Feb 17, 2025
Merged

spytheman merged 3 commits into
vlang:masterfrom
Eliyaan:fix-print-2-ints

Conversation

@Eliyaan

@Eliyaan Eliyaan commented Feb 17, 2025

Copy link
Copy Markdown
Member

Fix int_to_string overwriting other variables on the stack while creating the string representation of the integer.
(Some of the tests added (the for loop) were going on an infinite loop before.)
Make the size of the lenght variable of arrays allocated with allocate_array independent of the size of the stored items, now 32bits.

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-22162

Comment thread vlib/v/gen/native/amd64.v Outdated
Comment thread vlib/v/gen/native/gen.v Outdated
Comment thread vlib/v/gen/native/tests/print.vv

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent work.

@Eliyaan

Eliyaan commented Feb 17, 2025

Copy link
Copy Markdown
Member Author

Sadly the for loop from -2 to 3 does not work yet

@spytheman

Copy link
Copy Markdown
Contributor

Sadly the for loop from -2 to 3 does not work yet

no problem, just add it as a commented block + a TODO

@spytheman

Copy link
Copy Markdown
Contributor

oh, you did already; excellent

@spytheman
spytheman merged commit 7e5b58d into vlang:master Feb 17, 2025
@Eliyaan
Eliyaan deleted the fix-print-2-ints branch February 17, 2025 16:37
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