Open
Description
With this example,
class Number{
constructor(_value){
this.value=_value;
}
_andset(_value){
return new Number(this.value&=_value)
}
}
var a=new Number(0xff);
var b=1;
b=a&=0x0f
Console::outln("a:{0} b:{1}",a,b)
the output is the following,
a:{"value":15} b:15
b=a&=15
is performing a AND SET first and then assigns to b. 'b' should be also the object 'a'.
As a solution it should override the source of the "stackelement" slot with the latest stackelement written in the stack implemented in the virtual machine module store (i.e vm_store.cpp) .