Closed Y-Nak closed 2 months ago
Hey, could I work on this? @Y-Nak
Yes, of course!
Yes, of course!
Sweet! So this task includes mentoring from you? :) if you have any guidance on how to start with the parser, please share, otherwise I am diving into the codebase for now!
So this task includes mentoring from you?
yep!
if you have any guidance on how to start with the parser
Sorry, I made the wrong description for the issue; you don't need to modify the parser. So, the first step for this issue would be to make the name resolution handle the two types properly.
The concrete steps would be
usize
and isize
tohir::hir_def::ident::kw
.hir::hir_def::prim_ty
to accommodate those two types(IntTy
and UintTy
are the places where you would need to modify).hir::hir_def::PrimTy::all_types
so that it includes the newly added usize
and isize
in step 2.For the type checker module, the steps would be
hir_analysis::ty::ty_def::PrimTy
.impl From<HirPrimty> for TyBase
in ty_def
module.In addition to that, you probably need to modify some auxiliary methods like ty_def::PrimTy::is_integral
.
Basically, that'd be all necessary things(I might miss something, though). Please feel free to ask any questions.
Oh, currently, the head of v2
is https://github.com/ethereum/fe/pull/1007, which will be merged soon.
Please use that branch as a base.
resolved in #1012
We don't have
usize
andisize
to represent target-dependent pointer-size, which are useful, especially forusize
is primarily used for indexing into collections and working with memory sizes.isize
andusize
provide a means to write code that is portable across systems.This issue can be split up into several phases.