Behdad Esfahbod [Fri, 10 May 2019 23:01:39 +0000 (16:01 -0700)]
Fix sanitize fail of extension sublookups
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=960331
Behdad Esfahbod [Fri, 10 May 2019 20:56:50 +0000 (13:56 -0700)]
Minor
Behdad Esfahbod [Fri, 10 May 2019 20:53:15 +0000 (13:53 -0700)]
Minor
Behdad Esfahbod [Fri, 10 May 2019 20:51:12 +0000 (13:51 -0700)]
Minor again
Behdad Esfahbod [Fri, 10 May 2019 20:43:29 +0000 (13:43 -0700)]
Minor
Behdad Esfahbod [Fri, 10 May 2019 20:17:41 +0000 (13:17 -0700)]
[gsubgpos] Minor
Behdad Esfahbod [Fri, 10 May 2019 18:53:02 +0000 (11:53 -0700)]
Generate tarball in .xz instead of .bz2
Fixes https://github.com/harfbuzz/harfbuzz/issues/1662
Behdad Esfahbod [Fri, 10 May 2019 18:32:59 +0000 (11:32 -0700)]
Fix bot
Any way to catch these?
Behdad Esfahbod [Fri, 10 May 2019 18:26:39 +0000 (11:26 -0700)]
[meta] Add hb_is_base_of
Behdad Esfahbod [Fri, 10 May 2019 18:18:52 +0000 (11:18 -0700)]
[iter] Adjust is_source_of / is_sink_of
There are two cases that we accept. Encode both.
rsheeter [Fri, 10 May 2019 03:06:29 +0000 (20:06 -0700)]
Update TESTING.md
Behdad Esfahbod [Thu, 9 May 2019 23:58:28 +0000 (16:58 -0700)]
[iter] Rewrite test functions
Notably, add hb_is_source_of(,) and hb_is_sink_of(,) to replace most
uses of hb_is_iterator_of(,).
Behdad Esfahbod [Thu, 9 May 2019 23:22:08 +0000 (16:22 -0700)]
Minor
Behdad Esfahbod [Thu, 9 May 2019 23:08:10 +0000 (16:08 -0700)]
Whitespace
Behdad Esfahbod [Thu, 9 May 2019 22:39:32 +0000 (15:39 -0700)]
Fix bot
Behdad Esfahbod [Thu, 9 May 2019 22:31:24 +0000 (15:31 -0700)]
[algs] Implement implicit casting between compatible pair types
Behdad Esfahbod [Thu, 9 May 2019 22:24:14 +0000 (15:24 -0700)]
[meta] Rewrite hb_is_cr_converitble
Behdad Esfahbod [Thu, 9 May 2019 22:19:42 +0000 (15:19 -0700)]
Fix compile
NameRecord is not copy-constructible, so should be iterator of
const-reference.
Behdad Esfahbod [Thu, 9 May 2019 22:09:07 +0000 (15:09 -0700)]
Adjust is_cr_convertible
If To is const& then From doesn't need to be &.
Behdad Esfahbod [Thu, 9 May 2019 21:53:02 +0000 (14:53 -0700)]
[iter] Make hb_is_iterator_of() check is_convertible
Instead of is_cr_convertible.
Behdad Esfahbod [Thu, 9 May 2019 21:35:15 +0000 (14:35 -0700)]
[meta] Add hb_conditional<> and hb_is_convertible()
Garret Rieger [Wed, 8 May 2019 23:33:03 +0000 (16:33 -0700)]
[subset] Switch building of glyph maps in subset plan to use iterators.
Garret Rieger [Wed, 8 May 2019 23:31:52 +0000 (16:31 -0700)]
Add sink support for hb_hashmap_t and a reverse call to hb_pair_t.
Behdad Esfahbod [Thu, 9 May 2019 20:15:36 +0000 (13:15 -0700)]
Add hb_pair_t(,) macro as alternative to hb_pair_t<,>
Just so it's easier to use it in other macros.
Behdad Esfahbod [Thu, 9 May 2019 19:43:57 +0000 (12:43 -0700)]
Add hb_lidentity(), and rename hb_rvalue() to hb_ridentity()
Behdad Esfahbod [Thu, 9 May 2019 19:14:36 +0000 (12:14 -0700)]
[hdmx] Adjust to hb_iota() behavior change
Use hb_range() instead.
Behdad Esfahbod [Thu, 9 May 2019 19:07:45 +0000 (12:07 -0700)]
[enumerate] Fix hb_enumerate() len for step=0
Behdad Esfahbod [Thu, 9 May 2019 18:30:31 +0000 (11:30 -0700)]
[iter] Fix hb_zip() end condition
We should compare-equal to end if either iterator's end reaches,
not if both reach at the same time. Fixes infinite-loop in test
which was happening after hb_enumerate() switched to using hb_zip().
Behdad Esfahbod [Thu, 9 May 2019 18:30:27 +0000 (11:30 -0700)]
[iter] Minor
Behdad Esfahbod [Thu, 9 May 2019 18:25:02 +0000 (11:25 -0700)]
[iter] Minor
Behdad Esfahbod [Thu, 9 May 2019 18:23:41 +0000 (11:23 -0700)]
[test-iter] Don't walk past end
That's not legal.
Behdad Esfahbod [Thu, 9 May 2019 18:20:41 +0000 (11:20 -0700)]
[iter] Allow negative step in hb_iota()
Behdad Esfahbod [Thu, 9 May 2019 18:14:06 +0000 (11:14 -0700)]
[iter] Minor
Behdad Esfahbod [Thu, 9 May 2019 18:10:31 +0000 (11:10 -0700)]
[iter] Bug fix
Behdad Esfahbod [Thu, 9 May 2019 18:08:25 +0000 (11:08 -0700)]
[iter] Fix
Behdad Esfahbod [Thu, 9 May 2019 18:07:38 +0000 (11:07 -0700)]
[iter] Take start value in hb_enumerate()
Also rewrite it via composition.
Behdad Esfahbod [Thu, 9 May 2019 18:02:56 +0000 (11:02 -0700)]
[iter] Add hb_range()
hb_range() is like Python range. hb_iota() has slightly different API.
Ie. it takes a start, instead of end.
Behdad Esfahbod [Thu, 9 May 2019 18:00:43 +0000 (11:00 -0700)]
[meta] Add hb_int_max()
Behdad Esfahbod [Thu, 9 May 2019 17:46:49 +0000 (10:46 -0700)]
[iota] end -> end_ to not shadow
n8willis [Thu, 9 May 2019 13:39:05 +0000 (14:39 +0100)]
Merge pull request #1680 from n8willis/usermanual-obj
Usermanual: object-model chapter
Behdad Esfahbod [Thu, 9 May 2019 04:14:01 +0000 (21:14 -0700)]
Remove unnecessary template keyword
Should fix MSVC.
Behdad Esfahbod [Wed, 8 May 2019 23:41:39 +0000 (16:41 -0700)]
Remove unused var
Behdad Esfahbod [Wed, 8 May 2019 23:37:38 +0000 (16:37 -0700)]
[array] Add .copy()
Behdad Esfahbod [Wed, 8 May 2019 23:16:43 +0000 (16:16 -0700)]
Fix msan issue
hb_identity returns rvalue-reference if input is rvalue. That, can leak
the reference and cause in bad access to temporaries after they are
destructed. This is unfortunately unfixable given the desired
transparency of hb_identity :(. Just don't use it with hb_map().
Behdad Esfahbod [Wed, 8 May 2019 22:57:33 +0000 (15:57 -0700)]
Move hb_invoke() back to hb-algs.hh
Behdad Esfahbod [Wed, 8 May 2019 22:46:51 +0000 (15:46 -0700)]
[hdmx] Touch up
Garret Rieger [Wed, 8 May 2019 00:23:02 +0000 (17:23 -0700)]
[subset] WIP convert hdmx subsetting to use iterators.
Garret Rieger [Tue, 7 May 2019 22:47:38 +0000 (15:47 -0700)]
[subset] Move hdmx to subset2.
Behdad Esfahbod [Wed, 8 May 2019 22:32:57 +0000 (15:32 -0700)]
[map] Return rvalues from keys()/values()
Behdad Esfahbod [Wed, 8 May 2019 22:28:39 +0000 (15:28 -0700)]
[map] Fix bots
Older compilers don't like calling iter() from return-type decltype()
../src/hb-map.hh:226:12: error: cannot call member function 'decltype ((((+ hb_array(((const hb_hashmap_t<K, V, kINVALID, vINVALID>*)this)->hb_hashmap_t<K, V, kINVALID, vINVALID>::items, (((const hb_hashmap_t<K, V, kINVALID, vINVALID>*)this)->hb_hashmap_t<K, V, kINVALID, vINVALID>::mask ? (((const hb_hashmap_t<K, V, kINVALID, vINVALID>*)this)->hb_hashmap_t<K, V, kINVALID, vINVALID>::mask + 1) : 0))) | hb_filter((& hb_hashmap_t<K, V, kINVALID, vINVALID>::item_t:: is_real))) | hb_map((& hb_hashmap_t<K, V, kINVALID, vINVALID>::item_t:: get_pair)))) hb_hashmap_t<K, V, kINVALID, vINVALID>::iter() const [with K = const hb_serialize_context_t::object_t*; V = unsigned int; K kINVALID = 0u; V vINVALID = 0u; decltype ((((+ hb_array(((const hb_hashmap_t<K, V, kINVALID, vINVALID>*)this)->hb_hashmap_t<K, V, kINVALID, vINVALID>::items, (((const hb_hashmap_t<K, V, kINVALID, vINVALID>*)this)->hb_hashmap_t<K, V, kINVALID, vINVALID>::mask ? (((const hb_hashmap_t<K, V, kINVALID, vINVALID>*)this)->hb_hashmap_t<K, V, kINVALID, vINVALID>::mask + 1) : 0))) | hb_filter((& hb_hashmap_t<K, V, kINVALID, vINVALID>::item_t:: is_real))) | hb_map((& hb_hashmap_t<K, V, kINVALID, vINVALID>::item_t:: get_pair)))) = hb_map_iter_t<hb_filter_iter_t<hb_array_t<hb_hashmap_t<const hb_serialize_context_t::object_t*, unsigned int, 0u, 0u>::item_t>, bool (hb_hashmap_t<const hb_serialize_context_t::object_t*, unsigned int, 0u, 0u>::item_t::*)() const, const<anonymous struct>&, 0u>, hb_pair_t<const hb_serialize_context_t::object_t*, unsigned int> (hb_hashmap_t<const hb_serialize_context_t::object_t*, unsigned int, 0u, 0u>::item_t::*)() const, 0u>]' without object
+ iter()
^
../src/hb-meta.hh:58:41: note: in definition of macro 'HB_AUTO_RETURN'
#define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
^
Behdad Esfahbod [Wed, 8 May 2019 22:08:10 +0000 (15:08 -0700)]
[map] Add .values() iterator
Behdad Esfahbod [Wed, 8 May 2019 22:05:10 +0000 (15:05 -0700)]
[map] Fix iter
Behdad Esfahbod [Wed, 8 May 2019 21:59:25 +0000 (14:59 -0700)]
[algs] Fix identity return type
Behdad Esfahbod [Wed, 8 May 2019 21:46:55 +0000 (14:46 -0700)]
Whitespace
Behdad Esfahbod [Wed, 8 May 2019 21:44:11 +0000 (14:44 -0700)]
[meta] Capture rvalue-references in is_reference / remove_reference
Behdad Esfahbod [Wed, 8 May 2019 21:24:57 +0000 (14:24 -0700)]
Minor
rsheeter [Wed, 8 May 2019 20:51:11 +0000 (13:51 -0700)]
[map] tweak test-iter.cc
rsheeter [Wed, 8 May 2019 19:47:18 +0000 (12:47 -0700)]
[map] add keys()
rsheeter [Wed, 8 May 2019 19:09:10 +0000 (12:09 -0700)]
[map] add a test for iteration
rsheeter [Wed, 8 May 2019 18:40:31 +0000 (11:40 -0700)]
[map] add iteration
Ebrahim Byagowi [Wed, 8 May 2019 21:17:14 +0000 (14:17 -0700)]
[test] Add https://crbug.com/oss-fuzz/14641 testcase
As 503748d fix
Michiharu Ariza [Wed, 8 May 2019 20:44:03 +0000 (13:44 -0700)]
initialize return param subr_num in popSubrNum
also snake_cased popSubrtNum and other surrounding function names
Behdad Esfahbod [Wed, 8 May 2019 19:45:02 +0000 (12:45 -0700)]
[name] Sanitize records for reals
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14641
Behdad Esfahbod [Wed, 8 May 2019 19:25:34 +0000 (12:25 -0700)]
[iter] Rename hb_iter_t() to hb_iter_type<> and add hb_item_type<>
Behdad Esfahbod [Wed, 8 May 2019 19:11:52 +0000 (12:11 -0700)]
[map] Make .has() optionally return value
Behdad Esfahbod [Wed, 8 May 2019 19:01:55 +0000 (12:01 -0700)]
Make compiler happy with -Og
Behdad Esfahbod [Wed, 8 May 2019 18:00:18 +0000 (11:00 -0700)]
[iter] Accept pointer in hb_iter() and hb_iter_t()
Behdad Esfahbod [Wed, 8 May 2019 17:56:09 +0000 (10:56 -0700)]
[iter] Accept pointer in hb_map()
Behdad Esfahbod [Wed, 8 May 2019 17:40:39 +0000 (10:40 -0700)]
[serialize] LangSys subset->copy
Behdad Esfahbod [Wed, 8 May 2019 17:35:02 +0000 (10:35 -0700)]
Add hb_iota()
Behdad Esfahbod [Wed, 8 May 2019 17:02:30 +0000 (10:02 -0700)]
[iter] Actually fix previous commit
The iter objects shouldn't not be const. D'oh.
Behdad Esfahbod [Wed, 8 May 2019 16:56:29 +0000 (09:56 -0700)]
[iter] For ref-qualified variants
rsheeter [Wed, 8 May 2019 16:53:58 +0000 (09:53 -0700)]
Update README.md
rsheeter [Wed, 8 May 2019 16:53:29 +0000 (09:53 -0700)]
Update README.md
rsheeter [Wed, 8 May 2019 16:47:34 +0000 (09:47 -0700)]
[docs] add fuzzer instructions (courtesy of Garret)
Roderick Sheeter [Wed, 8 May 2019 16:42:35 +0000 (09:42 -0700)]
[docs] add sample commands for test exec
Behdad Esfahbod [Wed, 8 May 2019 16:48:55 +0000 (09:48 -0700)]
[iter] Fix hb_sink() to accept rvalue
Behdad Esfahbod [Wed, 8 May 2019 16:33:09 +0000 (09:33 -0700)]
[iter] Default predicates to hb_identity instead of hb_bool
The bool conversion happens after predicate is called automatically.
Behdad Esfahbod [Wed, 8 May 2019 16:32:19 +0000 (09:32 -0700)]
Adjust hb_all/any/none
Behdad Esfahbod [Wed, 8 May 2019 16:16:33 +0000 (09:16 -0700)]
Add hb_match
Behdad Esfahbod [Wed, 8 May 2019 16:14:44 +0000 (09:14 -0700)]
[algs] Try f[v] in hb_get() as last resort
Behdad Esfahbod [Wed, 8 May 2019 14:47:36 +0000 (07:47 -0700)]
Fix a few more double-pomotion errors
Behdad Esfahbod [Wed, 8 May 2019 06:28:22 +0000 (23:28 -0700)]
Fix signed comparison on 32bit
Behdad Esfahbod [Wed, 8 May 2019 06:26:09 +0000 (23:26 -0700)]
Fix more double-promotion errors
WHy do only some of the clang bots catch this I have no idea :(.
Behdad Esfahbod [Wed, 8 May 2019 06:13:38 +0000 (23:13 -0700)]
Fix double-promotion warnings
Make it an error.
Behdad Esfahbod [Wed, 8 May 2019 06:10:59 +0000 (23:10 -0700)]
More tests
Behdad Esfahbod [Wed, 8 May 2019 06:08:49 +0000 (23:08 -0700)]
[algs] Sprinkle hb_min/max with hb-forward salad
Let's see if fixes MSVC fail. Though, the error doesn't make sense to me.
hb-blob.cc
c:\projects\harfbuzz\src\hb-algs.hh(166): error C2440: 'return': cannot convert from 'unsigned int' to 'unsigned int &&' [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
c:\projects\harfbuzz\src\hb-algs.hh(166): note: You cannot bind an lvalue to an rvalue reference
c:\projects\harfbuzz\src\hb-algs.hh(174): note: see reference to function template instantiation 'T &&<unnamed-type-hb_min>::impl<T,unsigned int&>(T &&,T2) const' being compiled
with
[
T=unsigned int,
T2=unsigned int &
]
Behdad Esfahbod [Wed, 8 May 2019 05:52:43 +0000 (22:52 -0700)]
[iter] Add value and projection to hb_all/any/none
Allows for eg, checking all values equal 2: hb_all (it, 2).
Behdad Esfahbod [Wed, 8 May 2019 05:45:01 +0000 (22:45 -0700)]
[iter] Accept rvalues to hb_enumerate()
Behdad Esfahbod [Wed, 8 May 2019 05:29:40 +0000 (22:29 -0700)]
[meta] Move hb_invoke from algs to meta
Behdad Esfahbod [Wed, 8 May 2019 04:39:20 +0000 (21:39 -0700)]
[meta] Replace most hb_enable_if with hb_requires
They do absolutely same thing. hb_requires is to encode constraints,
whereas hb_enable_if is for more conditional enabling.
Behdad Esfahbod [Wed, 8 May 2019 04:33:26 +0000 (21:33 -0700)]
[algs] Accept varargs in hb_min/max
Behdad Esfahbod [Wed, 8 May 2019 04:00:23 +0000 (21:00 -0700)]
Rename
Behdad Esfahbod [Wed, 8 May 2019 03:58:43 +0000 (20:58 -0700)]
Whitespace
Behdad Esfahbod [Wed, 8 May 2019 03:55:33 +0000 (20:55 -0700)]
Use universal references in hb_min/max
Behdad Esfahbod [Wed, 8 May 2019 03:54:31 +0000 (20:54 -0700)]
Remove MIN/MAX in favor of hb_min/hb_max
Behdad Esfahbod [Wed, 8 May 2019 00:23:46 +0000 (17:23 -0700)]
[serializer] Accept pointer & reference in more methods
Behdad Esfahbod [Wed, 8 May 2019 00:21:27 +0000 (17:21 -0700)]
[serializer] Minor
Behdad Esfahbod [Wed, 8 May 2019 00:21:18 +0000 (17:21 -0700)]
[meta] Fix addressof()
Behdad Esfahbod [Tue, 7 May 2019 23:53:03 +0000 (16:53 -0700)]
Whitespace