phoboslab / JavaScriptCore-iOS

Apple's JavaScript Engine, with modified project files for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App Store approval / jsc typed arrays / building jsc

geoff-nixon opened this issue · comments

Hi — this isn't really an 'issue', but I was hoping I could pick your brain on a couple of things?

  1. ICU (and App Store in general).
    I am slightly confused about your comment in the readme regarding Apple's rejection on the basis of ICU being a private framework; not because they said that (which doesn't surprise me in the least) but for the fact that this seems to imply this is AppStore-approvable otherwise. With regard to ICU, I would think this would be one of the easier issues to work around... one could roll one's own icu4c and link it in statically, or no? But I was under the impression that something like this would get rejected out of hand for a couple of other reasons. First, I thought it was Apple's policy to reject all JavaScript engines except their own (i.e., iOS chromium-based browsers must use JavaScriptCore rather than V8, etc.). Is this not this not the case here? Or is it allowable because it is (a variant of) JavaScriptCore? Second, I thought Apple rejected anything which JIT's its own code. Is JIT disabled here? Or is it allowed, maybe for the same reason as above BTW, I know this project is 'JavaScriptCore-iOS' (and your focus in general is iOS), but if this is indeed allowable in the App Store there, I think this project might be equally relevant in the Mac App Store as well, where I believe the same rules (to some extent at least) are applied...
  2. jsc.
    I was hugely disappointed to see that this did not make its way into the version of jsc that ships with 10.9. Is it your sense that this maybe just 'missed the deadline', or was it deliberately left out?
  3. I was wondering if by chance you have (or know of) a script or a makefile for building a standalone (statically linked) jsc executable on Darwin, (without using Xcode)?
    This project (JavaScriptCore-iOS, I mean) helps considerably to that end; but it would be really great to be able to do this in a platform-independant Xcode-independant manner, i.e., so that one could compile with one's own clang/LLVM and link in the same libraries as those used in the build toolchain. IMO, it is exceedingly cumbersome/difficult (and confusing to someone not familiar with the WebKit codebase) to compile a standalone jsc from the WebKit trunk since both the autotools scripts and CMakeLists don't target Darwin, and the Xcode projects don't really like to produce anything but system frameworks. I actually tried hacking on this for a while, but gave up... ended up writing this ridiculous script to forcibly extract and bundle up jsc from the nightlies instead...

Thanks!
~G

In this repo, JSC is configured to compile without unicode collation (NO_COLLATION), which seemed to be the part that of libicu that we're not allowed to use. You should be able to compile this repo and submit an App with the resulting lib to the App Store without a problem.

If your App is heavily relying on correct (international) character sorting you can of course compile your own version of libicu and link against that. ICU is quite huge, though.

Whether JSC is compiled with a JIT or not doesn't matter. The JIT simply doesn't work because it fails to allocate executable memory. There's no problem with having the JIT compiled it or even trying to use it.

Google can't use V8, because V8 doesn't have a (bytecode) intepreter mode. They only have a JIT. Without a JIT V8 doesn't work. JSC has several interpreter modes as fallback.

Typed arrays are a part of JSC now. I'm not sure which version OSX 10.9 ships with, but this repo is built against a version (538.4 tag) that supports it. I don't know anything about the release politics of JSC or Apple.

Looks adventurous :) I haven't tried anything in that regard. Please complain to Apple that their "Open Source" efforts suck ass and that the GPL license actually dictates that they have to release proper build scripts along with the source. Good luck!