From 76b57ca3f84cadc3163987b824b6c94ea55589f3 Mon Sep 17 00:00:00 2001 From: arookas Date: Mon, 1 Feb 2016 14:04:57 -0500 Subject: [PATCH] Fixed: code gen for system builtins --- ssc/ast/nodes.system.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ssc/ast/nodes.system.cs b/ssc/ast/nodes.system.cs index 156d190..ca3cb4c 100644 --- a/ssc/ast/nodes.system.cs +++ b/ssc/ast/nodes.system.cs @@ -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(); } }