List.fold_left
(fun
(stack,scope,count,bytes)
- {op=op;args=args;stack=st;scope=sc;count=c} ->
+ {op=op;prefix=prefix;args=args;stack=st;scope=sc;count=c} ->
let by =
- (Bytes.u8 op)::args cmap in
+ List.concat [
+ prefix cmap;
+ [Bytes.u8 op];
+ args cmap] in
add stack st,add scope sc,count+c,by::bytes)
(init,init,1,[]) configs in
let info =
Printf.printf "type config = {
op:int;
args: Cpool.cmap -> Bytes.t list;
+ prefix: Cpool.cmap -> Bytes.t list;
const: Cpool.clist;
stack: int;
scope: int;
let default = {
op=0;
args=const [];
+ prefix=const [];
const= Cpool.empty;
stack=0;
scope=0;
GreaterEquals: op=0xb0; stack= ~-1
# if
-Label of Label.t: op=0x09; args=const [label arg0]
+Label of Label.t: op=0x09; prefix=const [label arg0]
IfNlt of Label.t: op=0x0c; stack= ~-1; args=const [label_ref arg0]
IfNle of Label.t: op=0x0d; stack= ~-1; args=const [label_ref arg0]
IfNgt of Label.t: op=0x0e; stack= ~-1; args=const [label_ref arg0]