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

Слияние
author cin
date Wed, 30 Oct 2013 20:44:42 +0400
parents a6329b092499
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
1 using System;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
2 using System.Collections.Generic;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
3 using System.Linq;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
4 using System.Text;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
5
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
6 namespace Jint.Runtime.VM.OpCodes {
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
7 delegate void BinaryInstructionImpl(int arg1, int arg2, int dest, Frame frame);
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
8
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
9 class BinaryOp: IInstruction {
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
10
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
11 int m_dest;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
12 int m_arg1;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
13 int m_arg2;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
14 Codes m_code;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
15 IInstruction m_next;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
16
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
17 public BinaryOp(Codes code, int arg1, int arg2, int dest) {
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
18 m_code = code;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
19 m_arg1 = arg1;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
20 m_arg2 = arg2;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
21 m_dest = dest;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
22 }
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
23
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
24 public IInstruction Chain(IInstruction next) {
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
25 m_next = next;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
26 return next;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
27 }
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
28
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
29 public IInstruction Invoke(Frame frame) {
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
30 //frame[m_arg1].GetBinaryImpl(m_code)(m_arg1, m_arg2, m_dest, frame);
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
31 frame[m_arg1].InvokeBinaryOperation(m_code, m_arg2, m_dest, frame);
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
32
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
33 return m_next;
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
34 }
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
35 }
a6329b092499 Added scopes, function builder
cin
parents: 3
diff changeset
36 }