Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
f6bd1b0
work
kripken Jun 5, 2024
dd673f8
note
kripken Jun 6, 2024
3232bae
note
kripken Jun 6, 2024
4517e55
Merge remote-tracking branch 'origin/main' into mono.moar
kripken Jun 11, 2024
d47f4c2
Merge remote-tracking branch 'origin/main' into mono.moar
kripken Jun 27, 2024
c876ff5
comments
kripken Jun 27, 2024
f804c95
comments
kripken Jun 27, 2024
6817d67
comments
kripken Jun 27, 2024
7c975c3
work
kripken Jun 27, 2024
38488b9
work
kripken Jun 27, 2024
0877c0a
work
kripken Jun 27, 2024
bc47504
work
kripken Jul 1, 2024
a8fbc5e
format
kripken Jul 1, 2024
a11b9d3
Merge remote-tracking branch 'origin/main' into mono.moar
kripken Jul 1, 2024
38ab29a
work
kripken Jul 1, 2024
3339ef7
work
kripken Jul 1, 2024
d978b55
work
kripken Jul 1, 2024
52ad9f0
work
kripken Jul 1, 2024
e428820
work
kripken Jul 1, 2024
996a95d
bad
kripken Jul 1, 2024
2aa99fa
work
kripken Jul 1, 2024
235c5fd
work
kripken Jul 1, 2024
9bb4af5
work
kripken Jul 1, 2024
7ca4545
work
kripken Jul 1, 2024
4d04aea
work
kripken Jul 1, 2024
e26d753
work
kripken Jul 1, 2024
e48ebb8
work
kripken Jul 1, 2024
a669e47
work
kripken Jul 1, 2024
1d598ef
work
kripken Jul 1, 2024
aaacb45
work
kripken Jul 1, 2024
21a879f
work
kripken Jul 1, 2024
71f3d43
test
kripken Jul 2, 2024
1b7b27b
test
kripken Jul 2, 2024
b52f1ff
test
kripken Jul 2, 2024
91c6143
test
kripken Jul 2, 2024
27bbb77
test
kripken Jul 2, 2024
bdf8250
work
kripken Jul 2, 2024
9c7a6d6
test
kripken Jul 2, 2024
3b50f1b
almost
kripken Jul 2, 2024
8ef96f7
work
kripken Jul 2, 2024
5afbd14
work
kripken Jul 2, 2024
4867379
moar
kripken Jul 2, 2024
3a72b38
work
kripken Jul 2, 2024
e9505a0
work
kripken Jul 2, 2024
c3dca8b
work
kripken Jul 2, 2024
90e7ebb
work
kripken Jul 2, 2024
baca207
work
kripken Jul 2, 2024
c2a1dbd
work
kripken Jul 2, 2024
aca108c
work
kripken Jul 2, 2024
9c2d3fa
work
kripken Jul 2, 2024
b4933b2
work
kripken Jul 3, 2024
62fb4eb
work
kripken Jul 3, 2024
4742228
work
kripken Jul 3, 2024
8bb827f
work
kripken Jul 3, 2024
6bedb13
fix
kripken Jul 3, 2024
d24bb59
format
kripken Jul 3, 2024
cb50b7c
Merge remote-tracking branch 'origin/main' into mono.moar
kripken Jul 3, 2024
2091277
work
kripken Jul 3, 2024
8ddbc3e
work
kripken Jul 3, 2024
d781015
work
kripken Jul 3, 2024
2aa8509
work
kripken Jul 3, 2024
b4f6a41
work
kripken Jul 3, 2024
b3fce26
work
kripken Jul 3, 2024
a3b8153
fix
kripken Jul 3, 2024
57da116
fix test
kripken Jul 3, 2024
533e849
format
kripken Jul 3, 2024
decabfb
Merge remote-tracking branch 'myself/mono.moar' into mono.moar
kripken Jul 10, 2024
0a8e2ab
feedback: move cheaper check earlier
kripken Jul 10, 2024
649e8ad
feedback: TODO for global.get etc.
kripken Jul 10, 2024
b6cfd63
feedback: rename debug method
kripken Jul 10, 2024
e8df956
format
kripken Jul 10, 2024
d32d44a
feedback: improve TODO
kripken Jul 10, 2024
89b6bd4
feedback: remove second copy of function body
kripken Jul 10, 2024
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
work
  • Loading branch information
kripken committed Jul 3, 2024
commit 8ddbc3ecf9a3174cc2a95d42a06af0d1ba930fbf
18 changes: 6 additions & 12 deletions src/passes/Monomorphize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ struct CallContext {
// ;; sent from the caller, which we will local.get.
// ]
//
// Note how the inner part of the struct.new is a local.get. That is a
// local.get of a parameter to the monomorphized function, which looks like
// this:
// Both the const and the local.get are simply used in the monomorphized
// function, like this:
//
// (func $foo-monomorphized (param $0 ..)
// (..local defs..)
Expand All @@ -146,15 +145,10 @@ struct CallContext {
// The $int param is no longer a parameter, and it is set in a local at the
// top: we have "reverse-inlined" code from the calling function into the
// caller, pulling the constant 10 into here. The second parameter cannot be
// pulled in, so we must still send it:
//
// (call $foo-monomorphized
// (..something complicated..) ;; This is still sent.
// )
//
// We mark that value as a local.get among the context operands, because that
// is exactly what we do to receive it in the called function: we local.get
// it, as can be seen in the code above.
// pulled in, so we must still send it, but we still have a local.set there to
// copy it into a local (this does not matter in this case, but does if the
// sent value is more refined; always using a local.set is simpler and more
// regular).
std::vector<Expression*> operands;

// Whether the call is dropped. TODO
Expand Down