public void AddExternCall(string externCall, string comment = "")
        {
            externStringSet.Add(externCall);

            AppendCommentedLine($"EXTERN, \"{externCall}\"", comment);
            programCounter += UdonSharpUtils.GetUdonInstructionSize("EXTERN");
        }
        public void AddJumpIfFalse(JumpLabel jumpTarget, string comment = "")
        {
#if USE_UDON_LABELS
            AppendCommentedLine($"JUMP_IF_FALSE, {jumpTarget.uniqueName}", comment);
#else
            if (jumpTarget.IsResolved)
            {
                AppendCommentedLine($"JUMP_IF_FALSE, {jumpTarget.AddresStr()}", comment);
            }
            else
            {
                AppendCommentedLine($"JUMP_IF_FALSE_LABEL, [{jumpTarget.uniqueName}]", comment);
            }
#endif

            programCounter += UdonSharpUtils.GetUdonInstructionSize("JUMP_IF_FALSE");
        }
 public void AddCopy(string comment = "")
 {
     AppendCommentedLine("COPY", comment);
     programCounter += UdonSharpUtils.GetUdonInstructionSize("COPY");
 }
 public void AddJumpIndirect(SymbolDefinition addressSymbol, string comment = "")
 {
     AppendCommentedLine($"JUMP_INDIRECT, {addressSymbol.symbolUniqueName}", comment);
     programCounter += UdonSharpUtils.GetUdonInstructionSize("JUMP_INDIRECT");
 }
 public void AddJumpToExit()
 {
     AppendCommentedLine($"JUMP, 0xFFFFFFFF", "");
     programCounter += UdonSharpUtils.GetUdonInstructionSize("JUMP");
 }
 private void AddPush(string heapAddress, string comment)
 {
     AppendCommentedLine($"PUSH, {heapAddress}", comment);
     programCounter += UdonSharpUtils.GetUdonInstructionSize("PUSH");
 }