Re: [webkit-dev] C++17 is here. Should we use it?

2018-03-26 Thread JF Bastien
> On Mar 26, 2018, at 07:38, Michael Catanzaro <mcatanz...@igalia.com> wrote: > > On Fri, Mar 23, 2018 at 4:32 PM, JF Bastien <jfbast...@apple.com> wrote: >> Hello again WebKitten! >> >> April 2018 is fast approaching, which means that we might be able t

Re: [webkit-dev] Hosting precompiled `jsc` binaries for Linux

2017-12-12 Thread JF Bastien
On Tue, Dec 12, 2017 at 11:42 AM Mathias Bynens <m...@google.com> wrote: > On Tue, Dec 12, 2017 at 8:38 PM, JF Bastien <j...@chromium.org> wrote: > >> >> On Tue, Dec 12, 2017 at 11:27 AM Mathias Bynens <m...@google.com> wrote: >> >>> I

Re: [webkit-dev] Hosting precompiled `jsc` binaries for Linux

2017-12-12 Thread JF Bastien
On Tue, Dec 12, 2017 at 11:27 AM Mathias Bynens wrote: > Ideally, projects such as jsvu wouldn’t have to make such decisions. They > would trust the maintainer of the JS engine, in this case Apple, to provide > the downloads. > > If Apple trusts Igalia enough, that’s Apple’s

Re: [webkit-dev] Hosting precompiled `jsc` binaries for Linux

2017-12-08 Thread JF Bastien
Also, as we discussed on the github bug the JSC binary is available as part of the WebAssembly waterfall that Google maintains at wasm-stat.us The build is pretty straightforward: https://github.com/WebAssembly/waterfall/blob/7cda260b8ea5264900624a4cdc45df2c9e2de010/src/build.py#L943 I

Re: [webkit-dev] Forward.h's Vector

2017-09-15 Thread JF Bastien
Having not heard any objections, here’s a patch which does this: https://bugs.webkit.org/show_bug.cgi?id=176984 <https://bugs.webkit.org/show_bug.cgi?id=176984> > On Sep 13, 2017, at 12:49, JF Bastien <jfbast...@apple.com> wrote: > > > >> On Sep 13, 2017,

Re: [webkit-dev] Forward.h's Vector

2017-09-13 Thread JF Bastien
> On Sep 13, 2017, at 11:07, Maciej Stachowiak <m...@apple.com> wrote: > > > >> On Sep 13, 2017, at 8:11 AM, JF Bastien <jfbast...@apple.com >> <mailto:jfbast...@apple.com>> wrote: >> >> Hello WebCritters, >> >> I’m mov

[webkit-dev] Forward.h's Vector

2017-09-13 Thread JF Bastien
Hello WebCritters, I’m moving some code around, and one particular header I have is included everywhere in JSC so I’d like it to be lightweight and include as few other headers as possible. It unfortunately uses WTF::Vector, but it only does so as a pointer: void ohNoes(Vector*); It seems

Re: [webkit-dev] Get rid of RefPtr, replace with std::optional?

2017-09-01 Thread JF Bastien
The standard wants you to specialize things in std sometimes, and not other times... I’m not sure here’s clear guidance here. :( On Fri, Sep 1, 2017 at 10:46 AM Maciej Stachowiak wrote: > > > > On Sep 1, 2017, at 10:07 AM, Brady Eidson wrote: > > > > > > > >>

Re: [webkit-dev] How we enable template functions

2017-08-22 Thread JF Bastien
I'd suggest considering what it'll look like when we're migrating to concepts in C++20. Here's an example for our bitwise_cast: https://github.com/jfbastien/bit_cast/blob/master/bit_cast.h#L10 Notice the 3 ways to enable. There's also the option of using enable_if on the return value, or as a

[webkit-dev] C++17 is here. Should we use it?

2017-08-04 Thread JF Bastien
Hello WebKilters, Our Chrome-y friends are considering the use of C++14 . I have to say that C++14 in WebKit has been quite amazing, and we should consider using C++17: it has many

Re: [webkit-dev] Using "auto <function()> -> returnType" breaks prepare-ChangeLog

2017-07-28 Thread JF Bastien
> On Jul 28, 2017, at 10:58, Sam Weinig <wei...@apple.com> wrote: > > > >> On Jul 28, 2017, at 10:31 AM, JF Bastien <jfbast...@apple.com >> <mailto:jfbast...@apple.com>> wrote: >> >> >> >>> On Jul 28, 2017, at 10:2

Re: [webkit-dev] Using "auto <function()> -> returnType" breaks prepare-ChangeLog

2017-07-28 Thread JF Bastien
> On Jul 28, 2017, at 10:29, Sam Weinig wrote: > > For some generic programming, this form can be dramatically shorter: > > e.g. > > template KeyTraitsArg, typename MappedTraitsArg> > template > ALWAYS_INLINE auto HashMap

Re: [webkit-dev] Using "auto <function()> -> returnType" breaks prepare-ChangeLog

2017-07-28 Thread JF Bastien
https://bugs.webkit.org/show_bug.cgi?id=174930 I’ll trade this C++ fix for ES6 functions getting parsed properly too :D > On Jul 27, 2017, at 23:06, Brady Eidson wrote: > > I just noticed this tonight. When a change is made

Re: [webkit-dev] Data Memory Barrier ARMv6 question

2017-07-05 Thread JF Bastien
> On Jul 5, 2017, at 19:19, Caio Lima <ticaiol...@gmail.com> wrote: > > 2017-07-05 12:41 GMT-03:00 JF Bastien <jfbast...@apple.com>: >> On Linux you can do the following: >> >> ((void(*)())0x0fa0)(); >> >> >> That address co

Re: [webkit-dev] Data Memory Barrier ARMv6 question

2017-07-05 Thread JF Bastien
tem functions when the user is > expecting it to emit an instruction. If we cannot perfectly select the right > barrier on a particular CPU, we should disable concurrency on that CPU. > > -Filip > > On Jul 5, 2017, at 8:41 AM, JF Bastien <jfbast...@apple.com > <mailt

Re: [webkit-dev] Data Memory Barrier ARMv6 question

2017-07-05 Thread JF Bastien
On Linux you can do the following: ((void(*)())0x0fa0)(); That address contains a helper which does the “right” barrier, including if you’re not on an SMP system it’ll do nothing. Details: https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt

Re: [webkit-dev] Why does our std::optional lack the has_value() function?

2017-06-19 Thread JF Bastien
Ours was imported from: https://github.com/akrzemi1/Optional at: 727c729dd1d9f06f225868280e50154594d7e59d And it was subsequently added in:

Re: [webkit-dev] !!Tests for equality comparison

2017-04-28 Thread JF Bastien
er <keith_mil...@apple.com >> <mailto:keith_mil...@apple.com>> wrote: >> >> Is there any opposition to relaxing this rule? Speak now or forever hold >> your piece! (not really but I would be curious to hear opposition). >> >> Cheers, >&

Re: [webkit-dev] !!Tests for equality comparison

2017-04-27 Thread JF Bastien
e code uses the !int style in so many places that this style change would > be a lot of churn for little benefit. I eventually got used to this style, > and now it feels pretty natural. I’m not suggesting we replace existing code. Just that we allow it for now on. > -Filip >> On A

[webkit-dev] !!Tests for equality comparison

2017-04-27 Thread JF Bastien
Hello C++ fans! The C++ style check currently say: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons I totally agree for booleans and pointers… but not for integers. I know it’s pretty much the same thing, but I it takes me slightly longer

Re: [webkit-dev] Compile time increase over time

2017-04-24 Thread JF Bastien
On Mon, Apr 24, 2017 at 11:10 AM, Alex Christensen wrote: > Thanks for the data, Carlos! This is a growing problem that is hurting > productivity. We’ve discussed it a bit and haven’t done enough about it. > Here are some of the ideas I’ve heard: > > 1) Reduce #includes

Re: [webkit-dev] SVN trouble

2017-02-24 Thread JF Bastien
The github mirror also seems sad: https://github.com/WebKit/webkit/commits/master It's at r212950. On Fri, Feb 24, 2017 at 11:29 AM, Carlos Alberto Lopez Perez < clo...@igalia.com> wrote: > On 24/02/17 20:16, Alexey Proskuryakov wrote: > > > > How does one create a local git-svn checkout to

Re: [webkit-dev] Why does RELEASE_ASSERT not have an error message?

2017-02-22 Thread JF Bastien
Do we get the dataLog output in a crash report? It seems useful to have at a minimum some "reason" enum which ends up in a register, so the crash report is somewhat helpful, like we do with JIT code. At that point the release assert might as well capture __LINE__ and other things in a register,

Re: [webkit-dev] [webkit-reviewers] usage of auto

2017-01-11 Thread JF Bastien
Would it be helpful to focus on small well-defined cases where auto makes sense, and progressively grow that list as we see fit? e.g. I think this is great: auto ptr = std::make_unique(bar); Proposed rule: if the type is obvious because it's on the line, then auto is good. Similarly: auto i =

Re: [webkit-dev] [webkit-reviewers] usage of auto

2017-01-10 Thread JF Bastien
> > auto thingLength = getLengthOfThing(); > IntSize size(thingLength, 2); // Can’t tell by reading if thingLength is > LayoutUnit or float and thus truncated here. > The same is true for: int thingLength = getLengthOfThing(); ___ webkit-dev mailing

Re: [webkit-dev] Reducing the use of EncodedJSValue and use JSValue directly instead.

2017-01-03 Thread JF Bastien
On Tue, Jan 3, 2017 at 2:54 PM, Geoffrey Garen wrote: > EncodedJSValue was always just a work-around to convince the compiler to > put a JSValue in registers (instead of on the stack, with different > compilers disagreeing about where on the stack). > > I agree with removing

Re: [webkit-dev] Naming preference: SetForScope vs. TemporaryChange

2016-12-22 Thread JF Bastien
"Scope" seems to capture the C++ nature better. "Temporary" isn't clear on how long it'll last IMO. On Thu, Dec 22, 2016 at 6:28 PM Saam barati wrote: > Hi all, > > Recently, Yusuke found that JSC and WTF both had the exact same RAII > helper data structure. JSC called it