« first day (5049 days earlier)      last day (26 days later) » 

6:57 AM
-d opcache.opt_debug_level=0x10000 doesn't seem to do anything for me. Is it supposed to print to stdout or what?
 
3 hours later…
10:08 AM
@QuolonelQuestions Right, but the other way around. Most languages use these terms, the other ones I've heard is formal and actual arguments.
@QuolonelQuestions It's because of the default case for switch/match. switch ($foo) { default: ... }, where the parser doesn't know if default refers to the expr or case_list non-terminal.
You can fix that by removing the T_DEFAULT case from case_list and match_arm, and then check for the T_DEFAULT ast marker in the compiler, instead of a NULL condition.
That said, this remains ambiguous: foo(match ('foo') { default => 'bar' }). Does default refer to the default argument value, or to the default case? It's not obvious.
@QuolonelQuestions Essentially, mirror this function. github.com/php/php-src/blob/…
@QuolonelQuestions Did you actually enable opcache with opcache.enable_cli=1?
11:11 AM
@IluTov yes
Maybe it cannot be specified at the command line?
It can, you're probably missing zend_extension=opcache.so.
lol yes it's not even loaded
But are you sure? The doc says INI_SYSTEM, meaning it has to be set in the INI, no?
I think maybe it's not even built :<
Do you have to build it separately or is there just a configure flag or something to include it in the build?
@IluTov I understood from our previous discussion that that is basically what we would be doing (maybe I could even call it directly?) but I am not even that far yet. Still need to understand how everything else fits together
In particular, I don't really understand how to know when is the correct time to raise an opcode and how state between opcodes works
So hopefully I can figure out the debugger next
11:31 AM
@QuolonelQuestions It roughly means you cannot set it with ini_set().
@QuolonelQuestions Maybe read something like phpinternals.net/articles/…, phpinternals.net/articles/… to understand the bigger picture.
There are more links here: github.com/php/php-src/blob/master/…
@IluTov I read the "in" operator tutorial this morning 😀
Didn't realise there were more
I find it strange there's a tutorial on how to implement "in" but we still don't have the "in" operator
@TimWolla That's definitely not what the documentation says...
Thanks for the links. I have more reading to do :^)
 
5 hours later…
4:12 PM
What is this noise? /* {{{ */
@QuolonelQuestions Code folding stuff. You don't need to add it for new stuff, methinks.
 
4 hours later…
8:35 PM
it's something used in Vim, and maybe Vi... I believe it allows collapsing sections of code
9:14 PM
I still don't understand why I don't have opcache
OK I finally figured it out x3
 
1 hour later…
10:22 PM
@IluTov How do I know which param index I am? 🤔
@QuolonelQuestions By passing them as constants to op1.
See how the send opcodes work.
So far I got default to be replaced with a hard-coded integer, now I just need to figure out how to do the reflection thing
10:40 PM
I'm experiencing very exasperating behaviour, where my breakpoints won't trigger any more in zend_compile.c, or, my opcodes aren't output when running normally. It's literally random because, without changing any settings, it just starts/stops working again
Generally they seem to be mutually exclusive. I either get the opcodes or I get breakpoints
I'm even running with -d opcache.enable_cli=0 in the IDE to make sure opcache isn't skipping the compiler
Oh... heh... my pdb was out of date
11:02 PM
@IluTov I really can't figure it out at all. zend_compile_args knows what arg index it is because it's looping over them all, but it will eventually call zend_compile_expr passing only the AST for my expression and that contains no information whatsoever about the current arg we're processing (even though zend_compile_args knows, and it's sitting just a few frames up the call stack...)
I did figure out that CG(active_op_array)->T actually has a pointer to it but that doesn't seem like the correct way to do it...
11:23 PM
@QuolonelQuestions You likely need to keep track of the param index in zend_compile_args() using something similar to CG(context). CG(active_op_array)->T is not what you're looking for. 1. it doesn't refer to params but temporary variables and 2. it's for the current function, not the called function.
11:42 PM
Presumably I need to extend this structure, because there doesn't seem to be anywhere current to put it...

« first day (5049 days earlier)      last day (26 days later) »