comparison rathaxes_compiler_passes_fix_ref_scalar_issues_with_chunk_parameters.patch @ 129:518d9c8ac70c

Clean-up the patch queue
author Louis Opter <louis@lse.epita.fr>
date Mon, 02 Sep 2013 22:59:30 -0700
parents 72b5b4a62cc5
children
comparison
equal deleted inserted replaced
128:0fdaa93ed62b 129:518d9c8ac70c
63 + } 63 + }
64 + 64 +
65 if (instanceChunk<chunkTree.instanceKey>(resVals, chunkTree.body, source_tree) == false) 65 if (instanceChunk<chunkTree.instanceKey>(resVals, chunkTree.body, source_tree) == false)
66 { 66 {
67 increment(errcount); 67 increment(errcount);
68 @@ -716,6 +735,8 @@ 68 @@ -710,17 +729,29 @@
69 // First, try to retrieve value from previous resVals, otherwise build it from chunk
70 if (varName != "self")
71 {
72 + //
73 + // XXX Note: Here, we may encounter some issues if the chunk's type_map isnt properly filled
74 + // (encountered once, the type was scalar instead of ref)
75 + //
76 + local self_reftype = "scalar";
77 + local self_rtype;
78 if (rtxNodeArgs_GetArgByName(resolverValues, varName, self) == true)
79 {
80 rtxNodeArg_getValue(self, self_value);
81 + rtxNodeArg_getRType(self, self_rtype);
82 + self_reftype = self_rtype.qualifier;
69 } 83 }
70 else 84 else
71 { 85 {
72 + traceLine(YELLOW + "[Warning] Using variable's identifier as resolved value (high probability to be wrong): " 86 + traceLine(YELLOW + "[Warning] Using variable's identifier as resolved value (high probability to be wrong): "
73 + + local_node#parent.location + DEFAULT_COLOR); 87 + + local_node#parent.location + DEFAULT_COLOR);
74 clearVariable(self_value); 88 clearVariable(self_value);
75 cnormNode_TerminalId(self_value, varName); 89 cnormNode_TerminalId(self_value, varName);
76 } 90 }
91 - rtxNodeArgs_AppendArg(resVal, "self", theChunk.type_map[varName], self_value);
92 - setall self_type = theChunk.type_map[varName];
93 + setall self_rtype = theChunk.type_map[varName];
94 + self_rtype.qualifier = self_reftype;
95 + rtxNodeArgs_AppendArg(resVal, "self", self_rtype, self_value);
96 + setall self_type = self_rtype;
97 }
98 else
99 {