Mercurial > archived > louis > epitech > mq > rathaxes
annotate 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 |
rev | line source |
---|---|
116
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
1 # HG changeset patch |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
2 # User David Pineau <dav.pineau@gmail.com> |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
3 # Parent 8ffd7987f711493f9c87e029ba0977f5126e6120 |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
4 rathaxes: fix a misuse of the unknown list in the placeholder identification pass |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
5 |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
6 Fixes "unknown" C types being incorrectly expanded to numbers. |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
7 |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
8 diff --git a/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws b/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
9 --- a/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
10 +++ b/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
11 @@ -194,7 +194,9 @@ |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
12 // in unstrict mode |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
13 if (existVariable(ctype_ref.unknown) && $getArraySize(ctype_ref.unknown) > 0$) |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
14 { |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
15 - ctype_ref.identifier = ctype_ref.unknown#back; |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
16 + local it; |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
17 + createReverseIterator(it, ctype_ref.unknown); |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
18 + ctype_ref.identifier = key(it); |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
19 removeVariable(ctype_ref.unknown); |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
20 } |
2a7126613c70
WIP, add the patch from David to fix cast expansion
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
21 // name of a type |