@@ -164,7 +164,7 @@ private static bool TryCreateInstantiationInvocation(AbstractPhaseContext contex
164164            switch  ( symbol . Name ) 
165165            { 
166166                case  "Instantiate_Extern"  when  symbol . ContainingType  ==  context . GetTypeSymbol ( typeof ( InstantiationShim ) ) : 
167-                     createdInvocation  =  new  BoundExternInvocation ( node , 
167+                     createdInvocation  =  new  BoundExternInvocation ( node ,   context , 
168168                        new  ExternSynthesizedMethodSymbol ( context , 
169169                            "VRCInstantiate.__Instantiate__UnityEngineGameObject__UnityEngineGameObject" , 
170170                            parameterExpressions . Select ( e =>  e . ValueType ) . ToArray ( ) , 
@@ -213,7 +213,7 @@ private static bool TryCreateSetProgramVariableInvocation(AbstractPhaseContext c
213213                    . GetMembers < MethodSymbol > ( "SetProgramVariable" ,  context ) 
214214                    . First ( e =>  ! e . RoslynSymbol . IsGenericMethod ) ; 
215215
216-                 createdInvocation  =  new  BoundExternInvocation ( node ,  setProgramVarObjMethod ,  instanceExpression , 
216+                 createdInvocation  =  new  BoundExternInvocation ( node ,  context ,   setProgramVarObjMethod ,  instanceExpression , 
217217                    parameterExpressions ) ; 
218218                return  true ; 
219219            } 
@@ -233,7 +233,7 @@ private static bool TryCreateArrayMethodInvocation(AbstractPhaseContext context,
233233                    . GetMembers < MethodSymbol > ( symbol . Name ,  context ) 
234234                    . First ( e =>  ! e . RoslynSymbol . IsGenericMethod  &&  e . Parameters . Length  ==  symbol . Parameters . Length ) ; 
235235
236-                 createdInvocation  =  new  BoundExternInvocation ( node ,  arrayMethod ,  instanceExpression , 
236+                 createdInvocation  =  new  BoundExternInvocation ( node ,  context ,   arrayMethod ,  instanceExpression , 
237237                    parameterExpressions ) ; 
238238                return  true ; 
239239            } 
@@ -249,7 +249,7 @@ private static bool TryCreateTMPMethodInvocation(AbstractPhaseContext context, S
249249            if  ( symbol . ContainingType  !=  null  &&  
250250                symbol . ContainingType . ToString ( )  ==  "TMPro.TMP_Text" ) 
251251            { 
252-                 createdInvocation  =  new  BoundExternInvocation ( node ,  
252+                 createdInvocation  =  new  BoundExternInvocation ( node ,  context , 
253253                    new  ExternSynthesizedMethodSymbol ( context ,  symbol . Name ,  instanceExpression . ValueType ,  symbol . Parameters . Select ( e =>  e . Type ) . ToArray ( ) ,  symbol . ReturnType ,  symbol . IsStatic ) ,  
254254                    instanceExpression , 
255255                    parameterExpressions ) ; 
@@ -269,7 +269,7 @@ private static bool TryCreateBaseEnumMethodInvocation(AbstractPhaseContext conte
269269                symbol . ContainingType  !=  null  && 
270270                symbol . ContainingType  ==  context . GetTypeSymbol ( SpecialType . System_Enum ) ) 
271271            { 
272-                 createdInvocation  =  new  BoundExternInvocation ( node ,  
272+                 createdInvocation  =  new  BoundExternInvocation ( node ,  context , 
273273                    context . GetTypeSymbol ( SpecialType . System_Object ) . GetMember < MethodSymbol > ( symbol . Name ,  context ) ,  
274274                    instanceExpression , 
275275                    parameterExpressions ) ; 
@@ -289,7 +289,7 @@ private static bool TryCreateCompareToInvocation(AbstractPhaseContext context, S
289289                symbol . ContainingType  !=  null  && 
290290                symbol . ContainingType  ==  context . GetTypeSymbol ( typeof ( IComparable ) ) ) 
291291            { 
292-                 createdInvocation  =  new  BoundExternInvocation ( node , 
292+                 createdInvocation  =  new  BoundExternInvocation ( node ,   context , 
293293                    new  ExternSynthesizedMethodSymbol ( context ,  "CompareTo" ,  instanceExpression . ValueType , 
294294                        new  [ ]  {  instanceExpression . ValueType  } , 
295295                        context . GetTypeSymbol ( SpecialType . System_Int32 ) ,  false ) , 
@@ -344,15 +344,6 @@ public static BoundInvocationExpression CreateBoundInvocation(AbstractPhaseConte
344344                if  ( CompilerUdonInterface . IsUdonEvent ( symbol . Name )  && 
345345                    symbol . ContainingType  ==  context . GetTypeSymbol ( typeof ( UdonSharpBehaviour ) ) )  // Pass through for making base calls on the U# behaviour type return noop 
346346                    return  new  BoundUdonSharpBehaviourInvocationExpression ( node ,  symbol ,  instanceExpression ,  parameterExpressions ) ; 
347-                 
348-                 var  doExposureCheck  =  ( ! symbol . IsOperator  ||  ( symbol . ContainingType  ==  null  ||  ! symbol . ContainingType . IsEnum ) ) ; 
349- 
350-                 if  ( symbol . IsOperator  &&  symbol  is  ExternBuiltinOperatorSymbol  operatorSymbol  && 
351-                     operatorSymbol . OperatorType  ==  BuiltinOperatorType . BitwiseNot ) 
352-                     doExposureCheck  =  false ; 
353-                 
354-                 if  ( doExposureCheck  &&  ! CompilerUdonInterface . IsExposedToUdon ( ( ( ExternMethodSymbol )  symbol ) . ExternSignature ) ) 
355-                     throw  new  NotExposedException ( LocStr . CE_UdonMethodNotExposed ,  node ,  $ "{ symbol . RoslynSymbol ? . ToDisplayString ( )  ??  symbol . ToString ( ) } , sig: { ( ( ExternMethodSymbol )  symbol ) . ExternSignature } ") ; 
356347
357348                if  ( symbol . IsOperator ) 
358349                { 
@@ -371,7 +362,7 @@ public static BoundInvocationExpression CreateBoundInvocation(AbstractPhaseConte
371362                            BuiltinOperatorType . UnaryNegation ,  context . GetTypeSymbol ( SpecialType . System_Boolean ) , 
372363                            context ) ; 
373364
374-                         return  new  BoundExternInvocation ( node ,  boolNotOperator ,  null ,  new  BoundExpression [ ]  { boundEqualsInvocation } ) ; 
365+                         return  new  BoundExternInvocation ( node ,  context ,   boolNotOperator ,  null ,  new  BoundExpression [ ]  { boundEqualsInvocation } ) ; 
375366                    } 
376367
377368                    if  ( node  is  AssignmentExpressionSyntax ) 
@@ -383,13 +374,13 @@ public static BoundInvocationExpression CreateBoundInvocation(AbstractPhaseConte
383374
384375                    if  ( parameterExpressions . Length  ==  2  ||  symbol . Name  ==  "op_UnaryNegation"  ||  symbol . Name  ==  "op_LogicalNot" ) 
385376                    { 
386-                         return  new  BoundBuiltinOperatorInvocationExpression ( node ,  symbol ,  parameterExpressions ) ; 
377+                         return  new  BoundBuiltinOperatorInvocationExpression ( node ,  context ,   symbol ,  parameterExpressions ) ; 
387378                    } 
388379
389380                    throw  new  NotSupportedException ( "Operator expressions must have either 1 or 2 parameters" ,  node . GetLocation ( ) ) ; 
390381                } 
391382
392-                 return  new  BoundExternInvocation ( node ,  symbol ,  instanceExpression ,  parameterExpressions ) ; 
383+                 return  new  BoundExternInvocation ( node ,  context ,   symbol ,  instanceExpression ,  parameterExpressions ) ; 
393384            } 
394385
395386            if  ( symbol . IsStatic ) 
@@ -596,8 +587,8 @@ protected void PopRecursiveValues(Value[] values, EmitContext context)
596587
597588        private  sealed  class  BoundBuiltinOperatorInvocationExpression  :  BoundExternInvocation 
598589        { 
599-             public  BoundBuiltinOperatorInvocationExpression ( SyntaxNode  node ,  MethodSymbol  method ,  BoundExpression [ ]  operandExpressions ) 
600-                 : base ( node ,  method ,  null ,  operandExpressions ) 
590+             public  BoundBuiltinOperatorInvocationExpression ( SyntaxNode  node ,  AbstractPhaseContext   context ,   MethodSymbol  method ,  BoundExpression [ ]  operandExpressions ) 
591+                 : base ( node ,  context ,   method ,  null ,  operandExpressions ) 
601592            { 
602593            } 
603594        } 
@@ -642,7 +633,7 @@ private sealed class BoundGetUnityEngineComponentInvocation : BoundExternInvocat
642633            public  override  TypeSymbol  ValueType  {  get ;  } 
643634
644635            public  BoundGetUnityEngineComponentInvocation ( AbstractPhaseContext  context ,  SyntaxNode  node ,  MethodSymbol  methodSymbol ,  BoundExpression  sourceExpression ,  BoundExpression [ ]  parametersExpressions )  
645-                 :  base ( node ,  BuildMethod ( context ,  methodSymbol ) ,  sourceExpression ,  GetParameterExpressions ( context ,  methodSymbol ,  parametersExpressions ) ) 
636+                 :  base ( node ,  context ,   BuildMethod ( context ,  methodSymbol ) ,  sourceExpression ,  GetParameterExpressions ( context ,  methodSymbol ,  parametersExpressions ) ) 
646637            { 
647638                ValueType  =  methodSymbol . TypeArguments [ 0 ] ; 
648639
0 commit comments