diff options
| author | John Hodge <tpg@ucc.asn.au> | 2019-04-25 13:56:11 +0800 |
|---|---|---|
| committer | John Hodge <tpg@ucc.asn.au> | 2019-04-25 13:56:11 +0800 |
| commit | 967a76859749ecb602cd2c343e28888514f827bd (patch) | |
| tree | 4efa0535a2658f2c21a627fbe1e38c2e2fcbea4b /src/hir_conv | |
| parent | 7a1a685ef5e0d831f6762f1bc9171de66d933e32 (diff) | |
| download | mrust-967a76859749ecb602cd2c343e28888514f827bd.tar.gz | |
MIR - Reduce size of LValue::Static by putting the HIR::Path behind a pointer
Diffstat (limited to 'src/hir_conv')
| -rw-r--r-- | src/hir_conv/bind.cpp | 2 | ||||
| -rw-r--r-- | src/hir_conv/constant_evaluation.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/hir_conv/bind.cpp b/src/hir_conv/bind.cpp index a3b0041b..940b2cab 100644 --- a/src/hir_conv/bind.cpp +++ b/src/hir_conv/bind.cpp @@ -712,7 +712,7 @@ namespace { (Argument, ), (Static, - upper_visitor.visit_path(e, ::HIR::Visitor::PathContext::VALUE); + upper_visitor.visit_path(*e, ::HIR::Visitor::PathContext::VALUE); ), (Field, H::visit_lvalue(upper_visitor, *e.val); diff --git a/src/hir_conv/constant_evaluation.cpp b/src/hir_conv/constant_evaluation.cpp index 6049056c..6838e186 100644 --- a/src/hir_conv/constant_evaluation.cpp +++ b/src/hir_conv/constant_evaluation.cpp @@ -319,7 +319,7 @@ namespace { return args[e.idx]; ), (Static, - MIR_TODO(state, "LValue::Static - " << e); + MIR_TODO(state, "LValue::Static - " << *e); ), (Field, auto& val = get_lval(*e.val); @@ -495,7 +495,7 @@ namespace { } else if( const auto* p = e.val.opt_Static() ) { // Borrow of a static, emit BorrowPath with the same path - val = ::HIR::Literal::make_BorrowPath( p->clone() ); + val = ::HIR::Literal::make_BorrowPath( (*p)->clone() ); } else { auto inner_val = local_state.read_lval(e.val); |
