Commit Graph

14321 Commits

Author SHA1 Message Date
Behdad Esfahbod ba08de624e [ucd] Change OPTIMIZE_SIZE to compression level 9
Also changes default compression level from 3 to 5, but that shows
no change in the generated table size.
2022-11-19 13:25:19 -07:00
Behdad Esfahbod b68f9f3cfe [machinery] Adjust comment 2022-11-18 21:36:01 -07:00
Behdad Esfahbod a47ba1dc0e [lazy-pointer] Hide instance 2022-11-18 21:14:07 -07:00
Behdad Esfahbod 281b4705b4 [pool] Rewrite a loop as dagger 2022-11-18 20:25:05 -07:00
Behdad Esfahbod 3ff8abf272 Revert "[map] Allow std::move-ing keys into the map"
This reverts commit f657ef7e57.

This breaks many compilers with messages like this:

hb-subset-plan.hh:226: undefined reference to `OT::head::tableTag'

I'm out of my depth re how to fix it.
2022-11-18 19:38:12 -07:00
Behdad Esfahbod 039e476bac [test-vector] Test sink-move'ing 2022-11-18 19:26:02 -07:00
Behdad Esfahbod a3a218edb5 [map] Add a couple more sink interfaces 2022-11-18 19:24:41 -07:00
Behdad Esfahbod 90226eab89 [test-map] Test inserting shared_ptr key 2022-11-18 19:21:58 -07:00
Behdad Esfahbod f657ef7e57 [map] Allow std::move-ing keys into the map 2022-11-18 19:17:03 -07:00
Behdad Esfahbod a1768ad829 [map] Fix use of != 2022-11-18 19:08:34 -07:00
Behdad Esfahbod e74b372b59 [test-map] Test moving values 2022-11-18 18:43:31 -07:00
Behdad Esfahbod a9c6a20b19 [map] Support moving value in sink interface 2022-11-18 18:29:12 -07:00
Behdad Esfahbod 1bf9afaad0 [test-vector] Test sink interface 2022-11-18 18:20:50 -07:00
Behdad Esfahbod fa0e4b041d [test-map] Test sink interface 2022-11-18 18:20:14 -07:00
Behdad Esfahbod 1c612a8541 [test-set] Test sinking range 2022-11-18 18:19:31 -07:00
Behdad Esfahbod 356708e34a [test-set] Test length of iterator 2022-11-18 18:17:34 -07:00
Behdad Esfahbod 2892fc71e8 [vector] Add std::move to pop()
This was removed in 76fc27713f,
but I believe that was faultly. It was because of a bad move
implementation in the set.
2022-11-18 18:03:59 -07:00
Behdad Esfahbod 921f45f46d [array] Rewrite hash() as dagger 2022-11-18 17:26:58 -07:00
Behdad Esfahbod 213117317c [array] Remove hash specializations for bytes
Not needed.
2022-11-18 17:24:44 -07:00
Behdad Esfahbod bef5a1c8dc [vector] Comment 2022-11-18 17:22:17 -07:00
Behdad Esfahbod 69b41f92ec [vector] Simplify shift_down_vector()
Compiler is smarter than I am.
2022-11-18 17:04:34 -07:00
Behdad Esfahbod 1dd9396c7a [vector] Optimize grow_vector() for size
Again, compiler is smarter than I am.
2022-11-18 17:01:14 -07:00
Behdad Esfahbod d36f688131 [vector] Optimize shrink_vector for size
Compiler is smarter than I am.
2022-11-18 17:00:07 -07:00
Behdad Esfahbod bc8eded296 [vector] Remove a for loop 2022-11-18 16:51:24 -07:00
Behdad Esfahbod afd9a58bd7 [vector] Save a couple hb_iter() invocations 2022-11-18 16:47:32 -07:00
Behdad Esfahbod 3ead9863d2 [map] Add size() 2022-11-18 16:43:47 -07:00
Behdad Esfahbod 42db8be189 [map] Minor remove if condition 2022-11-18 16:41:50 -07:00
Behdad Esfahbod 4ec706980c [map] Rewrite hash() as dagger
Somehow our daggers instead of for loop save size. I cannot
pinpoint why, other than maybe not inlining.
2022-11-18 16:39:30 -07:00
Behdad Esfahbod 025a68cb07 [map] Optimize copy resizing logic 2022-11-18 16:33:04 -07:00
Behdad Esfahbod f1d716871d [map] Change bucket_for_hash() to item_for_hash() 2022-11-18 16:31:27 -07:00
Behdad Esfahbod d012f9a9b3 [map] Change bucket_for() to item_for() 2022-11-18 16:29:06 -07:00
Behdad Esfahbod 68a29020c5 [bit-page] Write hash() as dagger 2022-11-18 16:02:45 -07:00
Behdad Esfahbod 87271e1b2e [bit-page] Write get_population as dagger 2022-11-18 16:01:23 -07:00
Behdad Esfahbod 744eb6baf9 [bit-page] Write is_empty() as dagger 2022-11-18 15:56:06 -07:00
Behdad Esfahbod 43a4028f0e [algs] Move hb_vector_size_t to bit-page as only user 2022-11-18 15:54:34 -07:00
Behdad Esfahbod 01f961ac3a [gsubgpos] Minor call hb_iter() instead of ->iter() directly 2022-11-18 15:47:17 -07:00
Behdad Esfahbod bba5765583 [gsubgpos] Remove a few unnecessary namespace invocations 2022-11-18 14:52:17 -07:00
Behdad Esfahbod b4d0d1608d [gsubgpos] Rewrite a couple apply() functions as daggers 2022-11-18 14:47:33 -07:00
Behdad Esfahbod 76c8214eb5 [gsubgpos] Move member around 2022-11-18 12:30:46 -07:00
Behdad Esfahbod 81a573008e [map] Optimize storage 2022-11-17 16:59:36 -07:00
Behdad Esfahbod ae080bf202 [map] Initialize key and value explicitly
If they are of int time they won't be initialized otherwise.
2022-11-17 16:34:58 -07:00
Behdad Esfahbod 1d41b9cb3c [user-data] std::move item 2022-11-17 16:26:48 -07:00
Behdad Esfahbod ff0bb74895 [map] Call item_t constructor/destructor directly 2022-11-17 16:17:37 -07:00
Behdad Esfahbod 5c88715949 [map] Add item_t.destruct() 2022-11-17 16:14:16 -07:00
Behdad Esfahbod 7f83040836 [map] Simplify (de)construction of item_t 2022-11-17 16:10:37 -07:00
Behdad Esfahbod 99103bd976 [map] Destruct objects when clearing 2022-11-17 15:57:06 -07:00
Behdad Esfahbod 4caad5720c [test-map] Add test for reset
I expect this to leak now, since we don't destruct items.
2022-11-17 15:51:39 -07:00
Behdad Esfahbod e93c01c3ae [map] Rename item clear() to construct() 2022-11-17 15:50:00 -07:00
Behdad Esfahbod fc22d706fe [test-map] Don't insert null smart-pointers in map
Dereferencing them is not supported anymore after
3aad7c2ddf

We don't support that for regular pointers, so don't supporting
them for smart-pointers sounds right to me.
2022-11-17 15:47:43 -07:00
Behdad Esfahbod 896377463f [map] Don't resize map if not necessary 2022-11-17 15:25:45 -07:00