Home
last modified time | relevance | path

Searched +refs:linklet +refs:bundle +refs:hash +refs:code (Results 1 – 25 of 42) sorted by relevance

12

/dports/lang/racket-minimal/racket-8.3/src/expander/compile/
H A Dread-linklet.rkt44 (read-correlated-linklet-bundle-hash in)
45 (read-linklet-bundle-hash in)))
47 (raise-read-error 'read-linklet-bundle-hash
56 (hash->linklet-bundle
57 (add-hash-code (if initial?
88 (list->bundle-directory accum hash->linklet-directory)]
136 (define (list->bundle-directory l hash->linklet-directory)
187 ;; If the bundle has a non-zero hash code, record it with the
188 ;; 'hash-code key to enable module caching
189 (define (add-hash-code b-ht sha-1)
[all …]
H A Drecompile.rkt29 [(or (linklet-bundle? c)
45 (hash-set! recompileds k (recompile-bundle b
63 [(linklet-bundle? c)
77 [(linklet-bundle? c)
78 (recompiled-bundle (hash-ref recompileds (reverse rev-path)))]
80 (hash->linklet-directory
106 (define orig-h (linklet-bundle->hash b))
159 (or (hash-ref (linklet-bundle->hash b) phase #f)
168 (current-code-inspector) ; compile-time inspector is now
173 (for/hash ([(phase body-linklet) (in-hash h)]
[all …]
H A Dmodule.rkt301 [bundle (hash-set bundle 'decl (or declaration-linklet
306 (hash-set bundle 'data data-linklet)
309 (hash-set bundle 'stx syntax-literals-linklet)
312 (hash-set bundle 'stx-data syntax-literals-data-linklet)
332 [bundle (if (hash-count side-effects)
333 (hash-set bundle 'side-effects (sort (hash-keys side-effects) <))
339 (hash-set bundle 'unsafe? #t)
341 (hash->linklet-bundle bundle)))
358 (hash->linklet-directory ht)]))
366 (current-code-inspector)
[all …]
H A Dtop.rkt3 "../host/linklet.rkt"
13 "linklet.rkt"
75 #:to-correlated-linklet? to-correlated-linklet?
88 (let* ([ht (hash-set ht 'original-phase phase)]
89 [ht (hash-set ht 'max-phase max-phase)])
92 (define bundle
93 (hash->linklet-bundle
138 (hash-set body-linklets 'link link-linklet)]
143 ;; If the compiled code is executed directly, it must be in its
145 (compiled-in-memory (hash->linklet-directory (hasheq #f bundle))
[all …]
/dports/lang/racket/racket-8.3/src/expander/compile/
H A Dread-linklet.rkt44 (read-correlated-linklet-bundle-hash in)
45 (read-linklet-bundle-hash in)))
47 (raise-read-error 'read-linklet-bundle-hash
56 (hash->linklet-bundle
57 (add-hash-code (if initial?
88 (list->bundle-directory accum hash->linklet-directory)]
136 (define (list->bundle-directory l hash->linklet-directory)
187 ;; If the bundle has a non-zero hash code, record it with the
188 ;; 'hash-code key to enable module caching
189 (define (add-hash-code b-ht sha-1)
[all …]
H A Drecompile.rkt29 [(or (linklet-bundle? c)
45 (hash-set! recompileds k (recompile-bundle b
63 [(linklet-bundle? c)
77 [(linklet-bundle? c)
78 (recompiled-bundle (hash-ref recompileds (reverse rev-path)))]
80 (hash->linklet-directory
106 (define orig-h (linklet-bundle->hash b))
159 (or (hash-ref (linklet-bundle->hash b) phase #f)
168 (current-code-inspector) ; compile-time inspector is now
173 (for/hash ([(phase body-linklet) (in-hash h)]
[all …]
H A Dmodule.rkt301 [bundle (hash-set bundle 'decl (or declaration-linklet
306 (hash-set bundle 'data data-linklet)
309 (hash-set bundle 'stx syntax-literals-linklet)
312 (hash-set bundle 'stx-data syntax-literals-data-linklet)
332 [bundle (if (hash-count side-effects)
333 (hash-set bundle 'side-effects (sort (hash-keys side-effects) <))
339 (hash-set bundle 'unsafe? #t)
341 (hash->linklet-bundle bundle)))
358 (hash->linklet-directory ht)]))
366 (current-code-inspector)
[all …]
H A Dtop.rkt3 "../host/linklet.rkt"
13 "linklet.rkt"
75 #:to-correlated-linklet? to-correlated-linklet?
88 (let* ([ht (hash-set ht 'original-phase phase)]
89 [ht (hash-set ht 'max-phase max-phase)])
92 (define bundle
93 (hash->linklet-bundle
138 (hash-set body-linklets 'link link-linklet)]
143 ;; If the compiled code is executed directly, it must be in its
145 (compiled-in-memory (hash->linklet-directory (hasheq #f bundle))
[all …]
/dports/lang/racket/racket-8.3/src/cs/linklet/
H A Dread.ss2 (define (read-linklet-bundle-hash in)
7 (adjust-linklet-bundle-laziness-and-literals
21 (define (adjust-linklet-bundle-laziness-and-literals ls)
29 (hash-set ht
36 (define (adjust-linklet-laziness linklet)
37 (set-linklet-code linklet
38 (linklet-code linklet)
40 [(not (eq? root-inspector (|#%app| current-code-inspector)))
42 ;; a non-original code inspector as long as it doesn't refer
45 ;; code, means that all "bytecode" is unsafe:
[all …]
/dports/lang/racket-minimal/racket-8.3/src/cs/linklet/
H A Dread.ss2 (define (read-linklet-bundle-hash in)
7 (adjust-linklet-bundle-laziness-and-literals
21 (define (adjust-linklet-bundle-laziness-and-literals ls)
29 (hash-set ht
36 (define (adjust-linklet-laziness linklet)
37 (set-linklet-code linklet
38 (linklet-code linklet)
40 [(not (eq? root-inspector (|#%app| current-code-inspector)))
42 ;; a non-original code inspector as long as it doesn't refer
45 ;; code, means that all "bytecode" is unsafe:
[all …]
/dports/lang/racket-minimal/racket-8.3/src/expander/eval/
H A Dreflect-submodule.rkt14 ;; inconvenient, because each linklet bundle for a module encodes its
31 ;; more for loading code than easy manipulation...
34 (define ht (linklet-directory->hash c))
35 (define bh (linklet-bundle->hash (hash-ref ht #f)))
40 ;; a linklet bundle represents a module with no submodules
49 (or (linklet-bundle? (compiled->linklet-directory-or-bundle c))
72 … (hash-ref (linklet-directory->hash (compiled->linklet-directory-or-bundle n-c)) #f)
84 (hash-ref (linklet-directory->hash (compiled->linklet-directory-or-bundle n-c)) #f)
87 (map compiled->linklet-directory-or-bundle
101 (hash->linklet-bundle
[all …]
H A Dmulti-top.rkt2 (require "../host/linklet.rkt"
17 (instantiate-linklet (force-compile-linklet data-linklet)
24 #:inspector (current-code-inspector)))))
41 (define is-module? (or (linklet-bundle? ld)
42 (let ([b (hash-ref (linklet-directory->hash ld) #f #f)])
43 (and b (hash-ref (linklet-bundle->hash b) 'decl #f)))))
88 [(linklet-bundle? ld)
92 (define h (linklet-directory->hash ld))
93 (define mod (hash-ref h #f #f))
95 (define mh (linklet-bundle->hash mod))
[all …]
H A Dmodule.rkt70 ;; We expect a hash code only for a module
74 (hash-ref h 'hash-code #f))))
82 ;; Also, filter the bundle hash to just the phase-specific linklets, so that
249 ;; If we have a hash code, save the prepare module in the cache
250 ;; so it can be found by that hash code:
328 ;; h - hash from the module's linklet bundle
337 (linklet-directory->hash ld/h)]
341 (define h (linklet-bundle->hash (if dh
365 (instantiate-linklet (eval-linklet* (hash-ref h 'data))
372 (instantiate-linklet (eval-linklet* (hash-ref h 'decl))
[all …]
H A Dtop.rkt24 ;; Run a representation of top-level code as produced by `compile-top`;
40 (not (hash-ref (linklet-directory->hash ld) #f #f))))
62 [(hash-ref (linklet-directory->hash c) 'data #f)
68 (hash-ref (linklet-bundle->hash (hash-ref (linklet-directory->hash data-ld) #f)) 0)
82 (define h (linklet-bundle->hash (hash-ref (linklet-directory->hash ld) #f)))
86 (instantiate-linklet (force-compile-linklet (hash-ref h 'link))
93 #:inspector (current-code-inspector))))))
141 (define linklet (force-compile-linklet (hash-ref h phase #f)))
144 [linklet
146 module-uses import-module-instances (current-code-inspector)
[all …]
/dports/lang/racket/racket-8.3/src/expander/eval/
H A Dreflect-submodule.rkt14 ;; inconvenient, because each linklet bundle for a module encodes its
31 ;; more for loading code than easy manipulation...
34 (define ht (linklet-directory->hash c))
35 (define bh (linklet-bundle->hash (hash-ref ht #f)))
40 ;; a linklet bundle represents a module with no submodules
49 (or (linklet-bundle? (compiled->linklet-directory-or-bundle c))
72 … (hash-ref (linklet-directory->hash (compiled->linklet-directory-or-bundle n-c)) #f)
84 (hash-ref (linklet-directory->hash (compiled->linklet-directory-or-bundle n-c)) #f)
87 (map compiled->linklet-directory-or-bundle
101 (hash->linklet-bundle
[all …]
H A Dmulti-top.rkt2 (require "../host/linklet.rkt"
17 (instantiate-linklet (force-compile-linklet data-linklet)
24 #:inspector (current-code-inspector)))))
41 (define is-module? (or (linklet-bundle? ld)
42 (let ([b (hash-ref (linklet-directory->hash ld) #f #f)])
43 (and b (hash-ref (linklet-bundle->hash b) 'decl #f)))))
88 [(linklet-bundle? ld)
92 (define h (linklet-directory->hash ld))
93 (define mod (hash-ref h #f #f))
95 (define mh (linklet-bundle->hash mod))
[all …]
H A Dmodule.rkt70 ;; We expect a hash code only for a module
74 (hash-ref h 'hash-code #f))))
82 ;; Also, filter the bundle hash to just the phase-specific linklets, so that
249 ;; If we have a hash code, save the prepare module in the cache
250 ;; so it can be found by that hash code:
328 ;; h - hash from the module's linklet bundle
337 (linklet-directory->hash ld/h)]
341 (define h (linklet-bundle->hash (if dh
365 (instantiate-linklet (eval-linklet* (hash-ref h 'data))
372 (instantiate-linklet (eval-linklet* (hash-ref h 'decl))
[all …]
H A Dtop.rkt24 ;; Run a representation of top-level code as produced by `compile-top`;
40 (not (hash-ref (linklet-directory->hash ld) #f #f))))
62 [(hash-ref (linklet-directory->hash c) 'data #f)
68 (hash-ref (linklet-bundle->hash (hash-ref (linklet-directory->hash data-ld) #f)) 0)
82 (define h (linklet-bundle->hash (hash-ref (linklet-directory->hash ld) #f)))
86 (instantiate-linklet (force-compile-linklet (hash-ref h 'link))
93 #:inspector (current-code-inspector))))))
141 (define linklet (force-compile-linklet (hash-ref h phase #f)))
144 [linklet
146 module-uses import-module-instances (current-code-inspector)
[all …]
/dports/lang/racket/racket-8.3/src/expander/boot/
H A Dload-handler.rkt127 (define (linklet-bundle-or-directory-start i tag)
143 (define pos (linklet-bundle-or-directory-start i #\D))
148 (define (linklet-bundle-hash-code i)
149 (define pos (linklet-bundle-or-directory-start i #\B))
150 (define hash-code (and pos (peek-bytes 20 pos i)))
151 (and (bytes? hash-code)
152 (= 20 (bytes-length hash-code))
153 (for/or ([c (in-bytes hash-code)])
155 hash-code))
157 (define (cached-bundle i)
[all …]
/dports/lang/racket-minimal/racket-8.3/src/expander/boot/
H A Dload-handler.rkt127 (define (linklet-bundle-or-directory-start i tag)
143 (define pos (linklet-bundle-or-directory-start i #\D))
148 (define (linklet-bundle-hash-code i)
149 (define pos (linklet-bundle-or-directory-start i #\B))
150 (define hash-code (and pos (peek-bytes 20 pos i)))
151 (and (bytes? hash-code)
152 (= 20 (bytes-length hash-code))
153 (for/or ([c (in-bytes hash-code)])
155 hash-code))
157 (define (cached-bundle i)
[all …]
/dports/lang/racket/racket-8.3/share/pkgs/compiler-lib/compiler/demodularizer/
H A Dfind.rkt5 racket/linklet
55 [(linklet-bundle? compiled)
61 (or (hash-ref (linklet-directory->hash compiled) #f #f)
64 (loop (or (hash-ref (linklet-directory->hash compiled) (car submod) #f)
70 [(linkl-bundle? zo)
77 (define h (linklet-bundle->hash one-compiled))
78 (define data-linklet (hash-ref h 'data #f))
79 (define decl-linklet (hash-ref h 'decl #f))
89 (define decl (instantiate-linklet decl-linklet
122 (define linkl (hash-ref (linkl-bundle-table (one-mod-zo one-m)) phase #f))
[all …]
/dports/lang/racket/racket-8.3/share/pkgs/racket-doc/scribblings/reference/
H A Dlinklet.scrbl24 a @tech{fixnum}. A @tech{linklet bundle} containing
37 @tech{linklet bundle}. Like @tech{linklet bundles}, a @tech{linklet
143 part of a @tech{linklet bundle} (possibly in a @tech{linklet directory}).
258 @racket[instantiate-linklet] shares the JIT-generated code. However,
324 @defproc[(hash->linklet-directory [content (and/c hash? hash-eq? immutable? (not/c impersonator?))])
334 @defproc[(linklet-directory->hash [linklet-directory linklet-directory?])
341 @defproc[(linklet-bundle? [v any/c]) boolean?]{
347 @defproc[(hash->linklet-bundle [content (and/c hash? hash-eq? immutable? (not/c impersonator?))])
348 linklet-bundle?]{
357 @defproc[(linklet-bundle->hash [linklet-bundle linklet-bundle?])
[all …]
/dports/lang/racket/racket-8.3/src/bc/src/
H A Dcompile-startup.rkt2 (#%require '#%linklet
5 ;; Decode a linklet S-expression from "startup.inc" (in the source
33 ;; Startup code as an S-expression uses the pattern
84 (define-values (datum->correlated) (hash-ref (primitive-table '#%kernel) 'datum->syntax))
85 (define-values (correlated-property) (hash-ref (primitive-table '#%kernel) 'syntax-property))
87 (define-values (linklet) (compile-linklet (rename-functions (get-linklet src))
96 (lambda (outfile) (write (hash->linklet-bundle (hasheq 'startup linklet)) outfile))
103 (write-linklet-bundle-hash (hasheq 'startup linklet) p)
/dports/lang/racket-minimal/racket-8.3/src/bc/src/
H A Dcompile-startup.rkt2 (#%require '#%linklet
5 ;; Decode a linklet S-expression from "startup.inc" (in the source
33 ;; Startup code as an S-expression uses the pattern
84 (define-values (datum->correlated) (hash-ref (primitive-table '#%kernel) 'datum->syntax))
85 (define-values (correlated-property) (hash-ref (primitive-table '#%kernel) 'syntax-property))
87 (define-values (linklet) (compile-linklet (rename-functions (get-linklet src))
96 (lambda (outfile) (write (hash->linklet-bundle (hasheq 'startup linklet)) outfile))
103 (write-linklet-bundle-hash (hasheq 'startup linklet) p)
/dports/lang/racket/racket-8.3/share/pkgs/compiler-lib/compiler/
H A Ddecompile.rkt66 (hash-ref (linkl-bundle-table main) 'decl #f))
72 [(linkl-bundle? top)
76 'linklet-bundle
79 (for/list ([(k v) (in-hash (linkl-bundle-table top))])
106 (define ht (linkl-bundle-table l))
135 (decompile-linklet (hash-ref ht (car phases)) #:just-body? #t)
173 (define forms (let ([l (hash-ref (linkl-bundle-table b) 0 #f)])
185 (define l (and b (hash-ref (linkl-bundle-table b) 0 #f)))
226 (define-values (fmt code literals) ((vm-primitive 'linklet-fasled-code+arguments) l))
228 [code
[all …]

12