Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57842 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24437 invoked from network); 14 Feb 2012 05:01:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2012 05:01:43 -0000 Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:61749] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/F0-16962-5BAE93F4 for ; Tue, 14 Feb 2012 00:01:41 -0500 Received: by vcbfk13 with SMTP id fk13so4385465vcb.29 for ; Mon, 13 Feb 2012 21:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=gJMpYE/GOMHcp0EkauqBdUoXJ4DUTQqLr+oLZASywrI=; b=PfKKy6zGI6dHkzwI3IgRQ9hbv4ay1gImfNto6aWsQY8ND5aEJhiMeZQgkZ5grIQcf4 3adqKyvpnzseIzRRfRH4ftT/9Mi6GIFEBNZJ113jAqP0V+uwWHTcaNs3ALLct3SSsdj2 pjJiwJ9fHfmowePdqTaVk42yC6j47EFIpxwD4= Received: by 10.220.156.72 with SMTP id v8mr9678538vcw.45.1329195698196; Mon, 13 Feb 2012 21:01:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.178.130 with HTTP; Mon, 13 Feb 2012 21:01:18 -0800 (PST) In-Reply-To: <-6357718405742688648@unknownmsgid> References: <-6357718405742688648@unknownmsgid> Date: Tue, 14 Feb 2012 13:01:18 +0800 Message-ID: To: Stogov Dmitry , Stogov Dmitry Cc: Internals PHP , "stas@php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Please expose zend_vm_get_opcde_handler From: laruence@gmail.com (Xinchen Hui) Hi: a patch for this proposal: Index: zend_vm_gen.php =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- zend_vm_gen.php (revision 323168) +++ zend_vm_gen.php (working copy) @@ -797,7 +797,7 @@ if (ZEND_VM_OLD_EXECUTOR && $spec) { out($f,"static int zend_vm_old_executor =3D 0;\n\n"); } - out($f,"static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op);\n\n"); + out($f,"ZEND_API opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op);\n\n"); switch ($kind) { case ZEND_VM_KIND_CALL: out($f,"\n"); =09 @@ -1243,7 +1243,7 @@ } // Generate zend_vm_get_opcode_handler() function - out($f, "static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op)\n"); + out($f, "ZEND_API opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op)\n"); out($f, "{\n"); if (!ZEND_VM_SPEC) { out($f, "\treturn zend_opcode_handlers[opcode];\n"); Index: zend_vm_execute.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- zend_vm_execute.h (revision 323168) +++ zend_vm_execute.h (working copy) @@ -299,7 +299,7 @@ 241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 }; -static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op); +ZEND_API opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op); #undef OPLINE @@ -40192,7 +40192,7 @@ }; zend_opcode_handlers =3D (opcode_handler_t*)labels; } -static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op) +ZEND_API opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op) { static const int zend_vm_decode[] =3D { _UNUSED_CODE, /* 0 */ thanks On Tue, Feb 14, 2012 at 1:13 AM, Xinchen Hui wrote: > Hi: > =C2=A0 =C2=A0 =C2=A0As dmitry said today, there is no way to get a user o= pcode > handler which can be called *after* a specific built-in handler. > > =C2=A0 =C2=A0 =C2=A0So please expose zend_vm_get_opcde_handler. =C2=A0Bef= ore 5.4 release. :) > > =C2=A0 =C2=A0 =C2=A0 Thanks. > > Sent from my iPad --=20 =E6=83=A0=E6=96=B0=E5=AE=B8=C2=A0 =C2=A0 =C2=A0 =C2=A0 laruence Senior PHP Engineer http://www.laruence.com