Commit 5782ec2
module: don't cache uninitialized builtins
Don't cache the exported values of fully uninitialized builtins.
This works by adding an additional `loading` flag that is only
active during initial loading of an internal module and checking
that either the module is fully loaded or is in that state before
using its cached value.
This has the effect that builtins modules which could not be loaded
(e.g. because compilation failed due to missing stack space) can be
loaded at a later point.
Fixes: #6899
Ref: #6899
PR-URL: #6907
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent b9dfdfe commit 5782ec2
File tree
3 files changed
+36
-7
lines changed- src
- test/message
3 files changed
+36
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| 880 | + | |
880 | 881 | | |
881 | 882 | | |
882 | 883 | | |
| |||
888 | 889 | | |
889 | 890 | | |
890 | 891 | | |
891 | | - | |
| 892 | + | |
892 | 893 | | |
893 | 894 | | |
894 | 895 | | |
| |||
952 | 953 | | |
953 | 954 | | |
954 | 955 | | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
960 | 963 | | |
961 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
962 | 968 | | |
963 | 969 | | |
964 | 970 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments