emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add pseudo vector types


From: Eli Zaretskii
Subject: Re: How to add pseudo vector types
Date: Thu, 15 Jul 2021 18:50:36 +0300

> From: Yuan Fu <casouri@gmail.com>
> Date: Thu, 15 Jul 2021 11:17:02 -0400
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
>  emacs-devel@gnu.org
> 
> > Great, then please try also to liberate the implementation from using
> > JSON, it's a major slowdown factor.
> 
> JSON? I didn’t write anything involving JSON. 

Then what is json-module.zip about?

> While you are looking at the patch, here are some questions for integrating 
> tree-sitter with out buffer implementation. What I envisioned is for each 
> buffer to have a `parser-list’, and on buffer change, we update each parser’s 
> tree. I think modifying signal_after_change is enough to cover al the cases?

Why do you need to do this when a buffer is updated? why not use
display as the trigger?  Large portions of a buffer will never be
displayed, and some buffers will not be displayed at all.  Why waste
cycles on them?  Redisplay is perfectly equipped to tell you when some
chunk of buffer text is going to be redrawn, and it already knows to
do nothing if the buffer haven't changed.

> And, for tree-sitter to take the buffer’s content directly, we need to tell 
> it to skip the gap.

AFAIR, tree-sitter allows the calling package to provide a function to
access the text, isn't that so?  If so, you could write a function
that accesses buffer text via BYTE_POS_ADDR etc., and that knows how
to skip the gap already.

> I only need to modify gap_left, gap_right, make_gap_smaller and 
> make_gap_larger, right?

Why would you need to _modify_ any of these?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]