New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several changes on RTTI metadata for Python target #192

Merged
merged 3 commits into from Nov 6, 2017

Conversation

Projects
None yet
2 participants
@dahlia
Member

dahlia commented Nov 5, 2017

  • As I suggested from nirum-lang/nirum-python#34 (comment), now generated Python classes have __nirum_type__ attribute which contains one of 'unboxed'/'enum'/'record'/'union'/'service'. The future versions of Python runtime library would be able to utilize this rather than diagnostics using isinstance()/hasattr() queries. See also examples on test_nirum_type().

  • Also as I suggested from the same comment above, now union classes have an immutable map named __nirum_tags__ that keys are tags and values are class objects. See also examples on test_nirum_tag_classes().

  • Since the bug #185 was also applicable to union tag enums, also fixed it. See also test_union_reserved_keyword_for_tag() to reproduce the bug.

@dahlia dahlia merged commit 9a1fc0c into nirum-lang:master Nov 6, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dahlia dahlia referenced this pull request Nov 6, 2017

Merged

Leverage new RTTI metadata #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment