-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Reduce size of hir::Expr by boxing more of hir::InlineAsm
#66515
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1457,7 +1457,7 @@ pub struct Expr { | |
|
|
||
| // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger. | ||
| #[cfg(target_arch = "x86_64")] | ||
| static_assert_size!(Expr, 72); | ||
| static_assert_size!(Expr, 64); | ||
|
|
||
| impl Expr { | ||
| pub fn precedence(&self) -> ExprPrecedence { | ||
|
|
@@ -1656,7 +1656,7 @@ pub enum ExprKind { | |
| Ret(Option<P<Expr>>), | ||
|
|
||
| /// Inline assembly (from `asm!`), with its outputs and inputs. | ||
| InlineAsm(P<InlineAsm>, HirVec<Expr>, HirVec<Expr>), | ||
| InlineAsm(P<InlineAsm>), | ||
|
|
||
| /// A struct or struct-like variant literal expression. | ||
| /// | ||
|
|
@@ -2063,7 +2063,7 @@ pub struct InlineAsmOutput { | |
| // NOTE(eddyb) This is used within MIR as well, so unlike the rest of the HIR, | ||
| // it needs to be `Clone` and use plain `Vec<T>` instead of `HirVec<T>`. | ||
| #[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable)] | ||
| pub struct InlineAsm { | ||
| pub struct InlineAsmInner { | ||
oli-obk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pub asm: Symbol, | ||
| pub asm_str_style: StrStyle, | ||
| pub outputs: Vec<InlineAsmOutput>, | ||
|
|
@@ -2074,6 +2074,13 @@ pub struct InlineAsm { | |
| pub dialect: AsmDialect, | ||
| } | ||
|
|
||
| #[derive(RustcEncodable, RustcDecodable, Debug, HashStable)] | ||
| pub struct InlineAsm { | ||
| pub inner: InlineAsmInner, | ||
|
||
| pub outputs_exprs: HirVec<Expr>, | ||
| pub inputs_exprs: HirVec<Expr>, | ||
| } | ||
|
|
||
| /// Represents a parameter in a function header. | ||
| #[derive(RustcEncodable, RustcDecodable, Debug, HashStable)] | ||
| pub struct Param { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.