feat(ivy): select instruction now generated in front of all relevant instructions (#29546)
PR Close #29546
This commit is contained in:
@ -122,9 +122,10 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
|
||||
private _updateCodeFns: (() => o.Statement)[] = [];
|
||||
/**
|
||||
* Memorizes the last node index for which a select instruction has been generated.
|
||||
* Initialized to 0 to avoid generating a useless select(0).
|
||||
* We're initializing this to -1 to ensure the `select(0)` instruction is generated before any
|
||||
* relevant update instructions.
|
||||
*/
|
||||
private _lastNodeIndexWithFlush: number = 0;
|
||||
private _lastNodeIndexWithFlush: number = -1;
|
||||
/** Temporary variable declarations generated from visiting pipes, literals, etc. */
|
||||
private _tempVariables: o.Statement[] = [];
|
||||
/**
|
||||
|
Reference in New Issue
Block a user