From 04a408c7cd83509396c2ea479a64f0fa30010c4b Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 21 Jun 2016 13:14:40 -0700 Subject: [PATCH] factor: cleaning up STRING: etc. { "resource:language/compiler/cfg/builder/alien/alien-docs.factor" "resource:language/compiler/cfg/builder/blocks/blocks-docs.factor" "resource:language/compiler/cfg/instructions/syntax/syntax-doc..." "resource:language/compiler/tree/propagation/propagation-docs...." "resource:language/peg/ebnf/ebnf-docs.factor" "resource:ffi/cocoa/cocoa-docs.factor" "resource:libs/infix/infix-docs.factor" "resource:libs/urls/urls-docs.factor" "resource:libs/ctags/etags/etags-docs.factor" "resource:core/effects/effects-tests.factor" "resource:core/multiline/multiline-tests.factor" "resource:core/parser/parser-tests.factor" "resource:core/words/words-tests.factor" "resource:language/literate/literate-tests.factor" "resource:language/alien/data/map/map-tests.factor" "resource:collections/interval-sets/interval-sets-tests.factor" "resource:ffi/opencl/opencl-tests.factor" "resource:ffi/opencl/ffi/ffi-tests.factor" "resource:libs/http/http-tests.factor" "resource:libs/http/server/requests/requests-tests.factor" "resource:libs/infix/tokenizer/tokenizer-tests.factor" "resource:frameworks/furnace/utilities/utilities-tests.factor" "resource:tools/graphviz/graphviz-tests.factor" "resource:tools/tools/annotations/annotations-tests.factor" } [ dup . flush path>literals ] map-zip --- .../cpu/architecture/architecture-docs.factor | 30 +++++++++---------- core/generic/generic-docs.factor | 2 +- core/syntax/syntax-docs.factor | 12 ++++---- .../compiler/cfg/builder/builder-docs.factor | 8 ++--- language/compiler/codegen/codegen-docs.factor | 8 ++--- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/core/cpu/architecture/architecture-docs.factor b/core/cpu/architecture/architecture-docs.factor index 46aeb74a6b..6659ce3818 100644 --- a/core/cpu/architecture/architecture-docs.factor +++ b/core/cpu/architecture/architecture-docs.factor @@ -2,10 +2,10 @@ USING: alien assocs classes compiler.cfg.instructions compiler.cfg.registers compiler.cfg.stack-frame cpu.x86.assembler cpu.x86.assembler.operands help.markup help.syntax kernel layouts literals math multiline sequences strings system vm words ; -in: cpu.architecture +IN: cpu.architecture COMPILE< -STRING: ex-%allot +CONSTANT: ex-%allot [[ USING: cpu.architecture make ; [ RAX 40 tuple RCX %allot ] B{ } make disassemble 0000000002270cc0: 498d4d10 lea rcx, [r13+0x10] @@ -13,9 +13,9 @@ USING: cpu.architecture make ; 0000000002270cc7: 48c7001c000000 mov qword [rax], 0x1c 0000000002270cce: 4883c807 or rax, 0x7 0000000002270cd2: 48830130 add qword [rcx], 0x30 -; +]] ; -STRING: ex-%box-alien +CONSTANT: ex-%box-alien [[ USING: compiler.codegen compiler.codegen.relocation cpu.architecture make ; init-fixup init-relocation [ RAX RBX RCX %box-alien ] B{ } make disassemble 000000e9fcc720a0: 48b80100000000000000 mov rax, 0x1 @@ -30,27 +30,27 @@ init-fixup init-relocation [ RAX RBX RCX %box-alien ] B{ } make disassemble 000000e9fcc720d1: 48c7400a01000000 mov qword [rax+0xa], 0x1 000000e9fcc720d9: 48895812 mov [rax+0x12], rbx 000000e9fcc720dd: 4889581a mov [rax+0x1a], rbx -; +]] ; -STRING: ex-%context +CONSTANT: ex-%context [[ USING: cpu.architecture make ; [ EAX %context ] B{ } make disassemble 00000000010f5ed0: 418b4500 mov eax, [r13] -; +]] ; -STRING: ex-%copy +CONSTANT: ex-%copy [[ USING: cpu.architecture make ; RAX RBX int-rep [ %copy ] B{ } make disassemble 000000000108a970: 4889d8 mov rax, rbx -; +]] ; -STRING: ex-%safepoint +CONSTANT: ex-%safepoint [[ USING: cpu.architecture make ; init-relocation [ %safepoint ] B{ } make disassemble 00000000010b05a0: 890500000000 mov [rip], eax -; +]] ; -STRING: ex-%save-context +CONSTANT: ex-%save-context [[ USING: cpu.architecture make ; [ RAX RBX %save-context ] B{ } make disassemble 0000000000e63ab0: 498b4500 mov rax, [r13] @@ -58,9 +58,9 @@ USING: cpu.architecture make ; 0000000000e63ab9: 488918 mov [rax], rbx 0000000000e63abc: 4c897010 mov [rax+0x10], r14 0000000000e63ac0: 4c897818 mov [rax+0x18], r15 -; +]] ; -STRING: ex-%write-barrier +CONSTANT: ex-%write-barrier [[ USING: cpu.architecture make tools.disassembler ; init-relocation [ RAX RBX 3 -14 RCX RDX %write-barrier ] B{ } make disassemble 000000000143f960: 488d4cd80e lea rcx, [rax+rbx*8+0xe] @@ -70,7 +70,7 @@ init-relocation [ RAX RBX 3 -14 RCX RDX %write-barrier ] B{ } make disassemble 000000000143f978: 48c1e90a shr rcx, 0xa 000000000143f97c: 48ba0000000000000000 mov rdx, 0x0 000000000143f986: 48c60411c0 mov byte [rcx+rdx], 0xc0 -; +]] ; COMPILE> HELP: %alien-invoke diff --git a/core/generic/generic-docs.factor b/core/generic/generic-docs.factor index 811700c45e..32ae4ce167 100644 --- a/core/generic/generic-docs.factor +++ b/core/generic/generic-docs.factor @@ -126,7 +126,7 @@ HELP: define-generic { $description "Defines a generic word. A method combination is an object which responds to the " { $link perform-combination } " generic word." } { $contract "The method combination quotation is called each time the generic word has to be updated (for example, when a method is added), and thus must be side-effect free." } ; -HELP: M\ +HELP: \ M\ { $syntax "M\\ class generic" } { $description "Pushes a method on the stack." } { $examples { $code "M\\ fixnum + see" } { $code "USING: ui.gadgets.editors ui.render ;" "M\\ editor draw-gadget* edit" } } ; diff --git a/core/syntax/syntax-docs.factor b/core/syntax/syntax-docs.factor index f092d3e9d2..f525a63386 100644 --- a/core/syntax/syntax-docs.factor +++ b/core/syntax/syntax-docs.factor @@ -824,12 +824,12 @@ HELP: \ C: "In both cases, a word " { $snippet "" } " is defined, which reads three values from the stack and creates a " { $snippet "color" } " instance having these values in the " { $snippet "red" } ", " { $snippet "green" } " and " { $snippet "blue" } " slots, respectively." } ; -HELP: \ main: -{ $syntax "main: word" } +HELP: \ MAIN: +{ $syntax "MAIN: word" } { $values { "word" word } } { $description "Defines the main entry point for the current vocabulary and source file. This word will be executed when this vocabulary is passed to " { $link run } " or the source file is passed to " { $link run-script } "." } ; -HELP: PRIVATE< +HELP: \ PRIVATE< { $syntax "PRIVATE< ... PRIVATE>" } { $description "Begins a block of private word definitions. Private word definitions are placed in the current vocabulary name, suffixed with " { $snippet ".private" } "." } { $notes @@ -859,18 +859,18 @@ HELP: PRIVATE< } } ; -HELP: PRIVATE> +HELP: \ PRIVATE> { $syntax "PRIVATE< ... PRIVATE>" } { $description "Ends a block of private word definitions." } ; { \ PRIVATE< \ PRIVATE> } related-words -HELP: << +HELP: \ << { $syntax "<< ... >>" } { $description "Evaluates some code at parse time." } { $notes "Calling words defined in the same source file at parse time is prohibited; see compilation unit as where it was defined; see " { $link "compilation-units" } "." } ; -HELP: COMPILE> +HELP: \ COMPILE> { $syntax ">>" } { $description "Marks the end of a parse time code block." } ; diff --git a/language/compiler/cfg/builder/builder-docs.factor b/language/compiler/cfg/builder/builder-docs.factor index 1aa407633f..957ad14314 100644 --- a/language/compiler/cfg/builder/builder-docs.factor +++ b/language/compiler/cfg/builder/builder-docs.factor @@ -5,7 +5,7 @@ sequences vectors words ; in: compiler.cfg.builder COMPILE< -STRING: ex-emit-call +CONSTANT: ex-emit-call [[ USING: compiler.cfg.builder compiler.cfg.builder.blocks compiler.cfg.stacks kernel make prettyprint ; begin-stack-analysis set-basic-block @@ -32,9 +32,9 @@ T{ basic-block } } } -; +]] ; -STRING: ex-make-input-map +CONSTANT: ex-make-input-map [[ USING: compiler.cfg.builder prettyprint ; T{ #shuffle { in-d { 37 81 92 } } } make-input-map . H{ @@ -42,7 +42,7 @@ H{ { 37 T{ ds-loc { n 2 } } } { 92 T{ ds-loc } } } -; +]] ; COMPILE> HELP: build-cfg diff --git a/language/compiler/codegen/codegen-docs.factor b/language/compiler/codegen/codegen-docs.factor index d5e3e40dad..e185006c24 100644 --- a/language/compiler/codegen/codegen-docs.factor +++ b/language/compiler/codegen/codegen-docs.factor @@ -4,12 +4,12 @@ help.markup help.syntax literals make multiline sequences ; in: compiler.codegen COMPILE< -STRING: generate-ex +CONSTANT: generate-ex [[ USING: compiler.cfg.debugger io prettyprint ; [ "hello\n" write ] test-regs first dup cfg set generate [ . ] [ 4 swap nth disassemble ] bi -; +]] ; -STRING: generate-ex-answer +CONSTANT: generate-ex-answer [[ { { } { "hello\n" output-stream assoc-stack stream-write } @@ -50,7 +50,7 @@ STRING: generate-ex-answer 0000000001cc4cfa: 0000 add [rax], al 0000000001cc4cfc: 0000 add [rax], al 0000000001cc4cfe: 0000 add [rax], al -; +]] ; COMPILE> HELP: emit-branch