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
locals-and-roots
Doug Coleman 2016-06-21 13:14:40 -07:00
parent b4e4ab8ef3
commit 04a408c7cd
5 changed files with 30 additions and 30 deletions

View File

@ -2,10 +2,10 @@ USING: alien assocs classes compiler.cfg.instructions
compiler.cfg.registers compiler.cfg.stack-frame cpu.x86.assembler compiler.cfg.registers compiler.cfg.stack-frame cpu.x86.assembler
cpu.x86.assembler.operands help.markup help.syntax kernel layouts cpu.x86.assembler.operands help.markup help.syntax kernel layouts
literals math multiline sequences strings system vm words ; literals math multiline sequences strings system vm words ;
in: cpu.architecture IN: cpu.architecture
COMPILE< COMPILE<
STRING: ex-%allot CONSTANT: ex-%allot [[
USING: cpu.architecture make ; USING: cpu.architecture make ;
[ RAX 40 tuple RCX %allot ] B{ } make disassemble [ RAX 40 tuple RCX %allot ] B{ } make disassemble
0000000002270cc0: 498d4d10 lea rcx, [r13+0x10] 0000000002270cc0: 498d4d10 lea rcx, [r13+0x10]
@ -13,9 +13,9 @@ USING: cpu.architecture make ;
0000000002270cc7: 48c7001c000000 mov qword [rax], 0x1c 0000000002270cc7: 48c7001c000000 mov qword [rax], 0x1c
0000000002270cce: 4883c807 or rax, 0x7 0000000002270cce: 4883c807 or rax, 0x7
0000000002270cd2: 48830130 add qword [rcx], 0x30 0000000002270cd2: 48830130 add qword [rcx], 0x30
; ]] ;
STRING: ex-%box-alien CONSTANT: ex-%box-alien [[
USING: compiler.codegen compiler.codegen.relocation cpu.architecture make ; USING: compiler.codegen compiler.codegen.relocation cpu.architecture make ;
init-fixup init-relocation [ RAX RBX RCX %box-alien ] B{ } make disassemble init-fixup init-relocation [ RAX RBX RCX %box-alien ] B{ } make disassemble
000000e9fcc720a0: 48b80100000000000000 mov rax, 0x1 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 000000e9fcc720d1: 48c7400a01000000 mov qword [rax+0xa], 0x1
000000e9fcc720d9: 48895812 mov [rax+0x12], rbx 000000e9fcc720d9: 48895812 mov [rax+0x12], rbx
000000e9fcc720dd: 4889581a mov [rax+0x1a], rbx 000000e9fcc720dd: 4889581a mov [rax+0x1a], rbx
; ]] ;
STRING: ex-%context CONSTANT: ex-%context [[
USING: cpu.architecture make ; USING: cpu.architecture make ;
[ EAX %context ] B{ } make disassemble [ EAX %context ] B{ } make disassemble
00000000010f5ed0: 418b4500 mov eax, [r13] 00000000010f5ed0: 418b4500 mov eax, [r13]
; ]] ;
STRING: ex-%copy CONSTANT: ex-%copy [[
USING: cpu.architecture make ; USING: cpu.architecture make ;
RAX RBX int-rep [ %copy ] B{ } make disassemble RAX RBX int-rep [ %copy ] B{ } make disassemble
000000000108a970: 4889d8 mov rax, rbx 000000000108a970: 4889d8 mov rax, rbx
; ]] ;
STRING: ex-%safepoint CONSTANT: ex-%safepoint [[
USING: cpu.architecture make ; USING: cpu.architecture make ;
init-relocation [ %safepoint ] B{ } make disassemble init-relocation [ %safepoint ] B{ } make disassemble
00000000010b05a0: 890500000000 mov [rip], eax 00000000010b05a0: 890500000000 mov [rip], eax
; ]] ;
STRING: ex-%save-context CONSTANT: ex-%save-context [[
USING: cpu.architecture make ; USING: cpu.architecture make ;
[ RAX RBX %save-context ] B{ } make disassemble [ RAX RBX %save-context ] B{ } make disassemble
0000000000e63ab0: 498b4500 mov rax, [r13] 0000000000e63ab0: 498b4500 mov rax, [r13]
@ -58,9 +58,9 @@ USING: cpu.architecture make ;
0000000000e63ab9: 488918 mov [rax], rbx 0000000000e63ab9: 488918 mov [rax], rbx
0000000000e63abc: 4c897010 mov [rax+0x10], r14 0000000000e63abc: 4c897010 mov [rax+0x10], r14
0000000000e63ac0: 4c897818 mov [rax+0x18], r15 0000000000e63ac0: 4c897818 mov [rax+0x18], r15
; ]] ;
STRING: ex-%write-barrier CONSTANT: ex-%write-barrier [[
USING: cpu.architecture make tools.disassembler ; USING: cpu.architecture make tools.disassembler ;
init-relocation [ RAX RBX 3 -14 RCX RDX %write-barrier ] B{ } make disassemble init-relocation [ RAX RBX 3 -14 RCX RDX %write-barrier ] B{ } make disassemble
000000000143f960: 488d4cd80e lea rcx, [rax+rbx*8+0xe] 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 000000000143f978: 48c1e90a shr rcx, 0xa
000000000143f97c: 48ba0000000000000000 mov rdx, 0x0 000000000143f97c: 48ba0000000000000000 mov rdx, 0x0
000000000143f986: 48c60411c0 mov byte [rcx+rdx], 0xc0 000000000143f986: 48c60411c0 mov byte [rcx+rdx], 0xc0
; ]] ;
COMPILE> COMPILE>
HELP: %alien-invoke HELP: %alien-invoke

View File

@ -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." } { $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." } ; { $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" } { $syntax "M\\ class generic" }
{ $description "Pushes a method on the stack." } { $description "Pushes a method on the stack." }
{ $examples { $code "M\\ fixnum + see" } { $code "USING: ui.gadgets.editors ui.render ;" "M\\ editor draw-gadget* edit" } } ; { $examples { $code "M\\ fixnum + see" } { $code "USING: ui.gadgets.editors ui.render ;" "M\\ editor draw-gadget* edit" } } ;

View File

@ -824,12 +824,12 @@ HELP: \ C:
"In both cases, a word " { $snippet "<color>" } " 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." "In both cases, a word " { $snippet "<color>" } " 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: HELP: \ MAIN:
{ $syntax "main: word" } { $syntax "MAIN: word" }
{ $values { "word" 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 } "." } ; { $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>" } { $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" } "." } { $description "Begins a block of private word definitions. Private word definitions are placed in the current vocabulary name, suffixed with " { $snippet ".private" } "." }
{ $notes { $notes
@ -859,18 +859,18 @@ HELP: PRIVATE<
} }
} ; } ;
HELP: PRIVATE> HELP: \ PRIVATE>
{ $syntax "PRIVATE< ... PRIVATE>" } { $syntax "PRIVATE< ... PRIVATE>" }
{ $description "Ends a block of private word definitions." } ; { $description "Ends a block of private word definitions." } ;
{ \ PRIVATE< \ PRIVATE> } related-words { \ PRIVATE< \ PRIVATE> } related-words
HELP: << HELP: \ <<
{ $syntax "<< ... >>" } { $syntax "<< ... >>" }
{ $description "Evaluates some code at parse time." } { $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" } "." } ; { $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 ">>" } { $syntax ">>" }
{ $description "Marks the end of a parse time code block." } ; { $description "Marks the end of a parse time code block." } ;

View File

@ -5,7 +5,7 @@ sequences vectors words ;
in: compiler.cfg.builder in: compiler.cfg.builder
COMPILE< COMPILE<
STRING: ex-emit-call CONSTANT: ex-emit-call [[
USING: compiler.cfg.builder compiler.cfg.builder.blocks compiler.cfg.stacks USING: compiler.cfg.builder compiler.cfg.builder.blocks compiler.cfg.stacks
kernel make prettyprint ; kernel make prettyprint ;
begin-stack-analysis <basic-block> set-basic-block begin-stack-analysis <basic-block> 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 ; USING: compiler.cfg.builder prettyprint ;
T{ #shuffle { in-d { 37 81 92 } } } make-input-map . T{ #shuffle { in-d { 37 81 92 } } } make-input-map .
H{ H{
@ -42,7 +42,7 @@ H{
{ 37 T{ ds-loc { n 2 } } } { 37 T{ ds-loc { n 2 } } }
{ 92 T{ ds-loc } } { 92 T{ ds-loc } }
} }
; ]] ;
COMPILE> COMPILE>
HELP: build-cfg HELP: build-cfg

View File

@ -4,12 +4,12 @@ help.markup help.syntax literals make multiline sequences ;
in: compiler.codegen in: compiler.codegen
COMPILE< COMPILE<
STRING: generate-ex CONSTANT: generate-ex [[
USING: compiler.cfg.debugger io prettyprint ; USING: compiler.cfg.debugger io prettyprint ;
[ "hello\n" write ] test-regs first dup cfg set generate [ . ] [ 4 swap nth disassemble ] bi [ "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 } { "hello\n" output-stream assoc-stack stream-write }
@ -50,7 +50,7 @@ STRING: generate-ex-answer
0000000001cc4cfa: 0000 add [rax], al 0000000001cc4cfa: 0000 add [rax], al
0000000001cc4cfc: 0000 add [rax], al 0000000001cc4cfc: 0000 add [rax], al
0000000001cc4cfe: 0000 add [rax], al 0000000001cc4cfe: 0000 add [rax], al
; ]] ;
COMPILE> COMPILE>
HELP: emit-branch HELP: emit-branch