Skip to content

Commit

Permalink
Separate V8 code from the core JSI library (facebook#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
tudorms authored May 13, 2019
1 parent b12a210 commit 1e6ff28
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 18 deletions.
4 changes: 4 additions & 0 deletions ReactCommon/jsi/V8Runtime_droid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,8 @@ namespace facebook { namespace v8runtime {

return script;
}

std::unique_ptr<jsi::Runtime> makeV8Runtime(const folly::dynamic& v8Config) {
return std::make_unique<V8Runtime>(v8Config);
}
}} // namespace facebook::v8runtime
4 changes: 0 additions & 4 deletions ReactCommon/jsi/V8Runtime_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,4 @@ namespace facebook { namespace v8runtime {
std::unique_ptr<jsi::Runtime> makeV8Runtime() {
return std::make_unique<V8Runtime>();
}

std::unique_ptr<jsi::Runtime> makeV8Runtime(const folly::dynamic& v8Config) {
return std::make_unique<V8Runtime>(v8Config);
}
}} // namespace facebook::v8runtime
3 changes: 3 additions & 0 deletions ReactCommon/jsi/V8Runtime_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ namespace facebook { namespace v8runtime {
std::abort();
}

std::unique_ptr<jsi::Runtime> makeV8Runtime(const folly::dynamic& v8Config) {
return std::make_unique<V8Runtime>(v8Config);
}
}} // namespace facebook::v8runtime
1 change: 1 addition & 0 deletions ReactCommon/jsi/dirs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DIRS = \
android{droidarm,droidarm64,droidx64,droidx86} \
jsicore{apple,chpe,x64,x86} \
jsiv8{apple,chpe,x64,x86} \
win32{apple,chpe,x64,x86} \
winrt{arm,x64,x86} \
13 changes: 0 additions & 13 deletions ReactCommon/jsi/jsicore/sources
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@ LIBLET_WIN32 = 1
LIBLET_DEF_NOEXPORTS = 1
LIBLET_SUFFIX = core

C_DEFINES=$(C_DEFINES) -DJSI_CORE

V8_ENABLED = 1

# Currently this nuget package is windows only.
!LISTFILES -recursive V8_HEADERS = $(PKGOFFICE_GOOGLE_V8_1_6_0_0)\build\include *.h

HEADERS = $(HEADERS) \
$(V8_HEADERS) \

INCLUDES = $(INCLUDES); \
$(PKGOFFICE_GOOGLE_V8_1_6_0_0)\build\include; \

!include ..\sources.inc

SOURCES = $(SOURCES_JSICORE)
18 changes: 18 additions & 0 deletions ReactCommon/jsi/jsiv8/sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
LIBLET_WIN32 = 1
LIBLET_DEF_NOEXPORTS = 1
LIBLET_SUFFIX = v8

C_DEFINES=$(C_DEFINES) -DJSI_CORE

# Currently this nuget package is windows only.
!LISTFILES -recursive V8_HEADERS = $(PKGOFFICE_GOOGLE_V8_1_6_0_0)\build\include *.h

HEADERS = $(HEADERS) \
$(V8_HEADERS) \

INCLUDES = $(INCLUDES); \
$(PKGOFFICE_GOOGLE_V8_1_6_0_0)\build\include; \

!include ..\sources.inc

SOURCES = $(SOURCES_JSIV8)
5 changes: 4 additions & 1 deletion ReactCommon/jsi/sources.inc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ SOURCES_ANDROID = \
SOURCES_ANDROID = \
$(SOURCES_SHARED);\
$(SOURCES_JSC_FILES); \

!endif

SOURCES_WIN32 = \
Expand All @@ -41,6 +42,8 @@ SOURCES_WINRT = \

SOURCES_JSICORE = \
..\jsi.cpp \

SOURCES_JSIV8 = \
..\V8Platform.cpp \
..\V8Runtime_basic.cpp \
..\V8Runtime_shared.cpp \
..\V8Runtime_shared.cpp \

0 comments on commit 1e6ff28

Please sign in to comment.