Ejemplo n.º 1
0
        bool emulate_Brtrue()
        {
            var val1 = instructionEmulator.pop();

            if (val1.isInt32())
            {
                return(emulateBranch(1, Int32Value.compareTrue((Int32Value)val1)));
            }
            else if (val1.isInt64())
            {
                return(emulateBranch(1, Int64Value.compareTrue((Int64Value)val1)));
            }
            else if (val1.isNull())
            {
                return(emulateBranch(1, false));
            }
            else if (val1.isObject() || val1.isString())
            {
                return(emulateBranch(1, true));
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
		bool emulate_Brtrue() {
			var val1 = instructionEmulator.pop();

			if (val1.isInt32())
				return emulateBranch(1, Int32Value.compareTrue((Int32Value)val1));
			else if (val1.isInt64())
				return emulateBranch(1, Int64Value.compareTrue((Int64Value)val1));
			else if (val1.isNull())
				return emulateBranch(1, false);
			else
				return false;
		}