Stream: git-wasmtime

Topic: wasmtime / PR #8649 Miscellaneous Explore tool improvements


view this post on Zulip Wasmtime GitHub notifications bot (May 17 2024 at 16:28):

lpereira opened PR #8649 from lpereira:explore-enhancements to bytecodealliance:main:

I had some time last night, so I decided to clean up the explore tool frontend code. This is almost a full rewrite, that:

This is just a draft for now, because there are still a couple of bugs I have to fix, but I'm happy with how this is turning out, and I'd like some feedback. (This builds on #8639.)

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2024 at 22:27):

lpereira edited PR #8649:

I had some time last night, so I decided to clean up the explore tool frontend code. This is almost a full rewrite, that:

This is just a draft for now, because there are still a couple of bugs I have to fix, but I'm happy with how this is turning out, and I'd like some feedback. (This builds on #8639.)

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2024 at 23:44):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2024 at 07:26):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2024 at 09:06):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2024 at 09:06):

bjorn3 created PR review comment:

Did you come up with this or did you get it from somewhere else?

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2024 at 16:04):

lpereira created PR review comment:

It's adapted from Wikipedia. I'll add a note in the code. (The polynomial is just "fastly" written using hex digits. It generates surprisingly bright and vibrant colors.)

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2024 at 16:04):

lpereira submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2024 at 16:05):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2024 at 16:37):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 16:20):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 17:06):

lpereira has marked PR #8649 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 17:06):

lpereira requested wasmtime-core-reviewers for a review on PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 17:06):

lpereira requested alexcrichton for a review on PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 17:06):

lpereira requested wasmtime-default-reviewers for a review on PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 17:10):

alexcrichton requested fitzgen for a review on PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 19:43):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2024 at 21:22):

fitzgen commented on PR #8649:

(Will hold off on looking at this until https://github.com/bytecodealliance/wasmtime/pull/8639 merges)

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 17:56):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 17:57):

lpereira commented on PR #8649:

Rebased.

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen submitted PR review:

Thanks! Looks good, just a few comments below.

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen submitted PR review:

Thanks! Looks good, just a few comments below.

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen created PR review comment:

Similar about matching existing code style: none of the rest of the code is adding parens to single-arg arrow functions.

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen created PR review comment:

Can you avoid stylistic changes? Or configure your editor to avoid them?

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen created PR review comment:

Sent a PR to add formatting/linting for this JS, so that we don't have to nitpick about it anymore in PRs: https://github.com/bytecodealliance/wasmtime/pull/8675

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen created PR review comment:

This is using offsetToRgb as an object with a dynamic property that is a stringified integer. That is probably fine, I don't think any of this code is actually hot, and JS engines optimize the crap out of object access so this might actually be faster than actual map lookups, but we should be consistent so as not to confuse future code readers. That means doing one of the following two options:

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen created PR review comment:

Walking the DOM every time seems more expensive than the old approach of maintaining a map from offset to list of elements associated with that offset. I'd prefer sticking with the previous approach unless there is strong motivation to do otherwise.

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen created PR review comment:

Can we add a newline between all of these functions and a comment to the top describing what they are doing? It can certainly be gleamed by looking at the context in which they're used, but we shouldn't be forcing code readers to do that, we should help them out and save them the effort so they can focus on whatever they're really trying to do.

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen created PR review comment:

Can we use camel case here? That is pretty standard JS style, and is also what the rest of the file uses. (We use snake case for the JSON-encoded data because it comes from Rust)

view this post on Zulip Wasmtime GitHub notifications bot (May 21 2024 at 21:19):

fitzgen created PR review comment:

I don't think it makes sense to scroll every asm element into view, since I think this is equivalent to scrolling just the last asm element into view that we call this method on. We should just choose one of them (first? last? middle?) and scroll that one into view. It looks like we used to do the first one, fwiw.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 17:46):

lpereira created PR review comment:

Done.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 17:46):

lpereira submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 17:46):

lpereira submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 17:46):

lpereira created PR review comment:

Sure.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 17:46):

lpereira submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 17:46):

lpereira created PR review comment:

I'm fine either way.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 17:46):

lpereira submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 17:46):

lpereira created PR review comment:

Of course.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 18:07):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 18:08):

lpereira commented on PR #8649:

Rebased (to get your patch with prettier/eslint configs) and addressed your comments.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 20:05):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 22:25):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 22:26):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (May 30 2024 at 22:28):

lpereira updated PR #8649.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2024 at 14:13):

fitzgen submitted PR review:

Thanks for adding all the comments, that helps a bunch!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2024 at 14:13):

fitzgen submitted PR review:

Thanks for adding all the comments, that helps a bunch!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 05 2024 at 14:13):

fitzgen created PR review comment:

I think we can remove this?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2024 at 01:20):

lpereira commented on PR #8649:

@fitzgen Could you please merge this? (It's unlikely I'll continue working on this as this was done as part of a job, but I don't want this to bitrot.)


Last updated: Dec 23 2024 at 12:05 UTC