comparison rathaxes_compiler_passes_fix_local_variable_resolution_on_method_call.patch @ 126:6e142648b2fe

Wip on compiler issues
author Louis Opter <louis@lse.epita.fr>
date Sun, 18 Aug 2013 12:51:47 -0700
parents wip_fix_regression_in_rathaxes_compiler_passes_correctly_resolve_chunk_args_subidentifiers.patch@3a92a43a3215
children
comparison
equal deleted inserted replaced
125:3a92a43a3215 126:6e142648b2fe
1 # HG changeset patch
2 # Parent 1b62d6a6307fbfe6ad9ae7137d189f48b7ceb1fb
3 rathaxes: fix resolution of local variables on method call
4
5 Fix ${local.skb.init()} crazyness.
6
7 diff --git a/rathaxes/compiler/passes/common/rtxResolve.inc.cws b/rathaxes/compiler/passes/common/rtxResolve.inc.cws
8 --- a/rathaxes/compiler/passes/common/rtxResolve.inc.cws
9 +++ b/rathaxes/compiler/passes/common/rtxResolve.inc.cws
10 @@ -388,7 +388,20 @@
11 // Argument comes from the Chunk, so we retrieve the *real* type
12 // That will be resolved after the "local" resolution.
13
14 - rtxResolve_BuildLocalSelf(subResVal, theChunk, placeHolder, subidentifiers);
15 + if (subidentifiers#front == "local")
16 + rtxResolve_BuildLocalSelf(subResVal, theChunk, placeHolder, subidentifiers);
17 + else
18 + {
19 + local src_arg;
20 + local src_type;
21 + local src_value;
22 + rtxNodeArgs_GetArgByName(src_resVals, "self", src_arg);
23 + if (rtxNodeArg_getRType(src_arg, src_type) == false)
24 + return false;
25 + if (rtxNodeArg_getValue(src_arg, src_value) == false)
26 + return false;
27 + rtxNodeArgs_AppendArg(subResVal, "self", src_type, src_value);
28 + }
29 local local_self;
30 rtxNodeArgs_GetArgByName(subResVal, "self", local_self);
31 local local_type;