diff --git a/basis/cpu/ppc/assembler/assembler.factor b/basis/cpu/ppc/assembler/assembler.factor index f94cc00abc..6711c139b9 100644 --- a/basis/cpu/ppc/assembler/assembler.factor +++ b/basis/cpu/ppc/assembler/assembler.factor @@ -189,19 +189,19 @@ MTSPR: LR 8 MTSPR: CTR 9 ! Pseudo-instructions -: LI 0 rot ADDI ; inline -: SUBI neg ADDI ; inline -: LIS 0 rot ADDIS ; inline -: SUBIC neg ADDIC ; inline -: SUBIC. neg ADDIC. ; inline -: NOT dup NOR ; inline -: NOT. dup NOR. ; inline -: MR dup OR ; inline -: MR. dup OR. ; inline -: (SLWI) 0 31 pick - ; inline +: LI ( value dst -- ) 0 rot ADDI ; inline +: SUBI ( dst src1 src2 -- ) neg ADDI ; inline +: LIS ( value dst -- ) 0 rot ADDIS ; inline +: SUBIC ( dst src1 src2 -- ) neg ADDIC ; inline +: SUBIC. ( dst src1 src2 -- ) neg ADDIC. ; inline +: NOT ( dst src -- ) dup NOR ; inline +: NOT. ( dst src -- ) dup NOR. ; inline +: MR ( dst src -- ) dup OR ; inline +: MR. ( dst src -- ) dup OR. ; inline +: (SLWI) ( d a b -- d a b x y ) 0 31 pick - ; inline : SLWI ( d a b -- ) (SLWI) RLWINM ; : SLWI. ( d a b -- ) (SLWI) RLWINM. ; -: (SRWI) 32 over - swap 31 ; inline +: (SRWI) ( d a b -- d a b x y ) 32 over - swap 31 ; inline : SRWI ( d a b -- ) (SRWI) RLWINM ; : SRWI. ( d a b -- ) (SRWI) RLWINM. ; : LOAD32 ( n r -- ) >r w>h/h r> tuck LIS dup rot ORI ; diff --git a/basis/math/quaternions/quaternions.factor b/basis/math/quaternions/quaternions.factor index bb0d025dc6..bc6da9f564 100755 --- a/basis/math/quaternions/quaternions.factor +++ b/basis/math/quaternions/quaternions.factor @@ -10,7 +10,7 @@ IN: math.quaternions bytes 1 + 2/ ; inline +: nibbles>bytes ( m -- n ) 1 + 2/ ; inline : byte/nibble ( n -- shift n' ) [ 1 bitand 2 shift ] [ -1 shift ] bi ; inline diff --git a/basis/persistent/vectors/vectors.factor b/basis/persistent/vectors/vectors.factor index cd8e7c49e0..554db08e70 100644 --- a/basis/persistent/vectors/vectors.factor +++ b/basis/persistent/vectors/vectors.factor @@ -22,9 +22,9 @@ M: persistent-vector length count>> ; : node-size 32 ; inline -: node-mask node-size mod ; inline +: node-mask ( m -- n ) node-size mod ; inline -: node-shift -5 * shift ; inline +: node-shift ( m n -- x ) -5 * shift ; inline : node-nth ( i node -- obj ) [ node-mask ] [ children>> ] bi* nth ; diff --git a/basis/specialized-vectors/functor/functor.factor b/basis/specialized-vectors/functor/functor.factor index 8ba5354dc4..6069a4cb4a 100644 --- a/basis/specialized-vectors/functor/functor.factor +++ b/basis/specialized-vectors/functor/functor.factor @@ -18,7 +18,7 @@ WHERE TUPLE: V { underlying A } { length array-capacity } ; -: execute 0 V boa ; inline +: ( capacity -- vector ) execute 0 V boa ; inline M: V like drop dup V instance? [ @@ -31,7 +31,7 @@ M: A new-resizable drop execute ; M: V equal? over V instance? [ sequence= ] [ 2drop f ] if ; -: >V V new clone-like ; inline +: >V ( seq -- vector ) V new clone-like ; inline M: V pprint-delims drop V{ \ } ; diff --git a/basis/vlists/vlists.factor b/basis/vlists/vlists.factor index ea40594964..e4f64ca8f8 100644 --- a/basis/vlists/vlists.factor +++ b/basis/vlists/vlists.factor @@ -17,7 +17,8 @@ M: vlist nth-unsafe vector>> nth-unsafe ; vlist< [ length>> ] [ vector>> ] bi ; inline +: >vlist< ( vlist -- len vec ) + [ length>> ] [ vector>> ] bi ; inline : unshare ( len vec -- len vec' ) clone [ set-length ] 2keep ; inline diff --git a/basis/x11/xlib/xlib.factor b/basis/x11/xlib/xlib.factor index 1eee8307b1..07872fe576 100644 --- a/basis/x11/xlib/xlib.factor +++ b/basis/x11/xlib/xlib.factor @@ -13,7 +13,7 @@ USING: kernel arrays alien alien.c-types alien.strings alien.syntax math math.bitwise words sequences namespaces -continuations io io.encodings.ascii ; +continuations io io.encodings.ascii alias ; IN: x11.xlib LIBRARY: xlib @@ -50,17 +50,17 @@ TYPEDEF: ulong Time TYPEDEF: void* Window** TYPEDEF: void* Atom** -: ; inline -: ; inline -: ; inline -: ; inline -: ; inline +ALIAS: +ALIAS: +ALIAS: +ALIAS: +ALIAS: -: *XID *ulong ; inline -: *Window *XID ; inline -: *Drawable *XID ; inline -: *KeySym *XID ; inline -: *Atom *ulong ; inline +ALIAS: *XID *ulong +ALIAS: *Window *XID +ALIAS: *Drawable *XID +ALIAS: *KeySym *XID +ALIAS: *Atom *ulong ! ! 2 - Display Functions ! @@ -98,21 +98,21 @@ FUNCTION: int XCloseDisplay ( Display* display ) ; ! 3.2 - Window Attributes -: CWBackPixmap 1 0 shift ; inline -: CWBackPixel 1 1 shift ; inline -: CWBorderPixmap 1 2 shift ; inline -: CWBorderPixel 1 3 shift ; inline -: CWBitGravity 1 4 shift ; inline -: CWWinGravity 1 5 shift ; inline -: CWBackingStore 1 6 shift ; inline -: CWBackingPlanes 1 7 shift ; inline -: CWBackingPixel 1 8 shift ; inline -: CWOverrideRedirect 1 9 shift ; inline -: CWSaveUnder 1 10 shift ; inline -: CWEventMask 1 11 shift ; inline -: CWDontPropagate 1 12 shift ; inline -: CWColormap 1 13 shift ; inline -: CWCursor 1 14 shift ; inline +: CWBackPixmap ( -- n ) 0 2^ ; inline +: CWBackPixel ( -- n ) 1 2^ ; inline +: CWBorderPixmap ( -- n ) 2 2^ ; inline +: CWBorderPixel ( -- n ) 3 2^ ; inline +: CWBitGravity ( -- n ) 4 2^ ; inline +: CWWinGravity ( -- n ) 5 2^ ; inline +: CWBackingStore ( -- n ) 6 2^ ; inline +: CWBackingPlanes ( -- n ) 7 2^ ; inline +: CWBackingPixel ( -- n ) 8 2^ ; inline +: CWOverrideRedirect ( -- n ) 9 2^ ; inline +: CWSaveUnder ( -- n ) 10 2^ ; inline +: CWEventMask ( -- n ) 11 2^ ; inline +: CWDontPropagate ( -- n ) 12 2^ ; inline +: CWColormap ( -- n ) 13 2^ ; inline +: CWCursor ( -- n ) 14 2^ ; inline C-STRUCT: XSetWindowAttributes { "Pixmap" "background_pixmap" } @@ -161,13 +161,13 @@ FUNCTION: int XMapRaised ( Display* display, Window w ) ; ! 3.7 - Configuring Windows -: CWX 1 0 shift ; inline -: CWY 1 1 shift ; inline -: CWWidth 1 2 shift ; inline -: CWHeight 1 3 shift ; inline -: CWBorderWidth 1 4 shift ; inline -: CWSibling 1 5 shift ; inline -: CWStackMode 1 6 shift ; inline +: CWX ( -- n ) 0 2^ ; inline +: CWY ( -- n ) 1 2^ ; inline +: CWWidth ( -- n ) 2 2^ ; inline +: CWHeight ( -- n ) 3 2^ ; inline +: CWBorderWidth ( -- n ) 4 2^ ; inline +: CWSibling ( -- n ) 5 2^ ; inline +: CWStackMode ( -- n ) 6 2^ ; inline C-STRUCT: XWindowChanges { "int" "x" } @@ -312,29 +312,29 @@ FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visual, ! 7 - Graphics Context Functions ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -: GCFunction 1 0 shift ; inline -: GCPlaneMask 1 1 shift ; inline -: GCForeground 1 2 shift ; inline -: GCBackground 1 3 shift ; inline -: GCLineWidth 1 4 shift ; inline -: GCLineStyle 1 5 shift ; inline -: GCCapStyle 1 6 shift ; inline -: GCJoinStyle 1 7 shift ; inline -: GCFillStyle 1 8 shift ; inline -: GCFillRule 1 9 shift ; inline -: GCTile 1 10 shift ; inline -: GCStipple 1 11 shift ; inline -: GCTileStipXOrigin 1 12 shift ; inline -: GCTileStipYOrigin 1 13 shift ; inline -: GCFont 1 14 shift ; inline -: GCSubwindowMode 1 15 shift ; inline -: GCGraphicsExposures 1 16 shift ; inline -: GCClipXOrigin 1 17 shift ; inline -: GCClipYOrigin 1 18 shift ; inline -: GCClipMask 1 19 shift ; inline -: GCDashOffset 1 20 shift ; inline -: GCDashList 1 21 shift ; inline -: GCArcMode 1 22 shift ; inline +: GCFunction ( -- n ) 0 2^ ; inline +: GCPlaneMask ( -- n ) 1 2^ ; inline +: GCForeground ( -- n ) 2 2^ ; inline +: GCBackground ( -- n ) 3 2^ ; inline +: GCLineWidth ( -- n ) 4 2^ ; inline +: GCLineStyle ( -- n ) 5 2^ ; inline +: GCCapStyle ( -- n ) 6 2^ ; inline +: GCJoinStyle ( -- n ) 7 2^ ; inline +: GCFillStyle ( -- n ) 8 2^ ; inline +: GCFillRule ( -- n ) 9 2^ ; inline +: GCTile ( -- n ) 10 2^ ; inline +: GCStipple ( -- n ) 11 2^ ; inline +: GCTileStipXOrigin ( -- n ) 12 2^ ; inline +: GCTileStipYOrigin ( -- n ) 13 2^ ; inline +: GCFont ( -- n ) 14 2^ ; inline +: GCSubwindowMode ( -- n ) 15 2^ ; inline +: GCGraphicsExposures ( -- n ) 16 2^ ; inline +: GCClipXOrigin ( -- n ) 17 2^ ; inline +: GCClipYOrigin ( -- n ) 18 2^ ; inline +: GCClipMask ( -- n ) 19 2^ ; inline +: GCDashOffset ( -- n ) 20 2^ ; inline +: GCDashList ( -- n ) 21 2^ ; inline +: GCArcMode ( -- n ) 22 2^ ; inline : GXclear HEX: 0 ; inline : GXand HEX: 1 ; inline @@ -505,32 +505,32 @@ FUNCTION: Status XKillClient ( Display* display, XID resource ) ; ! 10.3 - Event Masks -: NoEventMask 0 ; inline -: KeyPressMask 1 0 shift ; inline -: KeyReleaseMask 1 1 shift ; inline -: ButtonPressMask 1 2 shift ; inline -: ButtonReleaseMask 1 3 shift ; inline -: EnterWindowMask 1 4 shift ; inline -: LeaveWindowMask 1 5 shift ; inline -: PointerMotionMask 1 6 shift ; inline -: PointerMotionHintMask 1 7 shift ; inline -: Button1MotionMask 1 8 shift ; inline -: Button2MotionMask 1 9 shift ; inline -: Button3MotionMask 1 10 shift ; inline -: Button4MotionMask 1 11 shift ; inline -: Button5MotionMask 1 12 shift ; inline -: ButtonMotionMask 1 13 shift ; inline -: KeymapStateMask 1 14 shift ; inline -: ExposureMask 1 15 shift ; inline -: VisibilityChangeMask 1 16 shift ; inline -: StructureNotifyMask 1 17 shift ; inline -: ResizeRedirectMask 1 18 shift ; inline -: SubstructureNotifyMask 1 19 shift ; inline -: SubstructureRedirectMask 1 20 shift ; inline -: FocusChangeMask 1 21 shift ; inline -: PropertyChangeMask 1 22 shift ; inline -: ColormapChangeMask 1 23 shift ; inline -: OwnerGrabButtonMask 1 24 shift ; inline +: NoEventMask ( -- n ) 0 ; inline +: KeyPressMask ( -- n ) 0 2^ ; inline +: KeyReleaseMask ( -- n ) 1 2^ ; inline +: ButtonPressMask ( -- n ) 2 2^ ; inline +: ButtonReleaseMask ( -- n ) 3 2^ ; inline +: EnterWindowMask ( -- n ) 4 2^ ; inline +: LeaveWindowMask ( -- n ) 5 2^ ; inline +: PointerMotionMask ( -- n ) 6 2^ ; inline +: PointerMotionHintMask ( -- n ) 7 2^ ; inline +: Button1MotionMask ( -- n ) 8 2^ ; inline +: Button2MotionMask ( -- n ) 9 2^ ; inline +: Button3MotionMask ( -- n ) 10 2^ ; inline +: Button4MotionMask ( -- n ) 11 2^ ; inline +: Button5MotionMask ( -- n ) 12 2^ ; inline +: ButtonMotionMask ( -- n ) 13 2^ ; inline +: KeymapStateMask ( -- n ) 14 2^ ; inline +: ExposureMask ( -- n ) 15 2^ ; inline +: VisibilityChangeMask ( -- n ) 16 2^ ; inline +: StructureNotifyMask ( -- n ) 17 2^ ; inline +: ResizeRedirectMask ( -- n ) 18 2^ ; inline +: SubstructureNotifyMask ( -- n ) 19 2^ ; inline +: SubstructureRedirectMask ( -- n ) 20 2^ ; inline +: FocusChangeMask ( -- n ) 21 2^ ; inline +: PropertyChangeMask ( -- n ) 22 2^ ; inline +: ColormapChangeMask ( -- n ) 23 2^ ; inline +: OwnerGrabButtonMask ( -- n ) 24 2^ ; inline : KeyPress 2 ; inline : KeyRelease 3 ; inline @@ -584,20 +584,20 @@ C-STRUCT: XAnyEvent : Button4 4 ; inline : Button5 5 ; inline -: Button1Mask 1 8 shift ; inline -: Button2Mask 1 9 shift ; inline -: Button3Mask 1 10 shift ; inline -: Button4Mask 1 11 shift ; inline -: Button5Mask 1 12 shift ; inline +: Button1Mask ( -- n ) 1 8 shift ; inline +: Button2Mask ( -- n ) 1 9 shift ; inline +: Button3Mask ( -- n ) 1 10 shift ; inline +: Button4Mask ( -- n ) 1 11 shift ; inline +: Button5Mask ( -- n ) 1 12 shift ; inline -: ShiftMask 1 0 shift ; inline -: LockMask 1 1 shift ; inline -: ControlMask 1 2 shift ; inline -: Mod1Mask 1 3 shift ; inline -: Mod2Mask 1 4 shift ; inline -: Mod3Mask 1 5 shift ; inline -: Mod4Mask 1 6 shift ; inline -: Mod5Mask 1 7 shift ; inline +: ShiftMask ( -- n ) 1 0 shift ; inline +: LockMask ( -- n ) 1 1 shift ; inline +: ControlMask ( -- n ) 1 2 shift ; inline +: Mod1Mask ( -- n ) 1 3 shift ; inline +: Mod2Mask ( -- n ) 1 4 shift ; inline +: Mod3Mask ( -- n ) 1 5 shift ; inline +: Mod4Mask ( -- n ) 1 6 shift ; inline +: Mod5Mask ( -- n ) 1 7 shift ; inline C-STRUCT: XButtonEvent { "int" "type" } @@ -1321,15 +1321,15 @@ FUNCTION: int XBell ( Display* display, int percent ) ; ! !!! INPUT METHODS -: XIMPreeditArea HEX: 0001 ; -: XIMPreeditCallbacks HEX: 0002 ; -: XIMPreeditPosition HEX: 0004 ; -: XIMPreeditNothing HEX: 0008 ; -: XIMPreeditNone HEX: 0010 ; -: XIMStatusArea HEX: 0100 ; -: XIMStatusCallbacks HEX: 0200 ; -: XIMStatusNothing HEX: 0400 ; -: XIMStatusNone HEX: 0800 ; +: XIMPreeditArea HEX: 0001 ; inline +: XIMPreeditCallbacks HEX: 0002 ; inline +: XIMPreeditPosition HEX: 0004 ; inline +: XIMPreeditNothing HEX: 0008 ; inline +: XIMPreeditNone HEX: 0010 ; inline +: XIMStatusArea HEX: 0100 ; inline +: XIMStatusCallbacks HEX: 0200 ; inline +: XIMStatusNothing HEX: 0400 ; inline +: XIMStatusNone HEX: 0800 ; inline : XNVaNestedList "XNVaNestedList" ; : XNQueryInputStyle "queryInputStyle" ; diff --git a/basis/xmode/utilities/utilities.factor b/basis/xmode/utilities/utilities.factor index 23e4195158..69fc08742b 100644 --- a/basis/xmode/utilities/utilities.factor +++ b/basis/xmode/utilities/utilities.factor @@ -2,7 +2,7 @@ USING: accessors sequences assocs kernel quotations namespaces xml.data xml.utilities combinators macros parser lexer words fry ; IN: xmode.utilities -: implies [ not ] dip or ; inline +: implies ( x y -- z ) [ not ] dip or ; inline : child-tags ( tag -- seq ) children>> [ tag? ] filter ; diff --git a/extra/benchmark/mandel/mandel.factor b/extra/benchmark/mandel/mandel.factor index c501c35c6a..1da3d91c61 100755 --- a/extra/benchmark/mandel/mandel.factor +++ b/extra/benchmark/mandel/mandel.factor @@ -6,8 +6,8 @@ io.encodings.binary fry benchmark.mandel.params benchmark.mandel.colors ; IN: benchmark.mandel -: x-inc width 200000 zoom-fact * / ; inline -: y-inc height 150000 zoom-fact * / ; inline +: x-inc ( -- x ) width 200000 zoom-fact * / ; inline +: y-inc ( -- y ) height 150000 zoom-fact * / ; inline : c ( i j -- c ) [ x-inc * center real-part x-inc width 2 / * - + >float ] diff --git a/extra/benchmark/nbody/nbody.factor b/extra/benchmark/nbody/nbody.factor index 305fc2e33b..84c41ee69f 100644 --- a/extra/benchmark/nbody/nbody.factor +++ b/extra/benchmark/nbody/nbody.factor @@ -5,7 +5,7 @@ math.constants math.functions math.vectors prettyprint sequences hints arrays ; IN: benchmark.nbody -: solar-mass 4 pi sq * ; inline +: solar-mass ( -- x ) 4 pi sq * ; inline : days-per-year 365.24 ; inline TUPLE: body diff --git a/extra/formatting/formatting.factor b/extra/formatting/formatting.factor index 55ebfdf607..7dd8458488 100644 --- a/extra/formatting/formatting.factor +++ b/extra/formatting/formatting.factor @@ -113,7 +113,7 @@ MACRO: printf ( format-string -- ) time ( timestamp -- string ) [ hour>> ] [ minute>> ] [ second>> floor ] tri 3array diff --git a/extra/iokit/hid/hid.factor b/extra/iokit/hid/hid.factor index 11ba5d3687..465c55c833 100644 --- a/extra/iokit/hid/hid.factor +++ b/extra/iokit/hid/hid.factor @@ -53,7 +53,7 @@ IN: iokit.hid : kIOHIDElementDuplicateIndexKey "DuplicateIndex" ; inline : kIOHIDElementParentCollectionKey "ParentCollection" ; inline -: kIOHIDElementVendorSpecificKey +: kIOHIDElementVendorSpecificKey ( -- str ) cpu ppc? "VendorSpecifc" "VendorSpecific" ? ; inline : kIOHIDElementCookieMinKey "ElementCookieMin" ; inline diff --git a/extra/math/trig/trig.factor b/extra/math/trig/trig.factor index 3d9428adda..515d7c7b99 100644 --- a/extra/math/trig/trig.factor +++ b/extra/math/trig/trig.factor @@ -3,5 +3,5 @@ USING: math math.constants ; IN: math.trig -: deg>rad pi * 180 / ; inline -: rad>deg 180 * pi / ; inline +: deg>rad ( x -- y ) pi * 180 / ; inline +: rad>deg ( x -- y ) 180 * pi / ; inline diff --git a/extra/tetris/tetris.factor b/extra/tetris/tetris.factor index b200c4d735..5c819f6e69 100644 --- a/extra/tetris/tetris.factor +++ b/extra/tetris/tetris.factor @@ -25,6 +25,7 @@ M: tetris-gadget draw-gadget* ( gadget -- ) [ ] change-tetris ; tetris-gadget H{ + { T{ button-down f f 1 } [ request-focus ] } { T{ key-down f f "UP" } [ tetris>> rotate-right ] } { T{ key-down f f "d" } [ tetris>> rotate-left ] } { T{ key-down f f "f" } [ tetris>> rotate-right ] } diff --git a/unfinished/benchmark/richards/richards.factor b/unfinished/benchmark/richards/richards.factor index 894948e44f..90d4304eee 100644 --- a/unfinished/benchmark/richards/richards.factor +++ b/unfinished/benchmark/richards/richards.factor @@ -47,13 +47,13 @@ TUPLE: packet link id kind a1 a2 ; : HOLDBIT 4 ; inline : S_RUN 0 ; inline -: S_RUNPKT { PKTBIT } flags ; inline -: S_WAIT { WAITBIT } flags ; inline -: S_WAITPKT { WAITBIT PKTBIT } flags ; inline -: S_HOLD { HOLDBIT } flags ; inline -: S_HOLDPKT { HOLDBIT PKTBIT } flags ; inline -: S_HOLDWAIT { HOLDBIT WAITBIT } flags ; inline -: S_HOLDWAITPKT { HOLDBIT WAITBIT PKTBIT } flags ; inline +: S_RUNPKT ( -- n ) { PKTBIT } flags ; inline +: S_WAIT ( -- n ) { WAITBIT } flags ; inline +: S_WAITPKT ( -- n ) { WAITBIT PKTBIT } flags ; inline +: S_HOLD ( -- n ) { HOLDBIT } flags ; inline +: S_HOLDPKT ( -- n ) { HOLDBIT PKTBIT } flags ; inline +: S_HOLDWAIT ( -- n ) { HOLDBIT WAITBIT } flags ; inline +: S_HOLDWAITPKT ( -- n ) { HOLDBIT WAITBIT PKTBIT } flags ; inline : task-tab-size 10 ; inline