mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-10-26 23:32:02 +03:00
Improve React fb-www debugging output
Summary: Release note: none Improves the debugging verbose output of fb-www React logs. Closes https://github.com/facebook/prepack/pull/1862 Reviewed By: gaearon Differential Revision: D7862544 Pulled By: trueadm fbshipit-source-id: ccd995d1ea1f2f2ef49962897a64334bb30de91f
This commit is contained in:
parent
4af05bd908
commit
b55c484d1d
@ -1172,6 +1172,9 @@ export class Reconciler {
|
||||
null,
|
||||
evaluatedChildNode
|
||||
);
|
||||
if (this.realm.react.verbose && evaluatedChildNode.status === "INLINED") {
|
||||
this.logger.logInformation(` ✔ ${evaluatedNode.name} (inlined)`);
|
||||
}
|
||||
evaluatedNode.children.push(evaluatedChildNode);
|
||||
result = render.result;
|
||||
this.statistics.inlinedComponents++;
|
||||
|
@ -321,6 +321,9 @@ export class Functions {
|
||||
if (reconciler.hasEvaluatedRootNode(componentType, evaluatedRootNode)) {
|
||||
continue;
|
||||
}
|
||||
if (this.realm.react.verbose) {
|
||||
logger.logInformation(` Evaluating ${evaluatedRootNode.name} (root)`);
|
||||
}
|
||||
let componentTreeEffects = reconciler.renderReactComponentTree(componentType, null, null, evaluatedRootNode);
|
||||
if (componentTreeEffects === null) {
|
||||
if (this.realm.react.verbose) {
|
||||
@ -379,6 +382,9 @@ export class Functions {
|
||||
if (func instanceof ECMAScriptSourceFunctionValue && reconciler.hasEvaluatedRootNode(func, evaluatedNode)) {
|
||||
continue;
|
||||
}
|
||||
if (this.realm.react.verbose) {
|
||||
logger.logInformation(` Evaluating function "${getComponentName(this.realm, func)}"`);
|
||||
}
|
||||
let closureEffects = reconciler.renderNestedOptimizedClosure(
|
||||
func,
|
||||
nestedEffects,
|
||||
@ -441,6 +447,9 @@ export class Functions {
|
||||
continue;
|
||||
}
|
||||
reconciler.clearComponentTreeState();
|
||||
if (this.realm.react.verbose) {
|
||||
logger.logInformation(` Evaluating ${evaluatedNode.name} (branch)`);
|
||||
}
|
||||
let branchEffects = reconciler.renderReactComponentTree(branchComponentType, null, null, evaluatedNode);
|
||||
if (branchEffects === null) {
|
||||
if (this.realm.react.verbose) {
|
||||
|
Loading…
Reference in New Issue
Block a user