Skip to content

Anonymous classes (2) #1249

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

Closed
wants to merge 8 commits into from
Closed

Anonymous classes (2) #1249

wants to merge 8 commits into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Apr 26, 2015

Open problem: Generating a name for the anon class.

{
// TODO The opline pointer may be reused, this is not safe!
uint32_t next = get_next_op_number(CG(active_op_array));
return zend_strpprintf(0, "class@%p", &CG(active_op_array)->opcodes[next-1]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better if it uses a unique id (self-incresemenet)....will be good for debuting..

@nikic nikic mentioned this pull request Apr 27, 2015
@nikic
Copy link
Member Author

nikic commented Apr 27, 2015

Superseded by #1250

@nikic nikic closed this Apr 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants