Skip to content

PudgeWithMoML: GC (π•²π–‘π–Šπ–‡ π•Ήπ–†π–˜π–—π–Šπ–™π–‰π–Žπ–“π–”π–› & 𝕴𝖑𝖍𝖔𝖒 π•Άπ–”π–’π–‡π–†π–Šπ–›)#17

Open
homka122 wants to merge 19 commits intomasterfrom
homka122/GC

Conversation

@homka122
Copy link
Collaborator

  • Add own malloc function and heap
  • Add garbage collector for own malloc
  • Improve printing debug messages
  • Now numbers are tagged
    • Change arithmetic operations with tagged numbers
  • Runtime now change tagged numbers to naive version by own
  • Add tests for garbage collector

Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
https://en.wikipedia.org/wiki/X_macro

Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
Signed-off-by: homka122 <kombaev02@gmail.com>
; "print_int", print_int_s
; "print_gc_status", print_gs_status_s
; "gc_collect", gc_collect_s
; "clear_regs", clear_regs_s
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Π­Ρ‚ΠΎ ΠΎΡΡ‚Π°Π»ΠΎΡΡŒ лишним ΡƒΠ΄Π°Π»ΡŽ

Comment on lines +300 to +304
@ [ srai (T 0) (T 0) 1
; srai (T 1) (T 1) 1
; add dst (T 0) (T 1)
; slli dst dst 1
; ori dst dst 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

это наивная вСрсия, Π΅ΡΡ‚ΡŒ оптимизированная ΠΏΠΎ слайду, ΠΏΠ΅Ρ€Π΅Π΄Π΅Π»Π°ΡŽ

| CApp (ImmVar "print_gc_status", ImmConst Unit_lt, []) ->
[ call "print_gc_status" ] |> return
| CApp (ImmVar "gc_collect", ImmConst Unit_lt, []) -> [ call "gc_collect" ] |> return
| CApp (ImmVar "clear_regs", ImmConst Unit_lt, []) -> [ call "clear_regs" ] |> return
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ΡƒΠ΄Π°Π»ΡŽ

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.

1 participant