diff options
author | John Hodge <tpg@mutabah.net> | 2018-05-12 19:05:54 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-05-12 19:05:54 +0800 |
commit | d8928895e318b026f106a30f145d6a41be74cb0f (patch) | |
tree | 4c099c70bb7fff13c2bacaa022fff7d4037f70e3 /tools/standalone_miri/main.cpp | |
parent | 5de0393d29ac0e7eb3ede52fe665fd49ac412f21 (diff) | |
download | mrust-d8928895e318b026f106a30f145d6a41be74cb0f.tar.gz |
Standalone MIRI - Fiddling around
Diffstat (limited to 'tools/standalone_miri/main.cpp')
-rw-r--r-- | tools/standalone_miri/main.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/standalone_miri/main.cpp b/tools/standalone_miri/main.cpp index c9cc7f38..b7f62252 100644 --- a/tools/standalone_miri/main.cpp +++ b/tools/standalone_miri/main.cpp @@ -378,6 +378,8 @@ Value MIRI_Invoke(ModuleTree& modtree, ::HIR::Path path, ::std::vector<Value> ar return ret; } + // TODO: Recursion limit. + TRACE_FUNCTION_R(path, path << " = " << ret); for(size_t i = 0; i < args.size(); i ++) { @@ -809,11 +811,13 @@ Value MIRI_Invoke(ModuleTree& modtree, ::HIR::Path path, ::std::vector<Value> ar switch(re.type.inner_type) { case RawType::Unreachable: throw "BUG"; - case RawType::Composite: throw "ERROR"; - case RawType::TraitObject: throw "ERROR"; - case RawType::Function: throw "ERROR"; - case RawType::Str: throw "ERROR"; - case RawType::Unit: throw "ERROR"; + case RawType::Composite: + case RawType::TraitObject: + case RawType::Function: + case RawType::Str: + case RawType::Unit: + LOG_ERROR("Casting to " << re.type << " is invalid"); + throw "ERROR"; case RawType::F32: { float dst_val = 0.0; // Can be an integer, or F64 (pointer is impossible atm) |