Skip to content

Commit

Permalink
Component linking fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Apr 9, 2024
1 parent 1921281 commit c3c0a97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/mono/mono/metadata/metadata-internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ typedef struct {
MonoTableInfo *t; /* pointer to the table */

// optimization data
gboolean metadata_has_updates;
gint32 metadata_has_updates; // -1: uninitialized. 0/1: value
const char * t_base;
guint t_row_size;
guint32 t_rows;
Expand All @@ -1173,7 +1173,7 @@ locator_init (MonoTableInfo *t, guint32 idx, guint32 col_idx)
return result;

// optimization data for decode_locator_row
result.metadata_has_updates = mono_metadata_has_updates ();
result.metadata_has_updates = -1;
result.t_base = t->base;
result.t_row_size = t->row_size;
result.t_rows = table_info_get_rows (t);
Expand Down
4 changes: 3 additions & 1 deletion src/mono/mono/metadata/metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -4684,7 +4684,9 @@ decode_locator_row (locator_t *loc, int row_index)
{
const char *data;

if (G_UNLIKELY (loc->metadata_has_updates))
if (G_UNLIKELY (loc->metadata_has_updates < 0))
loc->metadata_has_updates = mono_metadata_has_updates ();
if (G_UNLIKELY (loc->metadata_has_updates > 0))
return mono_metadata_decode_row_col_slow (loc->t, row_index, loc->col_idx);

// g_assert (col < mono_metadata_table_count (bitfield));
Expand Down

0 comments on commit c3c0a97

Please sign in to comment.