diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-03 15:55:32 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-03 15:55:32 +0800 |
commit | 3aea6cc0390775271a2ead0b04aed05f7820ce77 (patch) | |
tree | fe030d462c3fde64e0beb332930edbfa450e0796 | |
parent | 3bc9ca27875112fda1cccacbf4035039dd41563c (diff) | |
download | mrust-3aea6cc0390775271a2ead0b04aed05f7820ce77.tar.gz |
Trans Monomorph - Note about vtable magic
-rw-r--r-- | src/trans/monomorphise.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/trans/monomorphise.cpp b/src/trans/monomorphise.cpp index e2490673..e6ae2885 100644 --- a/src/trans/monomorphise.cpp +++ b/src/trans/monomorphise.cpp @@ -7,7 +7,7 @@ */ #include "monomorphise.hpp" #include <mir/mir.hpp> - +#include <hir/hir.hpp> namespace { ::MIR::LValue monomorph_LValue(const ::HIR::Crate& crate, const Trans_Params& params, const ::MIR::LValue& tpl) @@ -132,6 +132,7 @@ namespace { auto p = params.monomorph(crate, ce); // TODO: If this is a pointer to a function on a trait object, replace with the address loaded from the vtable. // - Requires creating a new temporary for the vtable pointer. + // - Also requires knowing what the receiver is. rval = ::MIR::Constant( mv$(p) ); ) ) |