Constants and identifiers
(&mut self, value: Value<'gc>)
| 1747 | |
| 1748 | // Constants and identifiers |
| 1749 | fn make_constant(&mut self, value: Value<'gc>) -> usize { |
| 1750 | let constant = self.function.add_constant(value); |
| 1751 | if constant > u8::MAX as usize { |
| 1752 | self.error_at_value(value, "Too many constants in one chunk."); |
| 1753 | 0 |
| 1754 | } else { |
| 1755 | constant |
| 1756 | } |
| 1757 | } |
| 1758 | |
| 1759 | fn identifier_constant(&mut self, name: &str) -> usize { |
| 1760 | let s = self.ctx.intern(name.as_bytes()); |
no test coverage detected