docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep keep keep replace replace keep keep keep keep keep
<mask> return mManifestJson; <mask> } <mask> <mask> public UpdateEntity getUpdateEntity() { <mask> String projectIdentifier = mManifestUri.toString(); <mask> UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, projectIdentifier); <mask> if (mMetadata != null) { <mask> updateEntity.metadata = mMetadata; <mask> } <mask> updateEntity.status = UpdateStatus.EMBEDDED; <mask> </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove String projectIdentifier = mManifestUrl.toString(); UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, projectIdentifier); </s> add UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, mScopeKey); </s> remove String projectIdentifier = mManifestUrl.toString(); UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, projectIdentifier); </s> add UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, mScopeKey); </s> add String scopeKeyFromMap = readValueCheckingType(map, UPDATES_CONFIGURATION_SCOPE_KEY_KEY, String.class); if (scopeKeyFromMap != null) { mScopeKey = scopeKeyFromMap; } maybeSetDefaultScopeKey(); </s> remove return new BareManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, metadata, assets); </s> add return new BareManifest(manifestJson, id, configuration.getScopeKey(), commitTime, runtimeVersion, metadata, assets); </s> remove public static void reapUnusedUpdates(UpdatesDatabase database, File updatesDirectory, UpdateEntity launchedUpdate, SelectionPolicy selectionPolicy) { </s> add public static void reapUnusedUpdates(UpdatesConfiguration configuration, UpdatesDatabase database, File updatesDirectory, UpdateEntity launchedUpdate, SelectionPolicy selectionPolicy) { </s> remove return new NewManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, metadata, bundleUrl, assets); </s> add return new NewManifest(manifestJson, id, configuration.getScopeKey(), commitTime, runtimeVersion, metadata, bundleUrl, assets);
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/BareManifest.java
keep keep keep keep replace keep keep keep keep keep
<mask> import android.net.Uri; <mask> import android.util.Log; <mask> <mask> import expo.modules.updates.UpdatesConfiguration; <mask> import expo.modules.updates.UpdatesController; <mask> import expo.modules.updates.db.entity.AssetEntity; <mask> import expo.modules.updates.db.entity.UpdateEntity; <mask> <mask> import org.json.JSONArray; <mask> import org.json.JSONException; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove import expo.modules.updates.UpdatesController; </s> add </s> remove import android.net.Uri; </s> add </s> remove import expo.modules.updates.UpdatesController; </s> add </s> add import expo.modules.updates.UpdatesConfiguration; </s> remove import androidx.test.runner.AndroidJUnit4; import expo.modules.updates.db.UpdatesDatabase; </s> add </s> remove @Database(entities = {UpdateEntity.class, UpdateAssetEntity.class, AssetEntity.class}, exportSchema = false, version = 2) </s> add @Database(entities = {UpdateEntity.class, UpdateAssetEntity.class, AssetEntity.class}, exportSchema = false, version = 3)
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/LegacyManifest.java
keep keep add keep keep keep keep keep
<mask> private Uri mAssetsUrlBase = null; <mask> <mask> private UUID mId; <mask> private Date mCommitTime; <mask> private String mRuntimeVersion; <mask> private JSONObject mMetadata; <mask> private Uri mBundleUrl; <mask> private JSONArray mAssets; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> add private String mScopeKey; </s> add private String mScopeKey; </s> remove private Uri mManifestUrl; </s> add </s> remove private Uri mManifestUri; </s> add </s> remove private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private NewManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) {
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/LegacyManifest.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> private JSONObject mManifestJson; <mask> private Uri mManifestUrl; <mask> <mask> private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { <mask> mManifestJson = manifestJson; <mask> mManifestUrl = manifestUrl; <mask> mId = id; <mask> mCommitTime = commitTime; <mask> mRuntimeVersion = runtimeVersion; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private NewManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove mManifestUrl = manifestUrl; </s> add </s> remove private Uri mManifestUrl; </s> add </s> remove private BareManifest(JSONObject manifestJson, Uri manifestUri, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> add private BareManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> remove mManifestUri = manifestUri; </s> add mScopeKey = scopeKey; </s> remove private Uri mManifestUri; </s> add
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/LegacyManifest.java
keep add keep keep keep keep
<mask> mManifestUrl = manifestUrl; <mask> mId = id; <mask> mCommitTime = commitTime; <mask> mRuntimeVersion = runtimeVersion; <mask> mMetadata = metadata; <mask> mBundleUrl = bundleUrl; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove mManifestUrl = manifestUrl; </s> add </s> add mScopeKey = scopeKey; </s> remove mManifestUri = manifestUri; </s> add mScopeKey = scopeKey; </s> remove private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private NewManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private BareManifest(JSONObject manifestJson, Uri manifestUri, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> add private BareManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) {
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/LegacyManifest.java
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> JSONArray bundledAssets = manifestJson.optJSONArray("bundledAssets"); <mask> <mask> return new LegacyManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, manifestJson, bundleUrl, bundledAssets); <mask> } <mask> <mask> public JSONObject getRawManifestJson() { <mask> return mManifestJson; <mask> } </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove return new NewManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, metadata, bundleUrl, assets); </s> add return new NewManifest(manifestJson, id, configuration.getScopeKey(), commitTime, runtimeVersion, metadata, bundleUrl, assets); </s> remove return new BareManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, metadata, assets); </s> add return new BareManifest(manifestJson, id, configuration.getScopeKey(), commitTime, runtimeVersion, metadata, assets); </s> remove private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private NewManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private Uri mManifestUrl; </s> add </s> remove private BareManifest(JSONObject manifestJson, Uri manifestUri, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> add private BareManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) {
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/LegacyManifest.java
keep keep keep keep replace replace keep keep keep keep keep
<mask> return mManifestJson; <mask> } <mask> <mask> public UpdateEntity getUpdateEntity() { <mask> String projectIdentifier = mManifestUrl.toString(); <mask> UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, projectIdentifier); <mask> if (mMetadata != null) { <mask> updateEntity.metadata = mMetadata; <mask> } <mask> <mask> return updateEntity; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove String projectIdentifier = mManifestUrl.toString(); UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, projectIdentifier); </s> add UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, mScopeKey); </s> remove String projectIdentifier = mManifestUri.toString(); UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, projectIdentifier); </s> add UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, mScopeKey); </s> add String scopeKeyFromMap = readValueCheckingType(map, UPDATES_CONFIGURATION_SCOPE_KEY_KEY, String.class); if (scopeKeyFromMap != null) { mScopeKey = scopeKeyFromMap; } maybeSetDefaultScopeKey(); </s> remove return new BareManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, metadata, assets); </s> add return new BareManifest(manifestJson, id, configuration.getScopeKey(), commitTime, runtimeVersion, metadata, assets); </s> remove return new NewManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, metadata, bundleUrl, assets); </s> add return new NewManifest(manifestJson, id, configuration.getScopeKey(), commitTime, runtimeVersion, metadata, bundleUrl, assets); </s> remove return new LegacyManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, manifestJson, bundleUrl, bundledAssets); </s> add return new LegacyManifest(manifestJson,configuration.getUpdateUrl(), id, configuration.getScopeKey(), commitTime, runtimeVersion, manifestJson, bundleUrl, bundledAssets);
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/LegacyManifest.java
keep keep keep keep replace keep keep keep keep keep
<mask> import android.net.Uri; <mask> import android.util.Log; <mask> <mask> import expo.modules.updates.UpdatesConfiguration; <mask> import expo.modules.updates.UpdatesController; <mask> import expo.modules.updates.db.entity.AssetEntity; <mask> import expo.modules.updates.db.entity.UpdateEntity; <mask> <mask> import org.json.JSONArray; <mask> import org.json.JSONException; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic.
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/NewManifest.java
keep keep keep add keep keep keep keep keep
<mask> <mask> private static String TAG = Manifest.class.getSimpleName(); <mask> <mask> private UUID mId; <mask> private Date mCommitTime; <mask> private String mRuntimeVersion; <mask> private JSONObject mMetadata; <mask> private Uri mBundleUrl; <mask> private JSONArray mAssets; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> add private String mScopeKey; </s> add private String mScopeKey; </s> remove private Uri mManifestUrl; </s> add </s> remove private Uri mManifestUri; </s> add </s> add private String mScopeKey; </s> remove private BareManifest(JSONObject manifestJson, Uri manifestUri, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> add private BareManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) {
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/NewManifest.java
keep keep keep keep replace keep keep keep keep keep
<mask> private Uri mBundleUrl; <mask> private JSONArray mAssets; <mask> <mask> private JSONObject mManifestJson; <mask> private Uri mManifestUrl; <mask> <mask> private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { <mask> mManifestJson = manifestJson; <mask> mManifestUrl = manifestUrl; <mask> mId = id; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private NewManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove mManifestUrl = manifestUrl; </s> add </s> remove private Uri mManifestUri; </s> add </s> remove private BareManifest(JSONObject manifestJson, Uri manifestUri, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> add private BareManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> remove mManifestUri = manifestUri; </s> add mScopeKey = scopeKey;
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/NewManifest.java
keep keep replace keep replace keep
<mask> private Uri mManifestUrl; <mask> <mask> private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { <mask> mManifestJson = manifestJson; <mask> mManifestUrl = manifestUrl; <mask> mId = id; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove private Uri mManifestUrl; </s> add </s> remove private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private BareManifest(JSONObject manifestJson, Uri manifestUri, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> add private BareManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> remove private Uri mManifestUri; </s> add </s> remove mManifestUri = manifestUri; </s> add mScopeKey = scopeKey;
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/NewManifest.java
keep keep keep add keep keep keep keep keep
<mask> Uri bundleUrl, <mask> JSONArray assets) { <mask> mManifestJson = manifestJson; <mask> mId = id; <mask> mCommitTime = commitTime; <mask> mRuntimeVersion = runtimeVersion; <mask> mMetadata = metadata; <mask> mBundleUrl = bundleUrl; <mask> mAssets = assets; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove mManifestUrl = manifestUrl; </s> add </s> remove mManifestUri = manifestUri; </s> add mScopeKey = scopeKey; </s> add mScopeKey = scopeKey; </s> remove private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private NewManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private BareManifest(JSONObject manifestJson, Uri manifestUri, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> add private BareManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) {
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/NewManifest.java
keep keep keep keep replace keep keep keep keep keep
<mask> JSONObject metadata = manifestJson.optJSONObject("metadata"); <mask> Uri bundleUrl = Uri.parse(manifestJson.getString("bundleUrl")); <mask> JSONArray assets = manifestJson.optJSONArray("assets"); <mask> <mask> return new NewManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, metadata, bundleUrl, assets); <mask> } <mask> <mask> public JSONObject getRawManifestJson() { <mask> return mManifestJson; <mask> } </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove return new BareManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, metadata, assets); </s> add return new BareManifest(manifestJson, id, configuration.getScopeKey(), commitTime, runtimeVersion, metadata, assets); </s> remove return new LegacyManifest(manifestJson, configuration.getUpdateUrl(), id, commitTime, runtimeVersion, manifestJson, bundleUrl, bundledAssets); </s> add return new LegacyManifest(manifestJson,configuration.getUpdateUrl(), id, configuration.getScopeKey(), commitTime, runtimeVersion, manifestJson, bundleUrl, bundledAssets); </s> remove private NewManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private NewManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> add private LegacyManifest(JSONObject manifestJson, Uri manifestUrl, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, Uri bundleUrl, JSONArray assets) { </s> remove private Uri mManifestUrl; </s> add </s> remove private BareManifest(JSONObject manifestJson, Uri manifestUri, UUID id, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) { </s> add private BareManifest(JSONObject manifestJson, UUID id, String scopeKey, Date commitTime, String runtimeVersion, JSONObject metadata, JSONArray assets) {
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/NewManifest.java
keep keep keep keep replace replace keep keep keep keep keep
<mask> return mManifestJson; <mask> } <mask> <mask> public UpdateEntity getUpdateEntity() { <mask> String projectIdentifier = mManifestUrl.toString(); <mask> UpdateEntity updateEntity = new UpdateEntity(mId, mCommitTime, mRuntimeVersion, projectIdentifier); <mask> if (mMetadata != null) { <mask> updateEntity.metadata = mMetadata; <mask> } <mask> <mask> return updateEntity; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic.
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/android/src/main/java/expo/modules/updates/manifest/NewManifest.java
keep keep add keep keep keep keep keep keep
<mask> @interface EXUpdatesConfig : NSObject <mask> <mask> @property (nonatomic, readonly) BOOL isEnabled; <mask> @property (nonatomic, readonly) NSURL *updateUrl; <mask> @property (nonatomic, readonly) NSString *releaseChannel; <mask> @property (nonatomic, readonly) NSNumber *launchWaitMs; <mask> @property (nonatomic, readonly) EXUpdatesCheckAutomaticallyConfig checkOnLaunch; <mask> <mask> @property (nullable, nonatomic, readonly) NSString *sdkVersion; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove @property (nonatomic, strong, readonly) NSString *projectIdentifier; </s> add @property (nonatomic, strong, readonly) NSString *scopeKey; </s> remove List<UpdateEntity> allUpdates = updateDao.loadAllUpdates(); </s> add List<UpdateEntity> allUpdates = updateDao.loadAllUpdatesForScope(projectId); </s> add mScopeKey = ai.metaData.getString("expo.modules.updates.EXPO_SCOPE_KEY"); maybeSetDefaultScopeKey(); </s> remove public List<UpdateEntity> loadLaunchableUpdates() { return _loadUpdatesWithStatuses(Arrays.asList(UpdateStatus.READY, UpdateStatus.EMBEDDED)); </s> add @Query("SELECT * FROM updates WHERE scope_key = :scopeKey;") public abstract List<UpdateEntity> loadAllUpdatesForScope(String scopeKey); public List<UpdateEntity> loadLaunchableUpdatesForScope(String scopeKey) { return _loadUpdatesForProjectWithStatuses(scopeKey, Arrays.asList(UpdateStatus.READY, UpdateStatus.EMBEDDED)); </s> add import expo.modules.updates.UpdatesConfiguration; </s> remove public String projectIdentifier; </s> add public String scopeKey;
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/ios/EXUpdates/EXUpdatesConfig.h
keep keep add keep keep keep
<mask> + (instancetype)configWithDictionary:(NSDictionary *)config; <mask> - (void)loadConfigFromDictionary:(NSDictionary *)config; <mask> <mask> @end <mask> <mask> NS_ASSUME_NONNULL_END </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> remove this.projectIdentifier = projectIdentifier; </s> add this.scopeKey = scopeKey; </s> remove public UpdateEntity(UUID id, Date commitTime, String runtimeVersion, String projectIdentifier) { </s> add public UpdateEntity(UUID id, Date commitTime, String runtimeVersion, String scopeKey) { </s> remove public String projectIdentifier; </s> add public String scopeKey; </s> remove @ColumnInfo(name = "project_identifier") </s> add @ColumnInfo(name = "scope_key") </s> remove @Index(value = {"project_identifier", "commit_time"}, unique = true)}) </s> add @Index(value = {"scope_key", "commit_time"}, unique = true)}) </s> remove public List<UpdateEntity> loadLaunchableUpdates() { return _loadUpdatesWithStatuses(Arrays.asList(UpdateStatus.READY, UpdateStatus.EMBEDDED)); </s> add @Query("SELECT * FROM updates WHERE scope_key = :scopeKey;") public abstract List<UpdateEntity> loadAllUpdatesForScope(String scopeKey); public List<UpdateEntity> loadLaunchableUpdatesForScope(String scopeKey) { return _loadUpdatesForProjectWithStatuses(scopeKey, Arrays.asList(UpdateStatus.READY, UpdateStatus.EMBEDDED));
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/ios/EXUpdates/EXUpdatesConfig.h
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> @interface EXUpdatesUpdate : NSObject <mask> <mask> @property (nonatomic, strong, readonly) NSUUID *updateId; <mask> @property (nonatomic, strong, readonly) NSString *projectIdentifier; <mask> @property (nonatomic, strong, readonly) NSDate *commitTime; <mask> @property (nonatomic, strong, readonly) NSString *runtimeVersion; <mask> @property (nonatomic, strong, readonly, nullable) NSDictionary * metadata; <mask> @property (nonatomic, assign, readonly) BOOL keep; <mask> @property (nonatomic, strong, readonly) NSArray<EXUpdatesAsset *> *assets; </s> [expo-updates] add scopeKey field to configuration and use when interacting with database (#9217) # Why Allow updates for multiple projects to be stored in the same database. # How We previously added the project_identifier field in the database for this purpose -- it is meant to be a unique ID for a project that can be used to filter stored updates by project. This commit adds a migration to turn that field into `scope_key`, adds a corresponding `scopeKey` field to the updates configuration object, and uses this `config.scopeKey` field both when inserting and selecting updates from the database. If no `scopeKey` is specified, it defaults to the manifest (update) URL origin. # Test Plan No behavior changes are expected, this just adds functionality that will be utilized when integrating the module into the App Store clients. Added some unit tests for the URL origin normalization logic. </s> add @property (nonatomic, readonly) NSString *scopeKey; </s> remove public List<UpdateEntity> loadLaunchableUpdates() { return _loadUpdatesWithStatuses(Arrays.asList(UpdateStatus.READY, UpdateStatus.EMBEDDED)); </s> add @Query("SELECT * FROM updates WHERE scope_key = :scopeKey;") public abstract List<UpdateEntity> loadAllUpdatesForScope(String scopeKey); public List<UpdateEntity> loadLaunchableUpdatesForScope(String scopeKey) { return _loadUpdatesForProjectWithStatuses(scopeKey, Arrays.asList(UpdateStatus.READY, UpdateStatus.EMBEDDED)); </s> remove @Query("SELECT * FROM updates WHERE status IN (:statuses);") public abstract List<UpdateEntity> _loadUpdatesWithStatuses(List<UpdateStatus> statuses); </s> add @Query("SELECT * FROM updates WHERE scope_key = :scopeKey AND status IN (:statuses);") public abstract List<UpdateEntity> _loadUpdatesForProjectWithStatuses(String scopeKey, List<UpdateStatus> statuses); </s> remove @Query("SELECT * FROM updates;") public abstract List<UpdateEntity> loadAllUpdates(); </s> add </s> add mScopeKey = scopeKey; </s> add mScopeKey = scopeKey;
https://github.com/expo/expo/commit/6b61ed5f748d7e8422d13e129d594988f105e1bb
packages/expo-updates/ios/EXUpdates/Update/EXUpdatesUpdate.h
keep keep keep keep replace keep keep keep keep keep
<mask> import { getSDKVersionFromRuntimeVersion } from '@expo/sdk-runtime-versions'; <mask> import { StackScreenProps } from '@react-navigation/stack'; <mask> import dedent from 'dedent'; <mask> import * as React from 'react'; <mask> import { ActivityIndicator, Alert, Image, Linking, StyleSheet, Text, View } from 'react-native'; <mask> import FadeIn from 'react-native-fade-in-image'; <mask> import semver from 'semver'; <mask> <mask> import ListItem from '../components/ListItem'; <mask> import SectionHeader from '../components/SectionHeader'; </s> [home] Update copy on project detail page (#13389) </s> remove <Text style={styles.moreLegacyBranchesText}> To launch a update from another classic updates release channel, scan the QR code on project webpage. </Text> </s> add {Platform.OS === 'ios' ? null : ( <Text style={styles.moreLegacyBranchesText}> To launch from another classic release channel, scan the QR code on the project webpage. </Text> )} </s> remove <SectionHeader title="Classic update release channels" /> </s> add <SectionHeader title="Classic release channels" /> </s> remove <SectionHeader title="EAS Update branches" /> </s> add <SectionHeader title="EAS branches" />
https://github.com/expo/expo/commit/6c888d29b77a3dfb79bfad6005d7d4c23bf54393
home/components/ProjectView.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> legacyUpdatesSDKMajorVersion < Environment.lowestSupportedSdkVersion; <mask> <mask> return ( <mask> <View> <mask> <SectionHeader title="Classic update release channels" /> <mask> <ListItem <mask> title="default" <mask> onPress={() => { <mask> if (isLatestLegacyPublishDeprecated) { <mask> Alert.alert( </s> [home] Update copy on project detail page (#13389) </s> remove <Text style={styles.moreLegacyBranchesText}> To launch a update from another classic updates release channel, scan the QR code on project webpage. </Text> </s> add {Platform.OS === 'ios' ? null : ( <Text style={styles.moreLegacyBranchesText}> To launch from another classic release channel, scan the QR code on the project webpage. </Text> )} </s> remove import { ActivityIndicator, Alert, Image, Linking, StyleSheet, Text, View } from 'react-native'; </s> add import { ActivityIndicator, Alert, Image, Linking, Platform, StyleSheet, Text, View, } from 'react-native'; </s> remove <SectionHeader title="EAS Update branches" /> </s> add <SectionHeader title="EAS branches" />
https://github.com/expo/expo/commit/6c888d29b77a3dfb79bfad6005d7d4c23bf54393
home/components/ProjectView.tsx
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> } <mask> }} <mask> last <mask> /> <mask> <Text style={styles.moreLegacyBranchesText}> <mask> To launch a update from another classic updates release channel, scan the QR code on project <mask> webpage. <mask> </Text> <mask> </View> <mask> ); <mask> } <mask> <mask> function NewLaunchSection({ app }: { app: ProjectDataProject }) { </s> [home] Update copy on project detail page (#13389) </s> remove import { ActivityIndicator, Alert, Image, Linking, StyleSheet, Text, View } from 'react-native'; </s> add import { ActivityIndicator, Alert, Image, Linking, Platform, StyleSheet, Text, View, } from 'react-native'; </s> remove <SectionHeader title="Classic update release channels" /> </s> add <SectionHeader title="Classic release channels" /> </s> remove <SectionHeader title="EAS Update branches" /> </s> add <SectionHeader title="EAS branches" />
https://github.com/expo/expo/commit/6c888d29b77a3dfb79bfad6005d7d4c23bf54393
home/components/ProjectView.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> }; <mask> <mask> return ( <mask> <View> <mask> <SectionHeader title="EAS Update branches" /> <mask> {branchManifests.map(renderBranchManifest)} <mask> </View> <mask> ); <mask> } <mask> </s> [home] Update copy on project detail page (#13389) </s> remove <Text style={styles.moreLegacyBranchesText}> To launch a update from another classic updates release channel, scan the QR code on project webpage. </Text> </s> add {Platform.OS === 'ios' ? null : ( <Text style={styles.moreLegacyBranchesText}> To launch from another classic release channel, scan the QR code on the project webpage. </Text> )} </s> remove <SectionHeader title="Classic update release channels" /> </s> add <SectionHeader title="Classic release channels" /> </s> remove import { ActivityIndicator, Alert, Image, Linking, StyleSheet, Text, View } from 'react-native'; </s> add import { ActivityIndicator, Alert, Image, Linking, Platform, StyleSheet, Text, View, } from 'react-native';
https://github.com/expo/expo/commit/6c888d29b77a3dfb79bfad6005d7d4c23bf54393
home/components/ProjectView.tsx
keep keep keep replace keep keep replace keep
<mask> * and success is set false. On collisions, success is set false, but the <mask> * iterator is set to the existing entry. <mask> */ <mask> std::pair<iterator,bool> insert(const value_type& r) { <mask> return emplace(r.first, r.second); <mask> } <mask> std::pair<iterator,bool> insert(value_type&& r) { <mask> return emplace(r.first, std::move(r.second)); </s> [sdk33] Update iOS with RN 0.59 </s> remove class Options : private boost::orable<Options> { </s> add class Options { </s> add // we just need to check the ptr since it can be set to nullptr // even if the entry is part of the list </s> remove iterator find(const key_type &value) { return iterator(sl_->find(value)); } const_iterator find(const key_type &value) const { </s> add iterator find(const key_type& value) { </s> remove RWSpinLock::ReadHolder rh(&mutex_); return singletons_.size(); </s> add return singletons_.rlock()->size(); </s> remove ThreadCachedInt& operator++() { increment(1); return *this; } ThreadCachedInt& operator--() { increment(-1); return *this; } </s> add ThreadCachedInt& operator++() { increment(1); return *this; } ThreadCachedInt& operator--() { increment(IntT(-1)); return *this; }
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/AtomicHashArray.h
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> * different from that stored in the table; see find(). If and only if no <mask> * equal key is already present, this method converts 'key_in' to a key of <mask> * type KeyT using the provided LookupKeyToKeyFcn. <mask> */ <mask> template <typename LookupKeyT = key_type, <mask> typename LookupHashFcn = hasher, <mask> typename LookupEqualFcn = key_equal, <mask> typename LookupKeyToKeyFcn = key_convert, <mask> typename... ArgTs> <mask> std::pair<iterator,bool> emplace(LookupKeyT key_in, ArgTs&&... vCtorArgs) { <mask> SimpleRetT ret = insertInternal<LookupKeyT, <mask> LookupHashFcn, <mask> LookupEqualFcn, <mask> LookupKeyToKeyFcn>( <mask> key_in, <mask> std::forward<ArgTs>(vCtorArgs)...); <mask> return std::make_pair(iterator(this, ret.idx), ret.success); <mask> } <mask> <mask> // returns the number of elements erased - should never exceed 1 <mask> size_t erase(KeyT k); </s> [sdk33] Update iOS with RN 0.59 </s> remove template <class SynchronizedType, class LockPolicy> class LockedGuardPtr { private: // CDataType is the DataType with the appropriate const-qualification using CDataType = detail::SynchronizedDataType<SynchronizedType>; public: using DataType = typename SynchronizedType::DataType; using MutexType = typename SynchronizedType::MutexType; using Synchronized = typename std::remove_const<SynchronizedType>::type; LockedGuardPtr() = delete; /** * Takes a Synchronized<T> and locks it. */ explicit LockedGuardPtr(SynchronizedType* parent) : parent_(parent) { LockPolicy::lock(parent_->mutex_); } /** * Destructor releases. */ ~LockedGuardPtr() { LockPolicy::unlock(parent_->mutex_); } /** * Access the locked data. */ CDataType* operator->() const { return &parent_->datum_; } </s> add template <typename D, typename M, typename... Args> auto wlock(Synchronized<D, M>& synchronized, Args&&... args) { return detail::wlock(synchronized, std::forward<Args>(args)...); } template <typename Data, typename Mutex, typename... Args> auto rlock(const Synchronized<Data, Mutex>& synchronized, Args&&... args) { return detail::rlock(synchronized, std::forward<Args>(args)...); } template <typename D, typename M, typename... Args> auto ulock(Synchronized<D, M>& synchronized, Args&&... args) { return detail::ulock(synchronized, std::forward<Args>(args)...); } template <typename D, typename M, typename... Args> auto lock(Synchronized<D, M>& synchronized, Args&&... args) { return detail::lock(synchronized, std::forward<Args>(args)...); } template <typename D, typename M, typename... Args> auto lock(const Synchronized<D, M>& synchronized, Args&&... args) { return detail::lock(synchronized, std::forward<Args>(args)...); } </s> remove } // detail </s> add template < typename Synchronized, typename LockFunc, typename TryLockFunc, typename... Args> class SynchronizedLocker { public: using LockedPtr = invoke_result_t<LockFunc&, Synchronized&, const Args&...>; template <typename LockFuncType, typename TryLockFuncType, typename... As> SynchronizedLocker( Synchronized& sync, LockFuncType&& lockFunc, TryLockFuncType tryLockFunc, As&&... as) : synchronized{sync}, lockFunc_{std::forward<LockFuncType>(lockFunc)}, tryLockFunc_{std::forward<TryLockFuncType>(tryLockFunc)}, args_{std::forward<As>(as)...} {} auto lock() const { auto args = std::tuple<const Args&...>{args_}; return apply(lockFunc_, std::tuple_cat(std::tie(synchronized), args)); } auto tryLock() const { return tryLockFunc_(synchronized); } private: Synchronized& synchronized; LockFunc lockFunc_; TryLockFunc tryLockFunc_; std::tuple<Args...> args_; }; template < typename Synchronized, typename LockFunc, typename TryLockFunc, typename... Args> auto makeSynchronizedLocker( Synchronized& synchronized, LockFunc&& lockFunc, TryLockFunc&& tryLockFunc, Args&&... args) { using LockFuncType = std::decay_t<LockFunc>; using TryLockFuncType = std::decay_t<TryLockFunc>; return SynchronizedLocker< Synchronized, LockFuncType, TryLockFuncType, std::decay_t<Args>...>{synchronized, std::forward<LockFunc>(lockFunc), std::forward<TryLockFunc>(tryLockFunc), std::forward<Args>(args)...}; } /** * Acquire locks for multiple Synchronized<T> objects, in a deadlock-safe * manner. * * The function uses the "smart and polite" algorithm from this link * http://howardhinnant.github.io/dining_philosophers.html#Polite * * The gist of the algorithm is that it locks a mutex, then tries to lock the * other mutexes in a non-blocking manner. If all the locks succeed, we are * done, if not, we release the locks we have held, yield to allow other * threads to continue and then block on the mutex that we failed to acquire. * * This allows dynamically yielding ownership of all the mutexes but one, so * that other threads can continue doing work and locking the other mutexes. * See the benchmarks in folly/test/SynchronizedBenchmark.cpp for more. */ template <typename... SynchronizedLocker> auto lock(SynchronizedLocker... lockersIn) -> std::tuple<typename SynchronizedLocker::LockedPtr...> { // capture the list of lockers as a tuple auto lockers = std::forward_as_tuple(lockersIn...); // make a list of null LockedPtr instances that we will return to the caller auto lockedPtrs = std::tuple<typename SynchronizedLocker::LockedPtr...>{}; // start by locking the first thing in the list std::get<0>(lockedPtrs) = std::get<0>(lockers).lock(); auto indexLocked = 0; while (true) { auto couldLockAll = true; for_each(lockers, [&](auto& locker, auto index) { // if we should try_lock on the current locker then do so if (index != indexLocked) { auto lockedPtr = locker.tryLock(); // if we were unable to lock this mutex, // // 1. release all the locks, // 2. yield control to another thread to be nice // 3. block on the mutex we failed to lock, acquire the lock // 4. break out and set the index of the current mutex to indicate // which mutex we have locked if (!lockedPtr) { // writing lockedPtrs = decltype(lockedPtrs){} does not compile on // gcc, I believe this is a bug D7676798 lockedPtrs = std::tuple<typename SynchronizedLocker::LockedPtr...>{}; std::this_thread::yield(); fetch(lockedPtrs, index) = locker.lock(); indexLocked = index; couldLockAll = false; return loop_break; } // else store the locked mutex in the list we return fetch(lockedPtrs, index) = std::move(lockedPtr); } return loop_continue; }); if (couldLockAll) { return lockedPtrs; } } } template <typename Synchronized, typename... Args> auto wlock(Synchronized& synchronized, Args&&... args) { return detail::makeSynchronizedLocker( synchronized, [](auto& s, auto&&... a) { return s.wlock(std::forward<decltype(a)>(a)...); }, [](auto& s) { return s.tryWLock(); }, std::forward<Args>(args)...); } template <typename Synchronized, typename... Args> auto rlock(Synchronized& synchronized, Args&&... args) { return detail::makeSynchronizedLocker( synchronized, [](auto& s, auto&&... a) { return s.rlock(std::forward<decltype(a)>(a)...); }, [](auto& s) { return s.tryRLock(); }, std::forward<Args>(args)...); } template <typename Synchronized, typename... Args> auto ulock(Synchronized& synchronized, Args&&... args) { return detail::makeSynchronizedLocker( synchronized, [](auto& s, auto&&... a) { return s.ulock(std::forward<decltype(a)>(a)...); }, [](auto& s) { return s.tryULock(); }, std::forward<Args>(args)...); } template <typename Synchronized, typename... Args> auto lock(Synchronized& synchronized, Args&&... args) { return detail::makeSynchronizedLocker( synchronized, [](auto& s, auto&&... a) { return s.lock(std::forward<decltype(a)>(a)...); }, [](auto& s) { return s.tryLock(); }, std::forward<Args>(args)...); } } // namespace detail </s> remove * Move objects in memory to the right into some uninitialized * memory, where the region overlaps. This doesn't just use * std::move_backward because move_backward only works if all the * memory is initialized to type T already. </s> add * Move a range to a range of uninitialized memory. Assumes the * ranges don't overlap. Inserts an element at out + pos using * emplaceFunc(). out will contain (end - begin) + 1 elements on success and * none on failure. If emplaceFunc() throws [begin, end) is unmodified. </s> remove template <typename E, typename V, typename... Args> void throwOnFail(V&& value, Args&&... args) { if (!value) { throw E(std::forward<Args>(args)...); } } </s> add </s> remove * Construct and inject a mock singleton which should be used only from tests. * Unlike regular singletons which are initialized once per process lifetime, * mock singletons live for the duration of a test. This means that one process * running multiple tests can initialize and register the same singleton * multiple times. This functionality should be used only from tests * since it relaxes validation and performance in order to be able to perform * the injection. The returned mock singleton is functionality identical to * regular singletons. */ static void make_mock(std::nullptr_t /* c */ = nullptr, typename Singleton<T>::TeardownFunc t = nullptr) { </s> add * Construct and inject a mock singleton which should be used only from tests. * Unlike regular singletons which are initialized once per process lifetime, * mock singletons live for the duration of a test. This means that one * process running multiple tests can initialize and register the same * singleton multiple times. This functionality should be used only from tests * since it relaxes validation and performance in order to be able to perform * the injection. The returned mock singleton is functionality identical to * regular singletons. */ static void make_mock( std::nullptr_t /* c */ = nullptr, typename Singleton<T>::TeardownFunc t = nullptr) { </s> remove /* * This helper returns the distance between two iterators if it is * possible to figure it out without messing up the range * (i.e. unless they are InputIterators). Otherwise this returns * -1. */ template<class Iterator> int distance_if_multipass(Iterator first, Iterator last) { typedef typename std::iterator_traits<Iterator>::iterator_category categ; if (std::is_same<categ,std::input_iterator_tag>::value) return -1; return std::distance(first, last); } template<class OurContainer, class Vector, class GrowthPolicy> typename OurContainer::iterator insert_with_hint(OurContainer& sorted, Vector& cont, typename OurContainer::iterator hint, typename OurContainer::value_type&& value, GrowthPolicy& po) { const typename OurContainer::value_compare& cmp(sorted.value_comp()); if (hint == cont.end() || cmp(value, *hint)) { if (hint == cont.begin()) { po.increase_capacity(cont, cont.begin()); return cont.insert(cont.begin(), std::move(value)); } if (cmp(*(hint - 1), value)) { hint = po.increase_capacity(cont, hint); return cont.insert(hint, std::move(value)); } </s> add template <typename Compare, typename Key, typename T> struct sorted_vector_enable_if_is_transparent< void_t<typename Compare::is_transparent>, Compare, Key, T> { using type = T; }; // This wrapper goes around a GrowthPolicy and provides iterator // preservation semantics, but only if the growth policy is not the // default (i.e. nothing). template <class Policy> struct growth_policy_wrapper : private Policy { template <class Container, class Iterator> Iterator increase_capacity(Container& c, Iterator desired_insertion) { typedef typename Container::difference_type diff_t; diff_t d = desired_insertion - c.begin(); Policy::increase_capacity(c); return c.begin() + d; } }; template <> struct growth_policy_wrapper<void> { template <class Container, class Iterator> Iterator increase_capacity(Container&, Iterator it) { return it; } }; /* * This helper returns the distance between two iterators if it is * possible to figure it out without messing up the range * (i.e. unless they are InputIterators). Otherwise this returns * -1. */ template <class Iterator> int distance_if_multipass(Iterator first, Iterator last) { typedef typename std::iterator_traits<Iterator>::iterator_category categ; if (std::is_same<categ, std::input_iterator_tag>::value) { return -1; } return std::distance(first, last); } template <class OurContainer, class Vector, class GrowthPolicy> typename OurContainer::iterator insert_with_hint( OurContainer& sorted, Vector& cont, typename OurContainer::iterator hint, typename OurContainer::value_type&& value, GrowthPolicy& po) { const typename OurContainer::value_compare& cmp(sorted.value_comp()); if (hint == cont.end() || cmp(value, *hint)) { if (hint == cont.begin() || cmp(*(hint - 1), value)) { hint = po.increase_capacity(cont, hint); return cont.insert(hint, std::move(value)); } else {
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/AtomicHashArray.h
keep keep keep keep replace replace keep keep replace keep
<mask> <mask> // Exact number of elements in the map - note that readFull() acquires a <mask> // mutex. See folly/ThreadCachedInt.h for more details. <mask> size_t size() const { <mask> return numEntries_.readFull() - <mask> numErases_.load(std::memory_order_relaxed); <mask> } <mask> <mask> bool empty() const { return size() == 0; } <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove bool empty() const { return size() == 0; } </s> add bool empty() const { return size() == 0; } </s> remove bool empty() const { return sl_->size() == 0; } size_t size() const { return sl_->size(); } size_type max_size() const { return std::numeric_limits<size_type>::max(); } </s> add bool empty() const { return sl_->size() == 0; } size_t size() const { return sl_->size(); } size_type max_size() const { return std::numeric_limits<size_type>::max(); } </s> remove void clear() { resize(0); } </s> add void clear() { resize(0); } </s> remove size_type size() const { return this->doSize(); } bool empty() const { return !size(); } </s> add size_type size() const { return this->doSize(); } bool empty() const { return !size(); } </s> remove return begin() <= end() && empty() == (size() == 0) && empty() == (begin() == end()) && size() <= max_size() && capacity() <= max_size() && size() <= capacity() && begin()[size()] == '\0'; </s> add return begin() <= end() && empty() == (size() == 0) && empty() == (begin() == end()) && size() <= max_size() && capacity() <= max_size() && size() <= capacity() && begin()[size()] == '\0';
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/AtomicHashArray.h
keep keep keep keep replace replace keep keep keep keep keep
<mask> it.advancePastEmpty(); <mask> return it; <mask> } <mask> <mask> iterator end() { return iterator(this, capacity_); } <mask> const_iterator end() const { return const_iterator(this, capacity_); } <mask> <mask> // See AtomicHashMap::findAt - access elements directly <mask> // WARNING: The following 2 functions will fail silently for hashtable <mask> // with capacity > 2^32 <mask> iterator findAt(uint32_t idx) { </s> [sdk33] Update iOS with RN 0.59 </s> remove iterator makeIter(size_t idx) { return iterator(this, idx); } </s> add iterator makeIter(size_t idx) { return iterator(this, idx); } </s> remove iterator begin() { return data(); } iterator end() { return data() + size(); } const_iterator begin() const { return data(); } const_iterator end() const { return data() + size(); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } </s> add iterator begin() { return data(); } iterator end() { return data() + size(); } const_iterator begin() const { return data(); } const_iterator end() const { return data() + size(); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } </s> remove iterator end() const { return iterator(nullptr); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } </s> add iterator end() const { return iterator(nullptr); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } </s> remove size_type size() const { return this->doSize(); } bool empty() const { return !size(); } </s> add size_type size() const { return this->doSize(); } bool empty() const { return !size(); } </s> remove bool empty() const { return size() == 0; } </s> add bool empty() const { return size() == 0; } </s> remove iterator find(const key_type &value) { return iterator(sl_->find(value)); } const_iterator find(const key_type &value) const { </s> add iterator find(const key_type& value) {
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/AtomicHashArray.h
keep keep keep keep replace keep keep keep keep keep
<mask> const_iterator findAt(uint32_t idx) const { <mask> return const_cast<AtomicHashArray*>(this)->findAt(idx); <mask> } <mask> <mask> iterator makeIter(size_t idx) { return iterator(this, idx); } <mask> const_iterator makeIter(size_t idx) const { <mask> return const_iterator(this, idx); <mask> } <mask> <mask> // The max load factor allowed for this map </s> [sdk33] Update iOS with RN 0.59 </s> remove iterator end() { return iterator(this, capacity_); } const_iterator end() const { return const_iterator(this, capacity_); } </s> add iterator end() { return iterator(this, capacity_); } const_iterator end() const { return const_iterator(this, capacity_); } </s> remove iterator begin() { return data(); } iterator end() { return data() + size(); } const_iterator begin() const { return data(); } const_iterator end() const { return data() + size(); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } </s> add iterator begin() { return data(); } iterator end() { return data() + size(); } const_iterator begin() const { return data(); } const_iterator end() const { return data() + size(); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } </s> remove iterator end() const { return iterator(nullptr); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } </s> add iterator end() const { return iterator(nullptr); } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } </s> remove size_type count(const key_type &data) const { return contains(data); } </s> add const_iterator find(const key_type& value) const { return iterator(sl_->find(value)); } size_type count(const key_type& data) const { return contains(data); } </s> remove size_type size() const { return this->doSize(); } bool empty() const { return !size(); } </s> add size_type size() const { return this->doSize(); } bool empty() const { return !size(); } </s> remove const_iterator cend() const { return end(); } </s> add const_iterator cend() const { return end(); }
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/AtomicHashArray.h
keep keep keep keep replace replace
<mask> mutable T data; <mask> explicit MutableData(const T& init) : data(init) {} <mask> }; <mask> <mask> <mask> } </s> [sdk33] Update iOS with RN 0.59 </s> add template < typename... DatumArgs, typename... MutexArgs, std::size_t... IndicesOne, std::size_t... IndicesTwo> Synchronized( std::piecewise_construct_t, std::tuple<DatumArgs...> datumArgs, std::tuple<MutexArgs...> mutexArgs, index_sequence<IndicesOne...>, index_sequence<IndicesTwo...>) : datum_{std::get<IndicesOne>(std::move(datumArgs))...}, mutex_{std::get<IndicesTwo>(std::move(mutexArgs))...} {} </s> remove explicit SharedProxy(Function<ReturnType(Args...)>&& func) : sp_(std::make_shared<Function<ReturnType(Args...)>>( std::move(func))) {} </s> add explicit SharedProxy(Function<NonConstSignature>&& func) : sp_(std::make_shared<Function<NonConstSignature>>(std::move(func))) {} </s> remove explicit SharedProxy(Function<ReturnType(Args...) const>&& func) : sp_(std::make_shared<Function<ReturnType(Args...) const>>( std::move(func))) {} </s> add explicit SharedProxy(Function<NonConstSignature>&& func) : sp_(std::make_shared<Function<NonConstSignature>>(std::move(func))) {} </s> remove public: explicit Transformer(const It& it) : Transformer::iterator_adaptor_(it), valid_(false) {} </s> add public: explicit Transformer(const It& it) : Transformer::iterator_adaptor_(it) {} </s> remove explicit SingletonVault(Type type = Type::Relaxed) : type_(type) {} </s> add static Type defaultVaultType(); explicit SingletonVault(Type type = defaultVaultType()) : type_(type) {} </s> remove explicit basic_fbstring(const A&) noexcept { } </s> add explicit basic_fbstring(const A&) noexcept {}
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/AtomicUnorderedMap.h
keep replace keep keep keep keep keep
<mask> /* <mask> * Copyright 2016 Facebook, Inc. <mask> * <mask> * Licensed under the Apache License, Version 2.0 (the "License"); <mask> * you may not use this file except in compliance with the License. <mask> * You may obtain a copy of the License at <mask> * </s> [sdk33] Update iOS with RN 0.59 </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2011-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2013-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2011-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2015-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2016-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2016-present Facebook, Inc.
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep add keep keep keep keep keep
<mask> #include <folly/Preprocessor.h> // for FB_ANONYMOUS_VARIABLE <mask> #include <folly/ScopeGuard.h> <mask> #include <folly/Traits.h> <mask> #include <folly/portability/GFlags.h> <mask> <mask> #include <cassert> <mask> #include <chrono> <mask> #include <functional> </s> [sdk33] Update iOS with RN 0.59 </s> remove #include <folly/portability/Time.h> </s> add </s> remove #include <ctime> #include <boost/function_types/function_arity.hpp> </s> add #include <chrono> </s> remove #include <glog/logging.h> </s> add </s> remove #include <memory> </s> add #include <functional> </s> remove #include <boost/iterator/iterator_facade.hpp> </s> add #include <iterator> #include <type_traits> #include <utility> </s> add #include <folly/Traits.h>
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep replace keep keep replace replace
<mask> #include <folly/portability/GFlags.h> <mask> #include <folly/portability/Time.h> <mask> <mask> #include <cassert> <mask> #include <ctime> <mask> #include <boost/function_types/function_arity.hpp> </s> [sdk33] Update iOS with RN 0.59 </s> remove #include <glog/logging.h> </s> add </s> add #include <folly/functional/Invoke.h> </s> add #include <boost/function_types/function_arity.hpp> #include <glog/logging.h> </s> remove #include <iterator> </s> add </s> add #include <cstdlib> #include <cstring> #include <iterator> #include <stdexcept> #include <type_traits> #include <utility>
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> #include <cassert> <mask> #include <ctime> <mask> #include <boost/function_types/function_arity.hpp> <mask> #include <functional> <mask> #include <glog/logging.h> <mask> #include <limits> <mask> #include <type_traits> <mask> <mask> DECLARE_bool(benchmark); <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove #include <ctime> #include <boost/function_types/function_arity.hpp> </s> add #include <chrono> </s> add #include <boost/function_types/function_arity.hpp> #include <glog/logging.h> </s> remove #include <folly/portability/Time.h> </s> add </s> remove #include <memory> </s> add #include <functional> </s> remove #include <functional> </s> add </s> add #include <memory>
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep add keep keep keep keep keep
<mask> #include <functional> <mask> #include <limits> <mask> #include <type_traits> <mask> <mask> DECLARE_bool(benchmark); <mask> <mask> namespace folly { <mask> <mask> /** </s> [sdk33] Update iOS with RN 0.59 </s> remove #include <glog/logging.h> </s> add </s> remove #include <memory> </s> add #include <functional> </s> remove #include <ctime> #include <boost/function_types/function_arity.hpp> </s> add #include <chrono> </s> remove #include <functional> </s> add </s> add #include <memory> </s> remove #include <boost/multi_index/ordered_index.hpp> </s> add
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep replace keep replace replace replace replace replace replace replace keep
<mask> namespace detail { <mask> <mask> typedef std::pair<uint64_t, unsigned int> TimeIterPair; <mask> <mask> /** <mask> * Adds a benchmark wrapped in a std::function. Only used <mask> * internally. Pass by value is intentional. <mask> */ <mask> void addBenchmarkImpl(const char* file, <mask> const char* name, <mask> std::function<TimeIterPair(unsigned int)>); <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove * Takes the difference between two sets of timespec values. The first * two come from a high-resolution clock whereas the other two come * from a low-resolution clock. The crux of the matter is that * high-res values may be bogus as documented in * http://linux.die.net/man/3/clock_gettime. The trouble is when the * running process migrates from one CPU to another, which is more * likely for long-running processes. Therefore we watch for high * differences between the two timings. * * This function is subject to further improvements. </s> add * Adds a benchmark wrapped in a std::function. Only used * internally. Pass by value is intentional. </s> remove inline uint64_t timespecDiff(timespec end, timespec start, timespec endCoarse, timespec startCoarse) { auto fine = timespecDiff(end, start); auto coarse = timespecDiff(endCoarse, startCoarse); if (coarse - fine >= 1000000) { // The fine time is in all likelihood bogus return coarse; } return fine; } </s> add void addBenchmarkImpl( const char* file, const char* name, std::function<TimeIterPair(unsigned int)>); </s> remove /** * Takes the difference between two timespec values. end is assumed to * occur after start. */ inline uint64_t timespecDiff(timespec end, timespec start) { if (end.tv_sec == start.tv_sec) { assert(end.tv_nsec >= start.tv_nsec); return end.tv_nsec - start.tv_nsec; } assert(end.tv_sec > start.tv_sec); auto diff = uint64_t(end.tv_sec - start.tv_sec); assert(diff < std::numeric_limits<uint64_t>::max() / 1000000000UL); return diff * 1000000000UL + end.tv_nsec - start.tv_nsec; } </s> add struct BenchmarkResult { std::string file; std::string name; double timeInNs; }; </s> remove boost::function_types::function_arity<decltype(&Lambda::operator())>::value == 1 >::type </s> add boost::function_types::function_arity< decltype(&Lambda::operator())>::value == 1>::type </s> remove boost::function_types::function_arity<decltype(&Lambda::operator())>::value == 2 >::type </s> add boost::function_types::function_arity< decltype(&Lambda::operator())>::value == 2>::type
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep
<mask> std::function<TimeIterPair(unsigned int)>); <mask> <mask> /** <mask> * Takes the difference between two timespec values. end is assumed to <mask> * occur after start. <mask> */ <mask> inline uint64_t timespecDiff(timespec end, timespec start) { <mask> if (end.tv_sec == start.tv_sec) { <mask> assert(end.tv_nsec >= start.tv_nsec); <mask> return end.tv_nsec - start.tv_nsec; <mask> } <mask> assert(end.tv_sec > start.tv_sec); <mask> auto diff = uint64_t(end.tv_sec - start.tv_sec); <mask> assert(diff < <mask> std::numeric_limits<uint64_t>::max() / 1000000000UL); <mask> return diff * 1000000000UL <mask> + end.tv_nsec - start.tv_nsec; <mask> } <mask> <mask> /** <mask> * Takes the difference between two sets of timespec values. The first <mask> * two come from a high-resolution clock whereas the other two come <mask> * from a low-resolution clock. The crux of the matter is that <mask> * high-res values may be bogus as documented in <mask> * http://linux.die.net/man/3/clock_gettime. The trouble is when the <mask> * running process migrates from one CPU to another, which is more <mask> * likely for long-running processes. Therefore we watch for high <mask> * differences between the two timings. <mask> * <mask> * This function is subject to further improvements. <mask> */ <mask> inline uint64_t timespecDiff(timespec end, timespec start, <mask> timespec endCoarse, timespec startCoarse) { </s> [sdk33] Update iOS with RN 0.59 </s> remove inline uint64_t timespecDiff(timespec end, timespec start, timespec endCoarse, timespec startCoarse) { auto fine = timespecDiff(end, start); auto coarse = timespecDiff(endCoarse, startCoarse); if (coarse - fine >= 1000000) { // The fine time is in all likelihood bogus return coarse; } return fine; } </s> add void addBenchmarkImpl( const char* file, const char* name, std::function<TimeIterPair(unsigned int)>); </s> remove /** * Adds a benchmark wrapped in a std::function. Only used * internally. Pass by value is intentional. */ void addBenchmarkImpl(const char* file, const char* name, std::function<TimeIterPair(unsigned int)>); </s> add struct BenchmarkRegistration { std::string file; std::string name; BenchmarkFun func; }; </s> remove * Move assignment operator, only assigns the data, NOT the * mutex. It locks the two objects in ascending order of their * addresses. </s> add * Move assignment operator; deprecated * * Takes an exclusive lock on the destination mutex while move-assigning the * destination data from the source data. The source mutex is not locked or * otherwise accessed. * * Semantically, assumes that the source object is a true rvalue and therefore * that no synchronization is required for accessing it. </s> remove * Construct and inject a mock singleton which should be used only from tests. * Unlike regular singletons which are initialized once per process lifetime, * mock singletons live for the duration of a test. This means that one process * running multiple tests can initialize and register the same singleton * multiple times. This functionality should be used only from tests * since it relaxes validation and performance in order to be able to perform * the injection. The returned mock singleton is functionality identical to * regular singletons. */ static void make_mock(std::nullptr_t /* c */ = nullptr, typename Singleton<T>::TeardownFunc t = nullptr) { </s> add * Construct and inject a mock singleton which should be used only from tests. * Unlike regular singletons which are initialized once per process lifetime, * mock singletons live for the duration of a test. This means that one * process running multiple tests can initialize and register the same * singleton multiple times. This functionality should be used only from tests * since it relaxes validation and performance in order to be able to perform * the injection. The returned mock singleton is functionality identical to * regular singletons. */ static void make_mock( std::nullptr_t /* c */ = nullptr, typename Singleton<T>::TeardownFunc t = nullptr) { </s> remove Synchronized& operator=(const Synchronized& rhs) { if (this == &rhs) { // Self-assignment, pass. } else if (this < &rhs) { auto guard1 = operator->(); auto guard2 = rhs.operator->(); datum_ = rhs.datum_; } else { auto guard1 = rhs.operator->(); auto guard2 = operator->(); datum_ = rhs.datum_; } return *this; </s> add template <typename... DatumArgs, typename... MutexArgs> Synchronized( std::piecewise_construct_t, std::tuple<DatumArgs...> datumArgs, std::tuple<MutexArgs...> mutexArgs) : Synchronized{std::piecewise_construct, std::move(datumArgs), std::move(mutexArgs), make_index_sequence<sizeof...(DatumArgs)>{}, make_index_sequence<sizeof...(MutexArgs)>{}} {} /** * Copy assignment operator; deprecated * * Enabled only when the data type is copy-constructible and move-assignable. * * Move-assigns from a copy of the source data. * * Takes a shared-or-exclusive lock on the source mutex while copying the * source data to a temporary. Takes an exclusive lock on the destination * mutex while move-assigning from the temporary. * * This technique consts an extra temporary but avoids the need to take locks * on both mutexes together. */ Synchronized& operator=(typename std::conditional< std::is_copy_constructible<T>::value && std::is_move_assignable<T>::value, const Synchronized&, NonImplementedType>::type rhs) { return *this = rhs.copy();
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> * differences between the two timings. <mask> * <mask> * This function is subject to further improvements. <mask> */ <mask> inline uint64_t timespecDiff(timespec end, timespec start, <mask> timespec endCoarse, timespec startCoarse) { <mask> auto fine = timespecDiff(end, start); <mask> auto coarse = timespecDiff(endCoarse, startCoarse); <mask> if (coarse - fine >= 1000000) { <mask> // The fine time is in all likelihood bogus <mask> return coarse; <mask> } <mask> return fine; <mask> } <mask> <mask> } // namespace detail <mask> <mask> /** <mask> * Supporting type for BENCHMARK_SUSPEND defined below. </s> [sdk33] Update iOS with RN 0.59 </s> remove * Takes the difference between two sets of timespec values. The first * two come from a high-resolution clock whereas the other two come * from a low-resolution clock. The crux of the matter is that * high-res values may be bogus as documented in * http://linux.die.net/man/3/clock_gettime. The trouble is when the * running process migrates from one CPU to another, which is more * likely for long-running processes. Therefore we watch for high * differences between the two timings. * * This function is subject to further improvements. </s> add * Adds a benchmark wrapped in a std::function. Only used * internally. Pass by value is intentional. </s> remove /** * Takes the difference between two timespec values. end is assumed to * occur after start. */ inline uint64_t timespecDiff(timespec end, timespec start) { if (end.tv_sec == start.tv_sec) { assert(end.tv_nsec >= start.tv_nsec); return end.tv_nsec - start.tv_nsec; } assert(end.tv_sec > start.tv_sec); auto diff = uint64_t(end.tv_sec - start.tv_sec); assert(diff < std::numeric_limits<uint64_t>::max() / 1000000000UL); return diff * 1000000000UL + end.tv_nsec - start.tv_nsec; } </s> add struct BenchmarkResult { std::string file; std::string name; double timeInNs; }; </s> remove timespec start; </s> add TimePoint start; </s> add using Clock = std::chrono::high_resolution_clock; using TimePoint = Clock::time_point; using Duration = Clock::duration; </s> remove timespec end; CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &end)); nsSpent += detail::timespecDiff(end, start); </s> add auto end = Clock::now(); timeSpent += end - start; </s> remove CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); </s> add start = Clock::now();
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep add keep keep keep keep keep
<mask> /** <mask> * Supporting type for BENCHMARK_SUSPEND defined below. <mask> */ <mask> struct BenchmarkSuspender { <mask> BenchmarkSuspender() { <mask> start = Clock::now(); <mask> } <mask> <mask> BenchmarkSuspender(const BenchmarkSuspender&) = delete; </s> [sdk33] Update iOS with RN 0.59 </s> remove CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); </s> add start = Clock::now(); </s> remove BenchmarkSuspender(const BenchmarkSuspender &) = delete; BenchmarkSuspender(BenchmarkSuspender && rhs) noexcept { </s> add BenchmarkSuspender(const BenchmarkSuspender&) = delete; BenchmarkSuspender(BenchmarkSuspender&& rhs) noexcept { </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {}; </s> remove BenchmarkSuspender& operator=(const BenchmarkSuspender &) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender && rhs) { if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> add BenchmarkSuspender& operator=(const BenchmarkSuspender&) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender&& rhs) { if (start != TimePoint{}) { </s> remove inline uint64_t timespecDiff(timespec end, timespec start, timespec endCoarse, timespec startCoarse) { auto fine = timespecDiff(end, start); auto coarse = timespecDiff(endCoarse, startCoarse); if (coarse - fine >= 1000000) { // The fine time is in all likelihood bogus return coarse; } return fine; } </s> add void addBenchmarkImpl( const char* file, const char* name, std::function<TimeIterPair(unsigned int)>); </s> remove timespec start; </s> add TimePoint start;
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep replace keep keep replace replace keep keep keep
<mask> */ <mask> struct BenchmarkSuspender { <mask> BenchmarkSuspender() { <mask> CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); <mask> } <mask> <mask> BenchmarkSuspender(const BenchmarkSuspender &) = delete; <mask> BenchmarkSuspender(BenchmarkSuspender && rhs) noexcept { <mask> start = rhs.start; <mask> rhs.start.tv_nsec = rhs.start.tv_sec = 0; <mask> } </s> [sdk33] Update iOS with RN 0.59 </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {}; </s> remove BenchmarkSuspender& operator=(const BenchmarkSuspender &) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender && rhs) { if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> add BenchmarkSuspender& operator=(const BenchmarkSuspender&) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender&& rhs) { if (start != TimePoint{}) { </s> add using Clock = std::chrono::high_resolution_clock; using TimePoint = Clock::time_point; using Duration = Clock::duration; </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {}; </s> remove start.tv_nsec = start.tv_sec = 0; </s> add start = {};
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep replace keep keep replace replace replace keep keep keep
<mask> start = rhs.start; <mask> rhs.start.tv_nsec = rhs.start.tv_sec = 0; <mask> } <mask> <mask> BenchmarkSuspender& operator=(const BenchmarkSuspender &) = delete; <mask> BenchmarkSuspender& operator=(BenchmarkSuspender && rhs) { <mask> if (start.tv_nsec > 0 || start.tv_sec > 0) { <mask> tally(); <mask> } <mask> start = rhs.start; </s> [sdk33] Update iOS with RN 0.59 </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {}; </s> remove BenchmarkSuspender(const BenchmarkSuspender &) = delete; BenchmarkSuspender(BenchmarkSuspender && rhs) noexcept { </s> add BenchmarkSuspender(const BenchmarkSuspender&) = delete; BenchmarkSuspender(BenchmarkSuspender&& rhs) noexcept { </s> remove CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); </s> add start = Clock::now(); </s> remove start.tv_nsec = start.tv_sec = 0; </s> add start = {}; </s> remove if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> add if (start != TimePoint{}) {
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep replace keep keep keep keep replace
<mask> } <mask> start = rhs.start; <mask> rhs.start.tv_nsec = rhs.start.tv_sec = 0; <mask> return *this; <mask> } <mask> <mask> ~BenchmarkSuspender() { <mask> if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> [sdk33] Update iOS with RN 0.59 </s> remove BenchmarkSuspender& operator=(const BenchmarkSuspender &) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender && rhs) { if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> add BenchmarkSuspender& operator=(const BenchmarkSuspender&) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender&& rhs) { if (start != TimePoint{}) { </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {}; </s> remove start.tv_nsec = start.tv_sec = 0; </s> add start = {}; </s> remove assert(start.tv_nsec > 0 || start.tv_sec > 0); </s> add assert(start != TimePoint{}); </s> remove BenchmarkSuspender(const BenchmarkSuspender &) = delete; BenchmarkSuspender(BenchmarkSuspender && rhs) noexcept { </s> add BenchmarkSuspender(const BenchmarkSuspender&) = delete; BenchmarkSuspender(BenchmarkSuspender&& rhs) noexcept {
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> } <mask> <mask> void dismiss() { <mask> assert(start.tv_nsec > 0 || start.tv_sec > 0); <mask> tally(); <mask> start.tv_nsec = start.tv_sec = 0; <mask> } <mask> <mask> void rehire() { </s> [sdk33] Update iOS with RN 0.59 </s> remove start.tv_nsec = start.tv_sec = 0; </s> add start = {}; </s> remove assert(start.tv_nsec == 0 || start.tv_sec == 0); CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); </s> add assert(start == TimePoint{}); start = Clock::now(); </s> remove if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> add if (start != TimePoint{}) { </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {}; </s> remove BenchmarkSuspender& operator=(const BenchmarkSuspender &) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender && rhs) { if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> add BenchmarkSuspender& operator=(const BenchmarkSuspender&) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender&& rhs) { if (start != TimePoint{}) { </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {};
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep replace keep keep keep replace replace keep keep
<mask> void dismiss() { <mask> assert(start.tv_nsec > 0 || start.tv_sec > 0); <mask> tally(); <mask> start.tv_nsec = start.tv_sec = 0; <mask> } <mask> <mask> void rehire() { <mask> assert(start.tv_nsec == 0 || start.tv_sec == 0); <mask> CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); <mask> } <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove assert(start.tv_nsec > 0 || start.tv_sec > 0); </s> add assert(start != TimePoint{}); </s> remove if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> add if (start != TimePoint{}) { </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {}; </s> remove BenchmarkSuspender& operator=(const BenchmarkSuspender &) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender && rhs) { if (start.tv_nsec > 0 || start.tv_sec > 0) { </s> add BenchmarkSuspender& operator=(const BenchmarkSuspender&) = delete; BenchmarkSuspender& operator=(BenchmarkSuspender&& rhs) { if (start != TimePoint{}) { </s> remove rhs.start.tv_nsec = rhs.start.tv_sec = 0; </s> add rhs.start = {};
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace keep keep keep keep keep
<mask> CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); <mask> } <mask> <mask> template <class F> <mask> auto dismissing(F f) -> typename std::result_of<F()>::type { <mask> SCOPE_EXIT { rehire(); }; <mask> dismiss(); <mask> return f(); <mask> } <mask> <mask> /** </s> [sdk33] Update iOS with RN 0.59 </s> remove assert(start.tv_nsec == 0 || start.tv_sec == 0); CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); </s> add assert(start == TimePoint{}); start = Clock::now(); </s> remove template <class Ex> bool is_compatible_with() const { if (item_) { return dynamic_cast<const Ex*>(item_.get()); } else if (eptr_) { try { std::rethrow_exception(eptr_); } catch (typename std::decay<Ex>::type&) { return true; } catch (...) { // fall through } } return false; } </s> add [[noreturn]] static void onNoExceptionError(char const* name); </s> remove CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &start)); </s> add start = Clock::now(); </s> remove BenchmarkSuspender(const BenchmarkSuspender &) = delete; BenchmarkSuspender(BenchmarkSuspender && rhs) noexcept { </s> add BenchmarkSuspender(const BenchmarkSuspender&) = delete; BenchmarkSuspender(BenchmarkSuspender&& rhs) noexcept { </s> remove start.tv_nsec = start.tv_sec = 0; </s> add start = {}; </s> remove // Invoke helper template <typename F, typename... Args> inline auto invoke(F&& f, Args&&... args) -> decltype(std::forward<F>(f)(std::forward<Args>(args)...)) { return std::forward<F>(f)(std::forward<Args>(args)...); } template <typename M, typename C, typename... Args> inline auto invoke(M(C::*d), Args&&... args) -> decltype(std::mem_fn(d)(std::forward<Args>(args)...)) { return std::mem_fn(d)(std::forward<Args>(args)...); } </s> add
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> return false; <mask> } <mask> <mask> /** <mask> * Accumulates nanoseconds spent outside benchmark. <mask> */ <mask> typedef uint64_t NanosecondsSpent; <mask> static NanosecondsSpent nsSpent; <mask> <mask> private: </s> [sdk33] Update iOS with RN 0.59 </s> remove typedef uint64_t NanosecondsSpent; static NanosecondsSpent nsSpent; </s> add static Duration timeSpent; </s> remove private: </s> add private: </s> remove timespec end; CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &end)); nsSpent += detail::timespecDiff(end, start); </s> add auto end = Clock::now(); timeSpent += end - start; </s> remove private: </s> add private: </s> remove /** * Returns the current time in seconds since Epoch. */ static double defaultClockNow() noexcept(noexcept(Impl::defaultClockNow())) { return Impl::defaultClockNow(); } </s> add </s> remove /** * Returns the current time in seconds since Epoch. */ static double defaultClockNow() noexcept(noexcept(ClockT::timeSinceEpoch())) { return std::chrono::duration_cast<std::chrono::duration<double>>( ClockT::timeSinceEpoch()) .count(); } </s> add
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep replace replace keep replace keep
<mask> */ <mask> typedef uint64_t NanosecondsSpent; <mask> static NanosecondsSpent nsSpent; <mask> <mask> private: <mask> void tally() { </s> [sdk33] Update iOS with RN 0.59 </s> remove * Accumulates nanoseconds spent outside benchmark. </s> add * Accumulates time spent outside benchmark. </s> remove timespec end; CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &end)); nsSpent += detail::timespecDiff(end, start); </s> add auto end = Clock::now(); timeSpent += end - start; </s> remove private: </s> add private: </s> remove typedef std::string(*StackTraceGetterPtr)(); </s> add typedef std::string (*StackTraceGetterPtr)(); </s> remove SkipListRandomHeight() { initLookupTable(); } </s> add SkipListRandomHeight() { initLookupTable(); }
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep replace replace replace keep keep keep replace
<mask> private: <mask> void tally() { <mask> timespec end; <mask> CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &end)); <mask> nsSpent += detail::timespecDiff(end, start); <mask> start = end; <mask> } <mask> <mask> timespec start; </s> [sdk33] Update iOS with RN 0.59 </s> remove private: </s> add private: </s> remove typedef uint64_t NanosecondsSpent; static NanosecondsSpent nsSpent; </s> add static Duration timeSpent; </s> remove auto const r1 = clock_gettime(CLOCK_REALTIME, &start); </s> add auto start = std::chrono::high_resolution_clock::now(); </s> remove BenchmarkSuspender::nsSpent = 0; timespec start, end; </s> add BenchmarkSuspender::timeSpent = {}; </s> remove inline uint64_t timespecDiff(timespec end, timespec start, timespec endCoarse, timespec startCoarse) { auto fine = timespecDiff(end, start); auto coarse = timespecDiff(endCoarse, startCoarse); if (coarse - fine >= 1000000) { // The fine time is in all likelihood bogus return coarse; } return fine; } </s> add void addBenchmarkImpl( const char* file, const char* name, std::function<TimeIterPair(unsigned int)>);
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep replace replace replace keep keep replace replace keep keep keep
<mask> */ <mask> template <typename Lambda> <mask> typename std::enable_if< <mask> boost::function_types::function_arity<decltype(&Lambda::operator())>::value <mask> == 2 <mask> >::type <mask> addBenchmark(const char* file, const char* name, Lambda&& lambda) { <mask> auto execute = [=](unsigned int times) { <mask> BenchmarkSuspender::nsSpent = 0; <mask> timespec start, end; <mask> unsigned int niter; <mask> <mask> // CORE MEASUREMENT STARTS </s> [sdk33] Update iOS with RN 0.59 </s> remove boost::function_types::function_arity<decltype(&Lambda::operator())>::value == 1 >::type </s> add boost::function_types::function_arity< decltype(&Lambda::operator())>::value == 1>::type </s> remove unsigned int niter = 0; while (times-- > 0) { niter += lambda(); } return niter; }); </s> add unsigned int niter = 0; while (times-- > 0) { niter += lambda(); } return niter; }); </s> remove auto const r1 = clock_gettime(CLOCK_REALTIME, &start); </s> add auto start = std::chrono::high_resolution_clock::now(); </s> remove inline uint64_t timespecDiff(timespec end, timespec start, timespec endCoarse, timespec startCoarse) { auto fine = timespecDiff(end, start); auto coarse = timespecDiff(endCoarse, startCoarse); if (coarse - fine >= 1000000) { // The fine time is in all likelihood bogus return coarse; } return fine; } </s> add void addBenchmarkImpl( const char* file, const char* name, std::function<TimeIterPair(unsigned int)>); </s> remove auto const r2 = clock_gettime(CLOCK_REALTIME, &end); </s> add auto end = std::chrono::high_resolution_clock::now();
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> timespec start, end; <mask> unsigned int niter; <mask> <mask> // CORE MEASUREMENT STARTS <mask> auto const r1 = clock_gettime(CLOCK_REALTIME, &start); <mask> niter = lambda(times); <mask> auto const r2 = clock_gettime(CLOCK_REALTIME, &end); <mask> // CORE MEASUREMENT ENDS <mask> <mask> CHECK_EQ(0, r1); </s> [sdk33] Update iOS with RN 0.59 </s> remove auto const r2 = clock_gettime(CLOCK_REALTIME, &end); </s> add auto end = std::chrono::high_resolution_clock::now(); </s> remove BenchmarkSuspender::nsSpent = 0; timespec start, end; </s> add BenchmarkSuspender::timeSpent = {}; </s> remove CHECK_EQ(0, r1); CHECK_EQ(0, r2); </s> add </s> remove boost::function_types::function_arity<decltype(&Lambda::operator())>::value == 2 >::type </s> add boost::function_types::function_arity< decltype(&Lambda::operator())>::value == 2>::type </s> remove timespec end; CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &end)); nsSpent += detail::timespecDiff(end, start); </s> add auto end = Clock::now(); timeSpent += end - start; </s> remove private: </s> add private:
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep replace keep keep replace replace replace keep keep keep
<mask> auto const r1 = clock_gettime(CLOCK_REALTIME, &start); <mask> niter = lambda(times); <mask> auto const r2 = clock_gettime(CLOCK_REALTIME, &end); <mask> // CORE MEASUREMENT ENDS <mask> <mask> CHECK_EQ(0, r1); <mask> CHECK_EQ(0, r2); <mask> <mask> return detail::TimeIterPair( <mask> detail::timespecDiff(end, start) - BenchmarkSuspender::nsSpent, <mask> niter); </s> [sdk33] Update iOS with RN 0.59 </s> remove auto const r1 = clock_gettime(CLOCK_REALTIME, &start); </s> add auto start = std::chrono::high_resolution_clock::now(); </s> remove detail::timespecDiff(end, start) - BenchmarkSuspender::nsSpent, niter); </s> add (end - start) - BenchmarkSuspender::timeSpent, niter); </s> remove BenchmarkSuspender::nsSpent = 0; timespec start, end; </s> add BenchmarkSuspender::timeSpent = {}; </s> remove timespec end; CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &end)); nsSpent += detail::timespecDiff(end, start); </s> add auto end = Clock::now(); timeSpent += end - start; </s> remove private: </s> add private:
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace keep keep replace replace keep keep
<mask> CHECK_EQ(0, r1); <mask> CHECK_EQ(0, r2); <mask> <mask> return detail::TimeIterPair( <mask> detail::timespecDiff(end, start) - BenchmarkSuspender::nsSpent, <mask> niter); <mask> }; <mask> <mask> detail::addBenchmarkImpl(file, name, <mask> std::function<detail::TimeIterPair(unsigned int)>(execute)); <mask> } <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove CHECK_EQ(0, r1); CHECK_EQ(0, r2); </s> add </s> remove auto const r2 = clock_gettime(CLOCK_REALTIME, &end); </s> add auto end = std::chrono::high_resolution_clock::now(); </s> remove timespec end; CHECK_EQ(0, clock_gettime(CLOCK_REALTIME, &end)); nsSpent += detail::timespecDiff(end, start); </s> add auto end = Clock::now(); timeSpent += end - start; </s> remove private: </s> add private: </s> remove auto const r1 = clock_gettime(CLOCK_REALTIME, &start); </s> add auto start = std::chrono::high_resolution_clock::now();
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep replace replace replace keep keep replace replace replace replace replace replace keep keep keep keep
<mask> typename std::enable_if< <mask> boost::function_types::function_arity<decltype(&Lambda::operator())>::value <mask> == 1 <mask> >::type <mask> addBenchmark(const char* file, const char* name, Lambda&& lambda) { <mask> addBenchmark(file, name, [=](unsigned int times) { <mask> unsigned int niter = 0; <mask> while (times-- > 0) { <mask> niter += lambda(); <mask> } <mask> return niter; <mask> }); <mask> } <mask> <mask> /** <mask> * Call doNotOptimizeAway(var) to ensure that var will be computed even </s> [sdk33] Update iOS with RN 0.59 </s> remove boost::function_types::function_arity<decltype(&Lambda::operator())>::value == 2 >::type </s> add boost::function_types::function_arity< decltype(&Lambda::operator())>::value == 2>::type </s> remove BenchmarkSuspender::nsSpent = 0; timespec start, end; </s> add BenchmarkSuspender::timeSpent = {}; </s> remove #ifdef _WIN32 // We implement a sane comparison operand for // pthread_t and an integer so that it may be // compared against 0. inline bool operator==(pthread_t ptA, unsigned int b) { if (ptA.p == nullptr) { return b == 0; } return pthread_getw32threadid_np(ptA) == b; } inline bool operator!=(pthread_t ptA, unsigned int b) { if (ptA.p == nullptr) { return b != 0; } return pthread_getw32threadid_np(ptA) != b; } inline bool operator==(pthread_t ptA, pthread_t ptB) { return pthread_equal(ptA, ptB) != 0; } inline bool operator!=(pthread_t ptA, pthread_t ptB) { return pthread_equal(ptA, ptB) == 0; } inline bool operator<(pthread_t ptA, pthread_t ptB) { return ptA.p < ptB.p; } inline bool operator!(pthread_t ptA) { return ptA == 0; } inline int pthread_attr_getstack( pthread_attr_t* attr, void** stackaddr, size_t* stacksize) { if (pthread_attr_getstackaddr(attr, stackaddr) != 0) { return -1; } if (pthread_attr_getstacksize(attr, stacksize) != 0) { return -1; } return 0; } inline int pthread_attr_setstack(pthread_attr_t* attr, void* stackaddr, size_t stacksize) { if (pthread_attr_setstackaddr(attr, stackaddr) != 0) { return -1; } if (pthread_attr_setstacksize(attr, stacksize) != 0) { return -1; } return 0; } inline int pthread_attr_getguardsize(pthread_attr_t* attr, size_t* guardsize) { *guardsize = 0; return 0; } #include <xstddef> namespace std { template <> struct hash<pthread_t> { std::size_t operator()(const pthread_t& k) const { return 0 ^ std::hash<decltype(k.p)>()(k.p) ^ std::hash<decltype(k.x)>()(k.x); } </s> add #elif !FOLLY_HAVE_PTHREAD #include <cstdint> #include <memory> #include <folly/portability/Sched.h> #include <folly/portability/Time.h> #include <folly/portability/Windows.h> #define PTHREAD_CREATE_JOINABLE 0 #define PTHREAD_CREATE_DETACHED 1 #define PTHREAD_MUTEX_NORMAL 0 #define PTHREAD_MUTEX_RECURSIVE 1 #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL #define _POSIX_TIMEOUTS 200112L namespace folly { namespace portability { namespace pthread { struct pthread_attr_t { size_t stackSize; bool detached; }; int pthread_attr_init(pthread_attr_t* attr); int pthread_attr_setdetachstate(pthread_attr_t* attr, int state); int pthread_attr_setstacksize(pthread_attr_t* attr, size_t kb); namespace pthread_detail { struct pthread_t { HANDLE handle{INVALID_HANDLE_VALUE}; DWORD threadID{0}; bool detached{false}; ~pthread_t() noexcept; </s> remove class SubprocessSpawnError : public SubprocessError { </s> add class FOLLY_EXPORT SubprocessSpawnError : public SubprocessError { </s> remove /** * Adds a benchmark wrapped in a std::function. Only used * internally. Pass by value is intentional. */ void addBenchmarkImpl(const char* file, const char* name, std::function<TimeIterPair(unsigned int)>); </s> add struct BenchmarkRegistration { std::string file; std::string name; BenchmarkFun func; };
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep replace keep keep replace
<mask> // First two constraints ensure it can be an "r" operand. <mask> // std::is_pointer check is because callers seem to expect that <mask> // doNotOptimizeAway(&x) is equivalent to doNotOptimizeAway(x). <mask> constexpr static bool value = !folly::IsTriviallyCopyable<Decayed>::value || <mask> sizeof(Decayed) > sizeof(long) || std::is_pointer<Decayed>::value; <mask> }; <mask> } // detail namespace </s> [sdk33] Update iOS with RN 0.59 </s> remove if (length == 0 || (result == 0.0 && std::isspace((*src)[length - 1]))) { </s> add if (length == 0 || (result == 0.0 && std::isspace((*src)[size_t(length) - 1]))) { </s> add // we just need to check the ptr since it can be set to nullptr // even if the entry is part of the list </s> remove // The following two constructors are meant to emulate the behavior of // try_and_catch in performance sensitive code as well as to be flexible // enough to wrap exceptions of unknown type. There is an overload that // takes an exception reference so that the wrapper can extract and store // the exception's type and what() when possible. // // The canonical use case is to construct an all-catching exception wrapper // with minimal overhead like so: // // try { // // some throwing code // } catch (const std::exception& e) { // // won't lose e's type and what() // exception_wrapper ew{std::current_exception(), e}; // } catch (...) { // // everything else // exception_wrapper ew{std::current_exception()}; // } // // try_and_catch is cleaner and preferable. Use it unless you're sure you need // something like this instead. template <typename Ex> explicit exception_wrapper(std::exception_ptr eptr, Ex& exn) { assign_eptr(eptr, exn); } </s> add namespace exception_wrapper_detail { </s> remove // Please note, however, that all non-weak_ptr interfaces are // inherently subject to races with destruction. Use responsibly. </s> add // You can also access a singleton instance with // `Singleton<ObjectType, TagType>::try_get()`. We recommend // that you prefer the form `the_singleton.try_get()` because it ensures that // `the_singleton` is used and cannot be garbage-collected during linking: this // is necessary because the constructor of `the_singleton` is what registers it // to the SingletonVault. </s> remove // TODO: we'd like to make use of makeSize (it can be optimized better, // because it manipulates the internals) // unfortunately the current implementation only supports moving from // a supplied rvalue, and doing an extra move just to reuse it is a perf // net loss if (size() == capacity()) {// && isInside(&t)) { value_type tmp(t); emplaceBack(std::move(tmp)); } else { emplaceBack(t); } </s> add emplace_back(t);
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> template <typename T> <mask> auto doNotOptimizeAway(const T& datum) -> typename std::enable_if< <mask> !detail::DoNotOptimizeAwayNeedsIndirect<T>::value>::type { <mask> asm volatile("" ::"X"(datum)); <mask> } <mask> <mask> template <typename T> <mask> auto doNotOptimizeAway(const T& datum) -> typename std::enable_if< <mask> detail::DoNotOptimizeAwayNeedsIndirect<T>::value>::type { </s> [sdk33] Update iOS with RN 0.59 </s> remove } // detail namespace </s> add } // namespace detail </s> add // This version of doNotOptimizeAway tells the compiler that the asm // block will read datum from memory, and that in addition it might read // or write from any memory location. If the memory clobber could be // separated into input and output that would be preferrable. </s> remove // Invoke helper template <typename F, typename... Args> inline auto invoke(F&& f, Args&&... args) -> decltype(std::forward<F>(f)(std::forward<Args>(args)...)) { return std::forward<F>(f)(std::forward<Args>(args)...); } template <typename M, typename C, typename... Args> inline auto invoke(M(C::*d), Args&&... args) -> decltype(std::mem_fn(d)(std::forward<Args>(args)...)) { return std::mem_fn(d)(std::forward<Args>(args)...); } </s> add </s> remove template <typename T, typename = void> struct constexpr_abs_helper {}; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if<std::is_floating_point<T>::value>::type> { static constexpr T go(T t) { return t < static_cast<T>(0) ? -t : t; } }; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_unsigned<T>::value>::type> { static constexpr T go(T t) { return t; } }; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_signed<T>::value>::type> { static constexpr typename std::make_unsigned<T>::type go(T t) { return t < static_cast<T>(0) ? -t : t; } }; </s> add template <typename Char> constexpr size_t constexpr_strlen_internal(const Char* s, size_t len) { // clang-format off return *(s + 0) == Char(0) ? len + 0 : *(s + 1) == Char(0) ? len + 1 : *(s + 2) == Char(0) ? len + 2 : *(s + 3) == Char(0) ? len + 3 : *(s + 4) == Char(0) ? len + 4 : *(s + 5) == Char(0) ? len + 5 : *(s + 6) == Char(0) ? len + 6 : *(s + 7) == Char(0) ? len + 7 : constexpr_strlen_internal(s + 8, len + 8); // clang-format on </s> remove template<typename T> </s> add template <typename T> </s> remove auto dismissing(F f) -> typename std::result_of<F()>::type { SCOPE_EXIT { rehire(); }; </s> add auto dismissing(F f) -> invoke_result_t<F> { SCOPE_EXIT { rehire(); };
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep add keep keep keep keep keep
<mask> auto doNotOptimizeAway(const T& datum) -> typename std::enable_if< <mask> detail::DoNotOptimizeAwayNeedsIndirect<T>::value>::type { <mask> asm volatile("" ::"m"(datum) : "memory"); <mask> } <mask> <mask> template <typename T> <mask> auto makeUnpredictable(T& datum) -> typename std::enable_if< </s> [sdk33] Update iOS with RN 0.59 </s> remove } // detail namespace </s> add } // namespace detail </s> remove asm volatile("" ::"X"(datum)); </s> add // The "r" constraint forces the compiler to make datum available // in a register to the asm block, which means that it must have // computed/loaded it. We use this path for things that are <= // sizeof(long) (they have to fit), trivial (otherwise the compiler // doesn't want to put them in a register), and not a pointer (because // doNotOptimizeAway(&foo) would otherwise be a foot gun that didn't // necessarily compute foo). // // An earlier version of this method had a more permissive input operand // constraint, but that caused unnecessary variation between clang and // gcc benchmarks. asm volatile("" ::"r"(datum)); </s> remove auto dismissing(F f) -> typename std::result_of<F()>::type { SCOPE_EXIT { rehire(); }; </s> add auto dismissing(F f) -> invoke_result_t<F> { SCOPE_EXIT { rehire(); }; </s> remove // Invoke helper template <typename F, typename... Args> inline auto invoke(F&& f, Args&&... args) -> decltype(std::forward<F>(f)(std::forward<Args>(args)...)) { return std::forward<F>(f)(std::forward<Args>(args)...); } template <typename M, typename C, typename... Args> inline auto invoke(M(C::*d), Args&&... args) -> decltype(std::mem_fn(d)(std::forward<Args>(args)...)) { return std::mem_fn(d)(std::forward<Args>(args)...); } </s> add </s> remove template <typename T, typename = void> struct constexpr_abs_helper {}; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if<std::is_floating_point<T>::value>::type> { static constexpr T go(T t) { return t < static_cast<T>(0) ? -t : t; } }; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_unsigned<T>::value>::type> { static constexpr T go(T t) { return t; } }; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_signed<T>::value>::type> { static constexpr typename std::make_unsigned<T>::type go(T t) { return t < static_cast<T>(0) ? -t : t; } }; </s> add template <typename Char> constexpr size_t constexpr_strlen_internal(const Char* s, size_t len) { // clang-format off return *(s + 0) == Char(0) ? len + 0 : *(s + 1) == Char(0) ? len + 1 : *(s + 2) == Char(0) ? len + 2 : *(s + 3) == Char(0) ? len + 3 : *(s + 4) == Char(0) ? len + 4 : *(s + 5) == Char(0) ? len + 5 : *(s + 6) == Char(0) ? len + 6 : *(s + 7) == Char(0) ? len + 7 : constexpr_strlen_internal(s + 8, len + 8); // clang-format on </s> remove template<typename NodeType, typename NodeAlloc> class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if< !NodeType::template destroyIsNoOp<NodeAlloc>()>::type> { </s> add template <typename NodeType, typename NodeAlloc> class NodeRecycler< NodeType, NodeAlloc, typename std::enable_if< !NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> {
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep add keep keep keep keep keep
<mask> <mask> #endif <mask> <mask> } // namespace folly <mask> <mask> /** <mask> * Introduces a benchmark function. Used internally, see BENCHMARK and <mask> * friends below. </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ static void funName(paramType); \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ ::folly::addBenchmark(__FILE__, stringName, \ [](paramType paramName) -> unsigned { funName(paramName); \ return rv; }), \ true); \ </s> add #define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ static void funName(paramType); \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ (::folly::addBenchmark( \ __FILE__, \ stringName, \ [](paramType paramName) -> unsigned { \ funName(paramName); \ return rv; \ }), \ true); \ </s> remove static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ ::folly::addBenchmark(__FILE__, stringName, \ [](paramType paramName) { return funName(paramName); }), \ true); \ </s> add static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ (::folly::addBenchmark( \ __FILE__, \ stringName, \ [](paramType paramName) { return funName(paramName); }), \ true); \ </s> remove timespec start; </s> add TimePoint start; </s> remove detail::addBenchmarkImpl(file, name, std::function<detail::TimeIterPair(unsigned int)>(execute)); </s> add detail::addBenchmarkImpl( file, name, std::function<detail::TimeIterPair(unsigned int)>(execute)); </s> remove } </s> add } // namespace folly </s> remove typedef std::pair<uint64_t, unsigned int> TimeIterPair; </s> add using TimeIterPair = std::pair<std::chrono::high_resolution_clock::duration, unsigned int>; using BenchmarkFun = std::function<detail::TimeIterPair(unsigned int)>;
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
<mask> /** <mask> * Introduces a benchmark function. Used internally, see BENCHMARK and <mask> * friends below. <mask> */ <mask> #define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ <mask> static void funName(paramType); \ <mask> static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ <mask> ::folly::addBenchmark(__FILE__, stringName, \ <mask> [](paramType paramName) -> unsigned { funName(paramName); \ <mask> return rv; }), \ <mask> true); \ <mask> static void funName(paramType paramName) <mask> <mask> /** <mask> * Introduces a benchmark function with support for returning the actual <mask> * number of iterations. Used internally, see BENCHMARK_MULTI and friends </s> [sdk33] Update iOS with RN 0.59 </s> remove static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ ::folly::addBenchmark(__FILE__, stringName, \ [](paramType paramName) { return funName(paramName); }), \ true); \ </s> add static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ (::folly::addBenchmark( \ __FILE__, \ stringName, \ [](paramType paramName) { return funName(paramName); }), \ true); \ </s> remove #define BENCHMARK_DRAW_LINE() \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ ::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \ true); </s> add #define BENCHMARK_DRAW_LINE() \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ (::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \ true) </s> add struct dynamic; void benchmarkResultsToDynamic( const std::vector<detail::BenchmarkResult>& data, dynamic&); void benchmarkResultsFromDynamic( const dynamic&, std::vector<detail::BenchmarkResult>&); void printResultComparison( const std::vector<detail::BenchmarkResult>& base, const std::vector<detail::BenchmarkResult>& test); </s> remove #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__)
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> * below. <mask> */ <mask> #define BENCHMARK_MULTI_IMPL(funName, stringName, paramType, paramName) \ <mask> static unsigned funName(paramType); \ <mask> static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ <mask> ::folly::addBenchmark(__FILE__, stringName, \ <mask> [](paramType paramName) { return funName(paramName); }), \ <mask> true); \ <mask> static unsigned funName(paramType paramName) <mask> <mask> /** <mask> * Introduces a benchmark function. Use with either one or two arguments. <mask> * The first is the name of the benchmark. Use something descriptive, such </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ static void funName(paramType); \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ ::folly::addBenchmark(__FILE__, stringName, \ [](paramType paramName) -> unsigned { funName(paramName); \ return rv; }), \ true); \ </s> add #define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ static void funName(paramType); \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ (::folly::addBenchmark( \ __FILE__, \ stringName, \ [](paramType paramName) -> unsigned { \ funName(paramName); \ return rv; \ }), \ true); \ </s> remove #define BENCHMARK_DRAW_LINE() \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ ::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \ true); </s> add #define BENCHMARK_DRAW_LINE() \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ (::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \ true) </s> remove #include <boost/type_traits.hpp> #include <boost/mpl/has_xxx.hpp> </s> add #define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) \ template <typename TTheClass_> \ struct classname##__folly_traits_impl__ { \ template <typename UTheClass_> \ static constexpr bool test(typename UTheClass_::type_name*) { \ return true; \ } \ template <typename> \ static constexpr bool test(...) { \ return false; \ } \ }; \ template <typename TTheClass_> \ using classname = typename std::conditional< \ classname##__folly_traits_impl__<TTheClass_>::template test<TTheClass_>( \ nullptr), \ std::true_type, \ std::false_type>::type #define FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL(classname, func_name, cv_qual) \ template <typename TTheClass_, typename RTheReturn_, typename... TTheArgs_> \ struct classname##__folly_traits_impl__< \ TTheClass_, \ RTheReturn_(TTheArgs_...) cv_qual> { \ template < \ typename UTheClass_, \ RTheReturn_ (UTheClass_::*)(TTheArgs_...) cv_qual> \ struct sfinae {}; \ template <typename UTheClass_> \ static std::true_type test(sfinae<UTheClass_, &UTheClass_::func_name>*); \ template <typename> \ static std::false_type test(...); \ } /* * The FOLLY_CREATE_HAS_MEMBER_FN_TRAITS is used to create traits * classes that check for the existence of a member function with * a given name and signature. It currently does not support * checking for inherited members. * * Such classes receive two template parameters: the class to be checked * and the signature of the member function. A static boolean field * named `value` (which is also constexpr) tells whether such member * function exists. * * Each traits class created is bound only to the member name, not to * its signature nor to the type of the class containing it. * * Say you need to know if a given class has a member function named * `test` with the following signature: * * int test() const; * * You'd need this macro to create a traits class to check for a member * named `test`, and then use this traits class to check for the signature: * * namespace { * * FOLLY_CREATE_HAS_MEMBER_FN_TRAITS(has_test_traits, test); * * } // unnamed-namespace * * void some_func() { * cout << "Does class Foo have a member int test() const? " * << boolalpha << has_test_traits<Foo, int() const>::value; * } * * You can use the same traits class to test for a completely different * signature, on a completely different class, as long as the member name * is the same: * * void some_func() { * cout << "Does class Foo have a member int test()? " * << boolalpha << has_test_traits<Foo, int()>::value; * cout << "Does class Foo have a member int test() const? " * << boolalpha << has_test_traits<Foo, int() const>::value; * cout << "Does class Bar have a member double test(const string&, long)? " * << boolalpha << has_test_traits<Bar, double(const string&, long)>::value; * } * * @author: Marcelo Juchem <[email protected]> */ #define FOLLY_CREATE_HAS_MEMBER_FN_TRAITS(classname, func_name) \ template <typename, typename> \ struct classname##__folly_traits_impl__; \ FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL(classname, func_name, ); \ FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL(classname, func_name, const); \ FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL( \ classname, func_name, /* nolint */ volatile); \ FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL( \ classname, func_name, /* nolint */ volatile const); \ template <typename TTheClass_, typename TTheSignature_> \ using classname = \ decltype(classname##__folly_traits_impl__<TTheClass_, TTheSignature_>:: \ template test<TTheClass_>(nullptr)) </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
<mask> * v.insert(v.begin(), 42); <mask> * } <mask> * } <mask> */ <mask> #define BENCHMARK(name, ...) \ <mask> BENCHMARK_IMPL( \ <mask> name, \ <mask> FB_STRINGIZE(name), \ <mask> FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ <mask> FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ <mask> __VA_ARGS__) <mask> <mask> /** <mask> * Like BENCHMARK above, but allows the user to return the actual <mask> * number of iterations executed in the function body. This can be <mask> * useful if the benchmark function doesn't know upfront how many </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
<mask> * } <mask> * return testCases.size(); <mask> * } <mask> */ <mask> #define BENCHMARK_MULTI(name, ...) \ <mask> BENCHMARK_MULTI_IMPL( \ <mask> name, \ <mask> FB_STRINGIZE(name), \ <mask> FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ <mask> __VA_ARGS__) <mask> <mask> /** <mask> * Defines a benchmark that passes a parameter to another one. This is <mask> * common for benchmarks that need a "problem size" in addition to <mask> * "number of iterations". Consider: </s> [sdk33] Update iOS with RN 0.59 </s> remove * void pushBack(uint n, size_t initialSize) { </s> add * void pushBack(uint32_t n, size_t initialSize) { </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> * Defines a benchmark that passes a parameter to another one. This is <mask> * common for benchmarks that need a "problem size" in addition to <mask> * "number of iterations". Consider: <mask> * <mask> * void pushBack(uint n, size_t initialSize) { <mask> * vector<int> v; <mask> * BENCHMARK_SUSPEND { <mask> * v.resize(initialSize); <mask> * } <mask> * FOR_EACH_RANGE (i, 0, n) { </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove * void addValue(uint n, int64_t bucketSize, int64_t min, int64_t max) { </s> add * void addValue(uint32_t n, int64_t bucketSize, int64_t min, int64_t max) { </s> remove * Holds a type T, in addition to enough padding to round the size up to the * next multiple of the false sharing range used by folly. * * If T is standard-layout, then casting a T* you get from this class to a * CachelinePadded<T>* is safe. * * This class handles padding, but imperfectly handles alignment. (Note that * alignment matters for false-sharing: imagine a cacheline size of 64, and two * adjacent 64-byte objects, with the first starting at an offset of 32. The * last 32 bytes of the first object share a cacheline with the first 32 bytes * of the second.). We alignas this class to be at least cacheline-sized, but * it's implementation-defined what that means (since a cacheline is almost * certainly larger than the maximum natural alignment). The following should be * true for recent compilers on common architectures: * * For heap objects, alignment needs to be handled at the allocator level, such * as with posix_memalign (this isn't necessary with jemalloc, which aligns * objects that are a multiple of cacheline size to a cacheline). </s> add * Holds a type T, in addition to enough padding to ensure that it isn't subject * to false sharing within the range used by folly. </s> remove private: // This is the entire state of LockedGuardPtr. SynchronizedType* const parent_{nullptr}; }; </s> add /** * Acquire locks on many lockables or synchronized instances in such a way * that the sequence of calls within the function does not cause deadlocks. * * This can often result in a performance boost as compared to simply * acquiring your locks in an ordered manner. Even for very simple cases. * The algorithm tried to adjust to contention by blocking on the mutex it * thinks is the best fit, leaving all other mutexes open to be locked by * other threads. See the benchmarks in folly/test/SynchronizedBenchmark.cpp * for more * * This works differently as compared to the locking algorithm in libstdc++ * and is the recommended way to acquire mutexes in a generic order safe * manner. Performance benchmarks show that this does better than the one in * libstdc++ even for the simple cases * * Usage is the same as std::lock() for arbitrary lockables * * folly::lock(one, two, three); * * To make it work with folly::Synchronized you have to specify how you want * the locks to be acquired, use the folly::wlock(), folly::rlock(), * folly::ulock() and folly::lock() helpers defined below * * auto [one, two] = lock(folly::wlock(a), folly::rlock(b)); * * Note that you can/must avoid the folly:: namespace prefix on the lock() * function if you use the helpers, ADL lookup is done to find the lock function * * This will execute the deadlock avoidance algorithm and acquire a write lock * for a and a read lock for b */ template <typename LockableOne, typename LockableTwo, typename... Lockables> void lock(LockableOne& one, LockableTwo& two, Lockables&... lockables) { auto locker = [](auto& lockable) { using Lockable = std::remove_reference_t<decltype(lockable)>; return detail::makeSynchronizedLocker( lockable, [](auto& l) { return std::unique_lock<Lockable>{l}; }, [](auto& l) { auto lock = std::unique_lock<Lockable>{l, std::defer_lock}; lock.try_lock(); return lock; }); }; auto locks = lock(locker(one), locker(two), locker(lockables)...); // release ownership of the locks from the RAII lock wrapper returned by the // function above for_each(locks, [&](auto& lock) { lock.release(); }); } </s> remove /** * Sometimes, although you have a mutable object, you only want to * call a const method against it. The most efficient way to achieve * that is by using a read lock. You get to do so by using * obj.asConst()->method() instead of obj->method(). * * NOTE: This API is planned to be deprecated in an upcoming diff. * Use rlock() instead. */ const Synchronized& asConst() const { return *this; } </s> add </s> remove /* * Throwing exceptions can be a convenient way to handle errors. Storing * exceptions in an exception_ptr makes it easy to handle exceptions in a * different thread or at a later time. exception_ptr can also be used in a very * generic result/exception wrapper. * * However, there are some issues with throwing exceptions and * std::exception_ptr. These issues revolve around throw being expensive, * particularly in a multithreaded environment (see * ExceptionWrapperBenchmark.cpp). * * Imagine we have a library that has an API which returns a result/exception * wrapper. Let's consider some approaches for implementing this wrapper. * First, we could store a std::exception. This approach loses the derived * exception type, which can make exception handling more difficult for users * that prefer rethrowing the exception. We could use a folly::dynamic for every * possible type of exception. This is not very flexible - adding new types of * exceptions requires a change to the result/exception wrapper. We could use an * exception_ptr. However, constructing an exception_ptr as well as accessing * the error requires a call to throw. That means that there will be two calls * to throw in order to process the exception. For performance sensitive * applications, this may be unacceptable. * * exception_wrapper is designed to handle exception management for both * convenience and high performance use cases. make_exception_wrapper is * templated on derived type, allowing us to rethrow the exception properly for * users that prefer convenience. These explicitly named exception types can * therefore be handled without any peformance penalty. exception_wrapper is * also flexible enough to accept any type. If a caught exception is not of an * explicitly named type, then std::exception_ptr is used to preserve the * exception state. For performance sensitive applications, the accessor methods * can test or extract a pointer to a specific exception type with very little * overhead. * * Example usage: * * exception_wrapper globalExceptionWrapper; * * // Thread1 * void doSomethingCrazy() { * int rc = doSomethingCrazyWithLameReturnCodes(); * if (rc == NAILED_IT) { * globalExceptionWrapper = exception_wrapper(); * } else if (rc == FACE_PLANT) { * globalExceptionWrapper = make_exception_wrapper<FacePlantException>(); * } else if (rc == FAIL_WHALE) { * globalExceptionWrapper = make_exception_wrapper<FailWhaleException>(); * } * } * * // Thread2: Exceptions are ok! * void processResult() { * try { * globalExceptionWrapper.throwException(); * } catch (const FacePlantException& e) { * LOG(ERROR) << "FACEPLANT!"; * } catch (const FailWhaleException& e) { * LOG(ERROR) << "FAILWHALE!"; * } * } * * // Thread2: Exceptions are bad! * void processResult() { * globalExceptionWrapper.with_exception( * [&](FacePlantException& faceplant) { * LOG(ERROR) << "FACEPLANT"; * }) || * globalExceptionWrapper.with_exception( * [&](FailWhaleException& failwhale) { * LOG(ERROR) << "FAILWHALE!"; * }) || * LOG(FATAL) << "Unrecognized exception"; * } * */ class exception_wrapper { protected: template <typename Ex> struct optimize; </s> add #define FOLLY_REQUIRES_DEF(...) \ _t<std::enable_if<static_cast<bool>(__VA_ARGS__), long>>
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace keep keep keep keep keep
<mask> * The benchmark above estimates the speed of push_back at different <mask> * initial sizes of the vector. The framework will pass 0, 1000, and <mask> * 1000000 for initialSize, and the iteration count for n. <mask> */ <mask> #define BENCHMARK_PARAM(name, param) \ <mask> BENCHMARK_NAMED_PARAM(name, param, param) <mask> <mask> /** <mask> * Same as BENCHMARK_PARAM, but allows one to return the actual number of <mask> * iterations that have been run. <mask> */ </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> remove #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> remove #define BENCHMARK_PARAM_MULTI(name, param) \ </s> add #define BENCHMARK_PARAM_MULTI(name, param) \ </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__)
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> /** <mask> * Same as BENCHMARK_PARAM, but allows one to return the actual number of <mask> * iterations that have been run. <mask> */ <mask> #define BENCHMARK_PARAM_MULTI(name, param) \ <mask> BENCHMARK_NAMED_PARAM_MULTI(name, param, param) <mask> <mask> /* <mask> * Like BENCHMARK_PARAM(), but allows a custom name to be specified for each <mask> * parameter, rather than using the parameter value. </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> remove #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> remove #define BENCHMARK_PARAM(name, param) \ BENCHMARK_NAMED_PARAM(name, param, param) </s> add #define BENCHMARK_PARAM(name, param) BENCHMARK_NAMED_PARAM(name, param, param) </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__)
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> * of when you want to specify multiple parameter arguments. <mask> * <mask> * For example: <mask> * <mask> * void addValue(uint n, int64_t bucketSize, int64_t min, int64_t max) { <mask> * Histogram<int64_t> hist(bucketSize, min, max); <mask> * int64_t num = min; <mask> * FOR_EACH_RANGE (i, 0, n) { <mask> * hist.addValue(num); <mask> * ++num; </s> [sdk33] Update iOS with RN 0.59 </s> remove int64_t runOnce(int64_t now) { return runInternal(now, true); } int64_t runLoop(int64_t now) { return runInternal(now, false); } </s> add int64_t runOnce(int64_t now) { return runInternal(now, true); } int64_t runLoop(int64_t now) { return runInternal(now, false); } </s> remove * void pushBack(uint n, size_t initialSize) { </s> add * void pushBack(uint32_t n, size_t initialSize) { </s> remove TimeoutQueue() : nextId_(1) { } </s> add TimeoutQueue() : nextId_(1) {} </s> add #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index_container.hpp> </s> remove } } </s> add } // namespace chrono } // namespace folly </s> remove * Subprocess proc(cmd, Subprocess::pipeStdin()); * // write to proc.stdin() </s> add * Subprocess proc(cmd, Subprocess::Options().pipeStdin()); * // write to proc.stdinFd()
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> * BENCHMARK_NAMED_PARAM(addValue, 0_to_100, 1, 0, 100) <mask> * BENCHMARK_NAMED_PARAM(addValue, 0_to_1000, 10, 0, 1000) <mask> * BENCHMARK_NAMED_PARAM(addValue, 5k_to_20k, 250, 5000, 20000) <mask> */ <mask> #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ <mask> BENCHMARK_IMPL( \ <mask> FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ <mask> FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ <mask> iters, \ <mask> unsigned, \ <mask> iters) { \ <mask> name(iters, ## __VA_ARGS__); \ <mask> } <mask> <mask> /** <mask> * Same as BENCHMARK_NAMED_PARAM, but allows one to return the actual number <mask> * of iterations that have been run. </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM(name, param) \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
<mask> /** <mask> * Same as BENCHMARK_NAMED_PARAM, but allows one to return the actual number <mask> * of iterations that have been run. <mask> */ <mask> #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ <mask> BENCHMARK_MULTI_IMPL( \ <mask> FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ <mask> FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ <mask> unsigned, \ <mask> iters) { \ <mask> return name(iters, ## __VA_ARGS__); \ <mask> } <mask> <mask> /** <mask> * Just like BENCHMARK, but prints the time relative to a <mask> * baseline. The baseline is the most recent BENCHMARK() seen in </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_PARAM_MULTI(name, param) \ </s> add #define BENCHMARK_PARAM_MULTI(name, param) \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
<mask> * Any number of relative benchmark can be associated with a <mask> * baseline. Another BENCHMARK() occurrence effectively establishes a <mask> * new baseline. <mask> */ <mask> #define BENCHMARK_RELATIVE(name, ...) \ <mask> BENCHMARK_IMPL( \ <mask> name, \ <mask> "%" FB_STRINGIZE(name), \ <mask> FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ <mask> FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ <mask> __VA_ARGS__) <mask> <mask> /** <mask> * Same as BENCHMARK_RELATIVE, but allows one to return the actual number <mask> * of iterations that have been run. <mask> */ </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep replace replace replace replace replace replace keep keep keep keep replace keep keep
<mask> * Same as BENCHMARK_RELATIVE, but allows one to return the actual number <mask> * of iterations that have been run. <mask> */ <mask> #define BENCHMARK_RELATIVE_MULTI(name, ...) \ <mask> BENCHMARK_MULTI_IMPL( \ <mask> name, \ <mask> "%" FB_STRINGIZE(name), \ <mask> FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ <mask> __VA_ARGS__) <mask> <mask> /** <mask> * A combination of BENCHMARK_RELATIVE and BENCHMARK_PARAM. <mask> */ <mask> #define BENCHMARK_RELATIVE_PARAM(name, param) \ <mask> BENCHMARK_RELATIVE_NAMED_PARAM(name, param, param) <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__)
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace keep keep keep keep keep
<mask> /** <mask> * Same as BENCHMARK_RELATIVE_PARAM, but allows one to return the actual <mask> * number of iterations that have been run. <mask> */ <mask> #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ <mask> BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param, param) <mask> <mask> /** <mask> * A combination of BENCHMARK_RELATIVE and BENCHMARK_NAMED_PARAM. <mask> */ </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> remove #define BENCHMARK_PARAM_MULTI(name, param) \ </s> add #define BENCHMARK_PARAM_MULTI(name, param) \ </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_PARAM(name, param) \ BENCHMARK_NAMED_PARAM(name, param, param) </s> add #define BENCHMARK_PARAM(name, param) BENCHMARK_NAMED_PARAM(name, param, param) </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> <mask> /** <mask> * A combination of BENCHMARK_RELATIVE and BENCHMARK_NAMED_PARAM. <mask> */ <mask> #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ <mask> BENCHMARK_IMPL( \ <mask> FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ <mask> "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ <mask> iters, \ <mask> unsigned, \ <mask> iters) { \ <mask> name(iters, ## __VA_ARGS__); \ <mask> } <mask> <mask> /** <mask> * Same as BENCHMARK_RELATIVE_NAMED_PARAM, but allows one to return the <mask> * actual number of iterations that have been run. </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> remove #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
<mask> /** <mask> * Same as BENCHMARK_RELATIVE_NAMED_PARAM, but allows one to return the <mask> * actual number of iterations that have been run. <mask> */ <mask> #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ <mask> BENCHMARK_MULTI_IMPL( \ <mask> FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ <mask> "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ <mask> unsigned, \ <mask> iters) { \ <mask> return name(iters, ## __VA_ARGS__); \ <mask> } <mask> <mask> /** <mask> * Draws a line of dashes. <mask> */ </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> add #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> <mask> /** <mask> * Draws a line of dashes. <mask> */ <mask> #define BENCHMARK_DRAW_LINE() \ <mask> static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ <mask> ::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \ <mask> true); <mask> <mask> /** <mask> * Allows execution of code that doesn't count torward the benchmark's <mask> * time budget. Example: <mask> * </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ static void funName(paramType); \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ ::folly::addBenchmark(__FILE__, stringName, \ [](paramType paramName) -> unsigned { funName(paramName); \ return rv; }), \ true); \ </s> add #define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ static void funName(paramType); \ static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ (::folly::addBenchmark( \ __FILE__, \ stringName, \ [](paramType paramName) -> unsigned { \ funName(paramName); \ return rv; \ }), \ true); \ </s> remove static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = ( \ ::folly::addBenchmark(__FILE__, stringName, \ [](paramType paramName) { return funName(paramName); }), \ true); \ </s> add static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ (::folly::addBenchmark( \ __FILE__, \ stringName, \ [](paramType paramName) { return funName(paramName); }), \ true); \ </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ BENCHMARK_MULTI_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ unsigned, \ iters) { \ return name(iters, ##__VA_ARGS__); \ </s> remove #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ "%" FB_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ## __VA_ARGS__); \ </s> add #define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ BENCHMARK_IMPL( \ FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ iters, \ unsigned, \ iters) { \ name(iters, ##__VA_ARGS__); \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep keep keep keep replace replace replace replace
<mask> * v.insert(v.begin(), 42); <mask> * } <mask> * } <mask> */ <mask> #define BENCHMARK_SUSPEND \ <mask> if (auto FB_ANONYMOUS_VARIABLE(BENCHMARK_SUSPEND) = \ <mask> ::folly::BenchmarkSuspender()) {} \ <mask> else </s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ## __VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \ __VA_ARGS__) </s> add #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ FB_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) </s> remove for (auto SYNCHRONIZED_lockedPtr = \ </s> add for (auto SYNCHRONIZED_VAR(lockedPtr) = \ </s> remove #define SYNCHRONIZED_DUAL(n1, e1, n2, e2) \ if (bool SYNCHRONIZED_state = false) { \ } else \ for (auto SYNCHRONIZED_ptrs = acquireLockedPair(e1, e2); \ !SYNCHRONIZED_state; \ SYNCHRONIZED_state = true) \ for (auto& n1 = *SYNCHRONIZED_ptrs.first; !SYNCHRONIZED_state; \ SYNCHRONIZED_state = true) \ for (auto& n2 = *SYNCHRONIZED_ptrs.second; !SYNCHRONIZED_state; \ SYNCHRONIZED_state = true) </s> add #define SYNCHRONIZED_DUAL(n1, e1, n2, e2) \ if (bool SYNCHRONIZED_VAR(state) = false) { \ } else \ for (auto SYNCHRONIZED_VAR(ptrs) = acquireLockedPair(e1, e2); \ !SYNCHRONIZED_VAR(state); \ SYNCHRONIZED_VAR(state) = true) \ for (auto& n1 = *SYNCHRONIZED_VAR(ptrs).first; !SYNCHRONIZED_VAR(state); \ SYNCHRONIZED_VAR(state) = true) \ for (auto& n2 = *SYNCHRONIZED_VAR(ptrs).second; \ !SYNCHRONIZED_VAR(state); \ SYNCHRONIZED_VAR(state) = true) </s> remove FOLLY_GCC_DISABLE_WARNING(shadow) \ </s> add FOLLY_GNU_DISABLE_WARNING("-Wshadow") \ FOLLY_MSVC_DISABLE_WARNING(4189) /* initialized but unreferenced */ \ FOLLY_MSVC_DISABLE_WARNING(4456) /* declaration hides local */ \ FOLLY_MSVC_DISABLE_WARNING(4457) /* declaration hides parameter */ \ FOLLY_MSVC_DISABLE_WARNING(4458) /* declaration hides member */ \ FOLLY_MSVC_DISABLE_WARNING(4459) /* declaration hides global */ \ </s> remove if (bool SYNCHRONIZED_state = false) { \ </s> add if (bool SYNCHRONIZED_VAR(state) = false) { \ </s> remove if (bool SYNCHRONIZED_state = false) { \ </s> add if (bool SYNCHRONIZED_VAR(state) = false) { \
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Benchmark.h
keep replace keep keep keep keep keep
<mask> /* <mask> * Copyright 2016 Facebook, Inc. <mask> * <mask> * Licensed under the Apache License, Version 2.0 (the "License"); <mask> * you may not use this file except in compliance with the License. <mask> * You may obtain a copy of the License at <mask> * </s> [sdk33] Update iOS with RN 0.59 </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2012-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2013-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2011-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2015-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2016-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2016-present Facebook, Inc.
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Bits.h
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace
<mask> * See the License for the specific language governing permissions and <mask> * limitations under the License. <mask> */ <mask> <mask> /** <mask> * Various low-level, bit-manipulation routines. <mask> * <mask> * findFirstSet(x) [constexpr] <mask> * find first (least significant) bit set in a value of an integral type, <mask> * 1-based (like ffs()). 0 = no bits are set (x == 0) <mask> * <mask> * findLastSet(x) [constexpr] <mask> * find last (most significant) bit set in a value of an integral type, <mask> * 1-based. 0 = no bits are set (x == 0) <mask> * for x != 0, findLastSet(x) == 1 + floor(log2(x)) <mask> * <mask> * nextPowTwo(x) [constexpr] <mask> * Finds the next power of two >= x. <mask> * <mask> * isPowTwo(x) [constexpr] <mask> * return true iff x is a power of two <mask> * <mask> * popcount(x) <mask> * return the number of 1 bits in x <mask> * <mask> * Endian <mask> * convert between native, big, and little endian representation <mask> * Endian::big(x) big <-> native <mask> * Endian::little(x) little <-> native <mask> * Endian::swap(x) big <-> little <mask> * <mask> * BitIterator <mask> * Wrapper around an iterator over an integral type that iterates <mask> * over its underlying bits in MSb to LSb order <mask> * <mask> * findFirstSet(BitIterator begin, BitIterator end) <mask> * return a BitIterator pointing to the first 1 bit in [begin, end), or <mask> * end if all bits in [begin, end) are 0 <mask> * <mask> * @author Tudor Bosman ([email protected]) <mask> */ <mask> <mask> #pragma once <mask> <mask> #if !defined(__clang__) && !(defined(_MSC_VER) && (_MSC_VER < 1900)) <mask> #define FOLLY_INTRINSIC_CONSTEXPR constexpr <mask> #else <mask> // GCC and MSVC 2015+ are the only compilers with <mask> // intrinsics constexpr. <mask> #define FOLLY_INTRINSIC_CONSTEXPR const <mask> #endif <mask> <mask> #include <folly/Portability.h> <mask> #include <folly/portability/Builtins.h> <mask> <mask> #include <folly/Assume.h> <mask> #include <folly/detail/BitsDetail.h> <mask> #include <folly/detail/BitIteratorDetail.h> <mask> #include <folly/Likely.h> <mask> <mask> #if FOLLY_HAVE_BYTESWAP_H <mask> # include <byteswap.h> <mask> #endif <mask> <mask> #include <cassert> <mask> #include <cinttypes> <mask> #include <iterator> <mask> #include <limits> <mask> #include <type_traits> <mask> #include <boost/iterator/iterator_adaptor.hpp> <mask> #include <stdint.h> <mask> <mask> namespace folly { <mask> <mask> // Generate overloads for findFirstSet as wrappers around <mask> // appropriate ffs, ffsl, ffsll gcc builtins <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_unsigned<T>::value && <mask> sizeof(T) <= sizeof(unsigned int)), <mask> unsigned int>::type <mask> findFirstSet(T x) { <mask> return __builtin_ffs(x); <mask> } <mask> <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_unsigned<T>::value && <mask> sizeof(T) > sizeof(unsigned int) && <mask> sizeof(T) <= sizeof(unsigned long)), <mask> unsigned int>::type <mask> findFirstSet(T x) { <mask> return __builtin_ffsl(x); <mask> } <mask> <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_unsigned<T>::value && <mask> sizeof(T) > sizeof(unsigned long) && <mask> sizeof(T) <= sizeof(unsigned long long)), <mask> unsigned int>::type <mask> findFirstSet(T x) { <mask> return __builtin_ffsll(x); <mask> } <mask> <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> (std::is_integral<T>::value && std::is_signed<T>::value), <mask> unsigned int>::type <mask> findFirstSet(T x) { <mask> // Note that conversion from a signed type to the corresponding unsigned <mask> // type is technically implementation-defined, but will likely work <mask> // on any impementation that uses two's complement. <mask> return findFirstSet(static_cast<typename std::make_unsigned<T>::type>(x)); <mask> } <mask> <mask> // findLastSet: return the 1-based index of the highest bit set <mask> // for x > 0, findLastSet(x) == 1 + floor(log2(x)) <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_unsigned<T>::value && <mask> sizeof(T) <= sizeof(unsigned int)), <mask> unsigned int>::type <mask> findLastSet(T x) { <mask> // If X is a power of two X - Y = ((X - 1) ^ Y) + 1. Doing this transformation <mask> // allows GCC to remove its own xor that it adds to implement clz using bsr <mask> return x ? ((8 * sizeof(unsigned int) - 1) ^ __builtin_clz(x)) + 1 : 0; <mask> } <mask> <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_unsigned<T>::value && <mask> sizeof(T) > sizeof(unsigned int) && <mask> sizeof(T) <= sizeof(unsigned long)), <mask> unsigned int>::type <mask> findLastSet(T x) { <mask> return x ? ((8 * sizeof(unsigned long) - 1) ^ __builtin_clzl(x)) + 1 : 0; <mask> } <mask> <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_unsigned<T>::value && <mask> sizeof(T) > sizeof(unsigned long) && <mask> sizeof(T) <= sizeof(unsigned long long)), <mask> unsigned int>::type <mask> findLastSet(T x) { <mask> return x ? ((8 * sizeof(unsigned long long) - 1) ^ __builtin_clzll(x)) + 1 <mask> : 0; <mask> } <mask> <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_signed<T>::value), <mask> unsigned int>::type <mask> findLastSet(T x) { <mask> return findLastSet(static_cast<typename std::make_unsigned<T>::type>(x)); <mask> } <mask> <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR <mask> typename std::enable_if< <mask> std::is_integral<T>::value && std::is_unsigned<T>::value, <mask> T>::type <mask> nextPowTwo(T v) { <mask> return v ? (T(1) << findLastSet(v - 1)) : 1; <mask> } <mask> <mask> template <class T> <mask> inline FOLLY_INTRINSIC_CONSTEXPR typename std:: <mask> enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, T>::type <mask> prevPowTwo(T v) { <mask> return v ? (T(1) << (findLastSet(v) - 1)) : 0; <mask> } <mask> <mask> template <class T> <mask> inline constexpr typename std::enable_if< <mask> std::is_integral<T>::value && std::is_unsigned<T>::value, <mask> bool>::type <mask> isPowTwo(T v) { <mask> return (v != 0) && !(v & (v - 1)); <mask> } <mask> <mask> /** <mask> * Population count <mask> */ <mask> template <class T> <mask> inline typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_unsigned<T>::value && <mask> sizeof(T) <= sizeof(unsigned int)), <mask> size_t>::type <mask> popcount(T x) { <mask> return detail::popcount(x); <mask> } <mask> <mask> template <class T> <mask> inline typename std::enable_if< <mask> (std::is_integral<T>::value && <mask> std::is_unsigned<T>::value && <mask> sizeof(T) > sizeof(unsigned int) && <mask> sizeof(T) <= sizeof(unsigned long long)), <mask> size_t>::type <mask> popcount(T x) { <mask> return detail::popcountll(x); <mask> } <mask> <mask> /** <mask> * Endianness detection and manipulation primitives. <mask> */ <mask> namespace detail { <mask> <mask> template <class T> <mask> struct EndianIntBase { <mask> public: <mask> static T swap(T x); <mask> }; <mask> <mask> #ifndef _MSC_VER <mask> <mask> /** <mask> * If we have the bswap_16 macro from byteswap.h, use it; otherwise, provide our <mask> * own definition. <mask> */ <mask> #ifdef bswap_16 <mask> # define our_bswap16 bswap_16 <mask> #else <mask> <mask> template<class Int16> <mask> inline constexpr typename std::enable_if< <mask> sizeof(Int16) == 2, <mask> Int16>::type <mask> our_bswap16(Int16 x) { <mask> return ((x >> 8) & 0xff) | ((x & 0xff) << 8); <mask> } <mask> #endif <mask> <mask> #endif <mask> <mask> #define FB_GEN(t, fn) \ <mask> template<> inline t EndianIntBase<t>::swap(t x) { return fn(x); } <mask> <mask> // fn(x) expands to (x) if the second argument is empty, which is exactly <mask> // what we want for [u]int8_t. Also, gcc 4.7 on Intel doesn't have <mask> // __builtin_bswap16 for some reason, so we have to provide our own. <mask> FB_GEN( int8_t,) <mask> FB_GEN(uint8_t,) <mask> #ifdef _MSC_VER <mask> FB_GEN( int64_t, _byteswap_uint64) <mask> FB_GEN(uint64_t, _byteswap_uint64) <mask> FB_GEN( int32_t, _byteswap_ulong) <mask> FB_GEN(uint32_t, _byteswap_ulong) <mask> FB_GEN( int16_t, _byteswap_ushort) <mask> FB_GEN(uint16_t, _byteswap_ushort) <mask> #else <mask> FB_GEN( int64_t, __builtin_bswap64) <mask> FB_GEN(uint64_t, __builtin_bswap64) <mask> FB_GEN( int32_t, __builtin_bswap32) <mask> FB_GEN(uint32_t, __builtin_bswap32) <mask> FB_GEN( int16_t, our_bswap16) <mask> FB_GEN(uint16_t, our_bswap16) <mask> #endif <mask> <mask> #undef FB_GEN <mask> <mask> template <class T> <mask> struct EndianInt : public EndianIntBase<T> { <mask> public: <mask> static T big(T x) { <mask> return kIsLittleEndian ? EndianInt::swap(x) : x; <mask> } <mask> static T little(T x) { <mask> return kIsBigEndian ? EndianInt::swap(x) : x; <mask> } <mask> }; <mask> <mask> } // namespace detail <mask> <mask> // big* convert between native and big-endian representations <mask> // little* convert between native and little-endian representations <mask> // swap* convert between big-endian and little-endian representations <mask> // <mask> // ntohs, htons == big16 <mask> // ntohl, htonl == big32 <mask> #define FB_GEN1(fn, t, sz) \ <mask> static t fn##sz(t x) { return fn<t>(x); } \ <mask> <mask> #define FB_GEN2(t, sz) \ <mask> FB_GEN1(swap, t, sz) \ <mask> FB_GEN1(big, t, sz) \ <mask> FB_GEN1(little, t, sz) <mask> <mask> #define FB_GEN(sz) \ <mask> FB_GEN2(uint##sz##_t, sz) \ <mask> FB_GEN2(int##sz##_t, sz) <mask> <mask> class Endian { <mask> public: <mask> enum class Order : uint8_t { <mask> LITTLE, <mask> BIG <mask> }; <mask> <mask> static constexpr Order order = kIsLittleEndian ? Order::LITTLE : Order::BIG; <mask> <mask> template <class T> static T swap(T x) { <mask> return folly::detail::EndianInt<T>::swap(x); <mask> } <mask> template <class T> static T big(T x) { <mask> return folly::detail::EndianInt<T>::big(x); <mask> } <mask> template <class T> static T little(T x) { <mask> return folly::detail::EndianInt<T>::little(x); <mask> } <mask> <mask> #if !defined(__ANDROID__) <mask> FB_GEN(64) <mask> FB_GEN(32) <mask> FB_GEN(16) <mask> FB_GEN(8) <mask> #endif <mask> }; <mask> <mask> #undef FB_GEN <mask> #undef FB_GEN2 <mask> #undef FB_GEN1 <mask> <mask> /** <mask> * Fast bit iteration facility. <mask> */ <mask> <mask> <mask> template <class BaseIter> class BitIterator; <mask> template <class BaseIter> <mask> BitIterator<BaseIter> findFirstSet(BitIterator<BaseIter>, <mask> BitIterator<BaseIter>); <mask> /** <mask> * Wrapper around an iterator over an integer type that iterates <mask> * over its underlying bits in LSb to MSb order. <mask> * <mask> * BitIterator models the same iterator concepts as the base iterator. <mask> */ <mask> template <class BaseIter> <mask> class BitIterator <mask> : public bititerator_detail::BitIteratorBase<BaseIter>::type { <mask> public: <mask> /** <mask> * Return the number of bits in an element of the underlying iterator. <mask> */ <mask> static unsigned int bitsPerBlock() { <mask> return std::numeric_limits< <mask> typename std::make_unsigned< <mask> typename std::iterator_traits<BaseIter>::value_type <mask> >::type <mask> >::digits; <mask> } <mask> <mask> /** <mask> * Construct a BitIterator that points at a given bit offset (default 0) <mask> * in iter. <mask> */ <mask> explicit BitIterator(const BaseIter& iter, size_t bitOff=0) <mask> : bititerator_detail::BitIteratorBase<BaseIter>::type(iter), <mask> bitOffset_(bitOff) { <mask> assert(bitOffset_ < bitsPerBlock()); <mask> } <mask> <mask> size_t bitOffset() const { <mask> return bitOffset_; <mask> } <mask> <mask> void advanceToNextBlock() { <mask> bitOffset_ = 0; <mask> ++this->base_reference(); <mask> } <mask> <mask> BitIterator& operator=(const BaseIter& other) { <mask> this->~BitIterator(); <mask> new (this) BitIterator(other); <mask> return *this; <mask> } <mask> <mask> private: <mask> friend class boost::iterator_core_access; <mask> friend BitIterator findFirstSet<>(BitIterator, BitIterator); <mask> <mask> typedef bititerator_detail::BitReference< <mask> typename std::iterator_traits<BaseIter>::reference, <mask> typename std::iterator_traits<BaseIter>::value_type <mask> > BitRef; <mask> <mask> void advanceInBlock(size_t n) { <mask> bitOffset_ += n; <mask> assert(bitOffset_ < bitsPerBlock()); <mask> } <mask> <mask> BitRef dereference() const { <mask> return BitRef(*this->base_reference(), bitOffset_); <mask> } <mask> <mask> void advance(ssize_t n) { <mask> size_t bpb = bitsPerBlock(); <mask> ssize_t blocks = n / bpb; <mask> bitOffset_ += n % bpb; <mask> if (bitOffset_ >= bpb) { <mask> bitOffset_ -= bpb; <mask> ++blocks; <mask> } <mask> this->base_reference() += blocks; <mask> } <mask> <mask> void increment() { <mask> if (++bitOffset_ == bitsPerBlock()) { <mask> advanceToNextBlock(); <mask> } <mask> } <mask> <mask> void decrement() { <mask> if (bitOffset_-- == 0) { <mask> bitOffset_ = bitsPerBlock() - 1; <mask> --this->base_reference(); <mask> } <mask> } <mask> <mask> bool equal(const BitIterator& other) const { <mask> return (bitOffset_ == other.bitOffset_ && <mask> this->base_reference() == other.base_reference()); <mask> } <mask> <mask> ssize_t distance_to(const BitIterator& other) const { <mask> return <mask> (other.base_reference() - this->base_reference()) * bitsPerBlock() + <mask> other.bitOffset_ - bitOffset_; <mask> } <mask> <mask> unsigned int bitOffset_; <mask> }; <mask> <mask> /** <mask> * Helper function, so you can write <mask> * auto bi = makeBitIterator(container.begin()); <mask> */ <mask> template <class BaseIter> <mask> BitIterator<BaseIter> makeBitIterator(const BaseIter& iter) { <mask> return BitIterator<BaseIter>(iter); <mask> } <mask> <mask> <mask> /** <mask> * Find first bit set in a range of bit iterators. <mask> * 4.5x faster than the obvious std::find(begin, end, true); <mask> */ <mask> template <class BaseIter> <mask> BitIterator<BaseIter> findFirstSet(BitIterator<BaseIter> begin, <mask> BitIterator<BaseIter> end) { <mask> // shortcut to avoid ugly static_cast<> <mask> static const typename BaseIter::value_type one = 1; <mask> <mask> while (begin.base() != end.base()) { <mask> typename BaseIter::value_type v = *begin.base(); <mask> // mask out the bits that don't matter (< begin.bitOffset) <mask> v &= ~((one << begin.bitOffset()) - 1); <mask> size_t firstSet = findFirstSet(v); <mask> if (firstSet) { <mask> --firstSet; // now it's 0-based <mask> assert(firstSet >= begin.bitOffset()); <mask> begin.advanceInBlock(firstSet - begin.bitOffset()); <mask> return begin; <mask> } <mask> begin.advanceToNextBlock(); <mask> } <mask> <mask> // now begin points to the same block as end <mask> if (end.bitOffset() != 0) { // assume end is dereferenceable <mask> typename BaseIter::value_type v = *begin.base(); <mask> // mask out the bits that don't matter (< begin.bitOffset) <mask> v &= ~((one << begin.bitOffset()) - 1); <mask> // mask out the bits that don't matter (>= end.bitOffset) <mask> v &= (one << end.bitOffset()) - 1; <mask> size_t firstSet = findFirstSet(v); <mask> if (firstSet) { <mask> --firstSet; // now it's 0-based <mask> assert(firstSet >= begin.bitOffset()); <mask> begin.advanceInBlock(firstSet - begin.bitOffset()); <mask> return begin; <mask> } <mask> } <mask> <mask> return end; <mask> } <mask> <mask> <mask> template <class T, class Enable=void> struct Unaligned; <mask> <mask> /** <mask> * Representation of an unaligned value of a POD type. <mask> */ <mask> FOLLY_PACK_PUSH <mask> template <class T> <mask> struct Unaligned< <mask> T, <mask> typename std::enable_if<std::is_pod<T>::value>::type> { <mask> Unaligned() = default; // uninitialized <mask> /* implicit */ Unaligned(T v) : value(v) { } <mask> T value; <mask> } FOLLY_PACK_ATTR; <mask> FOLLY_PACK_POP <mask> <mask> /** <mask> * Read an unaligned value of type T and return it. <mask> */ <mask> template <class T> <mask> inline T loadUnaligned(const void* p) { <mask> static_assert(sizeof(Unaligned<T>) == sizeof(T), "Invalid unaligned size"); <mask> static_assert(alignof(Unaligned<T>) == 1, "Invalid alignment"); <mask> if (kHasUnalignedAccess) { <mask> return static_cast<const Unaligned<T>*>(p)->value; <mask> } else { <mask> T value; <mask> memcpy(&value, p, sizeof(T)); <mask> return value; <mask> } <mask> } <mask> <mask> /** <mask> * Write an unaligned value of type T. <mask> */ <mask> template <class T> <mask> inline void storeUnaligned(void* p, T value) { <mask> static_assert(sizeof(Unaligned<T>) == sizeof(T), "Invalid unaligned size"); <mask> static_assert(alignof(Unaligned<T>) == 1, "Invalid alignment"); <mask> if (kHasUnalignedAccess) { <mask> // Prior to C++14, the spec says that a placement new like this <mask> // is required to check that p is not nullptr, and to do nothing <mask> // if p is a nullptr. By assuming it's not a nullptr, we get a <mask> // nice loud segfault in optimized builds if p is nullptr, rather <mask> // than just silently doing nothing. <mask> folly::assume(p != nullptr); <mask> new (p) Unaligned<T>(value); <mask> } else { <mask> memcpy(p, &value, sizeof(T)); <mask> } <mask> } <mask> <mask> } // namespace folly </s> [sdk33] Update iOS with RN 0.59 </s> remove template <typename T, typename = void> struct constexpr_abs_helper {}; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if<std::is_floating_point<T>::value>::type> { static constexpr T go(T t) { return t < static_cast<T>(0) ? -t : t; } }; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_unsigned<T>::value>::type> { static constexpr T go(T t) { return t; } }; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_signed<T>::value>::type> { static constexpr typename std::make_unsigned<T>::type go(T t) { return t < static_cast<T>(0) ? -t : t; } }; </s> add template <typename Char> constexpr size_t constexpr_strlen_internal(const Char* s, size_t len) { // clang-format off return *(s + 0) == Char(0) ? len + 0 : *(s + 1) == Char(0) ? len + 1 : *(s + 2) == Char(0) ? len + 2 : *(s + 3) == Char(0) ? len + 3 : *(s + 4) == Char(0) ? len + 4 : *(s + 5) == Char(0) ? len + 5 : *(s + 6) == Char(0) ? len + 6 : *(s + 7) == Char(0) ? len + 7 : constexpr_strlen_internal(s + 8, len + 8); // clang-format on </s> remove template<class T> typename std::enable_if< !FOLLY_IS_TRIVIALLY_COPYABLE(T) >::type moveObjectsRight(T* first, T* lastConstructed, T* realLast) { if (lastConstructed == realLast) { return; } T* end = first - 1; // Past the end going backwards. T* out = realLast - 1; T* in = lastConstructed - 1; </s> add template <class T, class EmplaceFunc> void moveToUninitializedEmplace( T* begin, T* end, T* out, SizeType pos, EmplaceFunc&& emplaceFunc) { // Must be called first so that if it throws [begin, end) is unmodified. // We have to support the strong exception guarantee for emplace_back(). emplaceFunc(out + pos); // move old elements to the left of the new one </s> remove template <class T> T* pointerFlagSet(T* p) { return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) | 1); } template <class T> bool pointerFlagGet(T* p) { return reinterpret_cast<uintptr_t>(p) & 1; } template <class T> T* pointerFlagClear(T* p) { return reinterpret_cast<T*>( reinterpret_cast<uintptr_t>(p) & ~uintptr_t(1)); } inline void* shiftPointer(void* p, size_t sizeBytes) { return static_cast<char*>(p) + sizeBytes; } </s> add template <class T> T* pointerFlagSet(T* p) { return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) | 1); } template <class T> bool pointerFlagGet(T* p) { return reinterpret_cast<uintptr_t>(p) & 1; } template <class T> T* pointerFlagClear(T* p) { return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) & ~uintptr_t(1)); } inline void* shiftPointer(void* p, size_t sizeBytes) { return static_cast<char*>(p) + sizeBytes; </s> remove /* * This helper returns the distance between two iterators if it is * possible to figure it out without messing up the range * (i.e. unless they are InputIterators). Otherwise this returns * -1. */ template<class Iterator> int distance_if_multipass(Iterator first, Iterator last) { typedef typename std::iterator_traits<Iterator>::iterator_category categ; if (std::is_same<categ,std::input_iterator_tag>::value) return -1; return std::distance(first, last); } template<class OurContainer, class Vector, class GrowthPolicy> typename OurContainer::iterator insert_with_hint(OurContainer& sorted, Vector& cont, typename OurContainer::iterator hint, typename OurContainer::value_type&& value, GrowthPolicy& po) { const typename OurContainer::value_compare& cmp(sorted.value_comp()); if (hint == cont.end() || cmp(value, *hint)) { if (hint == cont.begin()) { po.increase_capacity(cont, cont.begin()); return cont.insert(cont.begin(), std::move(value)); } if (cmp(*(hint - 1), value)) { hint = po.increase_capacity(cont, hint); return cont.insert(hint, std::move(value)); } </s> add template <typename Compare, typename Key, typename T> struct sorted_vector_enable_if_is_transparent< void_t<typename Compare::is_transparent>, Compare, Key, T> { using type = T; }; // This wrapper goes around a GrowthPolicy and provides iterator // preservation semantics, but only if the growth policy is not the // default (i.e. nothing). template <class Policy> struct growth_policy_wrapper : private Policy { template <class Container, class Iterator> Iterator increase_capacity(Container& c, Iterator desired_insertion) { typedef typename Container::difference_type diff_t; diff_t d = desired_insertion - c.begin(); Policy::increase_capacity(c); return c.begin() + d; } }; template <> struct growth_policy_wrapper<void> { template <class Container, class Iterator> Iterator increase_capacity(Container&, Iterator it) { return it; } }; /* * This helper returns the distance between two iterators if it is * possible to figure it out without messing up the range * (i.e. unless they are InputIterators). Otherwise this returns * -1. */ template <class Iterator> int distance_if_multipass(Iterator first, Iterator last) { typedef typename std::iterator_traits<Iterator>::iterator_category categ; if (std::is_same<categ, std::input_iterator_tag>::value) { return -1; } return std::distance(first, last); } template <class OurContainer, class Vector, class GrowthPolicy> typename OurContainer::iterator insert_with_hint( OurContainer& sorted, Vector& cont, typename OurContainer::iterator hint, typename OurContainer::value_type&& value, GrowthPolicy& po) { const typename OurContainer::value_compare& cmp(sorted.value_comp()); if (hint == cont.end() || cmp(value, *hint)) { if (hint == cont.begin() || cmp(*(hint - 1), value)) { hint = po.increase_capacity(cont, hint); return cont.insert(hint, std::move(value)); } else { </s> remove #ifdef _WIN32 // We implement a sane comparison operand for // pthread_t and an integer so that it may be // compared against 0. inline bool operator==(pthread_t ptA, unsigned int b) { if (ptA.p == nullptr) { return b == 0; } return pthread_getw32threadid_np(ptA) == b; } inline bool operator!=(pthread_t ptA, unsigned int b) { if (ptA.p == nullptr) { return b != 0; } return pthread_getw32threadid_np(ptA) != b; } inline bool operator==(pthread_t ptA, pthread_t ptB) { return pthread_equal(ptA, ptB) != 0; } inline bool operator!=(pthread_t ptA, pthread_t ptB) { return pthread_equal(ptA, ptB) == 0; } inline bool operator<(pthread_t ptA, pthread_t ptB) { return ptA.p < ptB.p; } inline bool operator!(pthread_t ptA) { return ptA == 0; } inline int pthread_attr_getstack( pthread_attr_t* attr, void** stackaddr, size_t* stacksize) { if (pthread_attr_getstackaddr(attr, stackaddr) != 0) { return -1; } if (pthread_attr_getstacksize(attr, stacksize) != 0) { return -1; } return 0; } inline int pthread_attr_setstack(pthread_attr_t* attr, void* stackaddr, size_t stacksize) { if (pthread_attr_setstackaddr(attr, stackaddr) != 0) { return -1; } if (pthread_attr_setstacksize(attr, stacksize) != 0) { return -1; } return 0; } inline int pthread_attr_getguardsize(pthread_attr_t* attr, size_t* guardsize) { *guardsize = 0; return 0; } #include <xstddef> namespace std { template <> struct hash<pthread_t> { std::size_t operator()(const pthread_t& k) const { return 0 ^ std::hash<decltype(k.p)>()(k.p) ^ std::hash<decltype(k.x)>()(k.x); } </s> add #elif !FOLLY_HAVE_PTHREAD #include <cstdint> #include <memory> #include <folly/portability/Sched.h> #include <folly/portability/Time.h> #include <folly/portability/Windows.h> #define PTHREAD_CREATE_JOINABLE 0 #define PTHREAD_CREATE_DETACHED 1 #define PTHREAD_MUTEX_NORMAL 0 #define PTHREAD_MUTEX_RECURSIVE 1 #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL #define _POSIX_TIMEOUTS 200112L namespace folly { namespace portability { namespace pthread { struct pthread_attr_t { size_t stackSize; bool detached; }; int pthread_attr_init(pthread_attr_t* attr); int pthread_attr_setdetachstate(pthread_attr_t* attr, int state); int pthread_attr_setstacksize(pthread_attr_t* attr, size_t kb); namespace pthread_detail { struct pthread_t { HANDLE handle{INVALID_HANDLE_VALUE}; DWORD threadID{0}; bool detached{false}; ~pthread_t() noexcept; </s> remove template<class SizeType, bool ShouldUseHeap> struct IntegralSizePolicy { typedef SizeType InternalSizeType; IntegralSizePolicy() : size_(0) {} protected: static constexpr std::size_t policyMaxSize() { return SizeType(~kExternMask); } std::size_t doSize() const { return size_ & ~kExternMask; } std::size_t isExtern() const { return kExternMask & size_; } void setExtern(bool b) { if (b) { size_ |= kExternMask; } else { size_ &= ~kExternMask; } } void setSize(std::size_t sz) { assert(sz <= policyMaxSize()); size_ = (kExternMask & size_) | SizeType(sz); } void swapSizePolicy(IntegralSizePolicy& o) { std::swap(size_, o.size_); } protected: static bool const kShouldUseHeap = ShouldUseHeap; private: static SizeType const kExternMask = kShouldUseHeap ? SizeType(1) << (sizeof(SizeType) * 8 - 1) : 0; </s> add template <class SizeType> struct IntegralSizePolicy<SizeType, false> : public IntegralSizePolicyBase<SizeType, false> { public: template <class T> void moveToUninitialized(T* /*first*/, T* /*last*/, T* /*out*/) { assume_unreachable(); } template <class T, class EmplaceFunc> void moveToUninitializedEmplace( T* /* begin */, T* /* end */, T* /* out */, SizeType /* pos */, EmplaceFunc&& /* emplaceFunc */) { assume_unreachable(); } };
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/Bits.h
keep replace keep keep keep keep keep
<mask> /* <mask> * Copyright 2016 Facebook, Inc. <mask> * <mask> * Licensed under the Apache License, Version 2.0 (the "License"); <mask> * you may not use this file except in compliance with the License. <mask> * You may obtain a copy of the License at <mask> * </s> [sdk33] Update iOS with RN 0.59 </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2012-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2011-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2011-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2015-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2016-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2016-present Facebook, Inc.
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CPortability.h
keep add keep keep keep keep keep keep
<mask> * may be included from C- as well as C++-based projects. */ <mask> <mask> /** <mask> * Portable version check. <mask> */ <mask> #ifndef __GNUC_PREREQ <mask> #if defined __GNUC__ && defined __GNUC_MINOR__ <mask> /* nolint */ </s> [sdk33] Update iOS with RN 0.59 </s> remove # if defined __GNUC__ && defined __GNUC_MINOR__ </s> add #if defined __GNUC__ && defined __GNUC_MINOR__ </s> remove # define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= \ ((maj) << 16) + (min)) # else </s> add #define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else </s> remove /* Define a convenience macro to test when address sanitizer is being used * across the different compilers (e.g. clang, gcc) */ #if defined(__clang__) # if __has_feature(address_sanitizer) # define FOLLY_SANITIZE_ADDRESS 1 # endif #elif defined (__GNUC__) && \ (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ >= 5)) && \ __SANITIZE_ADDRESS__ # define FOLLY_SANITIZE_ADDRESS 1 </s> add // portable version check for clang #ifndef __CLANG_PREREQ #if defined __clang__ && defined __clang_major__ && defined __clang_minor__ /* nolint */ #define __CLANG_PREREQ(maj, min) \ ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min)) #else /* nolint */ #define __CLANG_PREREQ(maj, min) 0 #endif #endif #if defined(__has_builtin) #define FOLLY_HAS_BUILTIN(...) __has_builtin(__VA_ARGS__) #else #define FOLLY_HAS_BUILTIN(...) 0 #endif #if defined(__has_feature) #define FOLLY_HAS_FEATURE(...) __has_feature(__VA_ARGS__) #else #define FOLLY_HAS_FEATURE(...) 0 #endif /* FOLLY_SANITIZE_ADDRESS is defined to 1 if the current compilation unit * is being compiled with ASAN enabled. * * Beware when using this macro in a header file: this macro may change values * across compilation units if some libraries are built with ASAN enabled * and some built with ASAN disabled. For instance, this may occur, if folly * itself was compiled without ASAN but a downstream project that uses folly is * compiling with ASAN enabled. * * Use FOLLY_ASAN_ENABLED (defined in folly-config.h) to check if folly itself * was compiled with ASAN enabled. */ #if FOLLY_HAS_FEATURE(address_sanitizer) || __SANITIZE_ADDRESS__ #define FOLLY_SANITIZE_ADDRESS 1 </s> remove #include <WinSock2.h> #include <Windows.h> </s> add #if defined(min) || defined(max) #error Windows.h needs to be included by this header, or else NOMINMAX needs \ to be defined before including it yourself. #endif </s> remove Synchronized(Synchronized&& rhs) /* may throw */ : Synchronized(std::move(rhs), rhs.contextualLock()) {} </s> add Synchronized(Synchronized&& rhs) noexcept(nxMoveCtor) : Synchronized(std::move(rhs.datum_)) {} </s> remove # define __GNUC_PREREQ(maj, min) 0 # endif </s> add #define __GNUC_PREREQ(maj, min) 0 #endif
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CPortability.h
keep keep keep replace keep replace replace replace keep keep keep
<mask> * Portable version check. <mask> */ <mask> #ifndef __GNUC_PREREQ <mask> # if defined __GNUC__ && defined __GNUC_MINOR__ <mask> /* nolint */ <mask> # define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= \ <mask> ((maj) << 16) + (min)) <mask> # else <mask> /* nolint */ <mask> # define __GNUC_PREREQ(maj, min) 0 <mask> # endif </s> [sdk33] Update iOS with RN 0.59 </s> remove # define __GNUC_PREREQ(maj, min) 0 # endif </s> add #define __GNUC_PREREQ(maj, min) 0 #endif </s> remove /* Define a convenience macro to test when address sanitizer is being used * across the different compilers (e.g. clang, gcc) */ #if defined(__clang__) # if __has_feature(address_sanitizer) # define FOLLY_SANITIZE_ADDRESS 1 # endif #elif defined (__GNUC__) && \ (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ >= 5)) && \ __SANITIZE_ADDRESS__ # define FOLLY_SANITIZE_ADDRESS 1 </s> add // portable version check for clang #ifndef __CLANG_PREREQ #if defined __clang__ && defined __clang_major__ && defined __clang_minor__ /* nolint */ #define __CLANG_PREREQ(maj, min) \ ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min)) #else /* nolint */ #define __CLANG_PREREQ(maj, min) 0 #endif #endif #if defined(__has_builtin) #define FOLLY_HAS_BUILTIN(...) __has_builtin(__VA_ARGS__) #else #define FOLLY_HAS_BUILTIN(...) 0 #endif #if defined(__has_feature) #define FOLLY_HAS_FEATURE(...) __has_feature(__VA_ARGS__) #else #define FOLLY_HAS_FEATURE(...) 0 #endif /* FOLLY_SANITIZE_ADDRESS is defined to 1 if the current compilation unit * is being compiled with ASAN enabled. * * Beware when using this macro in a header file: this macro may change values * across compilation units if some libraries are built with ASAN enabled * and some built with ASAN disabled. For instance, this may occur, if folly * itself was compiled without ASAN but a downstream project that uses folly is * compiling with ASAN enabled. * * Use FOLLY_ASAN_ENABLED (defined in folly-config.h) to check if folly itself * was compiled with ASAN enabled. */ #if FOLLY_HAS_FEATURE(address_sanitizer) || __SANITIZE_ADDRESS__ #define FOLLY_SANITIZE_ADDRESS 1 </s> add #include <folly/portability/Config.h> </s> remove # if defined(__clang__) # if __has_attribute(__no_sanitize__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) # elif __has_attribute(__no_address_safety_analysis__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # elif __has_attribute(__no_sanitize_address__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) # endif # elif defined(__GNUC__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # endif </s> add #if defined(__clang__) #if __has_attribute(__no_sanitize__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) #elif __has_attribute(__no_address_safety_analysis__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #elif __has_attribute(__no_sanitize_address__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) #endif #elif defined(__GNUC__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #endif </s> remove # define FOLLY_EXPORT </s> add #define FOLLY_NOINLINE
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CPortability.h
keep keep keep keep replace replace keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep
<mask> # define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= \ <mask> ((maj) << 16) + (min)) <mask> # else <mask> /* nolint */ <mask> # define __GNUC_PREREQ(maj, min) 0 <mask> # endif <mask> #endif <mask> <mask> /* Define a convenience macro to test when address sanitizer is being used <mask> * across the different compilers (e.g. clang, gcc) */ <mask> #if defined(__clang__) <mask> # if __has_feature(address_sanitizer) <mask> # define FOLLY_SANITIZE_ADDRESS 1 <mask> # endif <mask> #elif defined (__GNUC__) && \ <mask> (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ >= 5)) && \ <mask> __SANITIZE_ADDRESS__ <mask> # define FOLLY_SANITIZE_ADDRESS 1 <mask> #endif <mask> <mask> /* Define attribute wrapper for function attribute used to disable </s> [sdk33] Update iOS with RN 0.59 </s> remove # define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= \ ((maj) << 16) + (min)) # else </s> add #define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else </s> remove # if defined __GNUC__ && defined __GNUC_MINOR__ </s> add #if defined __GNUC__ && defined __GNUC_MINOR__ </s> remove #if defined(__clang__) # if __has_feature(thread_sanitizer) # define FOLLY_SANITIZE_THREAD 1 # endif #elif defined(__GNUC__) && __SANITIZE_THREAD__ # define FOLLY_SANITIZE_THREAD 1 </s> add #if FOLLY_HAS_FEATURE(thread_sanitizer) || __SANITIZE_THREAD__ #define FOLLY_SANITIZE_THREAD 1 </s> remove # if defined(__clang__) # if __has_attribute(__no_sanitize__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) # elif __has_attribute(__no_address_safety_analysis__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # elif __has_attribute(__no_sanitize_address__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) # endif # elif defined(__GNUC__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # endif </s> add #if defined(__clang__) #if __has_attribute(__no_sanitize__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) #elif __has_attribute(__no_address_safety_analysis__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #elif __has_attribute(__no_sanitize_address__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) #endif #elif defined(__GNUC__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #endif </s> remove # define FOLLY_DISABLE_ADDRESS_SANITIZER </s> add #define FOLLY_DISABLE_ADDRESS_SANITIZER
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CPortability.h
keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep replace keep
<mask> #ifdef FOLLY_SANITIZE_ADDRESS <mask> # if defined(__clang__) <mask> # if __has_attribute(__no_sanitize__) <mask> # define FOLLY_DISABLE_ADDRESS_SANITIZER \ <mask> __attribute__((__no_sanitize__("address"), __noinline__)) <mask> # elif __has_attribute(__no_address_safety_analysis__) <mask> # define FOLLY_DISABLE_ADDRESS_SANITIZER \ <mask> __attribute__((__no_address_safety_analysis__, __noinline__)) <mask> # elif __has_attribute(__no_sanitize_address__) <mask> # define FOLLY_DISABLE_ADDRESS_SANITIZER \ <mask> __attribute__((__no_sanitize_address__, __noinline__)) <mask> # endif <mask> # elif defined(__GNUC__) <mask> # define FOLLY_DISABLE_ADDRESS_SANITIZER \ <mask> __attribute__((__no_address_safety_analysis__, __noinline__)) <mask> # endif <mask> #endif <mask> #ifndef FOLLY_DISABLE_ADDRESS_SANITIZER <mask> # define FOLLY_DISABLE_ADDRESS_SANITIZER <mask> #endif </s> [sdk33] Update iOS with RN 0.59 </s> remove # define FOLLY_EXPORT </s> add #define FOLLY_NOINLINE </s> remove # if __GNUC_PREREQ(4, 9) # define FOLLY_EXPORT [[gnu::visibility("default")]] # else # define FOLLY_EXPORT __attribute__((__visibility__("default"))) # endif </s> add #if __GNUC_PREREQ(4, 9) #define FOLLY_EXPORT [[gnu::visibility("default")]] #else #define FOLLY_EXPORT __attribute__((__visibility__("default"))) #endif #else #define FOLLY_EXPORT #endif // noinline #ifdef _MSC_VER #define FOLLY_NOINLINE __declspec(noinline) #elif defined(__clang__) || defined(__GNUC__) #define FOLLY_NOINLINE __attribute__((__noinline__)) </s> remove # define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= \ ((maj) << 16) + (min)) # else </s> add #define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else </s> remove # define __GNUC_PREREQ(maj, min) 0 # endif </s> add #define __GNUC_PREREQ(maj, min) 0 #endif </s> remove #if defined(__clang__) # if __has_feature(thread_sanitizer) # define FOLLY_SANITIZE_THREAD 1 # endif #elif defined(__GNUC__) && __SANITIZE_THREAD__ # define FOLLY_SANITIZE_THREAD 1 </s> add #if FOLLY_HAS_FEATURE(thread_sanitizer) || __SANITIZE_THREAD__ #define FOLLY_SANITIZE_THREAD 1
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CPortability.h
keep replace replace replace replace replace replace keep keep keep replace replace replace replace replace replace replace replace keep
<mask> * across the different compilers (e.g. clang, gcc) */ <mask> #if defined(__clang__) <mask> # if __has_feature(thread_sanitizer) <mask> # define FOLLY_SANITIZE_THREAD 1 <mask> # endif <mask> #elif defined(__GNUC__) && __SANITIZE_THREAD__ <mask> # define FOLLY_SANITIZE_THREAD 1 <mask> #endif <mask> <mask> /** <mask> * ASAN/MSAN/TSAN define pre-processor symbols: <mask> * ADDRESS_SANITIZER/MEMORY_SANITIZER/THREAD_SANITIZER. <mask> * <mask> * UBSAN doesn't define anything and makes it hard to <mask> * conditionally compile. <mask> * <mask> * The build system should define UNDEFINED_SANITIZER=1 when UBSAN is <mask> * used as folly whitelists some functions. <mask> */ </s> [sdk33] Update iOS with RN 0.59 </s> remove #if UNDEFINED_SANITIZER # define UBSAN_DISABLE(x) __attribute__((no_sanitize(x))) </s> add #if defined(FOLLY_SANITIZE_ADDRESS) || defined(FOLLY_SANITIZE_THREAD) #define FOLLY_SANITIZE 1 #endif #if FOLLY_SANITIZE #define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(...) \ __attribute__((no_sanitize(__VA_ARGS__))) </s> remove # define FOLLY_DISABLE_ADDRESS_SANITIZER </s> add #define FOLLY_DISABLE_ADDRESS_SANITIZER </s> remove # define __GNUC_PREREQ(maj, min) 0 # endif </s> add #define __GNUC_PREREQ(maj, min) 0 #endif </s> remove # if defined(__clang__) # if __has_attribute(__no_sanitize__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) # elif __has_attribute(__no_address_safety_analysis__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # elif __has_attribute(__no_sanitize_address__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) # endif # elif defined(__GNUC__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # endif </s> add #if defined(__clang__) #if __has_attribute(__no_sanitize__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) #elif __has_attribute(__no_address_safety_analysis__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #elif __has_attribute(__no_sanitize_address__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) #endif #elif defined(__GNUC__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #endif </s> remove # if __GNUC_PREREQ(4, 9) # define FOLLY_EXPORT [[gnu::visibility("default")]] # else # define FOLLY_EXPORT __attribute__((__visibility__("default"))) # endif </s> add #if __GNUC_PREREQ(4, 9) #define FOLLY_EXPORT [[gnu::visibility("default")]] #else #define FOLLY_EXPORT __attribute__((__visibility__("default"))) #endif #else #define FOLLY_EXPORT #endif // noinline #ifdef _MSC_VER #define FOLLY_NOINLINE __declspec(noinline) #elif defined(__clang__) || defined(__GNUC__) #define FOLLY_NOINLINE __attribute__((__noinline__))
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CPortability.h
keep replace replace keep replace replace keep keep
<mask> */ <mask> #if UNDEFINED_SANITIZER <mask> # define UBSAN_DISABLE(x) __attribute__((no_sanitize(x))) <mask> #else <mask> # define UBSAN_DISABLE(x) <mask> #endif // UNDEFINED_SANITIZER <mask> <mask> /** </s> [sdk33] Update iOS with RN 0.59 </s> remove * ASAN/MSAN/TSAN define pre-processor symbols: * ADDRESS_SANITIZER/MEMORY_SANITIZER/THREAD_SANITIZER. * * UBSAN doesn't define anything and makes it hard to * conditionally compile. * * The build system should define UNDEFINED_SANITIZER=1 when UBSAN is * used as folly whitelists some functions. </s> add * Define a convenience macro to test when ASAN, UBSAN or TSAN sanitizer are * being used </s> remove # if __GNUC_PREREQ(4, 9) # define FOLLY_EXPORT [[gnu::visibility("default")]] # else # define FOLLY_EXPORT __attribute__((__visibility__("default"))) # endif </s> add #if __GNUC_PREREQ(4, 9) #define FOLLY_EXPORT [[gnu::visibility("default")]] #else #define FOLLY_EXPORT __attribute__((__visibility__("default"))) #endif #else #define FOLLY_EXPORT #endif // noinline #ifdef _MSC_VER #define FOLLY_NOINLINE __declspec(noinline) #elif defined(__clang__) || defined(__GNUC__) #define FOLLY_NOINLINE __attribute__((__noinline__)) </s> remove # define FOLLY_EXPORT </s> add #define FOLLY_NOINLINE </s> remove #if defined(__clang__) # if __has_feature(thread_sanitizer) # define FOLLY_SANITIZE_THREAD 1 # endif #elif defined(__GNUC__) && __SANITIZE_THREAD__ # define FOLLY_SANITIZE_THREAD 1 </s> add #if FOLLY_HAS_FEATURE(thread_sanitizer) || __SANITIZE_THREAD__ #define FOLLY_SANITIZE_THREAD 1 </s> remove # if defined(__clang__) # if __has_attribute(__no_sanitize__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) # elif __has_attribute(__no_address_safety_analysis__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # elif __has_attribute(__no_sanitize_address__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) # endif # elif defined(__GNUC__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # endif </s> add #if defined(__clang__) #if __has_attribute(__no_sanitize__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) #elif __has_attribute(__no_address_safety_analysis__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #elif __has_attribute(__no_sanitize_address__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) #endif #elif defined(__GNUC__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #endif
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CPortability.h
keep keep keep keep replace replace replace replace replace keep replace
<mask> /** <mask> * Macro for marking functions as having public visibility. <mask> */ <mask> #if defined(__GNUC__) <mask> # if __GNUC_PREREQ(4, 9) <mask> # define FOLLY_EXPORT [[gnu::visibility("default")]] <mask> # else <mask> # define FOLLY_EXPORT __attribute__((__visibility__("default"))) <mask> # endif <mask> #else <mask> # define FOLLY_EXPORT </s> [sdk33] Update iOS with RN 0.59 </s> remove # define UBSAN_DISABLE(x) #endif // UNDEFINED_SANITIZER </s> add #define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(...) #endif // FOLLY_SANITIZE </s> remove # if defined(__clang__) # if __has_attribute(__no_sanitize__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) # elif __has_attribute(__no_address_safety_analysis__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # elif __has_attribute(__no_sanitize_address__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) # endif # elif defined(__GNUC__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # endif </s> add #if defined(__clang__) #if __has_attribute(__no_sanitize__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize__("address"), __noinline__)) #elif __has_attribute(__no_address_safety_analysis__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #elif __has_attribute(__no_sanitize_address__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_sanitize_address__, __noinline__)) #endif #elif defined(__GNUC__) #define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) #endif </s> remove #if defined(__clang__) # if __has_feature(thread_sanitizer) # define FOLLY_SANITIZE_THREAD 1 # endif #elif defined(__GNUC__) && __SANITIZE_THREAD__ # define FOLLY_SANITIZE_THREAD 1 </s> add #if FOLLY_HAS_FEATURE(thread_sanitizer) || __SANITIZE_THREAD__ #define FOLLY_SANITIZE_THREAD 1 </s> remove # define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= \ ((maj) << 16) + (min)) # else </s> add #define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else </s> remove # if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) # define MAP_ANONYMOUS MAP_ANON # endif </s> add #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) #define MAP_ANONYMOUS MAP_ANON #endif
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CPortability.h
keep replace keep keep keep keep keep
<mask> /* <mask> * Copyright 2016 Facebook, Inc. <mask> * <mask> * Licensed under the Apache License, Version 2.0 (the "License"); <mask> * you may not use this file except in compliance with the License. <mask> * You may obtain a copy of the License at <mask> * </s> [sdk33] Update iOS with RN 0.59 </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2012-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2011-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2013-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2011-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2015-present Facebook, Inc. </s> remove * Copyright 2016 Facebook, Inc. </s> add * Copyright 2016-present Facebook, Inc.
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CachelinePadded.h
keep keep keep keep replace keep keep keep keep keep
<mask> */ <mask> <mask> #pragma once <mask> <mask> #include <folly/detail/CachelinePaddedImpl.h> <mask> <mask> namespace folly { <mask> <mask> /** <mask> * Holds a type T, in addition to enough padding to round the size up to the </s> [sdk33] Update iOS with RN 0.59 </s> remove * Holds a type T, in addition to enough padding to round the size up to the * next multiple of the false sharing range used by folly. * * If T is standard-layout, then casting a T* you get from this class to a * CachelinePadded<T>* is safe. * * This class handles padding, but imperfectly handles alignment. (Note that * alignment matters for false-sharing: imagine a cacheline size of 64, and two * adjacent 64-byte objects, with the first starting at an offset of 32. The * last 32 bytes of the first object share a cacheline with the first 32 bytes * of the second.). We alignas this class to be at least cacheline-sized, but * it's implementation-defined what that means (since a cacheline is almost * certainly larger than the maximum natural alignment). The following should be * true for recent compilers on common architectures: * * For heap objects, alignment needs to be handled at the allocator level, such * as with posix_memalign (this isn't necessary with jemalloc, which aligns * objects that are a multiple of cacheline size to a cacheline). </s> add * Holds a type T, in addition to enough padding to ensure that it isn't subject * to false sharing within the range used by folly. </s> add #include <cstddef> </s> remove #include <string> </s> add </s> remove namespace folly { namespace detail { </s> add namespace folly { namespace detail { </s> add #include <folly/CPortability.h> </s> remove #include <stdlib.h> </s> add #include <folly/Memory.h> // @shim
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CachelinePadded.h
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep replace replace keep keep keep
<mask> <mask> namespace folly { <mask> <mask> /** <mask> * Holds a type T, in addition to enough padding to round the size up to the <mask> * next multiple of the false sharing range used by folly. <mask> * <mask> * If T is standard-layout, then casting a T* you get from this class to a <mask> * CachelinePadded<T>* is safe. <mask> * <mask> * This class handles padding, but imperfectly handles alignment. (Note that <mask> * alignment matters for false-sharing: imagine a cacheline size of 64, and two <mask> * adjacent 64-byte objects, with the first starting at an offset of 32. The <mask> * last 32 bytes of the first object share a cacheline with the first 32 bytes <mask> * of the second.). We alignas this class to be at least cacheline-sized, but <mask> * it's implementation-defined what that means (since a cacheline is almost <mask> * certainly larger than the maximum natural alignment). The following should be <mask> * true for recent compilers on common architectures: <mask> * <mask> * For heap objects, alignment needs to be handled at the allocator level, such <mask> * as with posix_memalign (this isn't necessary with jemalloc, which aligns <mask> * objects that are a multiple of cacheline size to a cacheline). <mask> * <mask> * For static and stack objects, the alignment should be obeyed, and no specific <mask> * intervention is necessary. <mask> */ <mask> template <typename T> <mask> class CachelinePadded { </s> [sdk33] Update iOS with RN 0.59 </s> remove * Constructs a new `Function` from any callable object. This * handles function pointers, pointers to static member functions, * `std::reference_wrapper` objects, `std::function` objects, and arbitrary * objects that implement `operator()` if the parameter signature * matches (i.e. it returns R when called with Args...). * For a `Function` with a const function type, the object must be * callable from a const-reference, i.e. implement `operator() const`. * For a `Function` with a non-const function type, the object will * be called from a non-const reference, which means that it will execute * a non-const `operator()` if it is defined, and falls back to * `operator() const` otherwise. </s> add * Constructs a new `Function` from any callable object that is _not_ a * `folly::Function`. This handles function pointers, pointers to static * member functions, `std::reference_wrapper` objects, `std::function` * objects, and arbitrary objects that implement `operator()` if the parameter * signature matches (i.e. it returns an object convertible to `R` when called * with `Args...`). </s> remove * Construct and inject a mock singleton which should be used only from tests. * Unlike regular singletons which are initialized once per process lifetime, * mock singletons live for the duration of a test. This means that one process * running multiple tests can initialize and register the same singleton * multiple times. This functionality should be used only from tests * since it relaxes validation and performance in order to be able to perform * the injection. The returned mock singleton is functionality identical to * regular singletons. */ static void make_mock(std::nullptr_t /* c */ = nullptr, typename Singleton<T>::TeardownFunc t = nullptr) { </s> add * Construct and inject a mock singleton which should be used only from tests. * Unlike regular singletons which are initialized once per process lifetime, * mock singletons live for the duration of a test. This means that one * process running multiple tests can initialize and register the same * singleton multiple times. This functionality should be used only from tests * since it relaxes validation and performance in order to be able to perform * the injection. The returned mock singleton is functionality identical to * regular singletons. */ static void make_mock( std::nullptr_t /* c */ = nullptr, typename Singleton<T>::TeardownFunc t = nullptr) { </s> remove * If you're just trying to use this class, ignore everything about * this next small_vector_base class thing. * * The purpose of this junk is to minimize sizeof(small_vector<>) * and allow specifying the template parameters in whatever order is * convenient for the user. There's a few extra steps here to try * to keep the error messages at least semi-reasonable. * * Apologies for all the black magic. </s> add * Determine the size type </s> remove * The relationship between LockedGuardPtr and LockedPtr is similar to that * between std::lock_guard and std::unique_lock. </s> add * For example in the above rlock() produces an implementation defined read * locking helper instance and wlock() a write locking helper * * Subsequent arguments passed to these locking helpers, after the first, will * be passed by const-ref to the corresponding function on the synchronized * instance. This means that if the function accepts these parameters by * value, they will be copied. Note that it is not necessary that the primary * locking function will be invoked at all (for eg. the implementation might * just invoke the try*Lock() method) * * // Try to acquire the lock for one second * synchronized([](auto) { ... }, wlock(one, 1s)); * * // The timed lock acquire might never actually be called, if it is not * // needed by the underlying deadlock avoiding algorithm * synchronized([](auto, auto) { ... }, rlock(one), wlock(two, 1s)); * * Note that the arguments passed to to *lock() calls will be passed by * const-ref to the function invocation, as the implementation might use them * many times </s> remove #include <folly/detail/CachelinePaddedImpl.h> </s> add #include <cstddef> #include <utility> #include <folly/lang/Align.h>
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CachelinePadded.h
keep keep keep add keep keep keep keep keep keep
<mask> * false sharing range (AKA cache line). <mask> */ <mask> template <typename T> <mask> class CachelinePadded { <mask> public: <mask> template <typename... Args> <mask> explicit CachelinePadded(Args&&... args) <mask> : inner_(std::forward<Args>(args)...) {} <mask> <mask> T* get() { </s> [sdk33] Update iOS with RN 0.59 </s> remove : impl_(std::forward<Args>(args)...) {} CachelinePadded() {} </s> add : inner_(std::forward<Args>(args)...) {} </s> remove * For static and stack objects, the alignment should be obeyed, and no specific * intervention is necessary. </s> add * If `sizeof(T) <= alignof(T)` then the inner `T` will be entirely within one * false sharing range (AKA cache line). </s> remove * instance `construct_in_place` as the first argument. </s> add * instance `in_place` as the first argument. </s> remove template <class SynchronizedType, class LockPolicy> class LockedGuardPtr { private: // CDataType is the DataType with the appropriate const-qualification using CDataType = detail::SynchronizedDataType<SynchronizedType>; public: using DataType = typename SynchronizedType::DataType; using MutexType = typename SynchronizedType::MutexType; using Synchronized = typename std::remove_const<SynchronizedType>::type; LockedGuardPtr() = delete; /** * Takes a Synchronized<T> and locks it. */ explicit LockedGuardPtr(SynchronizedType* parent) : parent_(parent) { LockPolicy::lock(parent_->mutex_); } /** * Destructor releases. */ ~LockedGuardPtr() { LockPolicy::unlock(parent_->mutex_); } /** * Access the locked data. */ CDataType* operator->() const { return &parent_->datum_; } </s> add template <typename D, typename M, typename... Args> auto wlock(Synchronized<D, M>& synchronized, Args&&... args) { return detail::wlock(synchronized, std::forward<Args>(args)...); } template <typename Data, typename Mutex, typename... Args> auto rlock(const Synchronized<Data, Mutex>& synchronized, Args&&... args) { return detail::rlock(synchronized, std::forward<Args>(args)...); } template <typename D, typename M, typename... Args> auto ulock(Synchronized<D, M>& synchronized, Args&&... args) { return detail::ulock(synchronized, std::forward<Args>(args)...); } template <typename D, typename M, typename... Args> auto lock(Synchronized<D, M>& synchronized, Args&&... args) { return detail::lock(synchronized, std::forward<Args>(args)...); } template <typename D, typename M, typename... Args> auto lock(const Synchronized<D, M>& synchronized, Args&&... args) { return detail::lock(synchronized, std::forward<Args>(args)...); } </s> remove explicit ThreadLocal(std::function<T*()> constructor) : constructor_(constructor) { } T* get() const { T* ptr = tlp_.get(); if (LIKELY(ptr != nullptr)) { return ptr; } // separated new item creation out to speed up the fast path. return makeTlp(); </s> add template < typename F, _t<std::enable_if<is_invocable_r<T*, F>::value, int>> = 0> explicit ThreadLocal(F&& constructor) : constructor_(std::forward<F>(constructor)) {} FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN T* get() const { auto const ptr = tlp_.get(); return FOLLY_LIKELY(!!ptr) ? ptr : makeTlp(); </s> remove "invalid format argument {", fullArgString, "}: ", std::forward<Args>(args)...); </s> add "invalid format argument {", fullArgString, "}: ", std::forward<Args>(args)...);
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CachelinePadded.h
keep replace replace replace keep keep keep keep keep keep keep keep replace keep keep
<mask> explicit CachelinePadded(Args&&... args) <mask> : impl_(std::forward<Args>(args)...) {} <mask> <mask> CachelinePadded() {} <mask> <mask> T* get() { <mask> return &impl_.item; <mask> } <mask> <mask> CachelinePadded() {} <mask> <mask> T* get() { <mask> return &impl_.item; <mask> } <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove return &impl_.item; </s> add return &inner_; </s> remove explicit ThreadLocal(std::function<T*()> constructor) : constructor_(constructor) { } T* get() const { T* ptr = tlp_.get(); if (LIKELY(ptr != nullptr)) { return ptr; } // separated new item creation out to speed up the fast path. return makeTlp(); </s> add template < typename F, _t<std::enable_if<is_invocable_r<T*, F>::value, int>> = 0> explicit ThreadLocal(F&& constructor) : constructor_(std::forward<F>(constructor)) {} FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN T* get() const { auto const ptr = tlp_.get(); return FOLLY_LIKELY(!!ptr) ? ptr : makeTlp(); </s> add static_assert( alignof(T) <= max_align_v, "CachelinePadded does not support over-aligned types."); </s> remove threadlocal_detail::ElementWrapper& w = StaticMeta::instance().get(&id_); </s> add threadlocal_detail::ElementWrapper& w = StaticMeta::get(&id_); </s> remove explicit SharedProxy(Function<ReturnType(Args...)>&& func) : sp_(std::make_shared<Function<ReturnType(Args...)>>( std::move(func))) {} </s> add explicit SharedProxy(Function<NonConstSignature>&& func) : sp_(std::make_shared<Function<NonConstSignature>>(std::move(func))) {}
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CachelinePadded.h
keep keep keep keep replace keep keep keep keep keep
<mask> return &impl_.item; <mask> } <mask> <mask> const T* get() const { <mask> return &impl_.item; <mask> } <mask> <mask> T* operator->() { <mask> return get(); <mask> } </s> [sdk33] Update iOS with RN 0.59 </s> remove return &impl_.item; </s> add return &inner_; </s> remove threadlocal_detail::ElementWrapper& w = StaticMeta::instance().get(&id_); </s> add threadlocal_detail::ElementWrapper& w = StaticMeta::get(&id_); </s> remove explicit ThreadLocal(std::function<T*()> constructor) : constructor_(constructor) { } T* get() const { T* ptr = tlp_.get(); if (LIKELY(ptr != nullptr)) { return ptr; } // separated new item creation out to speed up the fast path. return makeTlp(); </s> add template < typename F, _t<std::enable_if<is_invocable_r<T*, F>::value, int>> = 0> explicit ThreadLocal(F&& constructor) : constructor_(std::forward<F>(constructor)) {} FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN T* get() const { auto const ptr = tlp_.get(); return FOLLY_LIKELY(!!ptr) ? ptr : makeTlp(); </s> remove : impl_(std::forward<Args>(args)...) {} CachelinePadded() {} </s> add : inner_(std::forward<Args>(args)...) {} </s> remove for (; e_ != &accessor_->meta_.head_ && !valid(); e_ = e_->prev) { } </s> add for (; e_ != &accessor_->meta_.head_.elements[accessor_->id_].node && !valid(); e_ = e_->getPrev()) { } } public: using difference_type = ssize_t; using value_type = T; using reference = T const&; using pointer = T const*; using iterator_category = std::bidirectional_iterator_tag; Iterator& operator++() { increment(); return *this; } Iterator& operator++(int) { Iterator copy(*this); increment(); return copy; } Iterator& operator--() { decrement(); return *this; } Iterator& operator--(int) { Iterator copy(*this); decrement(); return copy; } T& operator*() { return dereference(); } T const& operator*() const { return dereference(); } T* operator->() { return &dereference(); } T const* operator->() const { return &dereference(); } bool operator==(Iterator const& rhs) const { return equal(rhs); } bool operator!=(Iterator const& rhs) const { return !equal(rhs); </s> remove template<class SizeType, bool ShouldUseHeap> struct IntegralSizePolicy { typedef SizeType InternalSizeType; IntegralSizePolicy() : size_(0) {} protected: static constexpr std::size_t policyMaxSize() { return SizeType(~kExternMask); } std::size_t doSize() const { return size_ & ~kExternMask; } std::size_t isExtern() const { return kExternMask & size_; } void setExtern(bool b) { if (b) { size_ |= kExternMask; } else { size_ &= ~kExternMask; } } void setSize(std::size_t sz) { assert(sz <= policyMaxSize()); size_ = (kExternMask & size_) | SizeType(sz); } void swapSizePolicy(IntegralSizePolicy& o) { std::swap(size_, o.size_); } protected: static bool const kShouldUseHeap = ShouldUseHeap; private: static SizeType const kExternMask = kShouldUseHeap ? SizeType(1) << (sizeof(SizeType) * 8 - 1) : 0; </s> add template <class SizeType> struct IntegralSizePolicy<SizeType, false> : public IntegralSizePolicyBase<SizeType, false> { public: template <class T> void moveToUninitialized(T* /*first*/, T* /*last*/, T* /*out*/) { assume_unreachable(); } template <class T, class EmplaceFunc> void moveToUninitializedEmplace( T* /* begin */, T* /* end */, T* /* out */, SizeType /* pos */, EmplaceFunc&& /* emplaceFunc */) { assume_unreachable(); } };
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CachelinePadded.h
keep keep keep keep replace keep replace
<mask> return *get(); <mask> } <mask> <mask> private: <mask> detail::CachelinePaddedImpl<T> impl_; <mask> }; <mask> } </s> [sdk33] Update iOS with RN 0.59 </s> remove threadlocal_detail::ElementWrapper& w = StaticMeta::instance().get(&id_); </s> add threadlocal_detail::ElementWrapper& w = StaticMeta::get(&id_); </s> remove NodeAlloc& alloc() { return alloc_; } </s> add NodeAlloc& alloc() { return alloc_; } </s> remove }} // namespaces </s> add } // namespace detail } // namespace folly </s> remove private: </s> add private: </s> remove std::string what_; </s> add
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/CachelinePadded.h
keep replace keep keep keep keep keep
<mask> /* <mask> * Copyright 2016 Facebook, Inc. <mask> * <mask> * Licensed under the Apache License, Version 2.0 (the "License"); <mask> * you may not use this file except in compliance with the License. <mask> * You may obtain a copy of the License at <mask> * </s> [sdk33] Update iOS with RN 0.59
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ClockGettimeWrappers.h
keep keep keep keep replace replace
<mask> namespace chrono { <mask> <mask> extern int (*clock_gettime)(clockid_t, timespec* ts); <mask> extern int64_t (*clock_gettime_ns)(clockid_t); <mask> } <mask> } </s> [sdk33] Update iOS with RN 0.59 </s> remove } } </s> add } // namespace portability } // namespace folly </s> add int getpriority(int which, int who); int setpriority(int which, int who, int value); </s> add int fchmod(int fd, mode_t mode); </s> remove extern "C" { </s> add </s> remove int64_t runOnce(int64_t now) { return runInternal(now, true); } int64_t runLoop(int64_t now) { return runInternal(now, false); } </s> add int64_t runOnce(int64_t now) { return runInternal(now, true); } int64_t runLoop(int64_t now) { return runInternal(now, false); } </s> remove } </s> add } // namespace pthread_detail using pthread_t = std::shared_ptr<pthread_detail::pthread_t>; int pthread_equal(pthread_t threadA, pthread_t threadB); int pthread_create( pthread_t* thread, const pthread_attr_t* attr, void* (*start_routine)(void*), void* arg); pthread_t pthread_self(); int pthread_join(pthread_t thread, void** exitCode); HANDLE pthread_getw32threadhandle_np(pthread_t thread); DWORD pthread_getw32threadid_np(pthread_t thread); int pthread_setschedparam( pthread_t thread, int policy, const sched_param* param); struct pthread_mutexattr_t { int type; }; int pthread_mutexattr_init(pthread_mutexattr_t* attr); int pthread_mutexattr_destroy(pthread_mutexattr_t* attr); int pthread_mutexattr_settype(pthread_mutexattr_t* attr, int type); using pthread_mutex_t = struct pthread_mutex_t_*; int pthread_mutex_init(pthread_mutex_t* mutex, const pthread_mutexattr_t* attr); int pthread_mutex_destroy(pthread_mutex_t* mutex); int pthread_mutex_lock(pthread_mutex_t* mutex); int pthread_mutex_trylock(pthread_mutex_t* mutex); int pthread_mutex_unlock(pthread_mutex_t* mutex); int pthread_mutex_timedlock( pthread_mutex_t* mutex, const timespec* abs_timeout); using pthread_rwlock_t = struct pthread_rwlock_t_*; // Technically the second argument here is supposed to be a // const pthread_rwlockattr_t* but we don support it, so we // simply don't define pthread_rwlockattr_t at all to cause // a build-break if anyone tries to use it. int pthread_rwlock_init(pthread_rwlock_t* rwlock, const void* attr); int pthread_rwlock_destroy(pthread_rwlock_t* rwlock); int pthread_rwlock_rdlock(pthread_rwlock_t* rwlock); int pthread_rwlock_tryrdlock(pthread_rwlock_t* rwlock); int pthread_rwlock_timedrdlock( pthread_rwlock_t* rwlock, const timespec* abs_timeout); int pthread_rwlock_wrlock(pthread_rwlock_t* rwlock); int pthread_rwlock_trywrlock(pthread_rwlock_t* rwlock); int pthread_rwlock_timedwrlock( pthread_rwlock_t* rwlock, const timespec* abs_timeout); int pthread_rwlock_unlock(pthread_rwlock_t* rwlock); using pthread_cond_t = struct pthread_cond_t_*; // Once again, technically the second argument should be a // pthread_condattr_t, but we don't implement it, so void* // it is. int pthread_cond_init(pthread_cond_t* cond, const void* attr); int pthread_cond_destroy(pthread_cond_t* cond); int pthread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex); int pthread_cond_timedwait( pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* abstime); int pthread_cond_signal(pthread_cond_t* cond); int pthread_cond_broadcast(pthread_cond_t* cond); // In reality, this is boost::thread_specific_ptr*, but we're attempting // to avoid introducing boost into a portability header. using pthread_key_t = void*; int pthread_key_create(pthread_key_t* key, void (*destructor)(void*)); int pthread_key_delete(pthread_key_t key); void* pthread_getspecific(pthread_key_t key); int pthread_setspecific(pthread_key_t key, const void* value); } // namespace pthread } // namespace portability } // namespace folly /* using override */ using namespace folly::portability::pthread;
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ClockGettimeWrappers.h
keep replace keep keep keep keep keep
<mask> /* <mask> * Copyright 2016 Facebook, Inc. <mask> * <mask> * Licensed under the Apache License, Version 2.0 (the "License"); <mask> * you may not use this file except in compliance with the License. <mask> * You may obtain a copy of the License at <mask> * </s> [sdk33] Update iOS with RN 0.59
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep keep keep keep replace keep keep keep keep keep
<mask> #include <boost/type_traits.hpp> <mask> #include <glog/logging.h> <mask> <mask> #include <folly/Memory.h> <mask> #include <folly/MicroSpinLock.h> <mask> #include <folly/ThreadLocal.h> <mask> <mask> namespace folly { namespace detail { <mask> <mask> template<typename ValT, typename NodeT> class csl_iterator; </s> [sdk33] Update iOS with RN 0.59 </s> remove namespace folly { namespace detail { </s> add namespace folly { namespace detail { </s> remove template<typename ValT, typename NodeT> class csl_iterator; </s> add template <typename ValT, typename NodeT> class csl_iterator; </s> add #include <folly/synchronization/MicroSpinLock.h> </s> remove #include <folly/MicroSpinLock.h> </s> add #include <folly/synchronization/MicroSpinLock.h> </s> remove template<typename T> </s> add template <typename T> </s> add #include <boost/function_types/function_arity.hpp> #include <glog/logging.h>
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep add keep keep keep keep
<mask> #include <folly/Memory.h> <mask> #include <folly/ThreadLocal.h> <mask> <mask> namespace folly { <mask> namespace detail { <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove namespace folly { namespace detail { </s> add namespace folly { namespace detail { </s> remove #include <folly/MicroSpinLock.h> </s> add </s> remove #include <stdlib.h> </s> add #include <folly/Memory.h> // @shim </s> remove namespace folly { namespace detail { </s> add namespace folly { namespace detail { </s> remove template<typename ValT, typename NodeT> class csl_iterator; </s> add template <typename ValT, typename NodeT> class csl_iterator; </s> add #include <string>
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep keep replace keep replace keep keep keep
<mask> #include <folly/ThreadLocal.h> <mask> <mask> namespace folly { namespace detail { <mask> <mask> template<typename ValT, typename NodeT> class csl_iterator; <mask> <mask> template<typename T> <mask> class SkipListNode : private boost::noncopyable { </s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename T> </s> add template <typename T> </s> remove #include <folly/MicroSpinLock.h> </s> add </s> remove enum { </s> add enum : uint16_t { </s> remove template<typename ValT, typename NodeT> class detail::csl_iterator : public boost::iterator_facade<csl_iterator<ValT, NodeT>, ValT, boost::forward_traversal_tag> { </s> add template <typename ValT, typename NodeT> class detail::csl_iterator : public boost::iterator_facade< csl_iterator<ValT, NodeT>, ValT, boost::forward_traversal_tag> { </s> add #include <folly/synchronization/MicroSpinLock.h>
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep keep keep keep replace keep replace keep keep
<mask> namespace folly { namespace detail { <mask> <mask> template<typename ValT, typename NodeT> class csl_iterator; <mask> <mask> template<typename T> <mask> class SkipListNode : private boost::noncopyable { <mask> enum { <mask> IS_HEAD_NODE = 1, <mask> MARKED_FOR_REMOVAL = (1 << 1), </s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename ValT, typename NodeT> class csl_iterator; </s> add template <typename ValT, typename NodeT> class csl_iterator; </s> remove namespace folly { namespace detail { </s> add namespace folly { namespace detail { </s> remove #include <folly/MicroSpinLock.h> </s> add </s> remove template<typename ValT, typename NodeT> class detail::csl_iterator : public boost::iterator_facade<csl_iterator<ValT, NodeT>, ValT, boost::forward_traversal_tag> { </s> add template <typename ValT, typename NodeT> class detail::csl_iterator : public boost::iterator_facade< csl_iterator<ValT, NodeT>, ValT, boost::forward_traversal_tag> { </s> remove enum class Op { MOVE, NUKE, FULL, HEAP }; </s> add enum class Op { MOVE, NUKE, HEAP };
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep keep replace replace replace replace keep keep replace replace replace keep keep keep keep
<mask> typedef T value_type; <mask> <mask> template<typename NodeAlloc, typename U, <mask> typename=typename std::enable_if<std::is_convertible<U, T>::value>::type> <mask> static SkipListNode* create( <mask> NodeAlloc& alloc, int height, U&& data, bool isHead = false) { <mask> DCHECK(height >= 1 && height < 64) << height; <mask> <mask> size_t size = sizeof(SkipListNode) + <mask> height * sizeof(std::atomic<SkipListNode*>); <mask> auto* node = static_cast<SkipListNode*>(alloc.allocate(size)); <mask> // do placement new <mask> new (node) SkipListNode(height, std::forward<U>(data), isHead); <mask> return node; <mask> } </s> [sdk33] Update iOS with RN 0.59 </s> remove new (node) SkipListNode(height, std::forward<U>(data), isHead); return node; </s> add return new (storage) SkipListNode(uint8_t(height), std::forward<U>(data), isHead); </s> remove template<typename NodeAlloc> </s> add template <typename NodeAlloc> </s> remove template<typename U, typename=typename std::enable_if<std::is_convertible<U, T>::value>::type> </s> add template < typename U, typename = typename std::enable_if<std::is_convertible<U, T>::value>::type> </s> add size_t size = sizeof(SkipListNode) + node->height_ * sizeof(std::atomic<SkipListNode*>); </s> remove static std::shared_ptr<SkipListType> createInstance(int height, const NodeAlloc& alloc) { </s> add static std::shared_ptr<SkipListType> createInstance( int height, const NodeAlloc& alloc) {
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep keep keep keep replace replace keep keep replace
<mask> size_t size = sizeof(SkipListNode) + <mask> height * sizeof(std::atomic<SkipListNode*>); <mask> auto* node = static_cast<SkipListNode*>(alloc.allocate(size)); <mask> // do placement new <mask> new (node) SkipListNode(height, std::forward<U>(data), isHead); <mask> return node; <mask> } <mask> <mask> template<typename NodeAlloc> </s> [sdk33] Update iOS with RN 0.59 </s> remove size_t size = sizeof(SkipListNode) + height * sizeof(std::atomic<SkipListNode*>); auto* node = static_cast<SkipListNode*>(alloc.allocate(size)); </s> add size_t size = sizeof(SkipListNode) + height * sizeof(std::atomic<SkipListNode*>); auto storage = std::allocator_traits<NodeAlloc>::allocate(alloc, size); </s> remove template<typename NodeAlloc, typename U, typename=typename std::enable_if<std::is_convertible<U, T>::value>::type> static SkipListNode* create( NodeAlloc& alloc, int height, U&& data, bool isHead = false) { </s> add template < typename NodeAlloc, typename U, typename = typename std::enable_if<std::is_convertible<U, T>::value>::type> static SkipListNode* create(NodeAlloc& alloc, int height, U&& data, bool isHead = false) { </s> add size_t size = sizeof(SkipListNode) + node->height_ * sizeof(std::atomic<SkipListNode*>); </s> remove if (node) pred = node; </s> add if (node) { pred = node; } </s> remove template<typename NodeAlloc> static constexpr bool destroyIsNoOp() { return IsArenaAllocator<NodeAlloc>::value && boost::has_trivial_destructor<SkipListNode>::value; } </s> add template <typename NodeAlloc> struct DestroyIsNoOp : StrictConjunction< AllocatorHasTrivialDeallocate<NodeAlloc>, boost::has_trivial_destructor<SkipListNode>> {};
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep keep keep add keep keep keep keep keep keep
<mask> } <mask> <mask> template <typename NodeAlloc> <mask> static void destroy(NodeAlloc& alloc, SkipListNode* node) { <mask> node->~SkipListNode(); <mask> std::allocator_traits<NodeAlloc>::deallocate(alloc, node, size); <mask> } <mask> <mask> template <typename NodeAlloc> <mask> struct DestroyIsNoOp : StrictConjunction< </s> [sdk33] Update iOS with RN 0.59 </s> remove alloc.deallocate(node); </s> add std::allocator_traits<NodeAlloc>::deallocate(alloc, node, size); </s> remove template<typename NodeAlloc> </s> add template <typename NodeAlloc> </s> remove template<typename NodeAlloc> static constexpr bool destroyIsNoOp() { return IsArenaAllocator<NodeAlloc>::value && boost::has_trivial_destructor<SkipListNode>::value; } </s> add template <typename NodeAlloc> struct DestroyIsNoOp : StrictConjunction< AllocatorHasTrivialDeallocate<NodeAlloc>, boost::has_trivial_destructor<SkipListNode>> {}; </s> remove new (node) SkipListNode(height, std::forward<U>(data), isHead); return node; </s> add return new (storage) SkipListNode(uint8_t(height), std::forward<U>(data), isHead); </s> remove void recycle(NodeType *node) { </s> add void recycle(NodeType* node) { </s> remove template<typename NodeType, typename NodeAlloc> class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if< NodeType::template destroyIsNoOp<NodeAlloc>()>::type> { </s> add template <typename NodeType, typename NodeAlloc> class NodeRecycler< NodeType, NodeAlloc, typename std::enable_if< NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> {
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep keep keep keep replace keep keep replace replace replace replace replace keep keep keep keep
<mask> <mask> template<typename NodeAlloc> <mask> static void destroy(NodeAlloc& alloc, SkipListNode* node) { <mask> node->~SkipListNode(); <mask> alloc.deallocate(node); <mask> } <mask> <mask> template<typename NodeAlloc> <mask> static constexpr bool destroyIsNoOp() { <mask> return IsArenaAllocator<NodeAlloc>::value && <mask> boost::has_trivial_destructor<SkipListNode>::value; <mask> } <mask> <mask> // copy the head node to a new head node assuming lock acquired <mask> SkipListNode* copyHead(SkipListNode* node) { <mask> DCHECK(node != nullptr && height_ > node->height_); </s> [sdk33] Update iOS with RN 0.59 </s> remove for (int i = 0; i < node->height_; ++i) { </s> add for (uint8_t i = 0; i < node->height_; ++i) { </s> remove template<typename NodeAlloc> </s> add template <typename NodeAlloc> </s> remove new (node) SkipListNode(height, std::forward<U>(data), isHead); return node; </s> add return new (storage) SkipListNode(uint8_t(height), std::forward<U>(data), isHead); </s> add size_t size = sizeof(SkipListNode) + node->height_ * sizeof(std::atomic<SkipListNode*>); </s> remove for (node = skip(0); (node != nullptr && node->markedForRemoval()); node = node->skip(0)) {} </s> add for (node = skip(0); (node != nullptr && node->markedForRemoval()); node = node->skip(0)) { }
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
keep keep keep keep replace keep keep keep keep keep
<mask> // copy the head node to a new head node assuming lock acquired <mask> SkipListNode* copyHead(SkipListNode* node) { <mask> DCHECK(node != nullptr && height_ > node->height_); <mask> setFlags(node->getFlags()); <mask> for (int i = 0; i < node->height_; ++i) { <mask> setSkip(i, node->skip(i)); <mask> } <mask> return this; <mask> } <mask> </s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename NodeAlloc> static constexpr bool destroyIsNoOp() { return IsArenaAllocator<NodeAlloc>::value && boost::has_trivial_destructor<SkipListNode>::value; } </s> add template <typename NodeAlloc> struct DestroyIsNoOp : StrictConjunction< AllocatorHasTrivialDeallocate<NodeAlloc>, boost::has_trivial_destructor<SkipListNode>> {}; </s> remove hints_[i] = i + 1; </s> add hints_[i] = uint8_t(i + 1); </s> remove Skipper& operator ++() { </s> add Skipper& operator++() { </s> remove for (std::size_t i = 0; i < idx; ++i) { mem[i].~T(); </s> add for (SizeType i = 0; i <= pos; ++i) { out[i].~T(); </s> remove for (node = skip(0); (node != nullptr && node->markedForRemoval()); node = node->skip(0)) {} </s> add for (node = skip(0); (node != nullptr && node->markedForRemoval()); node = node->skip(0)) { } </s> remove for (size_t i = 0; i < n; ++i) { op(&mem[idx]); ++idx; </s> add if (begin + pos < end) { this->moveToUninitialized(begin + pos, end, out + pos + 1);
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h