Skip to content

Commit

Permalink
Backend specific gc roots configuration (bootstrap)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-serrano committed Jul 8, 2024
1 parent b2b5a95 commit 56dbe52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion comptime/BackEnd/backend.sch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;; ==========================================================
;; Class accessors
;; Bigloo (4.6a)
;; Inria -- Sophia Antipolis Fri Jul 5 10:40:59 AM CEST 2024
;; Inria -- Sophia Antipolis Mon Jul 8 03:29:28 PM CEST 2024
;; (bigloo BackEnd/backend.scm -classgen)
;; ==========================================================

Expand All @@ -13,6 +13,8 @@
(export
(inline backend?::bool ::obj)
(backend-nil::backend)
(inline backend-force-register-gc-roots::bool ::backend)
(inline backend-force-register-gc-roots-set! ::backend ::bool)
(inline backend-strict-type-cast::bool ::backend)
(inline backend-strict-type-cast-set! ::backend ::bool)
(inline backend-typed-funcall::bool ::backend)
Expand Down Expand Up @@ -79,6 +81,8 @@
;; backend
(define-inline (backend?::bool obj::obj) ((@ isa? __object) obj (@ backend backend_backend)))
(define (backend-nil::backend) (class-nil (@ backend backend_backend)))
(define-inline (backend-force-register-gc-roots::bool o::backend) (-> |#!bigloo_wallow| o force-register-gc-roots))
(define-inline (backend-force-register-gc-roots-set! o::backend v::bool) (set! (-> |#!bigloo_wallow| o force-register-gc-roots) v))
(define-inline (backend-strict-type-cast::bool o::backend) (-> |#!bigloo_wallow| o strict-type-cast))
(define-inline (backend-strict-type-cast-set! o::backend v::bool) (set! (-> |#!bigloo_wallow| o strict-type-cast) v))
(define-inline (backend-typed-funcall::bool o::backend) (-> |#!bigloo_wallow| o typed-funcall))
Expand Down
5 changes: 3 additions & 2 deletions comptime/Engine/compiler.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;* ------------------------------------------------------------- */
;* Author : Manuel Serrano */
;* Creation : Fri May 31 08:22:54 1996 */
;* Last change : Wed Jul 3 16:17:02 2024 (serrano) */
;* Last change : Mon Jul 8 15:31:10 2024 (serrano) */
;* Copyright : 1996-2024 Manuel Serrano, see LICENSE file */
;* ------------------------------------------------------------- */
;* The compiler driver */
Expand Down Expand Up @@ -266,7 +266,8 @@
(backend-check-inlines (the-backend))

;; explicit GC roots registration
(when *gc-force-register-roots?*
(when (and *gc-force-register-roots?*
(backend-force-register-gc-roots (the-backend)))
(set! units (cons (make-gc-roots-unit) units)))

;; ok, now we build the ast
Expand Down

0 comments on commit 56dbe52

Please sign in to comment.