diff --git a/ReactCommon/fabric/uimanager/Scheduler.cpp b/ReactCommon/fabric/uimanager/Scheduler.cpp index 04ca1cccc93..92436b62683 100644 --- a/ReactCommon/fabric/uimanager/Scheduler.cpp +++ b/ReactCommon/fabric/uimanager/Scheduler.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "ComponentDescriptorFactory.h" #include "Differentiator.h" @@ -85,7 +85,7 @@ void Scheduler::renderTemplateToSurface( return; } NativeModuleRegistry nMR; - auto tree = ReactBytecodeInterpreter::buildShadowTree( + auto tree = UITemplateProcessor::buildShadowTree( uiTemplate, surfaceId, folly::dynamic::object(), diff --git a/ReactCommon/fabric/uimanager/ReactBytecodeInterpreter.cpp b/ReactCommon/fabric/uimanager/UITemplateProcessor.cpp similarity index 95% rename from ReactCommon/fabric/uimanager/ReactBytecodeInterpreter.cpp rename to ReactCommon/fabric/uimanager/UITemplateProcessor.cpp index 58460f1e44b..13045a3fdbc 100644 --- a/ReactCommon/fabric/uimanager/ReactBytecodeInterpreter.cpp +++ b/ReactCommon/fabric/uimanager/UITemplateProcessor.cpp @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#include "ReactBytecodeInterpreter.h" +#include "UITemplateProcessor.h" #include #include @@ -32,7 +32,7 @@ struct RBCContext { }; // TODO: use RBCContext instead of all the separate arguments. -SharedShadowNode ReactBytecodeInterpreter::runCommand( +SharedShadowNode UITemplateProcessor::runCommand( const folly::dynamic &command, Tag rootTag, std::vector &nodes, @@ -97,14 +97,14 @@ SharedShadowNode ReactBytecodeInterpreter::runCommand( return nullptr; } -SharedShadowNode ReactBytecodeInterpreter::buildShadowTree( +SharedShadowNode UITemplateProcessor::buildShadowTree( const std::string &jsonStr, Tag rootTag, const folly::dynamic ¶ms, const ComponentDescriptorRegistry &componentDescriptorRegistry, const NativeModuleRegistry &nativeModuleRegistry) { LOG(INFO) - << "(strt) ReactBytecodeInterpreter inject hardcoded 'server rendered' view tree"; + << "(strt) UITemplateProcessor inject hardcoded 'server rendered' view tree"; std::string content = jsonStr; for (const auto ¶m : params.items()) { diff --git a/ReactCommon/fabric/uimanager/ReactBytecodeInterpreter.h b/ReactCommon/fabric/uimanager/UITemplateProcessor.h similarity index 98% rename from ReactCommon/fabric/uimanager/ReactBytecodeInterpreter.h rename to ReactCommon/fabric/uimanager/UITemplateProcessor.h index 396ce8e7590..3039e1f668a 100644 --- a/ReactCommon/fabric/uimanager/ReactBytecodeInterpreter.h +++ b/ReactCommon/fabric/uimanager/UITemplateProcessor.h @@ -41,7 +41,7 @@ class NativeModuleRegistry { std::unordered_map modules_; }; -class ReactBytecodeInterpreter { +class UITemplateProcessor { public: static SharedShadowNode buildShadowTree( const std::string &jsonStr, diff --git a/ReactCommon/fabric/uimanager/tests/ReactBytecodeInterpreterTest.cpp b/ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp similarity index 93% rename from ReactCommon/fabric/uimanager/tests/ReactBytecodeInterpreterTest.cpp rename to ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp index ce35f20721a..baca33cdabd 100644 --- a/ReactCommon/fabric/uimanager/tests/ReactBytecodeInterpreterTest.cpp +++ b/ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include using namespace facebook::react; @@ -66,7 +66,7 @@ NativeModuleRegistry buildNativeModuleRegistry() { } // namespace react } // namespace facebook -TEST(ReactBytecodeInterpreterTest, testSimpleBytecode) { +TEST(UITemplateProcessorTest, testSimpleBytecode) { auto surfaceId = 11; auto componentDescriptorRegistry = ComponentDescriptorFactory::buildRegistry(nullptr, nullptr); @@ -80,7 +80,7 @@ TEST(ReactBytecodeInterpreterTest, testSimpleBytecode) { mockSimpleTestValue_ = true; - auto root1 = ReactBytecodeInterpreter::buildShadowTree( + auto root1 = UITemplateProcessor::buildShadowTree( bytecode, surfaceId, folly::dynamic::object(), @@ -97,7 +97,7 @@ TEST(ReactBytecodeInterpreterTest, testSimpleBytecode) { ASSERT_STREQ(child_props1->testId.c_str(), "child"); } -TEST(ReactBytecodeInterpreterTest, testConditionalBytecode) { +TEST(UITemplateProcessorTest, testConditionalBytecode) { auto surfaceId = 11; auto componentDescriptorRegistry = ComponentDescriptorFactory::buildRegistry(nullptr, nullptr); @@ -115,7 +115,7 @@ TEST(ReactBytecodeInterpreterTest, testConditionalBytecode) { mockSimpleTestValue_ = true; - auto root1 = ReactBytecodeInterpreter::buildShadowTree( + auto root1 = UITemplateProcessor::buildShadowTree( bytecode, surfaceId, folly::dynamic::object(), @@ -132,7 +132,7 @@ TEST(ReactBytecodeInterpreterTest, testConditionalBytecode) { mockSimpleTestValue_ = false; - auto root2 = ReactBytecodeInterpreter::buildShadowTree( + auto root2 = UITemplateProcessor::buildShadowTree( bytecode, surfaceId, folly::dynamic::object(),