From fa65e3028e0268ad32b005cd379bccf9a7b547b9 Mon Sep 17 00:00:00 2001 From: johnvg Date: Tue, 9 Apr 2013 14:13:40 +0000 Subject: in lazy record selector offsets for the garbage collector, swap the offsets, because the code generator swaps the fields in a FILE node git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2230 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- backendC/CleanCompilerSources/instructions.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'backendC') diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c index 2a97654..6234be1 100644 --- a/backendC/CleanCompilerSources/instructions.c +++ b/backendC/CleanCompilerSources/instructions.c @@ -3328,6 +3328,14 @@ static void print_result_descriptor_and_offsets (StateS field_state,int a_pos,in } else offset2=0; + if (field_state.state_object==FileObj){ + /* the code generator stores the fields in a FILE node in reversed order */ + int old_offset1; + + old_offset1=offset1; + offset1=offset2; + offset2=old_offset1; + } FPrintF (OutFile, "%s %d %d ",result_descriptor_name,offset1,offset2); } } -- cgit v1.2.3