Mercurial > archived > louis > epitech > mq > rathaxes
changeset 116:2a7126613c70
WIP, add the patch from David to fix cast expansion
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Mon, 22 Jul 2013 16:04:12 -0700 |
parents | 5a663f8f0e54 |
children | f3c7e9b0c5cf |
files | rathaxes_compiler_passes_fix_placeholder_identification.patch series |
diffstat | 2 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rathaxes_compiler_passes_fix_placeholder_identification.patch Mon Jul 22 16:04:12 2013 -0700 @@ -0,0 +1,21 @@ +# HG changeset patch +# User David Pineau <dav.pineau@gmail.com> +# Parent 8ffd7987f711493f9c87e029ba0977f5126e6120 +rathaxes: fix a misuse of the unknown list in the placeholder identification pass + +Fixes "unknown" C types being incorrectly expanded to numbers. + +diff --git a/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws b/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws +--- a/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws ++++ b/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws +@@ -194,7 +194,9 @@ + // in unstrict mode + if (existVariable(ctype_ref.unknown) && $getArraySize(ctype_ref.unknown) > 0$) + { +- ctype_ref.identifier = ctype_ref.unknown#back; ++ local it; ++ createReverseIterator(it, ctype_ref.unknown); ++ ctype_ref.identifier = key(it); + removeVariable(ctype_ref.unknown); + } + // name of a type
--- a/series Mon Jul 22 13:52:00 2013 -0700 +++ b/series Mon Jul 22 16:04:12 2013 -0700 @@ -1,5 +1,6 @@ rathaxes_compiler_passes_correctly_resolve_all_variables_subidentifiers.patch rathaxes_compiler_passes_look_for_locally_casted_variables_in_sequence_calls.patch +rathaxes_compiler_passes_fix_placeholder_identification.patch rathaxes_compiler_passes_hack_injection_of_chunks_into_rvalues.patch rathaxes_samples_e1000_add_a_dma_abstraction.patch rathaxes_samples_e1000_use_the_dma_abstraction_in_socket.patch