From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: lexbind Date: Sun, 20 Feb 2011 11:39:44 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1298228492 4100 80.91.229.12 (20 Feb 2011 19:01:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2011 19:01:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 20 20:01:27 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PrEX5-0001dE-Gb for ged-emacs-devel@m.gmane.org; Sun, 20 Feb 2011 20:01:24 +0100 Original-Received: from localhost ([127.0.0.1]:35165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrEX4-0006I6-JX for ged-emacs-devel@m.gmane.org; Sun, 20 Feb 2011 14:01:22 -0500 Original-Received: from [140.186.70.92] (port=39444 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrECD-000506-UW for emacs-devel@gnu.org; Sun, 20 Feb 2011 13:39:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrECB-0002mD-Ny for emacs-devel@gnu.org; Sun, 20 Feb 2011 13:39:49 -0500 Original-Received: from mx1.redhat.com ([209.132.183.28]:59807) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrECB-0002m2-CP for emacs-devel@gnu.org; Sun, 20 Feb 2011 13:39:47 -0500 Original-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1KIdkR8032406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 20 Feb 2011 13:39:46 -0500 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p1KIdj29009308; Sun, 20 Feb 2011 13:39:46 -0500 Original-Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p1KIdjiR013090; Sun, 20 Feb 2011 13:39:45 -0500 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id C950C3792F0; Sun, 20 Feb 2011 11:39:44 -0700 (MST) X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Thu, 17 Feb 2011 17:10:54 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136287 Archived-At: Stefan> Just a heads up that the lexbind-new branch is moving forward. Very cool. Stefan> It's not yet ready for inclusion (still a few things to clean up and Stefan> a few more to change), but I finally got it to run mpc.el (compiled Stefan> using lexical-binding). I checked it out and did a make bootstrap. It failed as appended. Tom Compiling /space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/chart.el Debugger entered--Lisp error: (wrong-type-argument listp "Forgot to expand = macro eieio-object-p") error-message-string("Forgot to expand macro eieio-object-p") byte-compile-report-error("Forgot to expand macro eieio-object-p") byte-compile-form((eieio-object-p (car local-args))) byte-compile-one-arg((not (eieio-object-p (car local-args)))) byte-compile-form((not (eieio-object-p (car local-args)))) byte-compile-if((if (not (eieio-object-p (car local-args))) (signal (quot= e no-method-definition) (list (quote shared-initialize) local-args)) (let (= (scoped-class (quote eieio-default-superclass)) (eieio-generic-call-next-me= thod-list nil) (eieio-generic-call-key method-primary) (eieio-generic-call-= methodname (quote shared-initialize)) (eieio-generic-call-arglst local-args= )) (apply (quote (lambda (obj slots) "Set slots of OBJ with SLOTS which is = a list of name/value pairs.\nCalled from the constructor routine." (let ((s= coped-class ...)) (while slots (let ... ...) (setq slots ...))))) local-arg= s)))) byte-compile-form((if (not (eieio-object-p (car local-args))) (signal (qu= ote no-method-definition) (list (quote shared-initialize) local-args)) (let= ((scoped-class (quote eieio-default-superclass)) (eieio-generic-call-next-= method-list nil) (eieio-generic-call-key method-primary) (eieio-generic-cal= l-methodname (quote shared-initialize)) (eieio-generic-call-arglst local-ar= gs)) (apply (quote (lambda (obj slots) "Set slots of OBJ with SLOTS which i= s a list of name/value pairs.\nCalled from the constructor routine." (let (= (scoped-class ...)) (while slots (let ... ...) (setq slots ...))))) local-a= rgs))) nil) byte-compile-top-level((progn (if (not (eieio-object-p (car local-args)))= (signal (quote no-method-definition) (list (quote shared-initialize) local= -args)) (if nil (apply (quote no-applicable-method) (car local-args) (quote= shared-initialize) local-args) (let ((scoped-class (quote eieio-default-su= perclass)) (eieio-generic-call-next-method-list nil) (eieio-generic-call-ke= y method-primary) (eieio-generic-call-methodname (quote shared-initialize))= (eieio-generic-call-arglst local-args)) (apply (quote (lambda (obj slots) = "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled f= rom the constructor routine." (let ... ...))) local-args))))) nil lambda) byte-compile-lambda((lambda (&rest local-args) "Set slots of OBJ with SLO= TS which is a list of name/value pairs.\nCalled from the constructor routin= e." (if (not (eieio-object-p (car local-args))) (signal (quote no-method-de= finition) (list (quote shared-initialize) local-args)) (if nil (apply (quot= e no-applicable-method) (car local-args) (quote shared-initialize) local-ar= gs) (let ((scoped-class (quote eieio-default-superclass)) (eieio-generic-ca= ll-next-method-list nil) (eieio-generic-call-key method-primary) (eieio-gen= eric-call-methodname (quote shared-initialize)) (eieio-generic-call-arglst = local-args)) (apply (quote (lambda (obj slots) "Set slots of OBJ with SLOTS= which is a list of name/value pairs.\nCalled from the constructor routine.= " (let ... ...))) local-args)))))) (let ((byte-compile-free-references nil) (byte-compile-warnings nil)) (by= te-compile-lambda (\` (lambda (&rest local-args) (\, doc-string) (if (not (= eieio-object-p (car local-args))) (signal (quote no-method-definition) (lis= t (\, ...) local-args)) (if (\, (if ... nil ...)) (apply (quote no-applicab= le-method) (car local-args) (\, ...) local-args) (let (... ... ... ... ...)= (apply ... local-args)))))))) eieio-defgeneric-form-primary-only-one(shared-initialize "Set slots of OB= J with SLOTS which is a list of name/value pairs.\nCalled from the construc= tor routine." eieio-default-superclass (lambda (obj slots) "Set slots of OB= J with SLOTS which is a list of name/value pairs.\nCalled from the construc= tor routine." (let ((scoped-class (aref obj object-class))) (while slots (l= et ((rn (eieio-initarg-to-attribute (object-class-fast obj) (car slots)))) = (if (not rn) (slot-missing obj (car slots) (quote oset) (car (cdr slots))) = (eieio-oset obj rn (car (cdr slots))))) (setq slots (cdr (cdr slots))))))) (fset method (eieio-defgeneric-form-primary-only-one method doc-string (c= ar entry) (cdr entry))) (let* ((doc-string (documentation method)) (M (get method (quote eieio-me= thod-tree))) (entry (car (aref M method-primary)))) (fset method (eieio-def= generic-form-primary-only-one method doc-string (car entry) (cdr entry)))) eieio-defgeneric-reset-generic-form-primary-only-one(shared-initialize) (if (generic-primary-only-one-p method) (eieio-defgeneric-reset-generic-f= orm-primary-only-one method) (eieio-defgeneric-reset-generic-form-primary-o= nly method)) (if (generic-primary-only-p method) (if (generic-primary-only-one-p metho= d) (eieio-defgeneric-reset-generic-form-primary-only-one method) (eieio-def= generic-reset-generic-form-primary-only method)) (eieio-defgeneric-reset-ge= neric-form method)) (progn (if (generic-primary-only-p method) (if (generic-primary-only-one-= p method) (eieio-defgeneric-reset-generic-form-primary-only-one method) (ei= eio-defgeneric-reset-generic-form-primary-only method)) (eieio-defgeneric-r= eset-generic-form method))) (if eieio-optimize-primary-methods-flag (progn (if (generic-primary-only-= p method) (if (generic-primary-only-one-p method) (eieio-defgeneric-reset-g= eneric-form-primary-only-one method) (eieio-defgeneric-reset-generic-form-p= rimary-only method)) (eieio-defgeneric-reset-generic-form method)))) (when eieio-optimize-primary-methods-flag (if (generic-primary-only-p met= hod) (if (generic-primary-only-one-p method) (eieio-defgeneric-reset-generi= c-form-primary-only-one method) (eieio-defgeneric-reset-generic-form-primar= y-only method)) (eieio-defgeneric-reset-generic-form method))) eieio-defmethod(shared-initialize (((obj eieio-default-superclass) slots)= "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled = from the constructor routine." (let ((scoped-class (aref obj object-class))= ) (while slots (let ((rn (eieio-initarg-to-attribute (object-class-fast obj= ) (car slots)))) (if (not rn) (slot-missing obj (car slots) (quote oset) (c= ar (cdr slots))) (eieio-oset obj rn (car (cdr slots))))) (setq slots (cdr (= cdr slots))))))) (defmethod shared-initialize ((obj eieio-default-superclass) slots) "Set = slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from t= he constructor routine." (let ((scoped-class (aref obj object-class))) (whi= le slots (let ((rn (eieio-initarg-to-attribute (object-class-fast obj) (car= slots)))) (if (not rn) (slot-missing obj (car slots) (quote oset) (car (cd= r slots))) (eieio-oset obj rn (car (cdr slots))))) (setq slots (cdr (cdr sl= ots)))))) (progn (if (fboundp (quote compiled-function-arglist)) (defalias (quote e= ieio-compiled-function-arglist) (quote compiled-function-arglist)) (defun e= ieio-compiled-function-arglist (func) "Return the argument list for the com= piled function FUNC." (aref func 0))) (defvar eieio-hook nil "*This hook is= executed, then cleared each time `defclass' is called.") (defvar eieio-err= or-unsupported-class-tags nil "Non-nil to throw an error if an encountered = tag is unsupported.\nThis may prevent classes from CLOS applications from b= eing used with EIEIO\nsince EIEIO does not support all CLOS tags.") (defvar= eieio-skip-typecheck nil "*If non-nil, skip all slot typechecking.\nSet th= is to t permanently if a program is functioning well to get a\nsmall speed = increase. This variable is also used internally to handle\ndefault setting= for optimization purposes.") (defvar eieio-optimize-primary-methods-flag t= "Non-nil means to optimize the method dispatch on primary methods.") (defv= ar this nil "Inside a method, this variable is the object in question.\nDO = NOT SET THIS YOURSELF unless you are trying to simulate friendly slots.\n\n= Note: Embedded methods are no longer supported. The variable THIS is\nstil= l set for CLOS methods for the sake of routines like\n`call-next-method'.")= (defvar scoped-class nil "This is set to a class when a method is running.= \nThis is so we know we are allowed to check private parts or how to\nexecu= te a `call-next-method'. DO NOT SET THIS YOURSELF!") (defvar eieio-initial= izing-object nil "Set to non-nil while initializing an object.") (defconst = eieio-unbound (if (and (boundp (quote eieio-unbound)) (symbolp eieio-unboun= d)) eieio-unbound (make-symbol "unbound")) "Uninterned symbol representing = an unbound slot in an object.") (defvar eieio-default-superclass nil) (defc= onst class-symbol 1 "Class's symbol (self-referencing.).") (defconst class-= parent 2 "Class parent slot.") (defconst class-children 3 "Class children c= lass slot.") (defconst class-symbol-obarray 4 "Obarray permitting fast acce= ss to variable position indexes.") (defconst class-public-a 5 "Class attrib= ute index.") (defconst class-public-d 6 "Class attribute defaults index.") = (defconst class-public-doc 7 "Class documentation strings for attributes.")= (defconst class-public-type 8 "Class type for a slot.") (defconst class-pu= blic-custom 9 "Class custom type for a slot.") (defconst class-public-custo= m-label 10 "Class custom group for a slot.") (defconst class-public-custom-= group 11 "Class custom group for a slot.") (defconst class-public-printer 1= 2 "Printer for a slot.") (defconst class-protection 13 "Class protection fo= r a slot.") (defconst class-initarg-tuples 14 "Class initarg tuples list.")= (defconst class-class-allocation-a 15 "Class allocated attributes.") (defc= onst class-class-allocation-doc 16 "Class allocated documentation.") (defco= nst class-class-allocation-type 17 "Class allocated value type.") (defconst= class-class-allocation-custom 18 "Class allocated custom descriptor.") (de= fconst class-class-allocation-custom-label 19 "Class allocated custom descr= iptor.") (defconst class-class-allocation-custom-group 20 "Class allocated = custom group.") (defconst class-class-allocation-printer 21 "Class allocate= d printer for a slot.") (defconst class-class-allocation-protection 22 "Cla= ss allocated protection list.") (defconst class-class-allocation-values 23 = "Class allocated value vector.") (defconst class-default-object-cache 24 "C= ache index of what a newly created object would look like.\nThis will speed= up instantiation time as only a `copy-sequence' will\nbe needed, instead o= f looping over all the values and setting them\nfrom the default.") (defcon= st class-options 25 "Storage location of tagged class options.\nStored outr= ight without modifications or stripping.") (defconst class-num-slots 26 "Nu= mber of slots in the class definition object.") (defconst object-class 1 "I= ndex in an object vector where the class is stored.") (defconst object-name= 2 "Index in an object where the name is stored.") (defconst method-static = 0 "Index into :static tag on a method.") (defconst method-before 1 "Index i= nto :before tag on a method.") (defconst method-primary 2 "Index into :prim= ary tag on a method.") (defconst method-after 3 "Index into :after tag on a= method.") (defconst method-num-lists 4 "Number of indexes into methods vec= tor in which groups of functions are kept.") (defconst method-generic-befor= e 4 "Index into generic :before tag on a method.") (defconst method-generic= -primary 5 "Index into generic :primary tag on a method.") (defconst method= -generic-after 6 "Index into generic :after tag on a method.") (defconst me= thod-num-slots 7 "Number of indexes into a method's vector.") (defsubst eie= io-specialized-key-to-generic-key (key) "Convert a specialized KEY into a g= eneric method key." (cond ((eq key method-static) 0) ((< key method-num-lis= ts) (+ key 3)) (t key))) (autoload (quote byte-compile-file-form-defmethod)= "eieio-comp" "This function is used to byte compile methods in a nice way.= ") ...) (eval-and-compile (if (fboundp (quote compiled-function-arglist)) (defali= as (quote eieio-compiled-function-arglist) (quote compiled-function-arglist= )) (defun eieio-compiled-function-arglist (func) "Return the argument list = for the compiled function FUNC." (aref func 0))) (defvar eieio-hook nil "*T= his hook is executed, then cleared each time `defclass' is called.") (defva= r eieio-error-unsupported-class-tags nil "Non-nil to throw an error if an e= ncountered tag is unsupported.\nThis may prevent classes from CLOS applicat= ions from being used with EIEIO\nsince EIEIO does not support all CLOS tags= .") (defvar eieio-skip-typecheck nil "*If non-nil, skip all slot typechecki= ng.\nSet this to t permanently if a program is functioning well to get a\ns= mall speed increase. This variable is also used internally to handle\ndefa= ult setting for optimization purposes.") (defvar eieio-optimize-primary-met= hods-flag t "Non-nil means to optimize the method dispatch on primary metho= ds.") (defvar this nil "Inside a method, this variable is the object in que= stion.\nDO NOT SET THIS YOURSELF unless you are trying to simulate friendly= slots.\n\nNote: Embedded methods are no longer supported. The variable TH= IS is\nstill set for CLOS methods for the sake of routines like\n`call-next= -method'.") (defvar scoped-class nil "This is set to a class when a method = is running.\nThis is so we know we are allowed to check private parts or ho= w to\nexecute a `call-next-method'. DO NOT SET THIS YOURSELF!") (defvar ei= eio-initializing-object nil "Set to non-nil while initializing an object.")= (defconst eieio-unbound (if (and (boundp (quote eieio-unbound)) (symbolp e= ieio-unbound)) eieio-unbound (make-symbol "unbound")) "Uninterned symbol re= presenting an unbound slot in an object.") (defvar eieio-default-superclass= nil) (defconst class-symbol 1 "Class's symbol (self-referencing.).") (defc= onst class-parent 2 "Class parent slot.") (defconst class-children 3 "Class= children class slot.") (defconst class-symbol-obarray 4 "Obarray permittin= g fast access to variable position indexes.") (defconst class-public-a 5 "C= lass attribute index.") (defconst class-public-d 6 "Class attribute default= s index.") (defconst class-public-doc 7 "Class documentation strings for at= tributes.") (defconst class-public-type 8 "Class type for a slot.") (defcon= st class-public-custom 9 "Class custom type for a slot.") (defconst class-p= ublic-custom-label 10 "Class custom group for a slot.") (defconst class-pub= lic-custom-group 11 "Class custom group for a slot.") (defconst class-publi= c-printer 12 "Printer for a slot.") (defconst class-protection 13 "Class pr= otection for a slot.") (defconst class-initarg-tuples 14 "Class initarg tup= les list.") (defconst class-class-allocation-a 15 "Class allocated attribut= es.") (defconst class-class-allocation-doc 16 "Class allocated documentatio= n.") (defconst class-class-allocation-type 17 "Class allocated value type."= ) (defconst class-class-allocation-custom 18 "Class allocated custom descri= ptor.") (defconst class-class-allocation-custom-label 19 "Class allocated c= ustom descriptor.") (defconst class-class-allocation-custom-group 20 "Class= allocated custom group.") (defconst class-class-allocation-printer 21 "Cla= ss allocated printer for a slot.") (defconst class-class-allocation-protect= ion 22 "Class allocated protection list.") (defconst class-class-allocation= -values 23 "Class allocated value vector.") (defconst class-default-object-= cache 24 "Cache index of what a newly created object would look like.\nThis= will speed up instantiation time as only a `copy-sequence' will\nbe needed= , instead of looping over all the values and setting them\nfrom the default= .") (defconst class-options 25 "Storage location of tagged class options.\n= Stored outright without modifications or stripping.") (defconst class-num-s= lots 26 "Number of slots in the class definition object.") (defconst object= -class 1 "Index in an object vector where the class is stored.") (defconst = object-name 2 "Index in an object where the name is stored.") (defconst met= hod-static 0 "Index into :static tag on a method.") (defconst method-before= 1 "Index into :before tag on a method.") (defconst method-primary 2 "Index= into :primary tag on a method.") (defconst method-after 3 "Index into :aft= er tag on a method.") (defconst method-num-lists 4 "Number of indexes into = methods vector in which groups of functions are kept.") (defconst method-ge= neric-before 4 "Index into generic :before tag on a method.") (defconst met= hod-generic-primary 5 "Index into generic :primary tag on a method.") (defc= onst method-generic-after 6 "Index into generic :after tag on a method.") (= defconst method-num-slots 7 "Number of indexes into a method's vector.") (d= efsubst eieio-specialized-key-to-generic-key (key) "Convert a specialized K= EY into a generic method key." (cond ((eq key method-static) 0) ((< key met= hod-num-lists) (+ key 3)) (t key))) (autoload (quote byte-compile-file-form= -defmethod) "eieio-comp" "This function is used to byte compile methods in = a nice way.") ...) eval-buffer(# nil "/space/tromey/EmacsBzr/Git/emacs/lisp/= emacs-lisp/eieio.el" nil t) ; Reading at buffer position 112490 load-with-code-conversion("/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-li= sp/eieio.el" "/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/eieio.el" ni= l t) require(eieio) apply(require eieio) byte-compile-file-form-require((require (quote eieio))) byte-compile-file-form((require (quote eieio))) #[nil "rq\210 \203=0D=00\306 \n\"\210eb\210\307=13\310\307w\210\311\312!= \203\"=00\313y\210\202=12=00m\204D=00`\211=14=15\307=1E=13\314!=1E=14=0E= =13\203;=00\315\316!\210\317=0E=14!\210*\202=12=00\320 \210d=15\321 \210) \= 205Y=00r\nq\210\322 !)\207" [bytecomp-inbuffer bytecomp-filename bytecomp-o= utbuffer byte-compile-unresolved-functions byte-compile-read-position byte-= compile-last-position byte-compile-insert-header nil " \n\f" looking-at ";= " 1 read byte-compile-warn "!! The file uses old-style backquotes !!\nThis = functionality has been obsolete for more than 10 years already\nand will be= removed soon. See (elisp)Backquote in the manual." byte-compile-file-form= byte-compile-flush-pending byte-compile-warn-about-unresolved-functions by= te-compile-fix-header old-style-backquotes form] 4]() byte-compile-from-buffer(# "/space/tromey/Emacs= Bzr/Git/emacs/lisp/emacs-lisp/chart.el") byte-compile-file("/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/chart= .el") batch-byte-compile-file("/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp= /chart.el") batch-byte-compile() command-line-1(("--eval" "(setq max-lisp-eval-depth 1000)" "-f" "batch-by= te-compile" "/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/chart.el")) command-line() normal-top-level()