fix use of size_t in list comprehension #177

Merged
sb10q merged 1 commits from list_comp_size_t_fix into master 2022-01-25 10:03:14 +08:00
Collaborator

I found the bug when porting tests of list slice things using list comprehension.

  • gep index of an struct must be i32
  • init counter with correct initial value
  • clean up a deprecated comment
I found the bug when porting tests of list slice things using list comprehension. - gep index of an struct must be i32 - init `counter` with correct initial value - clean up a deprecated comment
sb10q reviewed 2022-01-24 20:03:10 +08:00
@ -523,8 +523,7 @@ pub fn gen_comprehension<'ctx, 'a, G: CodeGenerator>(
let zero = size_t.const_zero();
Owner

rename or just use size_t.const_zero()?

rename or just use ``size_t.const_zero()``?
ychenfo force-pushed list_comp_size_t_fix from 7c6cbe0201 to 1b220c156f 2022-01-25 02:50:32 +08:00 Compare
Author
Collaborator

Renamed to zero_64 and zero_32, and further fix the size_t issue in list comprehension for range

Renamed to `zero_64` and `zero_32`, and further fix the size_t issue in list comprehension for `range`
ychenfo force-pushed list_comp_size_t_fix from 1b220c156f to ace0e2a2c6 2022-01-25 03:36:34 +08:00 Compare
sb10q merged commit ace0e2a2c6 into master 2022-01-25 10:03:14 +08:00
sb10q deleted branch list_comp_size_t_fix 2022-01-25 10:03:14 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#177
No description provided.