comparison rathaxes_compiler_passes_fix_placeholder_identification.patch @ 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
children
comparison
equal deleted inserted replaced
115:5a663f8f0e54 116:2a7126613c70
1 # HG changeset patch
2 # User David Pineau <dav.pineau@gmail.com>
3 # Parent 8ffd7987f711493f9c87e029ba0977f5126e6120
4 rathaxes: fix a misuse of the unknown list in the placeholder identification pass
5
6 Fixes "unknown" C types being incorrectly expanded to numbers.
7
8 diff --git a/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws b/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws
9 --- a/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws
10 +++ b/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws
11 @@ -194,7 +194,9 @@
12 // in unstrict mode
13 if (existVariable(ctype_ref.unknown) && $getArraySize(ctype_ref.unknown) > 0$)
14 {
15 - ctype_ref.identifier = ctype_ref.unknown#back;
16 + local it;
17 + createReverseIterator(it, ctype_ref.unknown);
18 + ctype_ref.identifier = key(it);
19 removeVariable(ctype_ref.unknown);
20 }
21 // name of a type