annotate Jint.Runtime/VM/IntegerBinder.cs @ 2:4aed85a1f558

implemented simple vm2
author cin
date Fri, 25 Oct 2013 15:52:16 +0400
parents e113095f1de0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
1 using System;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
2
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
3 namespace Jint.Runtime.VM
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
4 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
5 public class IntegerBinder: IBinder<int>
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
6 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
7 #region IBinder implementation
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
8
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
9
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
10
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
11 #endregion
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
12
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
13 #region IBinder implementation
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
14
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
15 public bool Equals (int arg1, int arg2)
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
16 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
17 throw new NotImplementedException ();
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
18 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
19
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
20 public int Compare (int arg1, int arg2)
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
21 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
22 throw new NotImplementedException ();
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
23 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
24
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
25 public T2 Convert<T2> (int arg)
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
26 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
27 return (T2)Convert.ChangeType(arg,typeof(T2)) ;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
28 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
29 public int OpAdd (int arg1, int arg2)
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
30 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
31 return arg1 + arg2;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
32 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
33
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
34 public int OpSub (int arg1, int arg2)
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
35 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
36 return arg1 - arg2;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
37 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
38
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
39 public int OpMul (int arg1, int arg2)
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
40 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
41 return arg1 * arg2;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
42 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
43
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
44 #endregion
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
45 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
46 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
47