Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
Nathan Froyd dc25b5a9dc Bug 1539605 - add fast paths for integer formatting on nsTSubstring; r=erahm
This way we don't have to go through a bunch of printf nonsense, and we
ought to be able to arrive at optimized routines that take advantage of
constant radices, etc.

Differential Revision: https://phabricator.services.mozilla.com/D25141

--HG--
extra : moz-landing-system : lando
2019-03-29 19:38:53 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Tom Tromey 18e18bcdb3 Bug 1517433 - do not assert on over-long float printf; r=froydnj
mozilla::PrintfTarget::cvt_f release asserts that the desired printf
fit into a statically-sized buffer.  However, this may not be the case
if the user requested a larger width or precision.  Handle this
unusual case by allocating a temporary buffer.

MozReview-Commit-ID: 2WicecHDzDR

Differential Revision: https://phabricator.services.mozilla.com/D15989

--HG--
extra : moz-landing-system : lando
2019-01-09 15:50:27 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Tom Tromey 21816ce4f3 Bug 1334276 - add Printf unit tests; r=froydnj
Add unit tests for Printf.  Code coverage now at 90%.  Doing better is
difficult due to the large number of assertions and failure cases, and
because some remaining untested code implements behavior undefined by
the spec, for example "%0s".

MozReview-Commit-ID: FenOur7bOt2

--HG--
extra : rebase_source : 4a399743e87912d8a72a8607dd520e676785f52d
2017-05-08 13:49:48 -06:00
Tom Tromey 62fa1c54e6 Bug 1334276 - remove dead code from Printf.cpp; r=froydnj
This removes some "#if 0"s, and some related code that is also obviously
dead.

MozReview-Commit-ID: 1vEPohvdpw8

--HG--
extra : rebase_source : b7a1c08c422f0aae6538db03331773f31be33ac6
2017-05-08 11:05:27 -06:00
Tom Tromey 8e0d0b9741 Bug 1350097 - handle very long floating point output in cvt_f; r=froydnj
Bug 1350097 points out a case where the assertion in cvt_f, added in
https://bugzilla.mozilla.org/show_bug.cgi?id=1060419#c127, triggers.
Before this addition, code calling this printf variant would end up just
printing something invalid, as the truncated value would be emitted.
This patch increases the buffer size to be sufficient for DBL_MAX.

MozReview-Commit-ID: AVphURGa6jL

--HG--
extra : rebase_source : c7a2dad8e496434a631441ccc25dfee2db1ea71a
2017-03-24 08:18:51 -06:00
Tom Ritter bdf4234dd1 Bug 1344809 Move function definition to cpp to fix mingw 'definition is marked dllimport' error r=froydnj
MozReview-Commit-ID: 8iAaa3FXvDq

--HG--
extra : rebase_source : aa2b14a00127c87853ebbc9961393e8c82ea0882
2017-03-13 11:51:10 -05:00
Tom Tromey 3f70992816 Bug 1341880 - do not emit trailing \0 in PrintfState; r=glandium
MozReview-Commit-ID: 2di7CsDCWLF

--HG--
extra : rebase_source : f5469d4b3e818204848123ea163c7f0f08563f7c
2017-02-27 13:29:54 -07:00
Tom Tromey f0b5bc050d Bug 1060419 - use result of SprintfLiteral in Printf.cpp; r=froydnj
MozReview-Commit-ID: HSHAeKVu6PU

--HG--
extra : rebase_source : ad15e1e0e13cf3974a1116f796b7a201fcfb36fd
2017-01-05 08:15:48 -07:00
Tom Tromey 6c09e4eb63 Bug 1060419 - add %S and %ls support to Smprintf; r=froydnj
MozReview-Commit-ID: CQMZCkCOXDV

--HG--
extra : rebase_source : 6b4ca87528cf820c71d62c50b734e3a4c06139ff
2017-01-19 15:56:09 -07:00
Tom Tromey 1610a7b7cb Bug 1060419 - move Smprintf et al to mozglue, r=froydnj
MozReview-Commit-ID: 4U23r6JhLls

--HG--
extra : rebase_source : 8e020d5d26d31b95f5b2c0e729ec27540c123b01
2017-01-13 10:25:59 -07:00