From 3e8db1042ad9852091b4d3a3ad0da3f083cad2ca Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Sat, 24 Apr 2021 23:43:34 +0200 Subject: [PATCH] fix ivar and fvar lookup code --- src/cs_parser.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/cs_parser.cc b/src/cs_parser.cc index 9ecf43e..268d0e6 100644 --- a/src/cs_parser.cc +++ b/src/cs_parser.cc @@ -481,26 +481,32 @@ lookup_id: ); switch (id.get_type()) { case ident_type::IVAR: + if (ltype == VAL_POP) { + return; + } + gs.gen_lookup_ivar(id, ltype); switch (ltype) { case VAL_CODE: case VAL_IDENT: - gs.gen_lookup_ivar(id, ltype); + lookup_done(gs, ltype); break; default: - return; + break; } - lookup_done(gs, ltype); return; case ident_type::FVAR: + if (ltype == VAL_POP) { + return; + } + gs.gen_lookup_fvar(id, ltype); switch (ltype) { case VAL_CODE: case VAL_IDENT: - gs.gen_lookup_fvar(id, ltype); + lookup_done(gs, ltype); break; default: - return; + break; } - lookup_done(gs, ltype); return; case ident_type::SVAR: switch (ltype) {