PR# 17390 Strange generated code
Problem Report Summary
Submitter: manus_eiffel
Category: Compiler
Priority: Medium
Date: 2011/03/02
Class: Bug
Severity: Serious
Number: 17390
Release: 6.7
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
Synopsis: Strange generated code
Description
When compiling a system in void-safe mode using Vision2, you get the following generated code for EV_DRAWING_AREA_ACTIONS_SEQUENCES.expose_actions_internal: expose_actions_internal: detachable EV_GEOMETRY_ACTION_SEQUENCE -- Implementation of once per object `expose_actions'. note option: stable attribute end; /* {EV_DRAWING_AREA_ACTION_SEQUENCES_I}.expose_actions_internal */ static EIF_TYPED_VALUE F297_4611_body (EIF_REFERENCE Current) { GTCX char *l_feature_name = "expose_actions_internal"; RTEX; EIF_REFERENCE Result = ((EIF_REFERENCE) 0); RTSN; RTDA; RTLD; RTLI(1); RTLR(0,Current); RTLU (SK_REF, &Result); RTLU (SK_REF, &Current); RTEAA(l_feature_name, 296, Current, 0, 0, 4446); RTSA(Dtype(Current)); RTSC; RTME(Dtype(Current), 0); RTGC; RTDBGEAA(296, Current, 4446); RTIV(Current, RTAL); RTVI(Current, RTAL); RTRS; RTHOOK(1); RTDBGLE; RTMD(0); RTLE; RTLO(2); RTEE; { EIF_TYPED_VALUE r; r.type = SK_REF; r.it_r = Result; return r; } } EIF_TYPED_VALUE F297_4611 (EIF_REFERENCE Current) { EIF_TYPED_VALUE r; r.type = SK_REF; if (!*(EIF_REFERENCE *)(Current + RTWA(296,34, Dtype(Current)))) { if (RTAT(RTWCT(296, 34, Current))) { *(EIF_REFERENCE *)(Current + RTWA(296,34, Dtype(Current))) = (F297_4611_body (Current)).it_r; } } r.it_r = *(EIF_REFERENCE *)(Current + RTWA(296,34, Dtype(Current))); return r; } It seems that this code is completely useless since we should have never generated a wrapper since the return type is detachable and there is no real body. I see that if a body has an assertion it does make sense, but not if it is empty, no?
To Reproduce
Problem Report Interactions