Skip to content

Commit 094f221

Browse files
willholenfacebook-github-bot
authored andcommitted
Move JSI source files into a separate directory
Summary: This will simplify updating the JSI API from upstream in the future. Reviewed By: mhorowitz Differential Revision: D14762674 fbshipit-source-id: fa4a86f08425943e301da4ef3df9893ebaa1493e
1 parent 68a5cee commit 094f221

File tree

12 files changed

+41
-23
lines changed

12 files changed

+41
-23
lines changed

React/React.xcodeproj/project.pbxproj

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,11 @@
20462046
3EDCA8A21D3591E700450C31 /* RCTErrorCustomizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTErrorCustomizer.h; sourceTree = "<group>"; };
20472047
3EDCA8A31D3591E700450C31 /* RCTErrorInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTErrorInfo.h; sourceTree = "<group>"; };
20482048
3EDCA8A41D3591E700450C31 /* RCTErrorInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTErrorInfo.m; sourceTree = "<group>"; };
2049-
4F56C93722167A4800DB9F3F /* jsilib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsilib.h; sourceTree = "<group>"; };
2049+
4F56C93722167A4800DB9F3F /* jsilib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsi/jsilib.h; sourceTree = "<group>"; };
2050+
50E98FE621460B0D00CD9289 /* RCTWKWebViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTWKWebViewManager.m; sourceTree = "<group>"; };
2051+
50E98FE721460B0D00CD9289 /* RCTWKWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWKWebView.h; sourceTree = "<group>"; };
2052+
50E98FE821460B0D00CD9289 /* RCTWKWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTWKWebView.m; sourceTree = "<group>"; };
2053+
50E98FE921460B0D00CD9289 /* RCTWKWebViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWKWebViewManager.h; sourceTree = "<group>"; };
20502054
5335D5401FE81A4700883D58 /* RCTShadowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTShadowView.m; sourceTree = "<group>"; };
20512055
5343895E203905B6008E0CB3 /* YGLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YGLayout.cpp; sourceTree = "<group>"; };
20522056
5343895F203905B6008E0CB3 /* YGLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGLayout.h; sourceTree = "<group>"; };
@@ -2221,15 +2225,15 @@
22212225
EDDA711B2164285A00B2D070 /* JSINativeModules.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSINativeModules.cpp; path = jsireact/JSINativeModules.cpp; sourceTree = "<group>"; };
22222226
EDDA711C2164285A00B2D070 /* JSIExecutor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSIExecutor.cpp; path = jsireact/JSIExecutor.cpp; sourceTree = "<group>"; };
22232227
EDEBC6D6214B3E7000DD5AC8 /* libjsi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjsi.a; sourceTree = BUILT_PRODUCTS_DIR; };
2224-
EDEBC6D9214B3F6800DD5AC8 /* jsi-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "jsi-inl.h"; sourceTree = "<group>"; };
2225-
EDEBC6DA214B3F6800DD5AC8 /* JSIDynamic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDynamic.cpp; sourceTree = "<group>"; };
2226-
EDEBC6DB214B3F6800DD5AC8 /* jsi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsi.cpp; sourceTree = "<group>"; };
2227-
EDEBC6DC214B3F6800DD5AC8 /* JSIDynamic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDynamic.h; sourceTree = "<group>"; };
2228+
EDEBC6D9214B3F6800DD5AC8 /* jsi-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "jsi-inl.h"; path = "jsi/jsi-inl.h"; sourceTree = "<group>"; };
2229+
EDEBC6DA214B3F6800DD5AC8 /* JSIDynamic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSIDynamic.cpp; path = jsi/JSIDynamic.cpp; sourceTree = "<group>"; };
2230+
EDEBC6DB214B3F6800DD5AC8 /* jsi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = jsi.cpp; path = jsi/jsi.cpp; sourceTree = "<group>"; };
2231+
EDEBC6DC214B3F6800DD5AC8 /* JSIDynamic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSIDynamic.h; path = jsi/JSIDynamic.h; sourceTree = "<group>"; };
22282232
EDEBC6DD214B3F6800DD5AC8 /* JSCRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCRuntime.cpp; sourceTree = "<group>"; };
22292233
EDEBC6DE214B3F6800DD5AC8 /* JSCRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCRuntime.h; sourceTree = "<group>"; };
22302234
EDEBC6DF214B3F6800DD5AC8 /* BUCK */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BUCK; sourceTree = "<group>"; };
2231-
EDEBC6E0214B3F6800DD5AC8 /* instrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = instrumentation.h; sourceTree = "<group>"; };
2232-
EDEBC6E1214B3F6800DD5AC8 /* jsi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsi.h; sourceTree = "<group>"; };
2235+
EDEBC6E0214B3F6800DD5AC8 /* instrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = instrumentation.h; path = jsi/instrumentation.h; sourceTree = "<group>"; };
2236+
EDEBC6E1214B3F6800DD5AC8 /* jsi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jsi.h; path = jsi/jsi.h; sourceTree = "<group>"; };
22332237
EDEBC73B214B45A300DD5AC8 /* libjsiexecutor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjsiexecutor.a; sourceTree = BUILT_PRODUCTS_DIR; };
22342238
EDEBC740214B463000DD5AC8 /* BUCK */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BUCK; sourceTree = "<group>"; };
22352239
EDEBC750214B47E100DD5AC8 /* JSDeltaBundleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeltaBundleClient.cpp; sourceTree = "<group>"; };
@@ -3199,10 +3203,7 @@
31993203
594F0A331FD23228007FBE96 /* RCTSurfaceHostingView.h in Headers */,
32003204
130443DD1E401AF500D93A67 /* RCTConvert+Transform.h in Headers */,
32013205
134D63C41F1FEC65008872B5 /* RCTCxxBridgeDelegate.h in Headers */,
3202-
3D302F801DF828F800D6DDAE /* RCTNavItem.h in Headers */,
32033206
1968A2601F67275300EB3D1D /* RCTComponentEvent.h in Headers */,
3204-
3D302F811DF828F800D6DDAE /* RCTNavItemManager.h in Headers */,
3205-
135A9C061E7B0F7800587AEB /* RCTJSCHelpers.h in Headers */,
32063207
3D302F841DF828F800D6DDAE /* RCTPointerEvents.h in Headers */,
32073208
59EB6DBC1EBD6FC90072A5E7 /* RCTUIManagerObserverCoordinator.h in Headers */,
32083209
657734941EE8356100A0E9EA /* RCTInspectorPackagerConnection.h in Headers */,
@@ -3932,6 +3933,7 @@
39323933
developmentRegion = English;
39333934
hasScannedForEncodings = 0;
39343935
knownRegions = (
3936+
English,
39353937
en,
39363938
Base,
39373939
);

ReactAndroid/src/main/java/com/facebook/react/jscexecutor/Android.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
1515

1616
LOCAL_CFLAGS += -fvisibility=hidden -fexceptions -frtti
1717

18-
LOCAL_STATIC_LIBRARIES := libjsi libjsireact
18+
LOCAL_STATIC_LIBRARIES := libjsi libjsireact jscruntime
1919
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libreactnativejni
2020

2121
include $(BUILD_SHARED_LIBRARY)

ReactCommon/cxxreact/Android.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LOCAL_CFLAGS := \
1919

2020
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
2121

22-
LOCAL_STATIC_LIBRARIES := boost
22+
LOCAL_STATIC_LIBRARIES := boost jsi
2323
LOCAL_SHARED_LIBRARIES := jsinspector libfolly_json glog
2424

2525
include $(BUILD_STATIC_LIBRARY)
@@ -28,4 +28,5 @@ $(call import-module,fb)
2828
$(call import-module,folly)
2929
$(call import-module,jsc)
3030
$(call import-module,glog)
31+
$(call import-module,jsi)
3132
$(call import-module,jsinspector)

ReactCommon/jsi/Android.mk

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,25 @@ include $(CLEAR_VARS)
99

1010
LOCAL_MODULE := jsi
1111

12+
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jsi/*.cpp)
13+
14+
LOCAL_C_INCLUDES := $(LOCAL_PATH)
15+
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
16+
17+
LOCAL_CFLAGS := -fexceptions -frtti -O3
18+
LOCAL_SHARED_LIBRARIES := libfolly_json glog
19+
20+
include $(BUILD_STATIC_LIBRARY)
21+
22+
23+
include $(CLEAR_VARS)
24+
25+
LOCAL_MODULE := jscruntime
26+
1227
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
1328

14-
LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
15-
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
29+
LOCAL_C_INCLUDES := $(LOCAL_PATH)
30+
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
1631

1732
LOCAL_CFLAGS := -fexceptions -frtti -O3
1833
LOCAL_SHARED_LIBRARIES := libfolly_json libjsc glog

ReactCommon/jsi/BUCK

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_xplat_dep", "rn_xplat_c
55
rn_xplat_cxx_library(
66
name = "jsi",
77
srcs = [
8-
"jsi.cpp",
8+
"jsi/jsi.cpp",
99
],
10-
header_namespace = "jsi",
10+
header_namespace = "",
1111
exported_headers = [
12-
"instrumentation.h",
13-
"jsi.h",
14-
"jsi-inl.h",
15-
"jsilib.h",
12+
"jsi/instrumentation.h",
13+
"jsi/jsi.h",
14+
"jsi/jsi-inl.h",
15+
"jsi/jsilib.h",
1616
],
1717
compiler_flags = [
1818
"-O3",
@@ -40,11 +40,11 @@ rn_xplat_cxx_library(
4040
rn_xplat_cxx_library(
4141
name = "JSIDynamic",
4242
srcs = [
43-
"JSIDynamic.cpp",
43+
"jsi/JSIDynamic.cpp",
4444
],
45-
header_namespace = "jsi",
45+
header_namespace = "",
4646
exported_headers = [
47-
"JSIDynamic.h",
47+
"jsi/JSIDynamic.h",
4848
],
4949
compiler_flags = [
5050
"-fexceptions",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)