Update documentation of CrossChunkReferenceCollector#canMoveValue
@@ -321,17 +321,20 @@ public final class CrossChunkReferenceCollector implements ScopedCallback, Compi
/** Determines whether the given value is eligible to be moved across modules. */
private boolean canMoveValue(Scope scope, Node valueNode) {
// the value is only movable if it's
- // a) nothing,
- // b) a constant literal,
- // c) a function, or
- // d) an array/object literal of movable values.
- // e) a function stub generated by CrossChunkMethodMotion.
+ // - nothing,
+ // - a constant literal,
+ // - a function
+ // - class without computed properties, or whose computed properties expressions are moveable
+ // - an array/object literal of movable values
+ // - a template literal with movable substitutions
+ // - a function stub generated by CrossChunkMethodMotion.
if (valueNode == null || NodeUtil.isLiteralValue(valueNode, true) || valueNode.isFunction()) {
return true;
}
switch (valueNode.getToken()) {
case CLASS:
+ // NOTE: Why aren't class extends expressions checked here?
Node classMembers = valueNode.getLastChild();
for (Node member = classMembers.getFirstChild();
member != null;
