示例#1
0
文件: Opcode.cs 项目: CalebJ2/KOS
 public override void Execute(ICpu cpu)
 {
     Structure value = PopStructureAssertEncapsulated(cpu);
     // Convert to string instead of cast in case the identifier is stored
     // as an encapsulated StringValue, preventing an unboxing collision.
     var identifier = Convert.ToString(cpu.PopStack());
     cpu.SetGlobal(identifier, value);
 }
示例#2
0
 public override void Execute(ICpu cpu)
 {
     object value = PopValueAssert(cpu);
     var identifier = (string)cpu.PopStack();
     cpu.SetGlobal(identifier, value);
 }