From 574f7ea7a1f5d5bc03a92ea64f72f2509e253edc Mon Sep 17 00:00:00 2001 From: Jesse Brault Date: Fri, 27 Dec 2024 11:31:19 -0600 Subject: [PATCH] Add `load_object` to op codes documentation. --- doc/dvm.asciidoc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/doc/dvm.asciidoc b/doc/dvm.asciidoc index b4a92a5..5d4374e 100644 --- a/doc/dvm.asciidoc +++ b/doc/dvm.asciidoc @@ -152,9 +152,27 @@ The source register must contain a `DvmValue::Object` at runtime. === Load Boolean +=== Load Object + +Loads the target register with the `DvmValue::Object` stored at the offset from the base of the object stored in the +source register. + +[source] +---- +load_object( + target_register: u8, + source_register: u8, + offset: usize +) +---- + +The source register must contain a `DvmValue::Object` at runtime, and the data at the offset from that object's base +must be a valid `Rc`. + === Store -Stores the value contained in the source register to the offset from the base of the object contained in the target register. +Stores the value contained in the source register to the offset from the base of the object contained in the target +register. [source] ---- @@ -180,7 +198,8 @@ alloc( ) ---- -The `implementation_name` is the bytes array of a UTF-8-encoded string, and `implementation_name_length` is the length of that array. +The `implementation_name` is the bytes array of a UTF-8-encoded string, and `implementation_name_length` is the length +of that array. === Deallocate