Commit Graph

153 Commits

Author SHA1 Message Date
Behdad Esfahbod a2efa5b489 [map] Another try at fixing old Mac build
https://github.com/harfbuzz/harfbuzz/issues/4138
2023-03-03 09:15:46 -07:00
Behdad Esfahbod be64cae164 [map] Another try at fixing old Mac builds
Maybe fixes https://github.com/harfbuzz/harfbuzz/issues/4138
2023-03-02 09:50:38 -07:00
Behdad Esfahbod 67e01c1292 [map] Try to work around old Mac compiler bug
Maybe fixes https://github.com/harfbuzz/harfbuzz/issues/4138
2023-03-01 20:08:17 -07:00
Behdad Esfahbod 8206569d63 [map] Remove hashmap create/destroy/vtable
Unused now.
2023-01-11 13:24:50 -07:00
Behdad Esfahbod 9420966f5b [map] Fix next() 2023-01-05 10:17:24 -07:00
Behdad Esfahbod 35f46e74d1 [map] Add hb_map_keys() and hb_map_values() 2023-01-04 17:12:08 -07:00
Behdad Esfahbod 4f6079138d [map] Add hb_map_update() 2023-01-04 13:58:46 -07:00
Behdad Esfahbod ffafcf9633 [map] Add hb_map_next() 2023-01-04 12:56:42 -07:00
Garret Rieger 5e713e99bf Revert "[map] Speed up is_real()"
This reverts commit f5307c3ba8.

Found to slow down the benchmarks in some cases.
2022-12-08 16:32:24 -07:00
Behdad Esfahbod f5307c3ba8 [map] Speed up is_real() 2022-12-04 11:54:16 -07:00
Behdad Esfahbod dbbb8e8006 Revert "[map] Add hb_map_filter_invalid"
This reverts commit 8d7e921117.

Surprisingly this slowed NotoNastaliqUrdu benchmark down by a couple
percent instead of speeding it up.
2022-12-04 11:13:39 -07:00
Behdad Esfahbod 8d7e921117 [map] Add hb_map_filter_invalid
Use it in one place.
2022-12-04 11:02:15 -07:00
Behdad Esfahbod d2a2670e54 [iter] Simplify has() interface implementations 2022-11-28 19:43:09 -07:00
Behdad Esfahbod 86a763c651 [map] Make keys moveable 2022-11-21 20:53:44 -07:00
Behdad Esfahbod cf20d2ec5d [map] Take const key 2022-11-21 20:47:17 -07:00
Behdad Esfahbod 3d1c76f713 [serializer] Don't hash objects twice 2022-11-21 19:40:32 -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 a3a218edb5 [map] Add a couple more sink interfaces 2022-11-18 19:24:41 -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 a9c6a20b19 [map] Support moving value in sink interface 2022-11-18 18:29:12 -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 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 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 e93c01c3ae [map] Rename item clear() to construct() 2022-11-17 15:50:00 -07:00
Behdad Esfahbod 896377463f [map] Don't resize map if not necessary 2022-11-17 15:25:45 -07:00
Behdad Esfahbod 7595fa2d9a [map] Fix copy-assignment operator
Ouch!
2022-11-17 15:23:14 -07:00
Behdad Esfahbod 41f4bdac35 [map] Fix resize during copy-construction/assignment 2022-11-17 15:16:00 -07:00
Behdad Esfahbod 7bd101728a [map] Minor use hb_iter instead of hb_array 2022-11-17 15:01:55 -07:00
Behdad Esfahbod 238fc14716 [map] Simplify iterators 2022-11-17 14:58:50 -07:00
Behdad Esfahbod 410c14bfa2 [map] Fix equality
Ouch!
2022-11-17 14:53:00 -07:00
Qunxin Liu dbb7f47b19 fix bug in hb_hashmap_t has() interface
It was not working when the value type is hb_bytes_t because hb_array_t
overloaded operator &
2022-11-03 13:48:23 -06:00
Behdad Esfahbod bcd59b5142 [set/map] Remove init_shallow/fini_shallow() 2022-07-20 15:58:28 -06:00
Behdad Esfahbod e1b5f2f806 [object] Call destructor in hb_object_destroy() 2022-07-20 15:07:55 -06:00
Behdad Esfahbod 9ea4ab6051 [object] Call constructor 2022-07-20 14:57:32 -06:00
Behdad Esfahbod 61c0438425 [map] Allow geting non-const value pointer out with has() 2022-07-20 14:43:58 -06:00
Behdad Esfahbod 00cfc5c17d [map] Don't set out value in has() if not found 2022-07-20 14:38:28 -06:00
Behdad Esfahbod 485f043211 [map] Enable using hashmap with unique_ptr 2022-07-20 14:34:55 -06:00
Qunxin Liu 2a4773e43d add option "--instance", store axes_location in subset_plan and drop all
variation tables when all axes are pinned at default
2022-07-18 14:59:07 -06:00
Behdad Esfahbod d8f9d51780 [hashmap] Add keys_ref() and values_ref() 2022-07-12 13:19:31 -06:00
Behdad Esfahbod 5da341ce92 [map] Another try at hiding minus1
To fix https://github.com/harfbuzz/harfbuzz/issues/3684
2022-06-27 14:00:34 -06:00