Skip to content

Commit ac9e09d

Browse files
sahrensfacebook-github-bot
authored andcommitted
rename ReactBytecode -> UITemplate
Summary: React bytecode is kind of a different thing that sebmarkbage already has in mind so lets keep the namespace separate. Reviewed By: mdvacca Differential Revision: D12896293 fbshipit-source-id: e0f266da6e7a051bcf5defea49b958452342754d
1 parent ccc8a42 commit ac9e09d

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

ReactCommon/fabric/uimanager/Scheduler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <fabric/uimanager/ComponentDescriptorRegistry.h>
1212
#include <fabric/uimanager/FabricUIManager.h>
1313
#include <fabric/uimanager/JSIFabricUIManager.h>
14-
#include <fabric/uimanager/ReactBytecodeInterpreter.h>
14+
#include <fabric/uimanager/UITemplateProcessor.h>
1515

1616
#include "ComponentDescriptorFactory.h"
1717
#include "Differentiator.h"
@@ -85,7 +85,7 @@ void Scheduler::renderTemplateToSurface(
8585
return;
8686
}
8787
NativeModuleRegistry nMR;
88-
auto tree = ReactBytecodeInterpreter::buildShadowTree(
88+
auto tree = UITemplateProcessor::buildShadowTree(
8989
uiTemplate,
9090
surfaceId,
9191
folly::dynamic::object(),

ReactCommon/fabric/uimanager/ReactBytecodeInterpreter.cpp renamed to ReactCommon/fabric/uimanager/UITemplateProcessor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
#include "ReactBytecodeInterpreter.h"
8+
#include "UITemplateProcessor.h"
99

1010
#include <fabric/components/view/ViewComponentDescriptor.h>
1111
#include <fabric/components/view/ViewProps.h>
@@ -32,7 +32,7 @@ struct RBCContext {
3232
};
3333

3434
// TODO: use RBCContext instead of all the separate arguments.
35-
SharedShadowNode ReactBytecodeInterpreter::runCommand(
35+
SharedShadowNode UITemplateProcessor::runCommand(
3636
const folly::dynamic &command,
3737
Tag rootTag,
3838
std::vector<SharedShadowNode> &nodes,
@@ -97,14 +97,14 @@ SharedShadowNode ReactBytecodeInterpreter::runCommand(
9797
return nullptr;
9898
}
9999

100-
SharedShadowNode ReactBytecodeInterpreter::buildShadowTree(
100+
SharedShadowNode UITemplateProcessor::buildShadowTree(
101101
const std::string &jsonStr,
102102
Tag rootTag,
103103
const folly::dynamic &params,
104104
const ComponentDescriptorRegistry &componentDescriptorRegistry,
105105
const NativeModuleRegistry &nativeModuleRegistry) {
106106
LOG(INFO)
107-
<< "(strt) ReactBytecodeInterpreter inject hardcoded 'server rendered' view tree";
107+
<< "(strt) UITemplateProcessor inject hardcoded 'server rendered' view tree";
108108

109109
std::string content = jsonStr;
110110
for (const auto &param : params.items()) {

ReactCommon/fabric/uimanager/ReactBytecodeInterpreter.h renamed to ReactCommon/fabric/uimanager/UITemplateProcessor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class NativeModuleRegistry {
4141
std::unordered_map<std::string, NativeModuleCallFn> modules_;
4242
};
4343

44-
class ReactBytecodeInterpreter {
44+
class UITemplateProcessor {
4545
public:
4646
static SharedShadowNode buildShadowTree(
4747
const std::string &jsonStr,

ReactCommon/fabric/uimanager/tests/ReactBytecodeInterpreterTest.cpp renamed to ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <exception>
99

1010
#include <fabric/uimanager/ComponentDescriptorFactory.h>
11-
#include <fabric/uimanager/ReactBytecodeInterpreter.h>
11+
#include <fabric/uimanager/UITemplateProcessor.h>
1212
#include <gtest/gtest.h>
1313

1414
using namespace facebook::react;
@@ -66,7 +66,7 @@ NativeModuleRegistry buildNativeModuleRegistry() {
6666
} // namespace react
6767
} // namespace facebook
6868

69-
TEST(ReactBytecodeInterpreterTest, testSimpleBytecode) {
69+
TEST(UITemplateProcessorTest, testSimpleBytecode) {
7070
auto surfaceId = 11;
7171
auto componentDescriptorRegistry =
7272
ComponentDescriptorFactory::buildRegistry(nullptr, nullptr);
@@ -80,7 +80,7 @@ TEST(ReactBytecodeInterpreterTest, testSimpleBytecode) {
8080

8181
mockSimpleTestValue_ = true;
8282

83-
auto root1 = ReactBytecodeInterpreter::buildShadowTree(
83+
auto root1 = UITemplateProcessor::buildShadowTree(
8484
bytecode,
8585
surfaceId,
8686
folly::dynamic::object(),
@@ -97,7 +97,7 @@ TEST(ReactBytecodeInterpreterTest, testSimpleBytecode) {
9797
ASSERT_STREQ(child_props1->testId.c_str(), "child");
9898
}
9999

100-
TEST(ReactBytecodeInterpreterTest, testConditionalBytecode) {
100+
TEST(UITemplateProcessorTest, testConditionalBytecode) {
101101
auto surfaceId = 11;
102102
auto componentDescriptorRegistry =
103103
ComponentDescriptorFactory::buildRegistry(nullptr, nullptr);
@@ -115,7 +115,7 @@ TEST(ReactBytecodeInterpreterTest, testConditionalBytecode) {
115115

116116
mockSimpleTestValue_ = true;
117117

118-
auto root1 = ReactBytecodeInterpreter::buildShadowTree(
118+
auto root1 = UITemplateProcessor::buildShadowTree(
119119
bytecode,
120120
surfaceId,
121121
folly::dynamic::object(),
@@ -132,7 +132,7 @@ TEST(ReactBytecodeInterpreterTest, testConditionalBytecode) {
132132

133133
mockSimpleTestValue_ = false;
134134

135-
auto root2 = ReactBytecodeInterpreter::buildShadowTree(
135+
auto root2 = UITemplateProcessor::buildShadowTree(
136136
bytecode,
137137
surfaceId,
138138
folly::dynamic::object(),

0 commit comments

Comments
 (0)