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 wrote: > > On Fri, Mar 23, 2018 at 4:32 PM, JF Bastien wrote: >> Hello again WebKitten! >> >> April 2018 is fast approaching, which means that we might be able to require >> GCC 6 and all the great C++17 featu

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

2018-03-23 Thread JF Bastien
> > Is that acceptable for Apple? > > Michael > > [1] https://trac.webkit.org/wiki/WebKitGTK/DependenciesPolicy > <https://trac.webkit.org/wiki/WebKitGTK/DependenciesPolicy> > On Aug 4, 2017, at 13:39, JF Bastien wrote: > > Hello WebKilters, > > Our Chrome-

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 wrote: > On Tue, Dec 12, 2017 at 8:38 PM, JF Bastien wrote: > >> >> On Tue, Dec 12, 2017 at 11:27 AM Mathias Bynens wrote: >> >>> Ideally, projects such as jsvu wouldn’t have to make such decisions. >>>

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 decision. Projects su

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 understa

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 wrote: > > > >> On Sep 13, 2017, at 11:07, Maciej Stachowiak

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

2017-09-13 Thread JF Bastien
> On Sep 13, 2017, at 11:07, Maciej Stachowiak wrote: > > > >> On Sep 13, 2017, at 8:11 AM, JF Bastien > <mailto:jfbast...@apple.com>> wrote: >> >> Hello WebCritters, >> >> I’m moving some code around, and one particular header I have

[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 lik

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: > > > > > > > >> On Sep 1, 2017, at 9:46 AM, Maciej

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 def

[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 m

Re: [webkit-dev] Using "auto -> returnType" breaks prepare-ChangeLog

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

Re: [webkit-dev] Using "auto -> 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 MappedTraitsArg>::inlineAdd(K&& key, V&& value) -> AddResult > { >

Re: [webkit-dev] Using "auto -> returnType" breaks prepare-ChangeLog

2017-07-27 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 to one of these funct

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

2017-07-05 Thread JF Bastien
> On Jul 5, 2017, at 19:19, Caio Lima wrote: > > 2017-07-05 12:41 GMT-03:00 JF Bastien : >> On Linux you can do the following: >> >> ((void(*)())0x0fa0)(); >> >> >> That address contains a helper which does the “right” barrier, includi

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

2017-07-05 Thread JF Bastien
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 <mailto:jfbast...@apple.com>> wrote: > >&

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: https://github.com/akrzemi1/Optional/commit/8993daae3e9ed90be98ffb2517315f43fe9f09e4#diff-b7e55535b5ac355f0d683d30b3c

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

2017-04-28 Thread JF Bastien
t 1:00 AM, Keith Miller > <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, >> Keith >>

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

2017-04-27 Thread JF Bastien
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 Apr 27, 2017, at 4:06 PM, JF Bastien > <ma

[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 to

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 by doing more forward dec

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 try

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, so

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 list

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 EncodedJSValue if pos

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 SetForScope, and WTF

Re: [webkit-dev] Terminate handler for WebKit

2016-09-09 Thread JF Bastien
On Fri, Sep 9, 2016 at 10:14 AM, Michael Catanzaro wrote: > Hi, > > The GTK+ port currently has an interesting web process crash on exit: > > pure virtual method called > terminate called without an active exception > > I found the easiest way to debug it was to rebuild with a terminate > handler