Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11561 invoked from network); 29 Sep 2015 16:32:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Sep 2015 16:32:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.160.169 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.160.169 mail-yk0-f169.google.com Received: from [209.85.160.169] ([209.85.160.169:33530] helo=mail-yk0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/11-05836-E1DBA065 for ; Tue, 29 Sep 2015 12:32:30 -0400 Received: by ykft14 with SMTP id t14so12483769ykf.0 for ; Tue, 29 Sep 2015 09:32:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Ls4nGuxil/fign3GKcxZ9Btaz48Pffvt1Wotas4d1ys=; b=l+LJUayelYBDWJIhEWdkWHzIvHQv7sZY0Tgp85B8uq0Q6+jMalHaXTP9mYIMsjkU4u kZXuFVcBQHTgpgb9WrcAdJ3Pn06LDabA6yditn4YcHwVehc1Z2P+kelCizOmEKzOUHYu 2P1Q/aTzAGvrb290ZGngJq2+Q5YrTqdpo9gnsCe8jkTFKouVpTIV4LCGFs46+anfFqLX 16c1kibg0CMMmkv2utvsUyIADE3N4N/6HCfLNgOgW9KawOyqbNuw8hIY6mlCzu7Sxgk6 g9tfTmHfL5ltIdAYa16/iPJY59/k8o6IhdDwf5BaasgZghnIADMFkna85A791/qR/5Kx V4yg== X-Gm-Message-State: ALoCoQnDqYLk8YOKgfUd8UqFHnPaDd41LAm6S29ygNDt0S4U6OxLqhEqsB4MxBzMT+kZ8BNbFGg3 MIME-Version: 1.0 X-Received: by 10.129.48.86 with SMTP id w83mr14227326yww.105.1443544347591; Tue, 29 Sep 2015 09:32:27 -0700 (PDT) Received: by 10.129.111.197 with HTTP; Tue, 29 Sep 2015 09:32:27 -0700 (PDT) X-Originating-IP: [165.120.223.197] In-Reply-To: References: Date: Tue, 29 Sep 2015 17:32:27 +0100 Message-ID: To: Dominic Grostate Cc: PHP internals Content-Type: multipart/alternative; boundary=001a114084e60e85af0520e55c85 Subject: Re: [PHP-DEV] Injecting structure to ZEND_NEW From: pthreads@pthreads.org (Joe Watkins) --001a114084e60e85af0520e55c85 Content-Type: text/plain; charset=UTF-8 Sorry, I'm not able to make sense of what you are doing ... got a patch ? Cheers Joe On Tue, Sep 29, 2015 at 5:29 PM, Dominic Grostate < codekestrel@googlemail.com> wrote: > Hi, ive already started working with the handlers. I've set up the > parser to accept addition syntax before the ctor. The type arguments are > passed to a new opcode handler which triggers prior to NEW but after > FETCH_CLASS (if dynamic, after resolve on CONST). > > This needs to override the fetching of the class during the current NEW > handler, but to do that I need to supply addition data. > > Do you know what I mean? I'm sorry if I'm explaining it badly. > On 29 Sep 2015 4:58 pm, "Joe Watkins" wrote: > >> lxr: zend_set_user_opcode_handler >> >> On Tue, Sep 29, 2015 at 4:57 PM, Joe Watkins >> wrote: >> >>> I think you are looking for opcode handlers, what you want to do is >>> implement a ZEND_NEW handler ... >>> >>> For reference, xdebug and uopz overload handlers, as well as many other >>> extensions ... >>> >>> Cheers >>> Joe >>> >>> On Tue, Sep 29, 2015 at 3:47 PM, Dominic Grostate < >>> codekestrel@googlemail.com> wrote: >>> >>>> I'm trying to pass a new structure into the ZEND_NEW handler which will >>>> be >>>> used to change the behaviour of zend_fetch_class_by_name. >>>> >>>> The issue I'm having though is the operands won't support the new type >>>> unless I compile it to zval, but I can't use zend_execute_data to >>>> reference >>>> that in a pre-handler since that appears to deal exclusively with >>>> function >>>> calls. >>>> >>>> op2 is taken on ZEND_NEW for the ctor skip, which is why I can't pass a >>>> new >>>> zval directly to it. Is there another means I can pass the structure in? >>>> >>>> Dominic >>>> >>> >>> >> --001a114084e60e85af0520e55c85--