History log of /expo/packages/expo-modules-core/android/src/main/cpp/JavaReferencesCache.cpp (Results 1 – 7 of 7)
Revision Date Author Comments
# ecb7f347 29-Mar-2023 Łukasz Kosmaty <[email protected]>

[core][Android] Introduce shared object (#21855)

# Why

This's a follow-up to https://github.com/expo/expo/pull/17514.

# How

- Added a shared object registry
- Run a native constructor if

[core][Android] Introduce shared object (#21855)

# Why

This's a follow-up to https://github.com/expo/expo/pull/17514.

# How

- Added a shared object registry
- Run a native constructor if present when creating a js class
- Added a shared object with its js representation to the registry
- Added a converter for shared object

# TODO

- [ ] call native destructor when class is deallocated
- [ ] use weak refs to hold js objects in the registry

# Test Plan

- unit tests ✅

show more ...


# 75c7ead1 31-Jan-2023 Kudo Chien <[email protected]>

[core] remove boost dep and use boost from prefab (#21000)

# Why

react-native 0.71 ships boost in prefab artifacts, unfortunately, we use boost's container hash which is not published in prefab.

[core] remove boost dep and use boost from prefab (#21000)

# Why

react-native 0.71 ships boost in prefab artifacts, unfortunately, we use boost's container hash which is not published in prefab. that's why we still need to download boost manually. to speed up build time, we could remove the boost dependency and just use boost from prefab.

# How

- implement custom std::pair hash function for std::unordered_map. the hash function is referenced from boost.
- remove boost from build.gradle and CMakeLists.txt

# Test Plan

- android tests passed
- bare-expo android

show more ...


# e95df2f4 11-Jan-2023 Łukasz Kosmaty <[email protected]>

[core][Android] Add support for the `Long` type as function parameters (#20787)

# Why

Adds support for a `Long` type as a function parameter or return type.
It could be used in the https://gith

[core][Android] Add support for the `Long` type as function parameters (#20787)

# Why

Adds support for a `Long` type as a function parameter or return type.
It could be used in the https://github.com/expo/expo/pull/20784.

# How

- Added a CPP frontend converter.
- Added new Kotlin converter.
- Ensured that react-native can understand Long as a return value.

# Test Plan

- Unit tests ✅

show more ...


# 5e538c67 26-Sep-2022 Łukasz Kosmaty <[email protected]>

[modules][Android] Simplify unpacking of method results (#19226)

# Why

Simplifies unpacking of method results.
Before, we used a similar approach to the RN when receiving results from Kotlin fun

[modules][Android] Simplify unpacking of method results (#19226)

# Why

Simplifies unpacking of method results.
Before, we used a similar approach to the RN when receiving results from Kotlin functions in Cpp. The result was obtained as a WritableArray, and then it was unpaced. That solution isn't ideal in the long term because we always return a single value.

# How

That change for the sync function was pretty straightforward. Right now, the Kotlin function body returns an arbitrary object which is later unpaced and converted to the jsi value.
Unfortunately, to simplify the flow of async functions, I've to introduce my implementation of the callback and the promise.

# Test Plan

- tests ✅
- bare-expo and NCL ✅

show more ...


# 8d89495b 14-Sep-2022 Łukasz Kosmaty <[email protected]>

[modules][Android] Fix primitive array converter on JSI (#19094)

# Why

Closes ENG-6298.
Fixes primitive array converter on JSI.

# How

Created a `FrontendConvert` for the primitive array.

[modules][Android] Fix primitive array converter on JSI (#19094)

# Why

Closes ENG-6298.
Fixes primitive array converter on JSI.

# How

Created a `FrontendConvert` for the primitive array.

# Test Plan

- unit tests ✅

show more ...


# 6f5b8a20 16-Aug-2022 Łukasz Kosmaty <[email protected]>

[sweet API][Kotlin] Pass more information about expected types to C++ (#18653)

# Why

Another step to stop using `folly` on Android.
Passes more information about expected types to C++ to make th

[sweet API][Kotlin] Pass more information about expected types to C++ (#18653)

# Why

Another step to stop using `folly` on Android.
Passes more information about expected types to C++ to make the conversion there smarter.
Note that this PR is just a first step in that direction and that information isn't used in many cases. However, I've made a simple optimization to create classes like Integer and Float directly in C++. Before, we alwayse converted numbers to Double and then we did a second conversion. As a result, we created more objects than needed.

# How

- Added a class representing information about the expected type
- Added simple Integer/Float optimization.

# Test Plan

- unit tests ✅

show more ...


# b7d1787d 12-Aug-2022 Łukasz Kosmaty <[email protected]>

[sweet API] Cache PropNameID and js objects (#18579)

# Why

Adds a cache for prop name IDs and js objects like `Promise` or `CodedError`.

# How

- Added a cache registry
- Added missing tr

[sweet API] Cache PropNameID and js objects (#18579)

# Why

Adds a cache for prop name IDs and js objects like `Promise` or `CodedError`.

# How

- Added a cache registry
- Added missing try catch in the async function

# Test Plan

- unit tests ✅

show more ...