OSDN Git Service

f974dc4ea6b1399861cb92d56ed466b34c006127
[happyabc/happyabc.git] / swflib / instruction.txt
1 NewFunction of method_: op=0x40; stack=1; method_=Some arg0; args=fun ctx->[u30 @@ RevList.index arg0 ctx#methods];
2 NewClass of class_:op=0x58; class_=Some arg0; args=fun ctx -> [u30 @@ RevList.index arg0 ctx#classes];
3
4 # Conversion
5 Coerce: op=0x80
6 Coerce_a: op=0x82
7 Coerce_s: op=0x85
8
9 Convert_i: op=0x73
10 Convert_s: op=0x74
11 Convert_d: op=0x75
12 Convert_b: op=0x76
13 Convert_u: op=0x77
14
15 # Arith
16 Add_i:      op=0xc5; stack= ~-1
17 Subtract_i: op=0xc6; stack= ~-1
18 Multiply_i: op=0xc7; stack= ~-1
19 Add:        op=0xa0; stack= ~-1
20 Subtract:   op=0xa1; stack= ~-1
21 Multiply:   op=0xa2; stack= ~-1
22 Divide:     op=0xa3; stack= ~-1
23 Modulo:     op=0xa4; stack= ~-1
24
25 # Predicator
26 Equals: op=0xab; stack= ~-1
27 StrictEquals: op=0xac; stack= ~-1
28 LessThan: op=0xad; stack= ~-1
29 LessEquals: op=0xae; stack= ~-1
30 GreaterThan: op=0xaf; stack= ~-1
31 GreaterEquals: op=0xb0; stack= ~-1
32
33 # Jump/Conditonal Jump
34 Label of Label.t: op=0x09; prefix=const [label arg0]
35 IfNlt of Label.t: op=0x0c; stack= ~-1; args=const [label_ref arg0]
36 IfNle of Label.t: op=0x0d; stack= ~-1; args=const [label_ref arg0]
37 IfNgt of Label.t: op=0x0e; stack= ~-1; args=const [label_ref arg0]
38 IfNge of Label.t: op=0x0f; stack= ~-1; args=const [label_ref arg0]
39 Jump of Label.t:  op=0x10; args=const [label_ref arg0]
40 IfTrue of Label.t: op=0x11; stack= ~-1; args=const [label_ref arg0]
41 IfFalse of Label.t: op=0x12; stack= ~-1; args=const [label_ref arg0]
42 IfEq of Label.t: op=0x13; stack= ~-1; args=const [label_ref arg0]
43 IfNe of Label.t: op=0x14; stack= ~-1; args=const [label_ref arg0]
44 IfLt of Label.t: op=0x15; stack= ~-1; args=const [label_ref arg0]
45 IfLe of Label.t: op=0x16; stack= ~-1; args=const [label_ref arg0]
46 IfGt of Label.t: op=0x17; stack= ~-1; args=const [label_ref arg0]
47 IfGe of Label.t: op=0x18; stack= ~-1; args=const [label_ref arg0]
48 IfStrictEq of Label.t: op=0x19; stack= ~-1; args=const [label_ref arg0]
49 IfStrictNe of Label.t: op=0x1a; stack= ~-1; args=const [label_ref arg0]
50
51 # Literal
52 PushNull:             op=0x20; stack=1
53 PushUndefined:        op=0x21; stack=1
54 PushByte of int:      op=0x24; stack=1; args=const [u8  arg0]
55 PushShort of int:     op=0x25; stack=1; args=const [u30 arg0]
56 PushTrue:             op=0x26; stack=1
57 PushFalse:            op=0x27; stack=1
58 PushNaN:              op=0x28; stack=1
59 PushString of string: op=0x2C; stack=1; const=[`String arg0]; args=fun ctx -> [cindex (`String arg0) ctx]
60 PushInt of int:       op=0x2D; stack=1; const=[`Int arg0];    args=fun ctx -> [cindex (`Int arg0)    ctx]
61 PushUInt of int:      op=0x2E; stack=1; const=[`UInt arg0];   args=fun ctx -> [cindex (`UInt arg0)   ctx]
62 PushDouble of float:  op=0x2F; stack=1; const=[`Double arg0]; args=fun ctx -> [cindex (`Double arg0) ctx]
63 PushNamespace of Cpool.namespace: op=0x31; stack=1; const=[entry arg0]; args=fun ctx -> [cindex arg0 ctx]
64
65 # Scope
66 PushScope:            op=0x30; stack= ~-1; scope=1
67 PushWith:             op=0x1c; stack= ~-1; scope=1
68 GetGlobalScope:op=0x64; stack=1
69 GetScopeObject of int:op=0x65; stack=1; args=const[u8 arg0]
70
71 # Register
72 GetLocal_0: op=0xD0; stack=1;count=1
73 GetLocal_1: op=0xD1; stack=1;count=2
74 GetLocal_2: op=0xD2; stack=1;count=3
75 GetLocal_3: op=0xD3; stack=1;count=4
76 GetLocal of int: op=0x62; stack=1; args=const [u30 arg0];count=(arg0+1)
77 SetLocal_0: op=0xD4; stack=1
78 SetLocal_1: op=0xD5; stack=1
79 SetLocal_2: op=0xD6; stack=1
80 SetLocal_3: op=0xD7; stack=1
81 SetLocal of int: op=0x63; stack=1; args=const [u30 arg0]
82
83 GetSlot of int: op=0x6c; args=const [u30 arg0]
84 SetSlot of int: op=0x6d; args=const [u30 arg0]; stack= ~-2
85 GetGlobalSlot of int: op=0x6e; stack=1;    args=const [u30 arg0]
86 SetGlobalSlot of int: op=0x6f; stack= ~-1; args=const [u30 arg0]
87
88 GetLex       of Cpool.multiname: op=0x60; stack=1;    const=[entry arg0]; args=fun ctx ->[cindex arg0 ctx]
89 GetProperty  of Cpool.multiname: op=0x66;             const=[entry arg0]; args=fun ctx ->[cindex arg0 ctx]
90 SetProperty  of Cpool.multiname: op=0x61; stack= ~-2; const=[entry arg0]; args=fun ctx ->[cindex arg0 ctx]
91 InitProperty of Cpool.multiname: op=0x68; stack= ~-2; const=[entry arg0]; args=fun ctx ->[cindex arg0 ctx]
92
93 # FunctionCall
94 ReturnVoid:  op=0x47
95 ReturnValue: op=0x48; stack= ~-1
96 FindPropStrict of Cpool.multiname: op=0x5D; stack=1; const=[entry arg0]; args=fun ctx -> [cindex arg0 ctx]
97 CallProperty   of Cpool.multiname * int: op=0x46; stack= 1-arg1; const=[entry arg0]; args=fun ctx ->[cindex arg0 ctx; u30 arg1]
98 CallPropLex of Cpool.multiname * int: op=0x4c; stack= 1-arg1; const=[entry arg0]; args=fun ctx ->[cindex arg0 ctx; u30 arg1]
99 Call of int: op=0x41; stack= 1-(2+arg0); args=const [u30 arg0];
100 Pop: op=0x29; stack= ~-1
101 Swap:op=0x2b
102 PopScope:op=0x1d; scope= ~-1
103
104 NewObject of int:op=0x55; args=const [u30 arg0]; stack=1-arg0
105 NewArray of int:op=0x56; args=const [u30 arg0]
106 NewActivation:op=0x57; stack=1
107
108
109 Dup: op=0x2a; stack= 2
110
111 # Class
112
113 ConstructSuper of int: op=0x49; args=const [u30 arg0]; stack= ~-(arg0+1)
114 ConstructProp  of Cpool.multiname*int: op=0x4a; stack= ~-arg1; args=(fun ctx -> [u30 @@ Cpool.index arg0 ctx#cpool;u30 arg1]);