Skip to content

Commit ca96c97

Browse files
committed
nitin: use the new frame read/write API
Signed-off-by: Jean Privat <[email protected]>
1 parent 09c3e97 commit ca96c97

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

contrib/nitin/nitin.nit

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,19 @@ redef class AMethPropdef
145145
if injected_variables == null then return super
146146

147147
# Inject main variables in the frame
148-
assert f isa InterpreterFrame
149148
for variable, i in injected_variables do
150-
f.map[variable] = i
149+
f.write_variable(variable, v, i)
151150
end
152151

153152
var res = super
154153

155154
# Update the values of the variables
156155
for variable in injected_variables.keys do
157-
injected_variables[variable] = f.map[variable]
156+
injected_variables[variable] = f.read_variable(variable, v)
158157
end
159158
# Retrieve the values of the new main variables
160159
for variable in new_variables.as(not null) do
161-
injected_variables[variable] = f.map[variable]
160+
injected_variables[variable] = f.read_variable(variable, v)
162161
end
163162

164163
return res

0 commit comments

Comments
 (0)