Add JSI implementation for JSC

Summary:
This diff is an implementation of jsi::Runtime which uses JSC as the virtual machine.  All of the JSC-specific details are encapsulated here.
@public

Reviewed By: RSNara

Differential Revision: D9328242

fbshipit-source-id: be3c7bed161916c1cb9a48182600b558f054eadc
This commit is contained in:
Marc Horowitz 2018-10-18 00:47:03 -07:00 committed by Facebook Github Bot
parent e337bcafb0
commit a23fb1a22c
3 changed files with 1351 additions and 0 deletions

View File

@ -59,3 +59,38 @@ rn_xplat_cxx_library(
react_native_xplat_dep("jsi:jsi"),
],
)
rn_xplat_cxx_library(
name = "JSCRuntime",
srcs = [
"JSCRuntime.cpp",
],
header_namespace = "jsi",
exported_headers = [
"JSCRuntime.h",
],
cxx_deps = [
"xplat//jsc:jsc",
],
fbandroid_compiler_flags = [
"-fexceptions",
"-frtti",
"-O3",
],
fbandroid_deps = [
"xplat//jsc:jsc",
],
fbobjc_compiler_flags = [
"-Os",
],
fbobjc_frameworks = [
"$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
],
visibility = ["PUBLIC"],
xplat_mangled_args = {
"soname": "libjscjsi.$(ext)",
},
exported_deps = [
react_native_xplat_dep("jsi:jsi"),
],
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
// Copyright 2004-present Facebook. All Rights Reserved.
#pragma once
#include <jsi/jsi.h>
#include <memory.h>
namespace facebook {
namespace jsc {
std::unique_ptr<jsi::Runtime> makeJSCRuntime();
} // namespace jsc
} // namespace facebook