fix(ivy): proper slot allocation for pure functions in hostBindings
function (#27587)
Prior to this update, we always returned the number of host vars defined in @Component definition as a value for `allocatePureFunctionsSlot` callback in ValueConverter. As a result, pure function arguments were not accounted for, thus leasing to incorrect slot offsets in `pureFunction` calls. Now we update and return total # of host vars, so the offsets are defined correctly. PR Close #27587
This commit is contained in:

committed by
Alex Rickabaugh

parent
3cb6dad6d5
commit
ceb14deb60
@ -666,11 +666,11 @@ function createHostBindingsFunction(
|
||||
return convertPropertyBinding(
|
||||
null, implicit, value, 'b', BindingForm.TrySimple, () => error('Unexpected interpolation'));
|
||||
};
|
||||
|
||||
if (bindings) {
|
||||
const hostVarsCountFn = (numSlots: number): number => {
|
||||
const originalVarsCount = totalHostVarsCount;
|
||||
totalHostVarsCount += numSlots;
|
||||
return hostVarsCount;
|
||||
return originalVarsCount;
|
||||
};
|
||||
const valueConverter = new ValueConverter(
|
||||
constantPool,
|
||||
|
Reference in New Issue
Block a user