View Issue Details

IDProjectCategoryView StatusLast Update
0031525RunnerWindows (YYC)Public2020-01-13 16:53
ReporterYellowAfterlifeAssigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionWon't Fix 
PlatformWindowsOSWindows 10 ProOS Version>=18362
Product Version2.2.4 
Target VersionFixed in Version 
Summary0031525: YYC: obj_name.field read caches in spite of subsequent write operations
instance_create_depth(0, 0, 0, obj_test); // defaults `value` to `noone`
if (obj_test.value == noone) {
    with (obj_test) value = "Hello!";
    show_debug_message("Changed value to Hello!");

will print -4 even after changing the value, since the retrieved value from line 2 is reused for line 6 read.
Additional InformationIn original encounter, event_perform was used to trigger init, and I thought that event_perform might be considered "pure" (side effect-free), but turns out that it's simpler than that.
1.4 Found In
2.x Runtime Found In9.9.1.1630
2.x Runtime Verified In



2019-11-28 20:25


a_bug.yyz (17,843 bytes)

Russell Kay

2019-12-11 14:00

Manager   ~0065206

This is a limitation on YYC it cannot handling the aliasing issues, to keep the speed higher then it cannot keep track of the variable being changed when it has been referenced in a different manner - if it had been changed in another function then it should be discarded but if it is changed in the same function but just referenced in a different way.

The current YYC compiler cannot handle the aliasing of the variables in this way (particularly the obj_name.field syntax, which I would strongly discourage the usage of), this is something we are changing with the new compiler - but it is a known limitation with the current one.


2020-01-13 16:53

Adminstrator   ~0065278

Closing as per the above comment.