mirror of
https://github.com/morluto/rea.git
synced 2026-11-09 08:17:02 +00:00
fix(javascript): preserve uncertain call targets across activation boundaries
This commit is contained in:
1 parent
599fdac029
commit
3b02179560
7 files changed
+180
-13
No files matched your search
@@ -13,6 +13,15 @@ export type JavaScriptSemanticIterationCardinality =
|
||||
| "nonempty"
|
||||
| "unknown";
|
||||
|
||||
/** Whether a method's computed key executes in the enclosing environment. */
|
||||
export const semanticComputedMethodKey = (
|
||||
parent: t.Node | undefined,
|
||||
child: t.Node,
|
||||
): boolean =>
|
||||
(t.isObjectMethod(parent) || t.isClassMethod(parent)) &&
|
||||
parent.computed &&
|
||||
parent.key === child;
|
||||
|
||||
/** Exact source-only cardinality for literal loop heads. */
|
||||
export const semanticIterationCardinality = (
|
||||
loop: t.ForInStatement | t.ForOfStatement,
|
||||
|
||||
Reference in new issue
Block a user