change wrong assertion into condition
This commit is contained in:
parent
1782c8c99e
commit
f68aae33cf
1 changed files with 7 additions and 4 deletions
|
@ -757,7 +757,7 @@ struct Sec_Hover_Fn {
|
||||||
f32 xf = ROOT::Experimental::Internal::HalfToFloat(x);
|
f32 xf = ROOT::Experimental::Internal::HalfToFloat(x);
|
||||||
return push_str8_node_child(arena, prev, fmt, xf);
|
return push_str8_node_child(arena, prev, fmt, xf);
|
||||||
});
|
});
|
||||||
// TODO
|
// XXX: these require piecing back "page-global" data and are currently unsupported.
|
||||||
// case CT::kSplitIndex64:
|
// case CT::kSplitIndex64:
|
||||||
// case CT::kSplitIndex32:
|
// case CT::kSplitIndex32:
|
||||||
// case CT::kSplitReal64:
|
// case CT::kSplitReal64:
|
||||||
|
@ -768,6 +768,7 @@ struct Sec_Hover_Fn {
|
||||||
// case CT::kSplitUInt32:
|
// case CT::kSplitUInt32:
|
||||||
// case CT::kSplitInt16:
|
// case CT::kSplitInt16:
|
||||||
// case CT::kSplitUInt16:
|
// case CT::kSplitUInt16:
|
||||||
|
// XXX: these require sub-byte addressing and are currently unsupported.
|
||||||
// case CT::kReal32Trunc:
|
// case CT::kReal32Trunc:
|
||||||
// case CT::kReal32Quant:
|
// case CT::kReal32Quant:
|
||||||
// case CT::kBit:
|
// case CT::kBit:
|
||||||
|
@ -1044,11 +1045,13 @@ struct Sec_Hover_Fn {
|
||||||
} else {
|
} else {
|
||||||
Page_Info_Node *pinfo = (Page_Info_Node *)section.info;
|
Page_Info_Node *pinfo = (Page_Info_Node *)section.info;
|
||||||
b8 display_individual = !display_grouped;
|
b8 display_individual = !display_grouped;
|
||||||
if (display_individual && pinfo) {
|
// TODO: currently we only support displaying elements whose size in bits on disk
|
||||||
assert(is_pow2(pinfo->bits_per_elem));
|
// is a multiple of 8. We should lift this requirement to be able to display stuff like
|
||||||
|
// Real32Trunc, Real32Quant etc.
|
||||||
|
if (display_individual && pinfo && is_pow2(pinfo->bits_per_elem)) {
|
||||||
u64 n_elems = std::abs(pinfo->n_elems);
|
u64 n_elems = std::abs(pinfo->n_elems);
|
||||||
u64 field_len = pinfo->bits_per_elem / 8;
|
u64 field_len = pinfo->bits_per_elem / 8;
|
||||||
// align cur_field_off to the start of the element
|
// Align cur_field_off to the start of the element.
|
||||||
u64 off_in_elems = off - cur_field_off;
|
u64 off_in_elems = off - cur_field_off;
|
||||||
off_in_elems = (off_in_elems & ~(field_len - 1));
|
off_in_elems = (off_in_elems & ~(field_len - 1));
|
||||||
u64 elem_idx = off_in_elems / field_len;
|
u64 elem_idx = off_in_elems / field_len;
|
||||||
|
|
Loading…
Add table
Reference in a new issue