projects
/
SXSI
/
xpathcomp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e4e34e6
)
Various fixes for bottom-up run.
author
Kim Nguyễn
<kn@lri.fr>
Wed, 2 May 2012 12:34:18 +0000
(14:34 +0200)
committer
Kim Nguyễn
<kn@lri.fr>
Wed, 2 May 2012 12:34:18 +0000
(14:34 +0200)
src/runtime.ml
patch
|
blob
|
history
diff --git
a/src/runtime.ml
b/src/runtime.ml
index
fa92977
..
52583c0
100644
(file)
--- a/
src/runtime.ml
+++ b/
src/runtime.ml
@@
-135,6
+135,7
@@
module Make (U : ResJIT.S) : S with type result_set = U.NS.t =
end
end else (* todo_code *) begin fun empty_slot sl1 sl2 tree node ->
let sl = choose_slot empty_slot sl1 sl2 in
end
end else (* todo_code *) begin fun empty_slot sl1 sl2 tree node ->
let sl = choose_slot empty_slot sl1 sl2 in
+ LOG( __ "bottom-up" 3 "Has todo code\n");
U.exec sl sl1 sl2 node code;
List.fold_left
(fun ares (p, q, code) ->
U.exec sl sl1 sl2 node code;
List.fold_left
(fun ares (p, q, code) ->
@@
-217,7
+218,7
@@
DEFINE LOOP_TAG (t, states, tag, ctx) = (
and l2jit_dispatch t tag states ctx opcode =
match opcode with
and l2jit_dispatch t tag states ctx opcode =
match opcode with
- | L2JIT.RETURN
_
-> nil_res
+ | L2JIT.RETURN
()
-> nil_res
| L2JIT.LEFT (tr_list, instr) ->
let res1, slot1 =
l2jit_dispatch_instr t (Tree.closing tree t) instr
| L2JIT.LEFT (tr_list, instr) ->
let res1, slot1 =
l2jit_dispatch_instr t (Tree.closing tree t) instr
@@
-238,7
+239,7
@@
DEFINE LOOP_TAG (t, states, tag, ctx) = (
l2jit_dispatch_instr t ctx instr2
in
l3jit_dispatch tr_list res1 res2 t slot1 slot2
l2jit_dispatch_instr t ctx instr2
in
l3jit_dispatch tr_list res1 res2 t slot1 slot2
- | L2JIT.CACHE
_
->
+ | L2JIT.CACHE
()
->
LOG(__ "top-down-run" 3
"Top-down cache miss for configuration %s %a"
(Tag.to_string tag) StateSet.print states);
LOG(__ "top-down-run" 3
"Top-down cache miss for configuration %s %a"
(Tag.to_string tag) StateSet.print states);
@@
-325,6
+326,8
@@
DEFINE BOTTOM_UP_NEXT(node, rest, stop) =
let nil_res = auto.bottom_states, empty_slot in
let cache = Cache.Lvl3.create 0 L3JIT.dummy in
let rec move_up node res is_left rest stop =
let nil_res = auto.bottom_states, empty_slot in
let cache = Cache.Lvl3.create 0 L3JIT.dummy in
let rec move_up node res is_left rest stop =
+ LOG(__ "bottom-up" 2 "move_up: node %i is_left %b stop %i\n"
+ (Node.to_int node) is_left (Node.to_int stop));
if node == stop then res, rest
else
(*let prev_sibling = Tree.prev_sibling tree node in *)
if node == stop then res, rest
else
(*let prev_sibling = Tree.prev_sibling tree node in *)
@@
-366,6
+369,12
@@
DEFINE BOTTOM_UP_NEXT(node, rest, stop) =
states
Translist.nil
in
states
Translist.nil
in
+ LOG( __ "bottom-up" 3 "Transition list for %s, %a, %a is %a\n"
+ (Tag.to_string tag)
+ StateSet.print s1
+ StateSet.print s2
+ Translist.print trl
+ );
let code = L3JIT.gen_code auto trl s1 s2 in
Cache.Lvl3.add cache id2 id1 tag code; code
else code
let code = L3JIT.gen_code auto trl s1 s2 in
Cache.Lvl3.add cache id2 id1 tag code; code
else code