MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / add_constant

Method add_constant

aiscript-vm/src/chunk.rs:202–207  ·  view source on GitHub ↗
(&mut self, value: Value<'gc>)

Source from the content-addressed store, hash-verified

200 }
201
202 pub fn add_constant(&mut self, value: Value<'gc>) -> usize {
203 self.constans.push(value);
204 // return the index where the constant
205 // was appended so that we can locate that same constant later
206 self.constans.len() - 1
207 }
208
209 #[inline]
210 pub fn read_constant(&self, byte: u8) -> Value<'gc> {

Callers 1

make_constantMethod · 0.80

Calls 2

pushMethod · 0.80
lenMethod · 0.80

Tested by

no test coverage detected