modulerecords keep the path now.

This commit is contained in:
Danny Yoo 2011-05-13 14:58:49 -04:00
parent 2bb4666645
commit 9988201d06
4 changed files with 9 additions and 4 deletions

View File

@ -395,7 +395,8 @@
;; Installs a module record into the machine ;; Installs a module record into the machine
(define-struct: InstallModuleEntry! ([name : ModuleName] (define-struct: InstallModuleEntry! ([name : Symbol]
[path : ModuleName]
[entry-point : Symbol]) [entry-point : Symbol])
#:transparent) #:transparent)

View File

@ -127,5 +127,6 @@
[(InstallModuleEntry!? op) [(InstallModuleEntry!? op)
(format "MACHINE.modules[~s]=new RUNTIME.ModuleRecord(~s, ~a);" (format "MACHINE.modules[~s]=new RUNTIME.ModuleRecord(~s, ~a);"
(symbol->string (ModuleName-name (InstallModuleEntry!-name op))) (symbol->string (ModuleName-name (InstallModuleEntry!-path op)))
(symbol->string (InstallModuleEntry!-name op))
(assemble-label (make-Label (InstallModuleEntry!-entry-point op))))])) (assemble-label (make-Label (InstallModuleEntry!-entry-point op))))]))

View File

@ -62,7 +62,8 @@
#:mutable) #:mutable)
(define-struct: module-record ([name : ModuleName] (define-struct: module-record ([name : Symbol]
[self-path : Symbol]
[label : Symbol] [label : Symbol]
[invoked? : Boolean] [invoked? : Boolean]
[exports : (HashTable Symbol PrimitiveValue)]) [exports : (HashTable Symbol PrimitiveValue)])

View File

@ -412,8 +412,10 @@
[(InstallModuleEntry!? op) [(InstallModuleEntry!? op)
(hash-set! (machine-modules m) (hash-set! (machine-modules m)
(ModuleName-name (InstallModuleEntry!-name op)) (ModuleName-name (InstallModuleEntry!-path op))
(make-module-record (InstallModuleEntry!-name op) (make-module-record (InstallModuleEntry!-name op)
(ModuleName-name
(InstallModuleEntry!-path op))
(InstallModuleEntry!-entry-point op) (InstallModuleEntry!-entry-point op)
#f #f
(make-hash))) (make-hash)))