comparison libinterp/corefcn/symscope.cc @ 25201:c80323fe4938 stable

improve handling of global symbols (bug #53599) * load-save.cc (install_loaded_variable): For global values, check global status and link to global symbol if needed. * symrec.h (symbol_record::symbol_record_rep::unbind_global_rep): New function. (symbol_record::symbol_record_rep::clear): Use unbind_global_rep to clearing global symbols. (symbol_record::symbol_record_rep::is_marked_global): New function. (symbol_record::symbol_record_rep::is_global): Use it. (symbol_record::symbol_record_rep::bind_fwd_rep): Don't forward again if symbol is already global. (symbol_record::unbind_fwd_rep): Eliminate argument. Change all uses. (symbol_record::symbol_record_rep::unbind_fwd_rep): Eliminate argument. Simplify. * test/bug-53599.tst: New file. * test/module.mk: Update.
author John W. Eaton <jwe@octave.org>
date Tue, 10 Apr 2018 22:22:37 -0400
parents 6652d3823428
children 0af4653e48a4
comparison
equal deleted inserted replaced
25200:b3ee0179d7b0 25201:c80323fe4938
235 235
236 void 236 void
237 symbol_scope_rep::unbind_script_symbols (void) 237 symbol_scope_rep::unbind_script_symbols (void)
238 { 238 {
239 for (auto& nm_sr : m_symbols) 239 for (auto& nm_sr : m_symbols)
240 nm_sr.second.unbind_fwd_rep (false); 240 nm_sr.second.unbind_fwd_rep ();
241 } 241 }
242 } 242 }