From fc6f53cd37e4704eba784e865974b176c7df35a9 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 21 Jan 2022 11:26:03 -0800 Subject: [PATCH] bootstrap: some cleanup, move stage1 to basis/bootstrap/ this keeps it all together and imho makes it easier to understand --- basis/bootstrap/assembler/arm.32.unix.factor | 6 +++--- basis/bootstrap/assembler/arm.32.windows.factor | 6 +++--- basis/bootstrap/assembler/arm.64.unix.factor | 6 +++--- basis/bootstrap/assembler/arm.64.windows.factor | 6 +++--- basis/bootstrap/assembler/ppc.32.linux.factor | 2 +- basis/bootstrap/assembler/ppc.64.linux.factor | 2 +- basis/bootstrap/assembler/x86.32.unix.factor | 6 +++--- basis/bootstrap/assembler/x86.32.windows.factor | 6 +++--- basis/bootstrap/assembler/x86.64.unix.factor | 6 +++--- basis/bootstrap/assembler/x86.64.windows.factor | 6 +++--- basis/bootstrap/image/image.factor | 2 +- basis/bootstrap/image/primitives/primitives-docs.factor | 2 +- {core => basis}/bootstrap/layouts.factor | 0 {core => basis}/bootstrap/primitives.factor | 6 +++--- {core => basis}/bootstrap/stage1.factor | 4 ++-- basis/bootstrap/stage2.factor | 6 +++--- {core => basis}/bootstrap/summary.txt | 0 {core => basis}/bootstrap/syntax.factor | 0 18 files changed, 36 insertions(+), 36 deletions(-) rename {core => basis}/bootstrap/layouts.factor (100%) rename {core => basis}/bootstrap/primitives.factor (98%) rename {core => basis}/bootstrap/stage1.factor (93%) rename {core => basis}/bootstrap/summary.txt (100%) rename {core => basis}/bootstrap/syntax.factor (100%) diff --git a/basis/bootstrap/assembler/arm.32.unix.factor b/basis/bootstrap/assembler/arm.32.unix.factor index e8db0416ee..d8945220c6 100644 --- a/basis/bootstrap/assembler/arm.32.unix.factor +++ b/basis/bootstrap/assembler/arm.32.unix.factor @@ -3,6 +3,6 @@ USING: kernel parser sequences ; IN: bootstrap.assembler.arm -<< "vocab:bootstrap/assembler/arm.unix.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/arm.32.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/arm.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.unix.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.32.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/arm.32.windows.factor b/basis/bootstrap/assembler/arm.32.windows.factor index 70f20056ca..ae11ab5f8d 100644 --- a/basis/bootstrap/assembler/arm.32.windows.factor +++ b/basis/bootstrap/assembler/arm.32.windows.factor @@ -3,6 +3,6 @@ USING: kernel parser sequences ; IN: bootstrap.assembler.arm -<< "vocab:bootstrap/assembler/arm.windows.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/arm.32.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/arm.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.windows.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.32.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/arm.64.unix.factor b/basis/bootstrap/assembler/arm.64.unix.factor index 4f4fe7d1b9..69a1c87a77 100644 --- a/basis/bootstrap/assembler/arm.64.unix.factor +++ b/basis/bootstrap/assembler/arm.64.unix.factor @@ -56,6 +56,6 @@ IN: bootstrap.assembler.arm : arg4 ( -- reg ) X3 ; : red-zone-size ( -- n ) 16 ; -<< "vocab:bootstrap/assembler/arm.unix.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/arm.64.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/arm.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.unix.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.64.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/arm.64.windows.factor b/basis/bootstrap/assembler/arm.64.windows.factor index 5f2938a369..16480903e5 100644 --- a/basis/bootstrap/assembler/arm.64.windows.factor +++ b/basis/bootstrap/assembler/arm.64.windows.factor @@ -4,6 +4,6 @@ USING: kernel parser sequences ; IN: bootstrap.assembler.arm -<< "vocab:bootstrap/assembler/arm.windows.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/arm.64.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/arm.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.windows.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.64.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/arm.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/ppc.32.linux.factor b/basis/bootstrap/assembler/ppc.32.linux.factor index 1f019587a2..328b14e61d 100644 --- a/basis/bootstrap/assembler/ppc.32.linux.factor +++ b/basis/bootstrap/assembler/ppc.32.linux.factor @@ -69,5 +69,5 @@ CONSTANT: frame-reg 31 : param-size ( -- n ) 32 ; : saved-int-regs-size ( -- n ) 96 ; -<< "vocab:bootstrap/assembler/ppc.factor" parse-file suffix! >> +<< "resource:basis/bootstrap/assembler/ppc.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/ppc.64.linux.factor b/basis/bootstrap/assembler/ppc.64.linux.factor index bb1d661ca1..1915688f67 100644 --- a/basis/bootstrap/assembler/ppc.64.linux.factor +++ b/basis/bootstrap/assembler/ppc.64.linux.factor @@ -76,5 +76,5 @@ CONSTANT: frame-reg 31 : param-size ( -- n ) 64 ; : saved-int-regs-size ( -- n ) 192 ; -<< "vocab:bootstrap/assembler/ppc.factor" parse-file suffix! >> +<< "resource:basis/bootstrap/assembler/ppc.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/x86.32.unix.factor b/basis/bootstrap/assembler/x86.32.unix.factor index aff19eb7d1..ce7e1b6779 100644 --- a/basis/bootstrap/assembler/x86.32.unix.factor +++ b/basis/bootstrap/assembler/x86.32.unix.factor @@ -3,6 +3,6 @@ USING: kernel parser sequences ; IN: bootstrap.assembler.x86 -<< "vocab:bootstrap/assembler/x86.unix.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.32.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.unix.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.32.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/x86.32.windows.factor b/basis/bootstrap/assembler/x86.32.windows.factor index d7e6e58a93..c190b5611a 100644 --- a/basis/bootstrap/assembler/x86.32.windows.factor +++ b/basis/bootstrap/assembler/x86.32.windows.factor @@ -8,7 +8,7 @@ IN: bootstrap.assembler.x86 : tib-segment ( -- ) FS ; : tib-temp ( -- reg ) EAX ; -<< "vocab:bootstrap/assembler/x86.windows.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.windows.factor" parse-file suffix! >> call : jit-install-seh ( -- ) ! VM pointer must be in vm-reg already @@ -34,5 +34,5 @@ IN: bootstrap.assembler.x86 ! Store exception record in TIB. tib-exception-list-offset [] tib-temp tib-segment MOV ; -<< "vocab:bootstrap/assembler/x86.32.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.32.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/x86.64.unix.factor b/basis/bootstrap/assembler/x86.64.unix.factor index e21962ed2a..55e66759dc 100644 --- a/basis/bootstrap/assembler/x86.64.unix.factor +++ b/basis/bootstrap/assembler/x86.64.unix.factor @@ -16,6 +16,6 @@ IN: bootstrap.assembler.x86 : arg4 ( -- reg ) RCX ; : red-zone-size ( -- n ) 128 ; -<< "vocab:bootstrap/assembler/x86.unix.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.64.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.unix.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.64.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/assembler/x86.64.windows.factor b/basis/bootstrap/assembler/x86.64.windows.factor index ec2fbf4dcd..8e981557e7 100644 --- a/basis/bootstrap/assembler/x86.64.windows.factor +++ b/basis/bootstrap/assembler/x86.64.windows.factor @@ -22,6 +22,6 @@ DEFER: stack-reg : red-zone-size ( -- n ) 0 ; -<< "vocab:bootstrap/assembler/x86.windows.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.64.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.windows.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.64.factor" parse-file suffix! >> call +<< "resource:basis/bootstrap/assembler/x86.factor" parse-file suffix! >> call diff --git a/basis/bootstrap/image/image.factor b/basis/bootstrap/image/image.factor index 6bf93c7636..8a9ec7348e 100644 --- a/basis/bootstrap/image/image.factor +++ b/basis/bootstrap/image/image.factor @@ -531,7 +531,7 @@ PRIVATE> { auto-use? f } } assoc-union! [ H{ } clone special-objects set - "resource:/core/bootstrap/stage1.factor" run-file + "resource:basis/bootstrap/stage1.factor" run-file build-image write-image ] with-variables ; diff --git a/basis/bootstrap/image/primitives/primitives-docs.factor b/basis/bootstrap/image/primitives/primitives-docs.factor index ce435ac5a7..3c6d97ec29 100644 --- a/basis/bootstrap/image/primitives/primitives-docs.factor +++ b/basis/bootstrap/image/primitives/primitives-docs.factor @@ -19,7 +19,7 @@ HELP: primitive-quot { $description "Creates the defining quotation for the primitive. If 'vm-func' is a string, then it is prefixed with 'primitive_' and a quotation calling that C++ function is generated." } ; ARTICLE: "bootstrap.image.primitives" "Bootstrap primitives" -"This vocab contains utilities for declaring primitives to be added to the bootstrap image. It is used by the file " { $snippet "resource:core/bootstrap/primitives.factor" } +"This vocab contains utilities for declaring primitives to be added to the bootstrap image. It is used by the file " { $snippet "resource:basis/bootstrap/primitives.factor" } $nl { $link all-primitives } " is an assoc where all primitives are declared. See that constant for a description of the format." ; diff --git a/core/bootstrap/layouts.factor b/basis/bootstrap/layouts.factor similarity index 100% rename from core/bootstrap/layouts.factor rename to basis/bootstrap/layouts.factor diff --git a/core/bootstrap/primitives.factor b/basis/bootstrap/primitives.factor similarity index 98% rename from core/bootstrap/primitives.factor rename to basis/bootstrap/primitives.factor index 3707a112dc..85092c8605 100644 --- a/core/bootstrap/primitives.factor +++ b/basis/bootstrap/primitives.factor @@ -13,15 +13,15 @@ IN: bootstrap.primitives H{ } clone sub-primitives set -"vocab:bootstrap/syntax.factor" parse-file +"resource:basis/bootstrap/syntax.factor" parse-file : asm-file ( arch -- file ) "-" split reverse "." join - "vocab:bootstrap/assembler/" ".factor" surround ; + "resource:basis/bootstrap/assembler/" ".factor" surround ; architecture get asm-file parse-file -"vocab:bootstrap/layouts.factor" parse-file +"resource:basis/bootstrap/layouts.factor" parse-file ! Now we have ( syntax-quot arch-quot layouts-quot ) on the stack diff --git a/core/bootstrap/stage1.factor b/basis/bootstrap/stage1.factor similarity index 93% rename from core/bootstrap/stage1.factor rename to basis/bootstrap/stage1.factor index 54fef16d62..0e9c8053f4 100644 --- a/core/bootstrap/stage1.factor +++ b/basis/bootstrap/stage1.factor @@ -6,7 +6,7 @@ parser.notes sequences system vocabs vocabs.loader ; "Bootstrap stage 1..." print flush -"vocab:bootstrap/primitives.factor" run-file +"resource:basis/bootstrap/primitives.factor" run-file load-help? off { "resource:core" } vocab-roots set @@ -37,7 +37,7 @@ load-help? off "locals.fry" require "locals.macros" require - "vocab:bootstrap/layouts.factor" parse-file % + "resource:basis/bootstrap/layouts.factor" parse-file % [ f parser-quiet? set-global diff --git a/basis/bootstrap/stage2.factor b/basis/bootstrap/stage2.factor index db8f335eea..3e6e58a8bb 100644 --- a/basis/bootstrap/stage2.factor +++ b/basis/bootstrap/stage2.factor @@ -95,9 +95,9 @@ CONSTANT: default-components print-report "staging" get [ - "vocab:bootstrap/finish-staging.factor" run-file + "resource:basis/bootstrap/finish-staging.factor" run-file ] [ - "vocab:bootstrap/finish-bootstrap.factor" run-file + "resource:basis/bootstrap/finish-bootstrap.factor" run-file ] if f error set-global @@ -108,7 +108,7 @@ CONSTANT: default-components drop [ load-help? off - [ "vocab:bootstrap/bootstrap-error.factor" parse-file ] save/restore-error + [ "resource:basis/bootstrap/bootstrap-error.factor" parse-file ] save/restore-error call ] with-scope ] recover diff --git a/core/bootstrap/summary.txt b/basis/bootstrap/summary.txt similarity index 100% rename from core/bootstrap/summary.txt rename to basis/bootstrap/summary.txt diff --git a/core/bootstrap/syntax.factor b/basis/bootstrap/syntax.factor similarity index 100% rename from core/bootstrap/syntax.factor rename to basis/bootstrap/syntax.factor -- 2.34.1