Creates a new global symbol `key` with `proto`.
(
&mut self,
key: SymbolKey,
proto: SymbolPrototype,
)
| 177 | |
| 178 | /// Creates a new global symbol `key` with `proto`. |
| 179 | pub(crate) fn put_global( |
| 180 | &mut self, |
| 181 | key: SymbolKey, |
| 182 | proto: SymbolPrototype, |
| 183 | ) -> Result<Register> { |
| 184 | put_var(key, proto, &mut self.globals, Register::global, RegisterScope::Global) |
| 185 | } |
| 186 | |
| 187 | /// Returns true if a global variable `key` is already defined. |
| 188 | pub(crate) fn contains_global(&self, key: &SymbolKey) -> bool { |