From 5e18e609b36c6724224c4af4879d0eb1fd7b4bbe Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 13 Mar 2018 11:57:40 -0700 Subject: [PATCH] cocoa: change ?-> to always cache stubs in syntax word. --- basis/cocoa/cocoa.factor | 2 +- basis/cocoa/messages/messages.factor | 2 +- basis/cocoa/touchbar/touchbar.factor | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/basis/cocoa/cocoa.factor b/basis/cocoa/cocoa.factor index e92f0f9068..f90e6036cc 100644 --- a/basis/cocoa/cocoa.factor +++ b/basis/cocoa/cocoa.factor @@ -14,7 +14,7 @@ SYMBOL: sent-messages SYNTAX: -> scan-token dup remember-send suffix! \ send suffix! ; -SYNTAX: ?-> scan-token dup remember-send suffix! \ ?send suffix! ; +SYNTAX: ?-> dup last cache-stubs scan-token dup remember-send suffix! \ ?send suffix! ; SYNTAX: SEL: scan-token diff --git a/basis/cocoa/messages/messages.factor b/basis/cocoa/messages/messages.factor index 670aed8141..8e917975c3 100644 --- a/basis/cocoa/messages/messages.factor +++ b/basis/cocoa/messages/messages.factor @@ -94,7 +94,7 @@ MACRO:: (?send) ( effect selector super? -- quot ) selector dup ?lookup-method effect or super? [ make-prepare-send ] 2keep super-message-senders message-senders ? get at - [ 1quotation append ] [ effect selector sender-stub 1quotation append ] if* ; + 1quotation append ; : ?send ( receiver args... selector effect -- return... ) f (?send) ; inline diff --git a/basis/cocoa/touchbar/touchbar.factor b/basis/cocoa/touchbar/touchbar.factor index 8f4a70420e..e040840b93 100644 --- a/basis/cocoa/touchbar/touchbar.factor +++ b/basis/cocoa/touchbar/touchbar.factor @@ -12,8 +12,6 @@ IN: cocoa.touchbar [ nip ] } 2cleave ; -{ id { id SEL id id SEL } } cache-stubs - :: make-NSTouchBar-button ( self identifier label-string action-string -- button ) NSCustomTouchBarItem -> alloc identifier { id { id SEL id } } ?-> initWithIdentifier: :> item