Skip to content

Commit

Permalink
Compiler: Parse_bytecode.State.start_block does not need the pc anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Mar 11, 2014
1 parent ae8debd commit b07566e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/parse_bytecode.ml
Expand Up @@ -376,7 +376,7 @@ module State = struct
{state with accu = Dummy; stack = []; env = env; env_offset = offset; {state with accu = Dummy; stack = []; env = env; env_offset = offset;
handlers = []} handlers = []}


let start_block state pc = let start_block state =
let stack = let stack =
List.fold_right List.fold_right
(fun e stack -> (fun e stack ->
Expand Down Expand Up @@ -508,7 +508,7 @@ let rec compile_block code pc state =
let len = String.length code / 4 in let len = String.length code / 4 in
let limit = next_block len pc in let limit = next_block len pc in
if debug_parser () then Format.eprintf "Compiling from %d to %d@." pc (limit - 1); if debug_parser () then Format.eprintf "Compiling from %d to %d@." pc (limit - 1);
let state = State.start_block state pc in let state = State.start_block state in
tagged_blocks := AddrSet.add pc !tagged_blocks; tagged_blocks := AddrSet.add pc !tagged_blocks;
let (instr, last, state') = compile code limit pc state [] in let (instr, last, state') = compile code limit pc state [] in
compiled_blocks := compiled_blocks :=
Expand Down

0 comments on commit b07566e

Please sign in to comment.