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 = {
759
759
kind : 'Phi' ;
760
760
id : Identifier ;
761
761
operands : Map < BlockId , Identifier > ;
762
- type : Type ;
763
762
} ;
764
763
765
764
/**
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ export function printPhi(phi: Phi): string {
165
165
const items = [ ] ;
166
166
items . push ( printIdentifier ( phi . id ) ) ;
167
167
items . push ( printMutableRange ( phi . id ) ) ;
168
- items . push ( printType ( phi . type ) ) ;
168
+ items . push ( printType ( phi . id . type ) ) ;
169
169
items . push ( ': phi(' ) ;
170
170
const phis = [ ] ;
171
171
for ( const [ blockId , id ] of phi . operands ) {
Original file line number Diff line number Diff line change @@ -192,7 +192,6 @@ class SSABuilder {
192
192
kind : 'Phi' ,
193
193
id : newId ,
194
194
operands : predDefs ,
195
- type : makeType ( ) ,
196
195
} ;
197
196
198
197
block . phis . add ( phi ) ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export function inferTypes(func: HIRFunction): void {
68
68
function apply ( func : HIRFunction , unifier : Unifier ) : void {
69
69
for ( const [ _ , block ] of func . body . blocks ) {
70
70
for ( const phi of block . phis ) {
71
- phi . type = unifier . get ( phi . type ) ;
71
+ phi . id . type = unifier . get ( phi . id . type ) ;
72
72
}
73
73
for ( const instr of block . instructions ) {
74
74
for ( const operand of eachInstructionLValue ( instr ) ) {
@@ -126,7 +126,7 @@ function* generate(
126
126
const returnTypes : Array < Type > = [ ] ;
127
127
for ( const [ _ , block ] of func . body . blocks ) {
128
128
for ( const phi of block . phis ) {
129
- yield equation ( phi . type , {
129
+ yield equation ( phi . id . type , {
130
130
kind : 'Phi' ,
131
131
operands : [ ...phi . operands . values ( ) ] . map ( id => id . type ) ,
132
132
} ) ;
Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ export function propagatePhiTypes(fn: HIRFunction): void {
76
76
}
77
77
if ( type !== null ) {
78
78
phi . id . type = type ;
79
- phi . type = type ;
80
79
propagated . add ( phi . id . id ) ;
81
80
}
82
81
}
You can’t perform that action at this time.
0 commit comments