diff options
author | John Hodge <tpg@mutabah.net> | 2018-05-20 09:49:16 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-05-20 09:49:16 +0800 |
commit | b5b70897015ee70d62ddda9711c256ca7c720e0f (patch) | |
tree | e4e3d51c44ccfc8c17cff21353c39733e760a026 /tools | |
parent | c2cfe98c96562af2a564a6715fcd6d09c2fa9f9b (diff) | |
download | mrust-b5b70897015ee70d62ddda9711c256ca7c720e0f.tar.gz |
Standalone MIRI - A few comment notes
Diffstat (limited to 'tools')
-rw-r--r-- | tools/standalone_miri/miri.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/standalone_miri/miri.cpp b/tools/standalone_miri/miri.cpp index 63be419c..5f9c095f 100644 --- a/tools/standalone_miri/miri.cpp +++ b/tools/standalone_miri/miri.cpp @@ -1467,7 +1467,7 @@ bool InterpreterThread::pop_stack(Value& out_thread_result) } else { - // Handle callback wrappers (e.g. for __rust_maybe_catch_panic) + // Handle callback wrappers (e.g. for __rust_maybe_catch_panic, drop_value) if( this->m_stack.back().cb ) { if( !this->m_stack.back().cb(res_v, ::std::move(res_v)) ) @@ -2201,8 +2201,10 @@ bool InterpreterThread::call_intrinsic(Value& rv, const ::std::string& name, con return true; } +// TODO: Use a ValueRef instead? bool InterpreterThread::drop_value(Value ptr, const ::HIR::TypeRef& ty, bool is_shallow/*=false*/) { + // TODO: After the drop is done, flag the backing allocation for `ptr` as freed if( is_shallow ) { // HACK: Only works for Box<T> where the first pointer is the data pointer |