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

Refactor bootstrap w.r.p new Fix design #8

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Refactor bootstrap w.r.p new Fix design #8

merged 1 commit into from
Jan 24, 2024

Conversation

yhdengh
Copy link
Contributor

@yhdengh yhdengh commented Jan 24, 2024

No description provided.

Copy link
Contributor

@Akshay-Srivatsan Akshay-Srivatsan left a comment

Choose a reason for hiding this comment

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

A few questions/comments, but otherwise looks good

(call $get_value_type (local.get $input))
(i32.eq (i32.const 2))
(call $is_blob (local.get $input))
(i32.eq (i32.const 1))
Copy link
Contributor

Choose a reason for hiding this comment

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

is this needed? I thought Wasm uses C-style truthiness already

@@ -156,15 +159,17 @@
(table.set $rw_table_2 (i32.const 2) (local.get $curried_cc))
(table.set $rw_table_2 (i32.const 3) (local.get $c_files))
(call $create_tree_rw_table_2 (i32.const 4))
(call $create_thunk)
(call $create_application_thunk)
(call $create_strict_encode)
Copy link
Contributor

Choose a reason for hiding this comment

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

one of the few times I'm glad that Wasm is a stack machine

@@ -0,0 +1,3 @@
[submodule "fix"]
Copy link
Contributor

Choose a reason for hiding this comment

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

is having it as a submodule going to make releases annoying? we could also use a subtree if we don't want to pin a specific version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But fix has submodules...We could probably make it work by copying fix/.gitmodules to bootstrap to make it work but then bootstrap still has submodules.

@@ -4,4 +4,9 @@ SRC=`realpath ${SRC_REL}`
FIX=${SRC}/.fix

mkdir -p ${FIX}
mkdir -p ${FIX}/data
Copy link
Contributor

Choose a reason for hiding this comment

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

the Repository class should probably be able to do this itself

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the Repository class is not creating {FIX}/data if it does not exist, but maybe Repository should be the one handling creating these directories?

@@ -199,11 +199,11 @@ class InitComposer

void InitComposer::write_attach_tree()
{
result_ << "extern void fixpoint_attach_tree(__m256i, wasm_rt_externref_table_t*);" << endl;
result_ << "extern void fixpoint_attach_tree(u8x32, wasm_rt_externref_table_t*);" << endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does this typedef come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's in wasm_rt.h

@yhdengh yhdengh merged commit adb8442 into main Jan 24, 2024
1 check passed
@yhdengh yhdengh deleted the refactor branch January 24, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants