Fixed: code gen for system builtins

This commit is contained in:
arookas 2016-02-01 14:04:57 -05:00
parent 193374ae50
commit 76b57ca3f8

View file

@ -4,7 +4,9 @@
: base(location) { }
public override void Compile(sunCompiler compiler) {
compiler.Context.Yield.OpenCallSite(compiler, 0);
var symbol = compiler.Context.Yield;
var site = symbol.CreateCallSite(compiler, 0);
symbol.OpenRelocation(site);
compiler.Binary.WritePOP();
}
}
@ -14,7 +16,9 @@
: base(location) { }
public override void Compile(sunCompiler compiler) {
compiler.Context.Exit.OpenCallSite(compiler, 0);
var symbol = compiler.Context.Exit;
var site = symbol.CreateCallSite(compiler, 0);
symbol.OpenRelocation(site);
compiler.Binary.WritePOP();
}
}
@ -24,7 +28,9 @@
: base(location) { }
public override void Compile(sunCompiler compiler) {
compiler.Context.Lock.OpenCallSite(compiler, 0);
var symbol = compiler.Context.Lock;
var site = symbol.CreateCallSite(compiler, 0);
symbol.OpenRelocation(site);
compiler.Binary.WritePOP();
}
}
@ -34,7 +40,9 @@
: base(location) { }
public override void Compile(sunCompiler compiler) {
compiler.Context.Unlock.OpenCallSite(compiler, 0);
var symbol = compiler.Context.Unlock;
var site = symbol.CreateCallSite(compiler, 0);
symbol.OpenRelocation(site);
compiler.Binary.WritePOP();
}
}