From ca96c97c88e10c5f2d2151b7e5db49c5b9d3dfe5 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 22 Aug 2024 15:47:40 -0400 Subject: [PATCH] nitin: use the new frame read/write API Signed-off-by: Jean Privat --- contrib/nitin/nitin.nit | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/contrib/nitin/nitin.nit b/contrib/nitin/nitin.nit index 96ad052eac..78d6fad99e 100644 --- a/contrib/nitin/nitin.nit +++ b/contrib/nitin/nitin.nit @@ -145,20 +145,19 @@ redef class AMethPropdef if injected_variables == null then return super # Inject main variables in the frame - assert f isa InterpreterFrame for variable, i in injected_variables do - f.map[variable] = i + f.write_variable(variable, v, i) end var res = super # Update the values of the variables for variable in injected_variables.keys do - injected_variables[variable] = f.map[variable] + injected_variables[variable] = f.read_variable(variable, v) end # Retrieve the values of the new main variables for variable in new_variables.as(not null) do - injected_variables[variable] = f.map[variable] + injected_variables[variable] = f.read_variable(variable, v) end return res