Exemplo n.º 1
0
        private void EmitI(eVM_Instruction _inst, string _val)
        {
            VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, 6));
            int count = Strings.Count;

            Strings.Add(_val);
            StringPatches.Add(VMB.Buffer.Position);
            VMB.Buffer.WriteInteger(count);
        }
Exemplo n.º 2
0
 private void Emit(eVM_Instruction _inst, VMLabel _label)
 {
     if (!_label.Marked)
     {
         _label.Patches.Add((int)VMB.Buffer.Position);
         VMB.Add(VMBuffer.EncodeInstructionBranch((int)_inst, 0));
     }
     else
     {
         long num = _label.Address - VMB.Buffer.Position;
         VMB.Add(VMBuffer.EncodeInstructionBranch((int)_inst, (int)num));
     }
 }
Exemplo n.º 3
0
 private void EmitIVar(eVM_Instruction _inst, int _var, eVM_Type _target)
 {
     VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, VMBuffer.EncodeArgDouble(5, (int)_target)));
     VMB.Buffer.WriteInteger(_var);
 }
Exemplo n.º 4
0
 private void EmitIVar(eVM_Instruction _inst, int _var)
 {
     VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, 5));
     VMB.Buffer.WriteInteger(_var);
 }
Exemplo n.º 5
0
 private void EmitI(eVM_Instruction _inst, bool _val)
 {
     VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, 4));
     VMB.Buffer.WriteBoolean(_val);
 }
Exemplo n.º 6
0
 private void EmitI(eVM_Instruction _inst, long _val)
 {
     VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, 3));
     VMB.Buffer.WriteLong(_val);
 }
Exemplo n.º 7
0
 private void EmitI(eVM_Instruction _inst, float _val)
 {
     VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, 1));
     VMB.Buffer.WriteSingle(_val);
 }
Exemplo n.º 8
0
 private void EmitI(eVM_Instruction _inst, double _val)
 {
     VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, 0));
     VMB.Buffer.WriteDouble(_val);
 }
Exemplo n.º 9
0
 private void Emit(eVM_Instruction _inst, eVM_Type _type1, eVM_Type _type2)
 {
     VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, VMBuffer.EncodeArgDouble((int)_type1, (int)_type2)));
 }
Exemplo n.º 10
0
 private void Emit(eVM_Instruction _inst, eVM_Type _type1)
 {
     VMB.Add(VMBuffer.EncodeInstructionArg((int)_inst, (int)_type1));
 }