[webkit-dev] JavaScriptCore on Fuchsia

Yusuke SUZUKI utatane.tea at gmail.com
Tue Jun 26 16:49:00 PDT 2018

Sounds very cool!

On Wed, Jun 27, 2018 at 6:01 AM Adam Barth <abarth at webkit.org> wrote:

> As part of developing Fuchsia [1] (a new open-source operating
> system), we ported JavaScriptCore to run on Fuchsia [2].  At the time,
> our intent was to use this code within the Fuchsia source tree but not
> to make it available for developers writing applications for Fuchsia.
> However, recently, we've gotten a number of requests from customers
> who would like to use JavaScriptCore in their Fuchsia applications.
> I'd like your advice about the best way to maintain JavaScriptCore
> support for Fuchsia.  Here are some possibilities I can imagine, but
> we're open to other possibilities as well:
> 1. Maintain a fork of JavaScriptCore somewhere on googlesource.com
> that supports Fuchsia and instruct customers to obtain the Fuchsia
> port of JavaScriptCore from googlesource.com.
> 2. Maintain a branch of JavaScriptCore in svn.webkit.org that supports
> Fuchsia.
> 3. Maintain support for JavaScriptCore in the mainline of svn.webkit.org.
> For reference, here's the patch we applied to WTF and JavaScriptCore
> to enable Fuchsia support:
> https://gist.github.com/abarth/b4fc909d83be5133cd7a5af209757e96

We are working on making JSC portable by introducing JSCOnly[1], so given
very small changes for Fushcia are super exciting (positive) results to me!

Looking through the patch in the gist, the ToT JSC moves
platform dependent part to WTF to make JSC further platform-independent.
So I think changes in JSC are further small: the required work for Fushcia
port is
mainly extending WTF for Fushcia OS.

My suggestion is introducing Fushcia port, adding both PLATFORM(FUSHCIA)
and OS(FUSHCIA) ifdefs.
Use OS(FUSHCIA) when the change is b/c of Fushcia's APIs. And use
the policy of the released build (e.g. enabling / disabling FTL JIT etc.).
By doing so, JSCOnly port also becomes available in Fushcia. And it means
that Fushcia port can benefit
from JSCOnly port's work for making WTF and JSC portable.

[1]: https://lists.webkit.org/pipermail/webkit-dev/2015-November/027785.html

> This patch is based on webkit at 206446, but we'd obviously rebase the
> patch onto top-of-tree before contributing it.
> I'm happy to answer any questions you might have that would help you
> provide the best advice.  If you would prefer to communicate off-list,
> I'm happy to do that as well.
> Thanks in advance,
> Adam
> [1] https://fuchsia.googlesource.com/docs/+/master/README.md
> [2] Actually, if you look at
> https://fuchsia.googlesource.com/third_party/webkit, you'll see that
> we've ported WebCore as well, but this email concerns only
> JavaScriptCore.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20180627/f6bd849b/attachment.html>

More information about the webkit-dev mailing list