[IMP] compiler: improve generated compiled code

This commit is contained in:
Géry Debongnie
2021-12-22 11:33:12 +01:00
parent d160c4a628
commit e8b0f31da6
36 changed files with 939 additions and 936 deletions
@@ -10,8 +10,8 @@ exports[`t-ref can get a dynamic ref on a node 1`] = `
return function template(ctx, node, key = \\"\\") {
const refs = ctx.__owl__.refs;
const v1 = ctx['id'];
let d1 = (el) => refs[\`myspan\${v1}\`] = el;
return block1([d1]);
let ref1 = (el) => refs[\`myspan\${v1}\`] = el;
return block1([ref1]);
}
}"
`;
@@ -100,9 +100,9 @@ exports[`t-ref refs in a loop 1`] = `
let key1 = ctx['item'];
const tKey_1 = ctx['item'];
const v2 = ctx['item'];
let d1 = (el) => refs[\`\${v2}\`] = el;
let d2 = ctx['item'];
c_block2[i1] = withKey(block3([d1, d2]), tKey_1 + key1);
let ref1 = (el) => refs[\`\${v2}\`] = el;
let txt2 = ctx['item'];
c_block2[i1] = withKey(block3([ref1, txt2]), tKey_1 + key1);
}
let b2 = list(c_block2);
return block1([], [b2]);