Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Better error reporting for uninitialized global. #313

Merged
merged 2 commits into from
Dec 27, 2015

Conversation

dcurrie
Copy link
Contributor

@dcurrie dcurrie commented Dec 27, 2015

Reverse lookup in the hash table is inefficient, but useful for debugging, and only used in error reporting.

@nyuichi
Copy link
Member

nyuichi commented Dec 27, 2015

@dcurrie

Thanks for the p-r. Can you check the patch? I'll merge when the build gets fiexed.

@dcurrie
Copy link
Contributor Author

dcurrie commented Dec 27, 2015

I was surprised that the checks failed since it worked on OS X... clang compiler is usually thorough. But it appears I only tested PIC_NAN_BOXING or PIC_WORD_BOXING modes since these are automatically set on OS X x86_64. When pic_value is a struct pic_values cannot be compared with !=.

The only solution I can see is to extend khash with a val_equal parameter. I will sleep on it.

@nyuichi
Copy link
Member

nyuichi commented Dec 27, 2015

@dcurrie

Removing kh_reverse_get and iterating over khash using a for loop in the pic_reg_rev_ref function should work nice, I think? Outside khash.h you can forget about != and use pic_eq_p to compare pic_values.

@dcurrie
Copy link
Contributor Author

dcurrie commented Dec 27, 2015

@wasabiz Thanks for the suggestion... seems to pass all checks now.

nyuichi added a commit that referenced this pull request Dec 27, 2015
Better error reporting for uninitialized global.
@nyuichi nyuichi merged commit 7524633 into picrin-scheme:master Dec 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants