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

[x/programs] add program abstraction #660

Merged
merged 29 commits into from
Jan 7, 2024
Merged

[x/programs] add program abstraction #660

merged 29 commits into from
Jan 7, 2024

Conversation

hexfusion
Copy link
Contributor

Depends on #657 and #658

Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
@hexfusion hexfusion changed the title Refactor/program [x/programs] add program abstraction Dec 22, 2023
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
@hexfusion hexfusion marked this pull request as ready for review December 22, 2023 17:22
x/programs/examples/imports/wrap/wrap.go Outdated Show resolved Hide resolved
x/programs/host/link.go Show resolved Hide resolved
x/programs/program/memory.go Show resolved Hide resolved
import "math"

// EnsureInt64ToInt32 returns true if a [v] (int64) can be safely converted to an int32.
func EnsureInt64ToInt32(v int64) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this func since we don't use it

samliok
samliok previously approved these changes Jan 6, 2024
return nil, err
}

exp, err = i.GetExport(program.AllocFnName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we require the instance to export an alloc function here, might make sense to make this optional

@patrick-ogrady patrick-ogrady merged commit 1254ce9 into main Jan 7, 2024
22 checks passed
@patrick-ogrady patrick-ogrady deleted the refactor/program branch January 7, 2024 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants