8000 Type check NewStore operands by pwaller · Pull Request #72 · llir/llvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Type check NewStore operands #72

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

Merged
merged 1 commit into from
Feb 25, 2019
Merged

Type check NewStore operands #72

merged 1 commit into from
Feb 25, 2019

Conversation

pwaller
Copy link
Member
@pwaller pwaller commented Feb 25, 2019
  • Panic if dst is not a pointer.
  • Panic if dst elem type is not equal to src type.

Updates #65.

* Panic if dst is not a pointer.
* Panic if dst elem type is not equal to src type.
Copy link
Member
@mewmew mewmew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mewmew mewmew merged commit 7bc9a55 into master Feb 25, 2019
@coveralls
Copy link
coveralls commented Feb 25, 2019

Coverage Status

Coverage increased (+0.01%) to 68.486% when pulling 40ca264 on type-check-store into b973432 on master.

@mewmew mewmew deleted the type-check-store branch February 25, 2019 15:51
mewmew added a commit to mewpull/geode that referenced this pull request Dec 30, 2019
There were two main changes of llir/llvm that required updates in Geode,
namely:

1) The sanity type-checks proposed in llir/llvm#65 and added in PR
   llir/llvm#72.
2) The API update of NewLoad, NewStore, NewGetElementPtr which added
   a elemType argument in preparation for opaque pointer types of the
   official LLVM project (see llir/llvm#112).

To resolve 1), an Equal method was added to StructType and SliceType of
gtypes.

To resolve 2) the element type was passed as the first argument to
NewLoad, NewStore and NewGetElementPtr.

Note, we've definitely noticed that working with user-defined types is
difficult and does not work well with the extensive type-switching used
in llir/llvm. The user-defined types (structs with names and slices) of
Geode have been very helpful to get a better understanding of this
limitation of llir/llvm. This has been outlined in llir/llvm#59 (comment)
and we hope to get a better design for sumtypes to allow user-defined
types, values, constants, instructions, etc.

One step at the time :)

I'm still very happy that you started the Geode project Nick as I've
learnt a lot from it and continue to learn more.

Wish you all the best and a most lovely start of the new year.

Cheers,
Robin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0