Made variables open relocations

This automatically makes it be able to detect if the variable is used at
all, as well, as HasRelocations will be false if none of these have
executed.
This commit is contained in:
arookas 2016-02-01 12:39:30 -05:00
parent 39617cbaf7
commit d384899888

View file

@ -262,16 +262,16 @@ namespace arookas {
}
public override void CompileGet(sunCompiler compiler) {
compiler.Binary.WriteVAR(mDisplay, mIndex);
OpenRelocation(new sunVariableGetSite(this, compiler));
}
public override void CompileSet(sunCompiler compiler) {
compiler.Binary.WriteASS(mDisplay, mIndex);
OpenRelocation(new sunVariableSetSite(this, compiler));
}
public override void CompileInc(sunCompiler compiler) {
compiler.Binary.WriteINC(mDisplay, mIndex);
OpenRelocation(new sunVariableIncSite(this, compiler));
}
public override void CompileDec(sunCompiler compiler) {
compiler.Binary.WriteDEC(mDisplay, mIndex);
OpenRelocation(new sunVariableDecSite(this, compiler));
}
}