You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, block objects are not properly implemented.
Block objects have a couple of interesting properties:
They share local variables with an "owner" object
They have a trigger count n that must be > 0 and the object must be triggered n times before it actually starts (via OBJECT_TRIG)
So, we need to figure out how to encode these two properties in the assembly language.
Also we need to fix the allocation of local variables. There are comments in the LMS2012 source code that indicate that the object header for blocks should have a local variable size of 0. However, code generated by the official EV3 programming software uses the same size as the owner object instead of 0.
The text was updated successfully, but these errors were encountered:
One idea I had for designating the "owner" of a block is only allowing block objects to be declared within the body of another block.
// compile error: block object cannot be top-level object
block Bad {
}
vmthread Thread1 {
DATA8 v1
block Block1 {
// compile error: block cannot contain local variables
DATA8 v2
MOVE8_8(1,v1) // OK
block Block2 {
// block in block is OK
// is owner Block1 or Thread1? probably Thread1 since it has the local variables
}
}
}
Currently, block objects are not properly implemented.
Block objects have a couple of interesting properties:
So, we need to figure out how to encode these two properties in the assembly language.
Also we need to fix the allocation of local variables. There are comments in the LMS2012 source code that indicate that the object header for blocks should have a local variable size of 0. However, code generated by the official EV3 programming software uses the same size as the owner object instead of 0.
The text was updated successfully, but these errors were encountered: