src/hb-machinery.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 858b6279 2019-12-10T13:18:32 [machinery] Remove CastR<>()
Behdad Esfahbod b84ceb2f 2019-12-10T13:02:48 [machinery] Remove CastP
Behdad Esfahbod 85574ec2 2019-12-10T12:52:32 [machinery] Minor
Behdad Esfahbod 35218c48 2019-10-31T13:19:44 Minor Allow empty HB_VAR_ARRAY definition. Though, doesn't compile with any compiler I know of.
Behdad Esfahbod 0e294c45 2019-09-06T16:54:27 Rename VAR to HB_VAR_ARRAY
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
Behdad Esfahbod 17f0cfa7 2019-03-31T21:34:19 Move BEInt to hb.hh I knows...
Behdad Esfahbod a7c63cd8 2019-03-30T14:59:40 Split sanitize and dispatch into their own files
Behdad Esfahbod be66b575 2019-03-30T14:53:54 Move serializer to hb-serialize.hh
Behdad Esfahbod bb22462f 2019-03-30T14:46:54 Whitespace
Behdad Esfahbod 4c38a9f6 2019-03-29T20:23:07 Remove hb_assign() Not needed anymore. We just use operator= now.
Behdad Esfahbod 4fd02f6e 2019-03-29T17:57:59 Remove unused line
Behdad Esfahbod 9a5b15dc 2019-03-29T17:57:24 [C++11] Replace BEInt.set() with operator=
Behdad Esfahbod 3f36c89f 2019-03-29T15:22:46 Inline explicit_operator macro Now that we require C++11, no need to macro.
Ebrahim Byagowi 8aaab78e 2019-03-14T16:49:42 Allow zero length ranges in sanitization (#1617) Fixes fvar table sanitization where there are no named instance by allowing zero length ranges starting from Null() address. Fixes #1607
Behdad Esfahbod f3980975 2019-01-25T16:08:25 More static constexpr
Behdad Esfahbod 447323b8 2019-01-22T12:45:40 Better fix for -Wcast-align errors
Behdad Esfahbod 70a52d6b 2019-01-22T12:15:23 Convert all other enum class consts to static constexpr Fixes https://github.com/harfbuzz/harfbuzz/issues/1553
Behdad Esfahbod c986ca15 2019-01-15T13:58:19 Improve overflow avoidance Better fix for 480406cd3ef9e5ab8476ddfa04498bf23906c508 This way we behave the same on 32bit and 64bit archs.
Behdad Esfahbod 480406cd 2019-01-14T15:27:34 Fix assertion on address overflow Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=917031
Behdad Esfahbod f6d5f1e9 2018-12-21T00:23:34 [iter] Add empty test
Behdad Esfahbod b80b97b5 2018-12-21T00:08:05 Revert "Remove unused hb-iter.hh" This reverts commit 969ff3c7aadbe721cdd414488eb170433f10d00c.
Behdad Esfahbod e6ebc9b6 2018-12-20T23:13:36 Remove unused typedef
Behdad Esfahbod 87f7c83f 2018-12-20T15:54:17 [serializer] Add operator << Not sure if we are going to use it. But might incentivize us to.
Behdad Esfahbod 5b70074e 2018-12-20T15:38:59 Add hb_assign(obj, value)
Behdad Esfahbod 4220b7bd 2018-12-20T11:48:45 Fix code on big-endian gcc / clang Ouch! We need a bigendian bot... Fixes https://github.com/harfbuzz/harfbuzz/issues/1498
Behdad Esfahbod 5000a59a 2018-12-19T21:07:53 [saitnize] Minor
Behdad Esfahbod a6287050 2018-12-19T21:05:00 [sanitize] Use hb_static_size instead of ::static_size https://github.com/harfbuzz/harfbuzz/issues/1496#issuecomment-448818112
Behdad Esfahbod 9aebfb41 2018-12-18T13:22:17 [serialize] Streamline error propagation
Behdad Esfahbod 969ff3c7 2018-12-17T22:43:00 Remove unused hb-iter.hh The ideas there are all part of hb-array.hh now. To be determined how we want to use generic iterator patterns.
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Behdad Esfahbod 92680361 2018-12-16T23:38:51 [arrays] Move Supplier<> to hb-array.hh
Behdad Esfahbod 2a3fa3f8 2018-12-16T23:33:03 [arrays] Remove unnecessary constructor from Supplier<> Looks like operator hb_array_t<> from vector works here. :)
Behdad Esfahbod 507cac49 2018-12-16T23:31:19 [arrays] Start moving Supplier<> to hb_array_t<>
Behdad Esfahbod 1e2c9812 2018-12-16T22:30:44 [arrays] Remove unused stride from Supplier
Behdad Esfahbod dcfa4a8d 2018-12-16T20:40:07 [array] Remove custom hb_bytes_t implementation
Behdad Esfahbod 5a552f75 2018-12-16T20:07:44 [array] Move hb_array_t and related types to hb-array.hh
Behdad Esfahbod 01d06e34 2018-12-16T14:27:43 Minor change to explicit_operator aesthetics
Ebrahim Byagowi b2ebaa9a 2018-12-16T22:38:10 Remove redundant 'inline' from methods (#1483)
Behdad Esfahbod 6e33a395 2018-12-13T16:40:01 Minor
Behdad Esfahbod c78e4784 2018-12-12T09:50:18 [dispatch] Minor
Behdad Esfahbod 41d1a1c1 2018-12-11T22:48:27 [subset] Minor
Behdad Esfahbod 2aba2c6c 2018-12-11T21:18:47 [serialize] Break down assert
Behdad Esfahbod fb059082 2018-11-30T20:45:40 Revert ugly fixes Now that we have 6daf45e0, revert cryptic hacks... This reverts commit abd81ed4f5cbc5a94171747909bc6b77551cb929. This reverts commit 9c6921c08c905a0cf45ba0182134e6ff910fac51. This reverts commit d39760cabfe4007cefdfc45231e85e93fababac2. This reverts commit fedd8e6c176dea85194693399e50243eb1c117c4. Fixes https://github.com/harfbuzz/harfbuzz/issues/1374
Behdad Esfahbod abd81ed4 2018-11-30T11:51:26 Umm. Cryptic, yes In file included from hb-face.cc:35: hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_compiles_assertion_on_line_388() const': hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>] hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in> hb-ot-cmap-table.hh: In member function 'void OT::CmapSubtableFormat4::_instance_assertion_on_line_388() const': hb-ot-cmap-table.hh:388: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-open-type.hh:354: note: candidate 1: const Type& OT::UnsizedArrayOf<Type>::operator[](unsigned int) const [with Type = OT::IntType<short unsigned int, 2u>] hb-ot-cmap-table.hh:388: note: candidate 2: operator[](const T*, int) <built-in> hb-face.cc: In function 'hb_blob_t* _hb_face_builder_data_reference_blob(hb_face_builder_data_t*)': hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:650: note: candidate 2: operator[](T*, int) <built-in> hb-face.cc:650: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:650: note: candidate 2: operator[](const T*, int) <built-in> hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:651: note: candidate 2: operator[](T*, int) <built-in> hb-face.cc:651: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: hb-vector.hh:81: note: candidate 1: Type& hb_vector_t<Type, PreallocedCount>::operator[](unsigned int) [with Type = hb_face_builder_data_t::table_entry_t, unsigned int PreallocedCount = 32u] hb-face.cc:651: note: candidate 2: operator[](const T*, int) <built-in>
Ebrahim Byagowi e7bd29ea 2018-11-29T23:47:20 Limit __builtin_bswap16 to GCC >= 5 as it was implemented on 4.8
Behdad Esfahbod 861bc753 2018-11-29T14:34:44 [vector] Make pointer cast explicit Too bad this doesn't help MSVC 2008 build, as explicit operators are C++11.
Behdad Esfahbod 987f4187 2018-11-27T17:40:32 Merge pull request #1398 from Adenilson/bigInt01 Optimize harfbuzz big integer conversions
Behdad Esfahbod 4e2a03b6 2018-11-27T17:40:09 Comment
Adenilson Cavalcanti 4a719a7f 2018-11-20T14:41:19 Optimize harfbuzz big integer conversions Profiling showed that type conversions were adding considerable cycles in time spent doing text shaping. The idea is to optimize it using native processor instructions to help Blink layout performance. Doing further investigation revelead that compilers may not use the proper instruction on ARM 32bits builds (i.e. REV16). One way to insure that the generated ASM was ideal for both gcc/clang was using __builtin_bswap16. Added bonus is that we no longer need to test for CPU architecture.
Behdad Esfahbod 93269129 2018-11-25T00:27:23 [kerx] Fix crash
Behdad Esfahbod 6ee40104 2018-11-25T00:21:13 Simplify sanitize set_object() / fix bots
Behdad Esfahbod 1e899422 2018-11-24T23:38:06 Add hb_sanitize_with_object_t Context manager.
Behdad Esfahbod b3c5affc 2018-11-24T23:34:34 Simplify sanitize set_object()
Behdad Esfahbod 9eeebd8d 2018-11-24T22:16:47 Revert "[sanitize] Remove now-unused set_object() machinery" This reverts commit bbdb6edb3e1cea4c5b7076c4f6b3e6998ae36dae.
Behdad Esfahbod bbdb6edb 2018-11-24T17:15:38 [sanitize] Remove now-unused set_object() machinery
Behdad Esfahbod a9fe787a 2018-11-22T22:12:36 [sanitizer] Add reset_object(), make set_object() do bounds-check Affects morx/kerx run-time only currently. Will adjust their sanitize next.
Behdad Esfahbod 3b9fd176 2018-11-22T01:18:55 Disallow taking Null() of unbounded structs Not sure I've marked all such structs. To be done as we discover. Fixes https://github.com/harfbuzz/harfbuzz/issues/1300
Behdad Esfahbod 7dd945a8 2018-11-22T01:05:02 One more time..
Behdad Esfahbod d062ad10 2018-11-22T00:39:14 Fix bots happy again, hopefully So, our fallback static_assert cannot be had more than once per line of source.
Behdad Esfahbod fb10c021 2018-11-22T00:21:49 Revert alignof() == 1 check Bots not happy with using "this" inside assertion... This reverts 2656644887e77a9d814bb12374af3c26b42fd935
Behdad Esfahbod 8d778877 2018-11-21T23:46:09 ..
Behdad Esfahbod 8cfeed99 2018-11-21T23:42:31 Minor
Behdad Esfahbod e5d954a2 2018-11-21T23:30:50 Minor
Behdad Esfahbod e987059c 2018-11-21T23:25:06 Minor
Behdad Esfahbod a2b6d308 2018-11-21T23:23:49 Remove DEFINE_SIZE_ARRAY2
Behdad Esfahbod 26566448 2018-11-21T23:23:21 Check alignof() structs are 1
Behdad Esfahbod 6321fdf7 2018-11-21T23:19:00 Whitespace
Behdad Esfahbod cfb9771a 2018-11-16T03:24:22 [coretext] Try to fix
Behdad Esfahbod ce5da0f3 2018-11-16T02:29:13 [shaper] Rewrite shaper data code to be more template-driven than macro-driven
Behdad Esfahbod dc4225cc 2018-11-13T20:48:46 Don't retry creating again and again in lazy_loader if create failed Still does that if get_null() returns nullptr. Our shaper data objects are like that. Shrug.
Behdad Esfahbod 274f4c72 2018-11-12T14:24:36 Rename check_array2() to check_array()
Behdad Esfahbod e014405a 2018-11-12T14:23:31 Rename check_array(array, a, b) to check_range()
Behdad Esfahbod c8f4cc49 2018-11-12T14:11:29 [kerx] Fix integer overflow in multiply Fixes https://oss-fuzz.com/v2/testcase-detail/5754863779053568
Behdad Esfahbod 1fd183ee 2018-11-11T16:47:52 Finish off eecccc919ce15f60ae7ef9da5cfb311b4aa05c63
Behdad Esfahbod eecccc91 2018-11-11T15:48:47 Don't store to null object Ouch :).
Behdad Esfahbod 903856ab 2018-11-11T15:45:58 Remove unused function
Behdad Esfahbod a953b647 2018-11-10T20:10:03 Revert parts of previous commit that made clang unhappy
Behdad Esfahbod 1d66cdcf 2018-11-10T19:54:08 Better fix for MSVC 2008 Follow up on b4c61130324455bfd42095b01fa14ac901e441f1 Fixes https://github.com/harfbuzz/harfbuzz/issues/1374
Behdad Esfahbod f6fc5574 2018-11-05T13:23:54 Add pointer magic operators to hb_atomic_ptr_t
Behdad Esfahbod 138f9e0f 2018-10-30T01:31:13 Minor
Ebrahim Byagowi f7a08cd4 2018-10-30T11:29:09 Fix extra semicolon issues and test that on CI (#1330)
Behdad Esfahbod 35d410f2 2018-10-29T14:45:44 Remove ASSERT_POD Newer compilers / language allows structs with constructor in union. So, this was not actually testing anything. Indeed, the recent change in DISALLOW_COPY *is* making some of our types non-POD. That broke some bots. Just remove this since it wasn't doing much, and I'd rather have DISALLOW_COPY.
Behdad Esfahbod 6f0454e1 2018-10-29T13:51:15 Fix extra-semicolon warnings
Behdad Esfahbod 39bd07ae 2018-10-26T21:01:11 Fix bunch of unused parameter warnings Show up with gcc -O0. There's a few more but those are functions that need to be filled in. Maybe this is a lost battle...
Behdad Esfahbod 955aa56b 2018-10-25T16:50:38 [vector] Make it act more like pointer Add pointer cast operator and plus operator.
Garret Rieger aa5af8d0 2018-10-23T15:45:35 Fix size calculation in DEFINE_SIZE_ARRAY_SIZED.
Behdad Esfahbod f7c0b431 2018-10-19T15:23:49 [aat] Implement LookupFormat10
Bruce Mitchener 257d0e5a 2018-10-19T22:49:21 Fix typos.
Behdad Esfahbod c406aca1 2018-10-17T22:58:43 Fix warning
Behdad Esfahbod 83780308 2018-10-17T22:34:16 [aat] Fix sanitize slowdown Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11034
Behdad Esfahbod e9f9c0d8 2018-10-11T21:37:45 [sanitize] Reorder condition to silence bogus gcc warning Was givin a dozen of: ../../src/hb-machinery.hh: In member function ‘bool AAT::ankr::sanitize(hb_sanitize_context_t*) const’: ../../src/hb-machinery.hh:307:23: warning: missed loop optimization, the loop counter may overflow [-Wunsafe-loop-optimizations] bool ok = --this->max_ops > 0 && ~~~~~~~~~~~~~~~~~~~~~~ this->start <= p && ~~~~~~~~~~~~~~~~~~~ p <= this->end && ~~~~~~~~~~~~~~~^~ (unsigned int) (this->end - p) >= len; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I believe those are bogus, but this silences them and does not introduce logic issues I believe.
Behdad Esfahbod 7fa69e92 2018-10-10T19:02:32 Comment
Behdad Esfahbod d35315cc 2018-10-09T23:17:32 [aat] Fixup recent commit For 329f2401082011007d9ce12b15ce0225cd267c57 max_ops is signed.
Behdad Esfahbod 948f59a1 2018-10-09T23:07:47 [kerx] Use subtable range for runtime checks
Behdad Esfahbod 329f2401 2018-10-09T23:02:53 [aat] Set embedded sanitizer max ops really high Since we consume it legitimately during shaping.
Michiharu Ariza 55942ad5 2018-10-06T14:49:44 Merge branch 'master' into cff-subset
Behdad Esfahbod 341206eb 2018-10-05T18:39:48 [vector] Make hb_vector_t relocatable / nestable Ugly, but... Fixes https://github.com/harfbuzz/harfbuzz/issues/1227
Behdad Esfahbod 606bf574 2018-09-16T19:33:48 Revert forcing use of single-parameter static_assert() Some clang versions define static_assert as a macro apparently, so we cannot redefine it... This reverts commit 94bfea0ce6a7b4d5641c198d50751748a353df11. This reverts commit 4e62627831e7457ed60ff87712570065b14b200a.
Behdad Esfahbod 4e626278 2018-09-16T18:09:36 Enforce single-param static_assert() only So we don't accidentally break it again.