Skip to content

Commit

Permalink
Wrap inline jsx transform codegen in conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Pope committed Oct 15, 2024
1 parent 13411e4 commit 13a005d
Show file tree
Hide file tree
Showing 6 changed files with 625 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const ReactElementSymbolSchema = z.object({
z.literal('react.element'),
z.literal('react.transitional.element'),
]),
globalDevVar: z.string(),
});

export const ExternalFunctionSchema = z.object({
Expand Down
11 changes: 11 additions & 0 deletions compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,17 @@ export function makeTemporaryIdentifier(
};
}

export function forkTemporaryIdentifier(
id: IdentifierId,
source: Identifier,
): Identifier {
return {
...source,
mutableRange: {start: makeInstructionId(0), end: makeInstructionId(0)},
id,
};
}

/**
* Creates a valid identifier name. This should *not* be used for synthesizing
* identifier names: only call this method for identifier names that appear in the
Expand Down
Loading

0 comments on commit 13a005d

Please sign in to comment.