Skip to content

Commit

Permalink
Update on "[compiler] Add lowerContextAccess pass"
Browse files Browse the repository at this point in the history
*This is only for internal profiling, not intended to ship.*

This pass is intended to be used with #30407.

This pass synthesizes selector functions by collecting immediately
destructured context acesses. We bailout for other types of context
access.

This pass lowers context access to use a selector function by passing
the synthesized selector function as the second argument.

[ghstack-poisoned]
  • Loading branch information
gsathya committed Jul 31, 2024
1 parent 3c04f89 commit 4a5ee1d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
LoadLocal,
Place,
PropertyLoad,
ReturnTerminal,
isUseContextHookType,
makeBlockId,
makeIdentifierId,
Expand Down Expand Up @@ -284,7 +283,7 @@ function emitSelectorFn(env: Environment, keys: Array<string>): Instruction {
return fnInstr;
}

function emitArrayInstr(elements: Place[], env: Environment): Instruction {
function emitArrayInstr(elements: Array<Place>, env: Environment): Instruction {
const array: ArrayExpression = {
kind: 'ArrayExpression',
elements,
Expand Down

0 comments on commit 4a5ee1d

Please sign in to comment.