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

Simplify `ConstValue::ScalarPair` #57442

Open
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
6 participants
@oli-obk
Copy link
Contributor

oli-obk commented Jan 8, 2019

While looking at #57432 I realized that some of our types for representing constants are very big. This reduces LazyConst to 3/4th of its original size and simplifies some code around slices at the same time.

r? @RalfJung

/// Needed for pattern matching code related to slices and strings.
ScalarPair(Scalar, Scalar),
/// Used only for slices and strings (`&[T]`, `&str`, `*const [T]`, `*mut str`, `Box<str>`, ...)
Slice(Scalar, u64),

This comment has been minimized.

@varkor

varkor Jan 8, 2019

Member

I like this name change; ScalarPair felt a little bit cryptic.

@RalfJung

This comment has been minimized.

Copy link
Member

RalfJung commented Jan 9, 2019

Nice! r=me with the comment fixed.

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Jan 9, 2019

@bors r=RalfJung

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 9, 2019

📌 Commit 3fba811 has been approved by RalfJung

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Jan 9, 2019

@bors r=RalfJung

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 9, 2019

📌 Commit 3177a6f has been approved by RalfJung

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 10, 2019

⌛️ Testing commit 3177a6f with merge e0f0935...

bors added a commit that referenced this pull request Jan 10, 2019

Auto merge of #57442 - oli-obk:lazy_const, r=RalfJung
Simplify `ConstValue::ScalarPair`

While looking at #57432 I realized that some of our types for representing constants are very big. This reduces `LazyConst` to 3/4th of its original size and simplifies some code around slices at the same time.

r? @RalfJung
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 10, 2019

💔 Test failed - status-appveyor

@RalfJung

This comment has been minimized.

Copy link
Member

RalfJung commented Jan 10, 2019

Log is empty. Probably spurious.

Cc @rust-lang/infra: same as #57351 (comment)

@RalfJung

This comment has been minimized.

Copy link
Member

RalfJung commented Jan 10, 2019

@bors retry

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Jan 12, 2019

Rollup merge of rust-lang#57442 - oli-obk:lazy_const, r=RalfJung
Simplify `ConstValue::ScalarPair`

While looking at rust-lang#57432 I realized that some of our types for representing constants are very big. This reduces `LazyConst` to 3/4th of its original size and simplifies some code around slices at the same time.

r? @RalfJung

bors added a commit that referenced this pull request Jan 12, 2019

Auto merge of #57554 - pietroalbini:rollup, r=pietroalbini
Rollup of 15 pull requests

Successful merges:

 - #57351 (Don't actually create a full MIR stack frame when not needed)
 - #57353 (Optimise floating point `is_finite` (2x) and `is_infinite` (1.6x).)
 - #57392 (Always calculate glob map but only for glob uses)
 - #57412 (Improve the wording)
 - #57436 (save-analysis: use a fallback when access levels couldn't be computed)
 - #57442 (Simplify `ConstValue::ScalarPair`)
 - #57453 (lldb_batchmode.py: try `import _thread` for Python 3)
 - #57454 (Some cleanups for core::fmt)
 - #57461 (Change `String` to `&'static str` in `ParseResult::Failure`.)
 - #57473 (std: Render large exit codes as hex on Windows)
 - #57474 (save-analysis: Get path def from parent in case there's no def for the path itself.)
 - #57494 (Speed up item_bodies for large match statements involving regions)
 - #57496 (re-do docs for core::cmp)
 - #57508 (rustdoc: Allow inlining of reexported crates and crate items)
 - #57547 (Use `ptr::eq` where applicable)

Failed merges:

r? @ghost
@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 13, 2019

@bors r-

Failed in rollup, #57554 (comment)

@oli-obk oli-obk force-pushed the oli-obk:lazy_const branch from 3177a6f to d7f57d4 Jan 14, 2019

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Jan 14, 2019

@bors r=RalfJung

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 14, 2019

📌 Commit d7f57d4 has been approved by RalfJung

Centril added a commit to Centril/rust that referenced this pull request Jan 14, 2019

Rollup merge of rust-lang#57442 - oli-obk:lazy_const, r=RalfJung
Simplify `ConstValue::ScalarPair`

While looking at rust-lang#57432 I realized that some of our types for representing constants are very big. This reduces `LazyConst` to 3/4th of its original size and simplifies some code around slices at the same time.

r? @RalfJung

bors added a commit that referenced this pull request Jan 14, 2019

Auto merge of #57599 - Centril:rollup, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #57442 (Simplify `ConstValue::ScalarPair`)
 - #57480 (Clean up and fix a bug in query plumbing)
 - #57481 (provide suggestion for invalid boolean cast)
 - #57540 (Modify some parser diagnostics to continue evaluating beyond the parser)
 - #57570 (Querify local `plugin_registrar_fn` and `proc_macro_decls_static`)

Failed merges:

r? @ghost
@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 15, 2019

based on #57599 (comment),
@bors r-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment