Put() public method

Set int value of the key.
Set int value of the key. If key does not exist, also set its object value to null.
public Put ( int key, int value ) : void
key int
value int
return void
Esempio n. 1
0
		/// <param name="indent">How much to indent the decompiled result</param>
		/// <param name="flags">Flags specifying format of decompilation output</param>
		internal sealed override string Decompile(int indent, int flags)
		{
			string encodedSource = GetEncodedSource();
			if (encodedSource == null)
			{
				return base.Decompile(indent, flags);
			}
			else
			{
				UintMap properties = new UintMap(1);
				properties.Put(Decompiler.INITIAL_INDENT_PROP, indent);
				return Decompiler.Decompile(encodedSource, flags, properties);
			}
		}
Esempio n. 2
0
		internal static int[] GetLineNumbers(InterpreterData data)
		{
			UintMap presentLines = new UintMap();
			byte[] iCode = data.itsICode;
			int iCodeLength = iCode.Length;
			for (int pc = 0; pc != iCodeLength; )
			{
				int bytecode = iCode[pc];
				int span = BytecodeSpan(bytecode);
				if (bytecode == Icode_LINE)
				{
					if (span != 3)
					{
						Kit.CodeBug();
					}
					int line = GetIndex(iCode, pc + 1);
					presentLines.Put(line, 0);
				}
				pc += span;
			}
			return presentLines.GetKeys();
		}