Skip to content
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

LLVM: initial list[i32] implementation #484

Merged
merged 6 commits into from
May 11, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove debug prints
  • Loading branch information
certik committed May 11, 2022
commit a6885f693d431691ffb16d3ecbd580581c609ae7
3 changes: 0 additions & 3 deletions src/runtime/impure/lfortran_intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ struct _lcompilers_list_i32 {
};

LFORTRAN_API int8_t* _lcompilers_list_init_i32() {
printf("_lcompilers_list_init_i32()\n");
struct _lcompilers_list_i32 *l;
l = (struct _lcompilers_list_i32*)malloc(
sizeof(struct _lcompilers_list_i32));
Expand All @@ -696,7 +695,6 @@ LFORTRAN_API int8_t* _lcompilers_list_init_i32() {
}

LFORTRAN_API void _lcompilers_list_append_i32(int8_t* s, int32_t item) {
printf("_lcompilers_list_append_i32(*, %d)\n", item);
struct _lcompilers_list_i32 *l = (struct _lcompilers_list_i32 *)s;
if (l->n < l->capacity) {
l->p[l->n] = item;
Expand All @@ -708,7 +706,6 @@ LFORTRAN_API void _lcompilers_list_append_i32(int8_t* s, int32_t item) {

// pos is the index = 1..n
LFORTRAN_API int32_t _lcompilers_list_item_i32(int8_t* s, int32_t pos) {
printf("_lcompilers_list_item_i32(*, %d)\n", pos);
struct _lcompilers_list_i32 *l = (struct _lcompilers_list_i32 *)s;
if (pos >= 1 && pos <= l->n) {
return l->p[pos-1];
Expand Down