Skip to content
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

Implement inlining for #ifNil:*, #ifNotNil:* selectors #59

Merged
merged 5 commits into from
Feb 21, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Explicitly convert size_t to signed for stack access
Signed-off-by: Stefan Marr <git@stefan-marr.de>
smarr committed Feb 20, 2025
commit 5df73e947683562adccee695703fab952d47200a
2 changes: 1 addition & 1 deletion src/vmobjects/VMFrame.h
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ class VMFrame : public AbstractVMObject {
}

[[nodiscard]] inline vm_oop_t GetStackElement(size_t index) const {
return load_ptr(stack_ptr[-index]);
return load_ptr(stack_ptr[-std::make_signed_t<int64_t>(index)]);
}

inline vm_oop_t GetLocal(uint8_t index, uint8_t contextLevel) {