-
Notifications
You must be signed in to change notification settings - Fork 91
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 stubs for internal classes #1093
Conversation
7262b87
to
cbbea14
Compare
@@ -65,7 +65,8 @@ function in_array ($value ::: any, $a ::: array, $strict ::: bool = false) ::: b | |||
function array_fill ($start_index ::: int, $num ::: int, $value ::: any) ::: ^3[]; | |||
function array_fill_keys ($a ::: array, $value ::: any) ::: ^2[]; | |||
function array_combine ($keys ::: array, $values ::: array) ::: ^2; | |||
function range ($from, $to, $step ::: int = 1) ::: mixed[];//TODO | |||
/** @kphp-extern-func-info generate-stub */ | |||
function range ($from ::: mixed, $to ::: mixed, $step ::: int = 1) ::: mixed[];//TODO |
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.
What does TODO comment mean here?
Please remove or provide better description
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.
I don't know. It came from _functions.txt. Remove it
compiler/data/class-data.cpp
Outdated
@@ -354,8 +354,7 @@ bool ClassData::has_polymorphic_member_dfs(std::unordered_set<ClassPtr> &checked | |||
} | |||
|
|||
bool ClassData::does_need_codegen() const { | |||
return !is_builtin() && !is_trait() && | |||
(really_used || is_tl_class); | |||
return (is_builtin() && need_generated_stub) || (!is_builtin() && !is_trait() && (really_used || is_tl_class)); |
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.
(is_builtin() && need_generated_stub) <=> need_generated_stub
, but up to you
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.
lgtm
Compile unsupported phpt test in k2 mode. Continuation of #1093
next part of #1078
General
Add notation
/** @kphp-generate-stub-class */
for generating internal class stub. Also prohibit visitors for runtime lightMain changes in /compiler, /runtime-core