Add additional instruction to invoke module linking.
This commit is contained in:
parent
d5c7298263
commit
2b51e06c76
|
@ -277,11 +277,13 @@
|
||||||
(append-instruction-sequences
|
(append-instruction-sequences
|
||||||
(make-TestAndJump (make-TestTrue (make-ModulePredicate a-module-name 'linked?))
|
(make-TestAndJump (make-TestTrue (make-ModulePredicate a-module-name 'linked?))
|
||||||
linked)
|
linked)
|
||||||
;; TODO: raise an exception here that says that the module hasn't been
|
;; TODO: try to link dynamically, using plt.runtime.currentModuleLoader.
|
||||||
|
(make-Perform (make-LinkModule! a-module-name))
|
||||||
|
;; If that fails, finally raise an exception here that says that the module hasn't been
|
||||||
;; linked yet.
|
;; linked yet.
|
||||||
(make-DebugPrint (make-Const
|
#;(make-DebugPrint (make-Const
|
||||||
(format "DEBUG: the module ~a hasn't been linked in!!!"
|
(format "DEBUG: the module ~a hasn't been linked in!!!"
|
||||||
(ModuleLocator-name a-module-name))))
|
(ModuleLocator-name a-module-name))))
|
||||||
(make-Goto (make-Label (LinkedLabel-label on-return)))
|
(make-Goto (make-Label (LinkedLabel-label on-return)))
|
||||||
linked
|
linked
|
||||||
(make-TestAndJump (make-TestTrue
|
(make-TestAndJump (make-TestTrue
|
||||||
|
|
|
@ -473,6 +473,9 @@
|
||||||
(define-struct: InstallContinuationMarkEntry! () #:transparent)
|
(define-struct: InstallContinuationMarkEntry! () #:transparent)
|
||||||
|
|
||||||
|
|
||||||
|
;; Use the dynamic module loader to link the module into the runtime.
|
||||||
|
(define-struct: LinkModule! ([path : ModuleLocator]))
|
||||||
|
|
||||||
;; Installs a module record into the machine
|
;; Installs a module record into the machine
|
||||||
(define-struct: InstallModuleEntry! ([name : Symbol]
|
(define-struct: InstallModuleEntry! ([name : Symbol]
|
||||||
[path : ModuleLocator]
|
[path : ModuleLocator]
|
||||||
|
@ -520,6 +523,7 @@
|
||||||
RestoreEnvironment!
|
RestoreEnvironment!
|
||||||
RestoreControl!
|
RestoreControl!
|
||||||
|
|
||||||
|
LinkModule!
|
||||||
InstallModuleEntry!
|
InstallModuleEntry!
|
||||||
MarkModuleInvoked!
|
MarkModuleInvoked!
|
||||||
AliasModuleAsMain!
|
AliasModuleAsMain!
|
||||||
|
|
Loading…
Reference in New Issue
Block a user