Mercurial > archived > louis > epitech > mq > rathaxes
comparison rathaxes_compiler_passes_fix_reference_reuse.patch @ 124:ecba077e0f73
WIP
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Sat, 03 Aug 2013 20:14:51 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
123:3816844250ff | 124:ecba077e0f73 |
---|---|
1 # HG changeset patch | |
2 # User David Pineau <dav.pineau@gmail.com>, Louis Opter <louis@lse.epita.fr> | |
3 # Parent 732233e9a7ba6638d5c75ed277fce8d6de626601 | |
4 rathaxes: fix an issue raised by re-using a reference to the ResVals | |
5 | |
6 Fixes incorrectly generated rathaxes variable expansion. | |
7 | |
8 diff --git a/rathaxes/compiler/passes/common/rtxResolve.inc.cws b/rathaxes/compiler/passes/common/rtxResolve.inc.cws | |
9 --- a/rathaxes/compiler/passes/common/rtxResolve.inc.cws | |
10 +++ b/rathaxes/compiler/passes/common/rtxResolve.inc.cws | |
11 @@ -340,6 +340,7 @@ | |
12 if (existVariable(dst_p.identifiers)) | |
13 ref param_name = dst_p.identifiers#front.name; | |
14 local param_type; | |
15 + local param_src_value; | |
16 local param_value; | |
17 local src_arg; | |
18 | |
19 @@ -375,9 +376,10 @@ | |
20 if (rtxNodeArg_getRType(src_arg, param_type) == false) | |
21 return false; | |
22 setall resolver_type = param_type; | |
23 - if (rtxNodeArg_getValue(src_arg, param_value) == false) | |
24 + if (rtxNodeArg_getValue(src_arg, param_src_value) == false) | |
25 return false; | |
26 | |
27 + setall param_value = param_src_value; | |
28 // In case a recursive resolution is necessary, we need to setup a "self" | |
29 rtxNodeArgs_AppendArg(subResVal, "self", resolver_type, param_value); | |
30 } | |
31 @@ -443,6 +445,7 @@ | |
32 local src_arg; | |
33 local src_name = param_value.id; | |
34 if (rtxNodeArgs_GetArgByName(src_resVals, src_name, src_arg)) | |
35 + return false; | |
36 if (rtxNodeArg_getRType(src_arg, param_type) == false) | |
37 return false; | |
38 if (rtxNodeArg_getValue(src_arg, param_value) == false) |