-
Notifications
You must be signed in to change notification settings - Fork 0
LessVM Codebase (Run ID: openSVM_lessvm_issue_2_cd25dcd3) #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fix VM initialization by introducing DataStructureStore::new() and add various arithmetic and bitwise operations like Mod, Exp, And, Or, Xor, Not, Shl, Shr and Sar. Improve SIMD vector handling and implement dynamic memory allocation.
Reviewer's Guide by SourceryThis pull request fixes the SIMD vector addition, enhances memory management by using dynamic Vecs, and implements missing opcodes and bitwise operations. The changes improve the VM's functionality and scalability. Sequence diagram for SIMD Vector AdditionsequenceDiagram
participant VM
VM->VM: Load values1 from stack
VM->VM: Pop 4 values from stack
VM->VM: Load values2 from stack
VM->VM: Add values1 and values2
VM->VM: Store result back to stack
Updated class diagram for MemoryclassDiagram
class Memory {
-Vec~u8~ data
-usize size
+new() Memory
+with_capacity(capacity: usize) Memory
+ensure_capacity(required_size: usize) void
+get_byte(offset: usize) Option~u8~
+load(offset: usize, len: usize) Result~Vec~u8~, VMError~
+store(offset: usize, value: []u8) Result~void, VMError~
+store8(offset: usize, value: u8) Result~void, VMError~
+load8(offset: usize) Result~u8, VMError~
+size() usize
+clear() void
+copy(dest: usize, src: usize, len: usize) Result~void, VMError~
+cost(new_size: usize) u64
}
note for Memory "Replaced fixed-size array with dynamic Vec"
Updated class diagram for DataStructureStoreclassDiagram
class DataStructureStore {
-Vec~Option~BTreeMapDS~~ btrees
-Vec~Option~TrieDS~~ tries
-Vec~Option~GraphDS~~ graphs
-Vec~Option~OHLCVDS~~ ohlcvs
-Vec~Option~HypergraphDS~~ hypergraphs
+new() DataStructureStore
+ensure_capacity(data_type: DataStructureType, id: usize) void
}
note for DataStructureStore "Replaced fixed-size arrays with dynamic Vecs"
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have skipped reviewing this pull request. It seems to have been created by a bot (hey, agentfarmx[bot]!). We assume it knows what it's doing!
β Deploy Preview for lessvm ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
agent_instance: openSVM_lessvm_issue_2_cd25dcd3 Tries to fix: #2
π οΈ Fixed SIMD Vector Addition and Enhanced Dynamic Memory Allocation
The changes improve scalability through dynamic memory management and bring the VM implementation in line with the opcodes specification. Please review these improvements, particularly the SIMD implementation which resolves issue #2.
Summary by Sourcery
Improves the VM implementation by fixing a bug in the SIMD vector addition, enhancing memory management with dynamic Vecs, and adding missing opcodes and bitwise operations.
New Features:
Bug Fixes:
Enhancements: