Skip to content

Commit

Permalink
Add Conditionalized Promise Internal Bytecode.
Browse files Browse the repository at this point in the history
Summary:
This diff add `Promise` to the internal bytecode.

The Promise Internal Bytecode is generated on the fly from the npm
`promise` polyfill package with some refinements so that
- It use the HermesInternal promise rejection tracking configuration.
- Its initialization is conditionalized against
  `HermesInternal.hasPromise()`.

A shell script is introduced in `util` to automate this tedious process.

Reviewed By: avp

Differential Revision: D23486048

fbshipit-source-id: 29a7a1cfcb0a8892939d6a1993810cda538aab9d
  • Loading branch information
Huxpro authored and facebook-github-bot committed Oct 15, 2020
1 parent 96006e5 commit 429b0f0
Show file tree
Hide file tree
Showing 7 changed files with 597 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/InternalBytecode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_hermes_library(hermesInternalBytecode
InternalBytecode.cpp
)

set(JS_COMPILER_FLAGS "-O")
set(JS_COMPILER_FLAGS "-O" "-Wno-undefined-variable")

# Concatenate all JS files into one source file for compilation.
# This way there is only one RuntimeModule made for them.
Expand All @@ -31,6 +31,7 @@ endif()

set(js_lib_sources
header.js
Promise.js
footer.js
)

Expand Down
Loading

0 comments on commit 429b0f0

Please sign in to comment.