File tree Expand file tree Collapse file tree 5 files changed +3
-6
lines changed
compiler/packages/babel-plugin-react-compiler/src Expand file tree Collapse file tree 5 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -759,7 +759,6 @@ export type Phi = {
759759 kind : 'Phi' ;
760760 id : Identifier ;
761761 operands : Map < BlockId , Identifier > ;
762- type : Type ;
763762} ;
764763
765764/**
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ export function printPhi(phi: Phi): string {
165165 const items = [ ] ;
166166 items . push ( printIdentifier ( phi . id ) ) ;
167167 items . push ( printMutableRange ( phi . id ) ) ;
168- items . push ( printType ( phi . type ) ) ;
168+ items . push ( printType ( phi . id . type ) ) ;
169169 items . push ( ': phi(' ) ;
170170 const phis = [ ] ;
171171 for ( const [ blockId , id ] of phi . operands ) {
Original file line number Diff line number Diff line change @@ -192,7 +192,6 @@ class SSABuilder {
192192 kind : 'Phi' ,
193193 id : newId ,
194194 operands : predDefs ,
195- type : makeType ( ) ,
196195 } ;
197196
198197 block . phis . add ( phi ) ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export function inferTypes(func: HIRFunction): void {
6868function apply ( func : HIRFunction , unifier : Unifier ) : void {
6969 for ( const [ _ , block ] of func . body . blocks ) {
7070 for ( const phi of block . phis ) {
71- phi . type = unifier . get ( phi . type ) ;
71+ phi . id . type = unifier . get ( phi . id . type ) ;
7272 }
7373 for ( const instr of block . instructions ) {
7474 for ( const operand of eachInstructionLValue ( instr ) ) {
@@ -126,7 +126,7 @@ function* generate(
126126 const returnTypes : Array < Type > = [ ] ;
127127 for ( const [ _ , block ] of func . body . blocks ) {
128128 for ( const phi of block . phis ) {
129- yield equation ( phi . type , {
129+ yield equation ( phi . id . type , {
130130 kind : 'Phi' ,
131131 operands : [ ...phi . operands . values ( ) ] . map ( id => id . type ) ,
132132 } ) ;
Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ export function propagatePhiTypes(fn: HIRFunction): void {
7676 }
7777 if ( type !== null ) {
7878 phi . id . type = type ;
79- phi . type = type ;
8079 propagated . add ( phi . id . id ) ;
8180 }
8281 }
You can’t perform that action at this time.
0 commit comments