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

Implement punycode encoding #2533

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Implement punycode encoding #2533

merged 1 commit into from
Aug 9, 2023

Conversation

tamaroning
Copy link
Contributor

@tamaroning tamaroning commented Aug 7, 2023

Addresses #2287 , #305
Depends on #2489

Added an punycode encoding function, which will be used in the v0 mangling scheme.
Decoder is not necessary because we do not need to demangle symbols.

gcc/rust/ChangeLog:

	* Make-lang.in: Add rust-punycode.o.
	* rust-lang.cc (run_rust_tests): Add selftest.
	* util/rust-punycode.cc: New file.
	* util/rust-punycode.h: New file.

Signed-off-by: Raiki Tamura <tamaron1203@gmail.com>

gcc/rust/lex/rust-input-source.h Outdated Show resolved Hide resolved
gcc/rust/lex/rust-input-source.h Outdated Show resolved Hide resolved
gcc/rust/lex/rust-input-source.h Outdated Show resolved Hide resolved
public:
// Create new input source from file.
BufferInputSource (const std::string &b, size_t offset)
: InputSource (), buffer (b), offs (offset)
Copy link
Member

Choose a reason for hiding this comment

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

InputSource default constructor is called implicitely.

Copy link
Member

@P-E-P P-E-P left a comment

Choose a reason for hiding this comment

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

Small nit. I'll merge this PR once it is fixed and the conflicts are resolved.

gcc/rust/util/rust-punycode.cc Show resolved Hide resolved
gcc/rust/ChangeLog:

	* Make-lang.in: Add rust-punycode.o.
	* rust-lang.cc (run_rust_tests): Add selftest.
	* util/rust-punycode.cc: New file.
	* util/rust-punycode.h: New file.

Signed-off-by: Raiki Tamura <tamaron1203@gmail.com>
@tamaroning
Copy link
Contributor Author

Rebased on master.

@P-E-P P-E-P added this pull request to the merge queue Aug 9, 2023
Merged via the queue into Rust-GCC:master with commit ebd449c Aug 9, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants