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 hash intrinsic #60

Closed
pcwalton opened this issue Jun 23, 2010 · 4 comments
Closed

Implement hash intrinsic #60

pcwalton opened this issue Jun 23, 2010 · 4 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

Comments

@pcwalton
Copy link
Contributor

"hash" and "cmp" intrinsics need to be implemented (most likely with the native "intrinsic" mod syntax?)

@pcwalton
Copy link
Contributor Author

"cmp" actually doesn't need to be an intrinsic. The "<" operator should be sufficient.

@graydon
Copy link
Contributor

graydon commented Jul 18, 2010

We discussed this at some length earlier in the year when considering equality operators, and I think at the time we settled on having two variants. The "operator symbols" variants (<, == and such) we decided to make "shallow", only-slot-comparing, memcmp-like, not-following-boxes; whereas we were going to make "cmp" a library function (only defined on pure, i.e. acyclic, values) that does deep comparison.

The rationale was that we wanted to make the operator cases "most like machine operations", and also that (given a deep-compare operator is much easier to specify on acyclic structures) we didn't want == to only work on immutable types, as that would be too surprising.

I suppose we could revisit this argument.

@pcwalton
Copy link
Contributor Author

The compare intrinsic is a dupe of issue #40, so I'll make this one about hash.

@graydon
Copy link
Contributor

graydon commented Jan 27, 2011

WONTFIX (not required for bootstrapping)

oli-obk pushed a commit to oli-obk/rust that referenced this issue Jul 19, 2017
some more cleanups getting rid of intermediate allocations and bad fat ptr assumptions
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 1, 2021
djtech-dev pushed a commit to djtech-dev/rust that referenced this issue Dec 9, 2021
c272 added a commit to c272/rust that referenced this issue Jan 22, 2024
Currently, when building with `build-std`, some library build scripts
check properties of the target by inspecting the target triple at
`env::TARGET`, which is simply set to the filename of the JSON file
when using JSON target files.

This patch alters these build scripts to use `env::CARGO_CFG_*` to
fetch target information instead, allowing JSON target files
describing platforms without `restricted_std` to build correctly when
using `-Z build-std`.

Fixes wg-cargo-std-aware/rust-lang#60.
c272 added a commit to c272/rust that referenced this issue Jan 23, 2024
Currently, when building with `build-std`, some library build scripts
check properties of the target by inspecting the target triple at
`env::TARGET`, which is simply set to the filename of the JSON file
when using JSON target files.

This patch alters these build scripts to use `env::CARGO_CFG_*` to
fetch target information instead, allowing JSON target files
describing platforms without `restricted_std` to build correctly when
using `-Z build-std`.

Fixes wg-cargo-std-aware/rust-lang#60.
c272 added a commit to c272/rust that referenced this issue Jan 23, 2024
Currently, when building with `build-std`, some library build scripts
check properties of the target by inspecting the target triple at
`env::TARGET`, which is simply set to the filename of the JSON file
when using JSON target files.

This patch alters these build scripts to use `env::CARGO_CFG_*` to
fetch target information instead, allowing JSON target files
describing platforms without `restricted_std` to build correctly when
using `-Z build-std`.

Fixes wg-cargo-std-aware/rust-lang#60.
c272 added a commit to c272/rust that referenced this issue Jan 29, 2024
Currently, when building with `build-std`, some library build scripts
check properties of the target by inspecting the target triple at
`env::TARGET`, which is simply set to the filename of the JSON file
when using JSON target files.

This patch alters these build scripts to use `env::CARGO_CFG_*` to
fetch target information instead, allowing JSON target files
describing platforms without `restricted_std` to build correctly when
using `-Z build-std`.

Fixes wg-cargo-std-aware/rust-lang#60.
c272 added a commit to c272/rust that referenced this issue Feb 5, 2024
Currently, when building with `build-std`, some library build scripts
check properties of the target by inspecting the target triple at
`env::TARGET`, which is simply set to the filename of the JSON file
when using JSON target files.

This patch alters these build scripts to use `env::CARGO_CFG_*` to
fetch target information instead, allowing JSON target files
describing platforms without `restricted_std` to build correctly when
using `-Z build-std`.

Fixes wg-cargo-std-aware/rust-lang#60.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Projects
None yet
Development

No branches or pull requests

2 participants