示例#1
0
文件: compiler.cs 项目: runefs/Marvin
		private void Emit (OpCode op, OpFlags flags) {
			Emit (EncodeOp (op, flags));
		}
示例#2
0
文件: compiler.cs 项目: runefs/Marvin
		public static void DecodeOp (ushort word, out OpCode op, out OpFlags flags) {
			op = (OpCode)(word & 0x00ff);
			flags = (OpFlags)(word & 0xff00);
		}
示例#3
0
文件: compiler.cs 项目: runefs/Marvin
		private void Emit (OpCode op) {
			Emit (op, (OpFlags)0);
		}
示例#4
0
文件: compiler.cs 项目: runefs/Marvin
		public static ushort EncodeOp (OpCode op, OpFlags flags) {
			return (ushort)((int)op | ((int)flags & 0xff00));
		}
示例#5
0
 private void Emit(OpCode op, OpFlags flags)
 {
     this.Emit(PatternCompiler.EncodeOp(op, flags));
 }
示例#6
0
 private void Emit(OpCode op)
 {
     this.Emit(op, OpFlags.None);
 }
示例#7
0
 public static void DecodeOp(ushort word, out OpCode op, out OpFlags flags)
 {
     op    = (OpCode)(word & 255);
     flags = (OpFlags)(word & 65280);
 }
示例#8
0
 public static ushort EncodeOp(OpCode op, OpFlags flags)
 {
     return((ushort)(op | (OpCode)(flags & (OpFlags)65280)));
 }