annotate Jint.Runtime/VM/OpCodes/ConditionOp.cs @ 8:5b2302d3ac4f default tip

Слияние
author cin
date Wed, 30 Oct 2013 20:44:42 +0400
parents cb13da6e3349
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
cb13da6e3349 simple loop test
cin
parents:
diff changeset
1 using System;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
2 using System.Collections.Generic;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
3 using System.Linq;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
4 using System.Text;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
5
cb13da6e3349 simple loop test
cin
parents:
diff changeset
6 namespace Jint.Runtime.VM.OpCodes {
cb13da6e3349 simple loop test
cin
parents:
diff changeset
7 class ConditionOp: IInstruction {
cb13da6e3349 simple loop test
cin
parents:
diff changeset
8 int m_test;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
9 IInstruction m_success;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
10 IInstruction m_fail;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
11
cb13da6e3349 simple loop test
cin
parents:
diff changeset
12 public ConditionOp(int test, IInstruction success, IInstruction fail) {
cb13da6e3349 simple loop test
cin
parents:
diff changeset
13 m_test = test;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
14 m_success = success;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
15 m_fail = fail;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
16 }
cb13da6e3349 simple loop test
cin
parents:
diff changeset
17
cb13da6e3349 simple loop test
cin
parents:
diff changeset
18 public IInstruction Invoke(Frame frame) {
cb13da6e3349 simple loop test
cin
parents:
diff changeset
19 return frame.GetConverted<bool>(m_test) ? m_success : m_fail;
cb13da6e3349 simple loop test
cin
parents:
diff changeset
20 }
cb13da6e3349 simple loop test
cin
parents:
diff changeset
21 }
cb13da6e3349 simple loop test
cin
parents:
diff changeset
22 }