-
Notifications
You must be signed in to change notification settings - Fork 820
Make imported functions inexact #7993
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
Changes from 65 commits
0967b41
7cbdfea
82ef0e0
d857e7d
d1d2ed8
e26f676
7fda8cf
5ce973b
4b167eb
7927749
160123e
b8bb97a
89103b9
24dea81
d4aabd2
a4fe585
76eac4c
020f119
21588c7
fdd7253
7a58395
4616380
46826b0
73024ea
4de7694
d03376d
82061c8
1859cf0
1791066
7278c6a
31573ac
b099733
34837c3
616b23a
46b9d70
8b5f7dd
c541380
982af15
e2de806
73bffc8
8931d56
c2f9d15
44faf20
719bf2c
c24956c
aea5996
e2d9c70
d360f0b
2d25b8d
bc122d5
5de1db0
61e0b66
8341afd
7d40a94
457b0e5
848151a
a6ff39a
e5081e3
b99dd75
87e1094
de14c6a
2802d94
33189d5
aab3067
aa7290d
89cf0c0
0a93101
03f7970
b77d0f9
e26652b
d4bf64f
2b75641
9322179
3de0316
176e8eb
f40d2b1
32939a1
b29bee0
1e2feac
a53f762
4291474
9e0d1e0
27222bb
1f3d700
e1a8629
7013b9f
ed50e3c
f1264d5
c96c5ab
7ba83e8
b780760
4b6963b
e23c1e6
54f1f35
f4a3446
ea44995
405b044
d5ee239
c5243e6
920e019
84c82f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ | |
| #include "ir/module-utils.h" | ||
| #include "ir/possible-contents.h" | ||
| #include "support/insert_ordered.h" | ||
| #include "wasm-type.h" | ||
| #include "wasm.h" | ||
|
|
||
| namespace std { | ||
|
|
@@ -641,9 +642,15 @@ struct InfoCollector | |
| addRoot(curr); | ||
| } | ||
| void visitRefFunc(RefFunc* curr) { | ||
| addRoot(curr, | ||
| PossibleContents::literal( | ||
| Literal::makeFunc(curr->func, curr->type.getHeapType()))); | ||
| if (!getModule()->getFunction(curr->func)->imported()) { | ||
| // This is not imported, so we know the exact function literal. | ||
| addRoot( | ||
| curr, | ||
| PossibleContents::literal(Literal::makeFunc(curr->func, *getModule()))); | ||
| } else { | ||
| // This is imported, so it might be anything of the proper type. | ||
| addRoot(curr); | ||
|
||
| } | ||
|
|
||
| // The presence of a RefFunc indicates the function may be called | ||
| // indirectly, so add the relevant connections for this particular function. | ||
|
|
@@ -1861,8 +1868,7 @@ void TNHOracle::infer() { | |
| // lot of other optimizations become possible anyhow. | ||
| auto target = possibleTargets[0]->name; | ||
| info.inferences[call->target] = | ||
| PossibleContents::literal(Literal::makeFunc( | ||
| target, wasm.getFunction(target)->type.getHeapType())); | ||
| PossibleContents::literal(Literal::makeFunc(target, wasm)); | ||
| continue; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.