Issue #336
Incredibly slow Indenting
| Status: | Assigned | Start date: | 03/23/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Michael McNamara | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
History
Updated by Jonathan Greenlaw about 1 year ago
We are seeing some REALLY long times after hitting return in certain files. Below are two breakpoints.
Xemacs [version 21.5.29 of May 2009] verilog-mode-670
Debugger entered--Lisp error: (quit) parse-partial-sexp(1 278360) verilog-syntax-ppss() (save-excursion (verilog-syntax-ppss)) (let ((state ...)) (> (nth 0 state) 0)) verilog-in-paren() (and (equal (char-after) ?}) (verilog-in-paren)) (if (and (equal ... ?}) (verilog-in-paren)) (save-excursion (verilog-backward-ws&directives) (if ... ... nil))) verilog-at-close-constraint-p() (let ((there ...)) (if there (progn ... ... ...))) (cond ((equal ... ?{) (if ... ...)) ((equal ... ?}) (let ... ...)) ((looking-at verilog-beg-block-re-ordered) (cond ... ... ... ... ... ...)) ((looking-at verilog-end-block-re) (verilog-leap-to-head) (if ... ...)) ((looking-at verilog-defun-level-re) (if ... ... ...)) ((looking-at verilog-cpp-level-re) (throw ... ...)) ((bobp) (throw ... ...))) (catch (quote continue) (cond (... ...) (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...))) (while (verilog-re-search-backward re nil (quote move)) (catch (quote continue) (cond ... ... ... ... ... ... ...))) (let ((re ...)) (while (verilog-re-search-backward re nil ...) (catch ... ...)) (throw (quote nesting) (quote cpp))) (catch (quote nesting) (let (...) (while ... ...) (throw ... ...))) verilog-calc-1() (throw (quote nesting) (verilog-calc-1)) (while t (if (bobp) (throw ... ...)) (if (verilog-continued-line-1 lim) (let ... ... ...) (goto-char starting_position)) (if (looking-at "\\<else\\>") (let ... ...)) (throw (quote nesting) (verilog-calc-1))) (catch (quote nesting) (if (verilog-in-star-comment-p) (throw ... ...)) (if (save-excursion ... ...) (throw ... ...)) (if (verilog-in-struct-p) (throw ... ...)) (if (and verilog-indent-lists ... ...) (progn ... ...)) (while t (if ... ...) (if ... ... ...) (if ... ...) (throw ... ...))) (let* ((starting_position ...) (par 0) (begin ...) (lim ...) (type ...)) (if (not type) (setq type ...)) (if (> par 0) (list ... par) (cond ... ... ... ...))) (save-excursion (let* (... ... ... ... ...) (if ... ...) (if ... ... ...))) verilog-calculate-indent() (verilog-do-indent (verilog-calculate-indent)) verilog-indent-line() (if verilog-auto-indent-on-newline (verilog-indent-line)) (cond ((nth 7 state) (if ... ... ...) (verilog-indent-line)) ((nth 4 state) (newline) (verilog-more-comment)) ((eolp) (if ... ... ...) (if verilog-auto-indent-on-newline ...)) (t (newline))) (let ((state ...)) (cond (... ... ...) (... ... ...) (... ... ...) (t ...))) (lambda (&optional arg) "Terminate line and indent next line.\nWith optional ARG, remove existing end of line comments." (interactive) (let (...) (cond ... ... ... ...)))() call-interactively(electric-verilog-terminate-line) recursive-edit() debug(error (quit)) re-search-backward("//\\s-*.*\\s-*\\(translate\\|coverage\\|lint\\)_\\(on\\|off\\)\\>" nil t) (save-excursion (re-search-backward (concat "//\\s-*.*\\s-*" verilog-directive-regexp "\\(on\\|off\\)\\>") nil t)) (and (save-excursion (re-search-backward ... nil t)) (equal "off" (match-string 2)) (point)) verilog-within-translate-off() (and verilog-highlight-translate-off (verilog-within-translate-off)) (cond ((and verilog-highlight-translate-off ...) (verilog-back-to-start-translate-off ...)) ((looking-at verilog-directive-re-1) (point)) (t nil)) (save-excursion (beginning-of-line) (cond (... ...) (... ...) (t nil))) (setq p (save-excursion (beginning-of-line) (cond ... ... ...))) (while (/= here (point)) (setq here (point)) (verilog-skip-backward-comments) (setq p (save-excursion ... ...)) (if p (goto-char p))) (progn (let (...) (cond ... ...)) (narrow-to-region bound (point)) (while (/= here ...) (setq here ...) (verilog-skip-backward-comments) (setq p ...) (if p ...))) (if (< bound (point)) (progn (let ... ...) (narrow-to-region bound ...) (while ... ... ... ... ...))) (let* ((bound ...) (here bound) (p nil)) (if (< bound ...) (progn ... ... ...))) (save-restriction (let* (... ... ...) (if ... ...))) verilog-backward-ws&directives() (save-excursion (verilog-backward-ws&directives) (if (equal ... ?\;) (point) nil)) (if (and (equal ... ?}) (verilog-in-paren)) (save-excursion (verilog-backward-ws&directives) (if ... ... nil))) verilog-at-close-constraint-p() (let ((there ...)) (if there (progn ... ... ...))) (cond ((equal ... ?{) (if ... ...)) ((equal ... ?}) (let ... ...)) ((looking-at verilog-beg-block-re-ordered) (cond ... ... ... ... ... ...)) ((looking-at verilog-end-block-re) (verilog-leap-to-head) (if ... ...)) ((looking-at verilog-defun-level-re) (if ... ... ...)) ((looking-at verilog-cpp-level-re) (throw ... ...)) ((bobp) (throw ... ...))) (catch (quote continue) (cond (... ...) (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...))) (while (verilog-re-search-backward re nil (quote move)) (catch (quote continue) (cond ... ... ... ... ... ... ...))) (let ((re ...)) (while (verilog-re-search-backward re nil ...) (catch ... ...)) (throw (quote nesting) (quote cpp))) (catch (quote nesting) (let (...) (while ... ...) (throw ... ...))) verilog-calc-1() (throw (quote nesting) (verilog-calc-1)) (while t (if (bobp) (throw ... ...)) (if (verilog-continued-line-1 lim) (let ... ... ...) (goto-char starting_position)) (if (looking-at "\\<else\\>") (let ... ...)) (throw (quote nesting) (verilog-calc-1))) (catch (quote nesting) (if (verilog-in-star-comment-p) (throw ... ...)) (if (save-excursion ... ...) (throw ... ...)) (if (verilog-in-struct-p) (throw ... ...)) (if (and verilog-indent-lists ... ...) (progn ... ...)) (while t (if ... ...) (if ... ... ...) (if ... ...) (throw ... ...))) (let* ((starting_position ...) (par 0) (begin ...) (lim ...) (type ...)) (if (not type) (setq type ...)) (if (> par 0) (list ... par) (cond ... ... ... ...))) (save-excursion (let* (... ... ... ... ...) (if ... ...) (if ... ... ...))) verilog-calculate-indent() (verilog-do-indent (verilog-calculate-indent)) verilog-indent-line() (if verilog-auto-indent-on-newline (verilog-indent-line)) (cond ((nth 7 state) (if ... ... ...) (verilog-indent-line)) ((nth 4 state) (newline) (verilog-more-comment)) ((eolp) (if ... ... ...) (if verilog-auto-indent-on-newline ...)) (t (newline))) (let ((state ...)) (cond (... ... ...) (... ... ...) (... ... ...) (t ...))) (lambda (&optional arg) "Terminate line and indent next line.\nWith optional ARG, remove existing end of line comments." (interactive) (let (...) (cond ... ... ... ...)))()
Debugger entered--Lisp error: (quit) re-search-backward("//\\s-*.*\\s-*\\(translate\\|coverage\\|lint\\)_\\(on\\|off\\)\\>" nil t) (save-excursion (re-search-backward (concat "//\\s-*.*\\s-*" verilog-directive-regexp "\\(on\\|off\\)\\>") nil t)) (and (save-excursion (re-search-backward ... nil t)) (equal "off" (match-string 2)) (point)) verilog-within-translate-off() (and verilog-highlight-translate-off (verilog-within-translate-off)) (cond ((and verilog-highlight-translate-off ...) (verilog-back-to-start-translate-off ...)) ((looking-at verilog-directive-re-1) (point)) (t nil)) (save-excursion (beginning-of-line) (cond (... ...) (... ...) (t nil))) (setq p (save-excursion (beginning-of-line) (cond ... ... ...))) (while (/= here (point)) (setq here (point)) (verilog-skip-backward-comments) (setq p (save-excursion ... ...)) (if p (goto-char p))) (progn (let (...) (cond ... ...)) (narrow-to-region bound (point)) (while (/= here ...) (setq here ...) (verilog-skip-backward-comments) (setq p ...) (if p ...))) (if (< bound (point)) (progn (let ... ...) (narrow-to-region bound ...) (while ... ... ... ... ...))) (let* ((bound ...) (here bound) (p nil)) (if (< bound ...) (progn ... ... ...))) (save-restriction (let* (... ... ...) (if ... ...))) verilog-backward-ws&directives() (progn (backward-char 1) (verilog-backward-ws&directives) (equal (char-before) ?\;)) (and (equal (char-after) ?{) (forward-list) (progn (backward-char 1) (verilog-backward-ws&directives) (equal ... ?\;))) (save-excursion (and (equal ... ?{) (forward-list) (progn ... ... ...))) (if (save-excursion (and ... ... ...)) (verilog-re-search-backward "\\<constraint\\|coverpoint\\|cross\\>" nil (quote move)) nil) verilog-at-constraint-p() (if (verilog-at-constraint-p) (throw (quote nesting) (quote block))) (cond ((equal ... ?{) (if ... ...)) ((equal ... ?}) (let ... ...)) ((looking-at verilog-beg-block-re-ordered) (cond ... ... ... ... ... ...)) ((looking-at verilog-end-block-re) (verilog-leap-to-head) (if ... ...)) ((looking-at verilog-defun-level-re) (if ... ... ...)) ((looking-at verilog-cpp-level-re) (throw ... ...)) ((bobp) (throw ... ...))) (catch (quote continue) (cond (... ...) (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...))) (while (verilog-re-search-backward re nil (quote move)) (catch (quote continue) (cond ... ... ... ... ... ... ...))) (let ((re ...)) (while (verilog-re-search-backward re nil ...) (catch ... ...)) (throw (quote nesting) (quote cpp))) (catch (quote nesting) (let (...) (while ... ...) (throw ... ...))) verilog-calc-1() (throw (quote nesting) (verilog-calc-1)) (while t (if (bobp) (throw ... ...)) (if (verilog-continued-line-1 lim) (let ... ... ...) (goto-char starting_position)) (if (looking-at "\\<else\\>") (let ... ...)) (throw (quote nesting) (verilog-calc-1))) (catch (quote nesting) (if (verilog-in-star-comment-p) (throw ... ...)) (if (save-excursion ... ...) (throw ... ...)) (if (verilog-in-struct-p) (throw ... ...)) (if (and verilog-indent-lists ... ...) (progn ... ...)) (while t (if ... ...) (if ... ... ...) (if ... ...) (throw ... ...))) (let* ((starting_position ...) (par 0) (begin ...) (lim ...) (type ...)) (if (not type) (setq type ...)) (if (> par 0) (list ... par) (cond ... ... ... ...))) (save-excursion (let* (... ... ... ... ...) (if ... ...) (if ... ... ...))) verilog-calculate-indent() (verilog-do-indent (verilog-calculate-indent)) verilog-indent-line() (if verilog-auto-indent-on-newline (verilog-indent-line)) (cond ((nth 7 state) (if ... ... ...) (verilog-indent-line)) ((nth 4 state) (newline) (verilog-more-comment)) ((eolp) (if ... ... ...) (if verilog-auto-indent-on-newline ...)) (t (newline))) (let ((state ...)) (cond (... ... ...) (... ... ...) (... ... ...) (t ...))) (lambda (&optional arg) "Terminate line and indent next line.\nWith optional ARG, remove existing end of line comments." (interactive) (let (...) (cond ... ... ... ...)))()
Updated by Wilson Snyder about 1 year ago
- Status changed from New to Assigned
- Assignee set to Michael McNamara
Also available in: Atom
![[logo]](/img/veripool_small.png)