Skip to content

Commit 395fab6

Browse files
authored
Add missing files from internal repo sync (#8)
* Add missing files from internal repo sync * Update PR template to warn people to submit to microsoft/rn
1 parent c52bd10 commit 395fab6

14 files changed

+899
-4998
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
GitHub Issues in the `facebook/react-native` repository are used exclusively for tracking bugs in React Native.
1+
GitHub Issues in the `Microsoft/react-native` repository are used exclusively for tracking bugs in the Microsoft/React Native fork. If the issue concerns Facebook's react-native, submit the issue to facebook/react-native.
22

33
Please take a look at the issue templates at https://github.com/facebook/react-native/issues/new/choose before submitting a new issue. Following one of the issue templates will ensure maintainers can route your request efficiently. Thanks!

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,2 @@
1-
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
2-
Help us understand your motivation by explaining why you decided to make this change.
1+
<!-- Make sure you are targeting Microsoft/react-native for your PR, if you mean to submit your change to the Microsoft fork, instead of to Facebook's react-native -->
32

4-
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
5-
6-
Test Plan:
7-
----------
8-
Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
9-
10-
Release Notes:
11-
--------------
12-
Help reviewers and the release process by writing your own release notes. See below for an example.
13-
14-
[CATEGORY] [TYPE] [LOCATION] - Message
15-
16-
<!--
17-
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
18-
19-
CATEGORY
20-
[----------] TYPE
21-
[ CLI ] [-------------] LOCATION
22-
[ DOCS ] [ BREAKING ] [-------------]
23-
[ GENERAL ] [ BUGFIX ] [ {Component} ]
24-
[ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ]
25-
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
26-
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
27-
[----------] [-------------] [-------------] |-----------|
28-
29-
EXAMPLES:
30-
31-
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
32-
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
33-
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
34-
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
35-
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
36-
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
37-
-->

.gitignore

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<<<<<<< HEAD
21
# Xcode
32
!**/*.xcodeproj
43
!**/*.pbxproj
@@ -53,10 +52,6 @@ node_modules
5352
*.log
5453
.nvm
5554
/bots/node_modules/
56-
57-
# TODO: Check in yarn.lock in open source. Right now we need to keep it out
58-
# from the GitHub repo as importing it might conflict with internal workspaces
59-
yarn.lock
6055
package-lock.json
6156

6257
# OS X
@@ -69,76 +64,12 @@ package-lock.json
6964
/coverage
7065
/third-party
7166
/packages/
72-
=======
73-
# Xcode
74-
!**/*.xcodeproj
75-
!**/*.pbxproj
76-
!**/*.xcworkspacedata
77-
!**/*.xcsettings
78-
!**/*.xcscheme
79-
*.pbxuser
80-
!default.pbxuser
81-
*.mode1v3
82-
!default.mode1v3
83-
*.mode2v3
84-
!default.mode2v3
85-
*.perspectivev3
86-
!default.perspectivev3
87-
xcuserdata
88-
*.xccheckout
89-
*.moved-aside
90-
DerivedData
91-
*.hmap
92-
*.ipa
93-
*.xcuserstate
94-
project.xcworkspace
95-
96-
# Gradle
97-
/build/
98-
/RNTester/android/app/build/
99-
/RNTester/android/app/gradle/
100-
/RNTester/android/app/gradlew
101-
/RNTester/android/app/gradlew.bat
102-
/ReactAndroid/build/
10367

104-
# Buck
105-
.buckd
106-
buck-out
107-
/ReactAndroid/src/main/jni/prebuilt/lib/armeabi-v7a/
108-
/ReactAndroid/src/main/jni/prebuilt/lib/x86/
109-
/ReactAndroid/src/main/gen
110-
111-
# Watchman
112-
.watchmanconfig
113-
114-
# Android
115-
.idea
116-
.gradle
117-
local.properties
118-
*.iml
119-
/android/
120-
121-
# Node
122-
node_modules
123-
*.log
124-
.nvm
125-
/bots/node_modules/
126-
package-lock.json
127-
128-
# OS X
129-
.DS_Store
130-
131-
# Test generated files
132-
/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
133-
*.js.meta
134-
135-
/coverage
13668
/third-party
13769

13870
# Root dir shouldn't have Xcode project
13971
/*.xcodeproj
14072

14173
# ReactCommon subdir shouldn't have Xcode project
14274
/ReactCommon/**/*.xcodeproj
143-
RNTester/build
144-
>>>>>>> v0.57.0
75+
RNTester/build

Folly/folly/docs/Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
SOURCES=$(wildcard *.md)
2+
PDF=$(SOURCES:%.md=%.pdf)
3+
HTML=$(SOURCES:%.md=%.html)
4+
INSTALL=install -c -m 644
5+
PYTHON=python
6+
PANDOCARGS=-s
7+
PANDOC=/usr/bin/pandoc
8+
9+
export LANGUAGE=C
10+
export LC_ALL=C
11+
12+
all: html index.html
13+
14+
pdf: $(PDF)
15+
16+
html: $(HTML)
17+
18+
# This needs pandoc 1.9 or later to work
19+
%.pdf: %.md
20+
$(PANDOC) -f markdown -o $*.pdf $*.md
21+
22+
%.html: %.md style.css
23+
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t html --toc -o $*.html $*.md
24+
25+
docs.md: $(SOURCES) style.css
26+
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t markdown --toc -o $@ *.md
27+
28+
index.html: $(SOURCES) style.css
29+
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t html --toc -o $@ *.md
30+
31+
32+
clean:
33+
$(RM) $(PDF) $(HTML) index.html
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ACLOCAL_AMFLAGS = -I m4
2+
3+
# depends on libfollybenchmark
4+
5+
# TESTS = function_benchmark
6+
7+
# check_PROGRAMS = $(TESTS)
8+
9+
# noinst_HEADERS = test_functions.h benchmark_impl.h
10+
11+
# function_benchmark_SOURCES = benchmark_impl.cpp main.cpp test_functions.cpp
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright 2017 Facebook, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include <folly/test/function_benchmark/benchmark_impl.h>
18+
19+
#include <folly/test/function_benchmark/test_functions.h>
20+
21+
/*
22+
* These functions are defined in a separate file so that gcc won't be able to
23+
* inline them and optimize away the indirect calls.
24+
*/
25+
26+
void BM_fn_ptr_invoke_impl(int iters, void (*fn)()) {
27+
for (int n = 0; n < iters; ++n) {
28+
fn();
29+
}
30+
}
31+
32+
void BM_std_function_invoke_impl(int iters,
33+
const std::function<void()>& fn) {
34+
for (int n = 0; n < iters; ++n) {
35+
fn();
36+
}
37+
}
38+
39+
void BM_Function_invoke_impl(int iters,
40+
const folly::Function<void() const>& fn) {
41+
for (int n = 0; n < iters; ++n) {
42+
fn();
43+
}
44+
}
45+
46+
void BM_mem_fn_invoke_impl(int iters,
47+
TestClass* tc,
48+
void (TestClass::*memfn)()) {
49+
for (int n = 0; n < iters; ++n) {
50+
(tc->*memfn)();
51+
}
52+
}
53+
54+
void BM_virtual_fn_invoke_impl(int iters, VirtualClass* vc) {
55+
for (int n = 0; n < iters; ++n) {
56+
vc->doNothing();
57+
}
58+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright 2017 Facebook, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#pragma once
18+
19+
#include <functional>
20+
21+
#include <folly/Function.h>
22+
23+
class TestClass;
24+
class VirtualClass;
25+
26+
void BM_fn_ptr_invoke_impl(int iters, void (*fn)());
27+
void BM_std_function_invoke_impl(int iters, const std::function<void()>& fn);
28+
void BM_Function_invoke_impl(int iters,
29+
const folly::Function<void() const>& fn);
30+
void BM_mem_fn_invoke_impl(int iters,
31+
TestClass* tc,
32+
void (TestClass::*memfn)());
33+
void BM_virtual_fn_invoke_impl(int iters, VirtualClass* vc);
34+
35+
// Inlined version of BM_fn_ptr_invoke_impl().
36+
// The compiler could potentially even optimize the call to the function
37+
// pointer if it is a constexpr.
38+
inline void BM_fn_ptr_invoke_inlined_impl(int iters, void (*fn)()) {
39+
for (int n = 0; n < iters; ++n) {
40+
fn();
41+
}
42+
}
43+
44+
// Invoke a function object as a template parameter.
45+
// This can be used to directly invoke lambda functions
46+
template<typename T>
47+
void BM_invoke_fn_template_impl(int iters, const T& fn) {
48+
for (int n = 0; n < iters; ++n) {
49+
fn();
50+
}
51+
}

0 commit comments

Comments
 (0)