comparison src/macros.h @ 20392:4c317d8c1051 v8.2.0751

patch 8.2.0751: Vim9: performance can be improved Commit: https://github.com/vim/vim/commit/7e9f351b2e69b498c4ee5004d7459844e1ba191a Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 13 22:44:22 2020 +0200 patch 8.2.0751: Vim9: performance can be improved Problem: Vim9: performance can be improved. Solution: Don't call break. Inline check for list materialize. Make an inline version of ga_grow().
author Bram Moolenaar <Bram@vim.org>
date Wed, 13 May 2020 22:45:04 +0200
parents bf377a9ffccb
children 8a2b86a39ef4
comparison
equal deleted inserted replaced
20391:9ceee4daa596 20392:4c317d8c1051
371 # define ESTACK_CHECK_DECLARATION 371 # define ESTACK_CHECK_DECLARATION
372 # define ESTACK_CHECK_SETUP 372 # define ESTACK_CHECK_SETUP
373 # define ESTACK_CHECK_NOW 373 # define ESTACK_CHECK_NOW
374 # define CHECK_CURBUF 374 # define CHECK_CURBUF
375 #endif 375 #endif
376
377 // Inline the condition for performance.
378 #define CHECK_LIST_MATERIALIZE(l) if ((l)->lv_first == &range_list_item) range_list_materialize(l)
379
380 // Inlined version of ga_grow(). Especially useful if "n" is a constant.
381 #define GA_GROW(gap, n) (((gap)->ga_maxlen - (gap)->ga_len < n) ? ga_grow_inner((gap), (n)) : OK)