-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add partially evaluated methods ===(x), !==(x), and isa(T) #36759
Changes from all commits
0fb5806
f50a4a0
4be5c9a
0e7a5fa
e48f183
a0bf2d8
8766a8d
6951577
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 |
---|---|---|
|
@@ -12,11 +12,11 @@ extern "C" { | |
#ifdef DEFINE_BUILTIN_GLOBALS | ||
#define DECLARE_BUILTIN(name) \ | ||
JL_CALLABLE(jl_f_##name); \ | ||
jl_value_t *jl_builtin_##name | ||
jl_value_t *jl_builtin_##name JL_GLOBALLY_ROOTED | ||
#else | ||
#define DECLARE_BUILTIN(name) \ | ||
JL_CALLABLE(jl_f_##name); \ | ||
extern jl_value_t *jl_builtin_##name | ||
extern jl_value_t *jl_builtin_##name JL_GLOBALLY_ROOTED | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bit of a long shot for working around analyzegc https://build.julialang.org/#/builders/65/builds/1574/steps/4/logs/stdio But I wonder if there is a reason why this is not used? Maybe I'm doing something stupid here? If this is not the right way to do it, maybe I need to do something like this? diff --git a/src/builtins.c b/src/builtins.c
index 440b69629e..c2576d553d 100644
--- a/src/builtins.c
+++ b/src/builtins.c
@@ -369,6 +369,7 @@ JL_CALLABLE(jl_f_is)
jl_function_t *fix2 = jl_get_function(jl_base_module, "Fix2");
if (fix2 == NULL)
jl_undefined_var_error(jl_symbol("Fix2"));
+ JL_GC_PROMISE_ROOTED(jl_builtin_is);
return jl_call2(fix2, jl_builtin_is, args[0]);
}
if (args[0] == args[1])
@@ -440,6 +441,7 @@ JL_CALLABLE(jl_f_isa)
jl_function_t *fix2 = jl_get_function(jl_base_module, "Fix2");
if (fix2 == NULL)
jl_undefined_var_error(jl_symbol("Fix2"));
+ JL_GC_PROMISE_ROOTED(jl_builtin_isa);
return jl_call2(fix2, jl_builtin_isa, args[0]);
}
JL_TYPECHK(isa, type, args[1]); |
||
#endif | ||
|
||
DECLARE_BUILTIN(throw); DECLARE_BUILTIN(is); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
y -> y === x