View Issue Details

IDProjectCategoryView StatusLast Update
0001248Ecere SDKcompiler:eccpublic2024-09-14 01:08
Reporterjerome Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version0.44.15 
Summary0001248: Arguments of virtual method are not evaluated if method is null
Descriptione.g., in

  a.compute(args[numArgs++], evaluator, computeType, stylesClass);

numArgs++ does not happen if a is null or if compute() is still null from an abstract class.
Additional InformationThe current generated code looks like:

  __internal_VirtualMethod ? __internal_VirtualMethod(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&a)), &args[numArgs++], evaluator, computeType, stylesClass) : (unsigned int)1;

with nothing being done in the else.

Instead, the arguments should ideally always be evaluated before the checks.

Somewhat welated to this, we could also improve on the a calling object currently being evaluated multiple times for the checks and for the this parameter.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-09-14 01:07 jerome New Issue
2024-09-14 01:07 jerome Description Updated
2024-09-14 01:07 jerome Additional Information Updated
2024-09-14 01:08 jerome Description Updated
2024-09-14 01:08 jerome Additional Information Updated
2024-09-14 01:08 jerome Description Updated
2024-09-14 01:08 jerome Additional Information Updated