Mercurial > pub > Jint1
view Jint.Runtime/VM/OpCodes/ConditionOp.cs @ 6:a6329b092499
Added scopes, function builder
author | cin |
---|---|
date | Wed, 30 Oct 2013 17:38:35 +0400 |
parents | cb13da6e3349 |
children |
line wrap: on
line source
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Jint.Runtime.VM.OpCodes { class ConditionOp: IInstruction { int m_test; IInstruction m_success; IInstruction m_fail; public ConditionOp(int test, IInstruction success, IInstruction fail) { m_test = test; m_success = success; m_fail = fail; } public IInstruction Invoke(Frame frame) { return frame.GetConverted<bool>(m_test) ? m_success : m_fail; } } }