diff options
-rw-r--r-- | src/mir/check_full.cpp | 7 | ||||
-rw-r--r-- | src/mir/from_hir_match.cpp | 16 | ||||
-rw-r--r-- | src/mir/mir_builder.cpp | 2 | ||||
-rw-r--r-- | src/trans/target.cpp | 1 | ||||
-rw-r--r-- | vsproject/mrustc.vcxproj | 9 | ||||
-rw-r--r-- | vsproject/mrustc.vcxproj.filters | 27 |
6 files changed, 42 insertions, 20 deletions
diff --git a/src/mir/check_full.cpp b/src/mir/check_full.cpp index 52c0aaf5..cacd9bef 100644 --- a/src/mir/check_full.cpp +++ b/src/mir/check_full.cpp @@ -754,9 +754,10 @@ void MIR_Validate_FullValState(::MIR::TypeResolve& mir_res, const ::MIR::Functio TU_MATCHA( (blk.statements[i]), (se), (Assign, - #if ENABLE_LEAK_DETECTOR - // TODO: Check if the target isn't valid. Allow if either invaid, or too complex to know. - #endif + if( ENABLE_LEAK_DETECTOR ) + { + // TODO: Check if the target isn't valid. Allow if either invaid, or too complex to know. + } TU_MATCHA( (se.src), (ve), (Use, state.move_lvalue(mir_res, ve); diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp index 46331ca6..a68fd1bf 100644 --- a/src/mir/from_hir_match.cpp +++ b/src/mir/from_hir_match.cpp @@ -2240,22 +2240,6 @@ int MIR_LowerHIR_Match_Simple__GeneratePattern(MirBuilder& builder, const Span& ), (Array, TODO(sp, "Match directly on array?"); - #if 0 - unsigned int total = 0; - for( unsigned int i = 0; i < te.size_val; i ++ ) { - unsigned int cnt = MIR_LowerHIR_Match_Simple__GeneratePattern( - builder, sp, - rules, num_rules, *te.inner, - ::MIR::LValue::make_Field({ box$(match_val.clone()), i }), - fail_bb - ); - total += cnt; - rules += cnt; - num_rules -= cnt; - if( num_rules == 0 ) - return total; - } - #endif ), (Slice, ASSERT_BUG(sp, rule.is_Slice() || rule.is_SplitSlice() || (rule.is_Value() && rule.as_Value().is_Bytes()), "Can only match slice with Bytes or Slice rules - " << rule); diff --git a/src/mir/mir_builder.cpp b/src/mir/mir_builder.cpp index eb50e9f7..8cb8c088 100644 --- a/src/mir/mir_builder.cpp +++ b/src/mir/mir_builder.cpp @@ -212,7 +212,7 @@ void MirBuilder::define_variable(unsigned int idx) { auto temp = new_temporary(ty); push_stmt_assign( sp, ::MIR::LValue(temp.clone()), mv$(rv) ); - return temp; + return ::MIR::Param( mv$(temp) ); } } void MirBuilder::set_result(const Span& sp, ::MIR::RValue val) diff --git a/src/trans/target.cpp b/src/trans/target.cpp index 21555101..a85ab12a 100644 --- a/src/trans/target.cpp +++ b/src/trans/target.cpp @@ -6,6 +6,7 @@ * - Target-specific information */ #include "target.hpp" +#include <algorithm> // TODO: Replace with target selection #define POINTER_SIZE_BYTES 8 diff --git a/vsproject/mrustc.vcxproj b/vsproject/mrustc.vcxproj index 0fb37029..79f3c276 100644 --- a/vsproject/mrustc.vcxproj +++ b/vsproject/mrustc.vcxproj @@ -136,16 +136,23 @@ <ClCompile Include="..\src\ast\pattern.cpp" /> <ClCompile Include="..\src\ast\types.cpp" /> <ClCompile Include="..\src\debug.cpp" /> + <ClCompile Include="..\src\expand\asm.cpp" /> <ClCompile Include="..\src\expand\cfg.cpp" /> <ClCompile Include="..\src\expand\concat.cpp" /> + <ClCompile Include="..\src\expand\crate_tags.cpp" /> <ClCompile Include="..\src\expand\derive.cpp" /> + <ClCompile Include="..\src\expand\env.cpp" /> <ClCompile Include="..\src\expand\file_line.cpp" /> <ClCompile Include="..\src\expand\format_args.cpp" /> + <ClCompile Include="..\src\expand\include.cpp" /> <ClCompile Include="..\src\expand\lang_item.cpp" /> <ClCompile Include="..\src\expand\macro_rules.cpp" /> <ClCompile Include="..\src\expand\mod.cpp" /> + <ClCompile Include="..\src\expand\rustc_diagnostics.cpp" /> <ClCompile Include="..\src\expand\std_prelude.cpp" /> <ClCompile Include="..\src\expand\stringify.cpp" /> + <ClCompile Include="..\src\expand\test.cpp" /> + <ClCompile Include="..\src\expand\test_harness.cpp" /> <ClCompile Include="..\src\hir\crate_post_load.cpp" /> <ClCompile Include="..\src\hir\crate_ptr.cpp" /> <ClCompile Include="..\src\hir\deserialise.cpp" /> @@ -188,6 +195,7 @@ <ClCompile Include="..\src\macro_rules\parse.cpp" /> <ClCompile Include="..\src\main.cpp" /> <ClCompile Include="..\src\mir\check.cpp" /> + <ClCompile Include="..\src\mir\check_full.cpp" /> <ClCompile Include="..\src\mir\cleanup.cpp" /> <ClCompile Include="..\src\mir\dump.cpp" /> <ClCompile Include="..\src\mir\from_hir.cpp" /> @@ -221,6 +229,7 @@ <ClCompile Include="..\src\trans\enumerate.cpp" /> <ClCompile Include="..\src\trans\mangling.cpp" /> <ClCompile Include="..\src\trans\monomorphise.cpp" /> + <ClCompile Include="..\src\trans\target.cpp" /> <ClCompile Include="..\src\trans\trans_list.cpp" /> </ItemGroup> <ItemGroup> diff --git a/vsproject/mrustc.vcxproj.filters b/vsproject/mrustc.vcxproj.filters index b8a44339..8ec87927 100644 --- a/vsproject/mrustc.vcxproj.filters +++ b/vsproject/mrustc.vcxproj.filters @@ -341,6 +341,33 @@ <ClCompile Include="..\src\ident.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\src\expand\test.cpp"> + <Filter>Source Files\expand</Filter> + </ClCompile> + <ClCompile Include="..\src\expand\asm.cpp"> + <Filter>Source Files\expand</Filter> + </ClCompile> + <ClCompile Include="..\src\expand\crate_tags.cpp"> + <Filter>Source Files\expand</Filter> + </ClCompile> + <ClCompile Include="..\src\expand\env.cpp"> + <Filter>Source Files\expand</Filter> + </ClCompile> + <ClCompile Include="..\src\expand\include.cpp"> + <Filter>Source Files\expand</Filter> + </ClCompile> + <ClCompile Include="..\src\expand\rustc_diagnostics.cpp"> + <Filter>Source Files\expand</Filter> + </ClCompile> + <ClCompile Include="..\src\expand\test_harness.cpp"> + <Filter>Source Files\expand</Filter> + </ClCompile> + <ClCompile Include="..\src\trans\target.cpp"> + <Filter>Source Files\trans</Filter> + </ClCompile> + <ClCompile Include="..\src\mir\check_full.cpp"> + <Filter>Source Files\mir</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\src\common.hpp"> |