Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2788 invoked from network); 2 Sep 2008 16:01:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2008 16:01:15 -0000 Authentication-Results: pb1.pair.com header.from=nlopess@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=nlopess@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.55.154.22 as permitted sender) X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.22 relay2.ptmail.sapo.pt Linux 2.4/2.6 Received: from [212.55.154.22] ([212.55.154.22:54288] helo=sapo.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/BD-33714-A436DB84 for ; Tue, 02 Sep 2008 12:01:15 -0400 Received: (qmail 9770 invoked from network); 2 Sep 2008 16:01:10 -0000 Received: from unknown (HELO sapo.pt) (10.134.37.162) by relay2 with SMTP; 2 Sep 2008 16:01:10 -0000 Received: (qmail 25437 invoked from network); 2 Sep 2008 16:01:11 -0000 X-AntiVirus: PTMail-AV 0.3-0.93.0 X-Scan-Status: AV clean (0.00671 seconds); AS clean (0.00024 seconds) Received: from unknown (HELO pc07654) (nunoplopes@sapo.pt@[85.243.105.51]) (envelope-sender ) by mta12 (qmail-ldap-1.03) with SMTP for ; 2 Sep 2008 16:01:11 -0000 Message-ID: To: "Jonathan Bond-Caron" , "'steve'" , "'Sebastian Bergmann'" Cc: References: <57792e850808251040y6672e1f1ha0036f0778b7a011@mail.gmail.com> <57792e850808251528u3ede0077rd6828ff066f5e4dd@mail.gmail.com> <002d01c9077b$4e0a9ce0$ea1fd6a0$@com> In-Reply-To: <002d01c9077b$4e0a9ce0$ea1fd6a0$@com> Date: Tue, 2 Sep 2008 17:01:07 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049 Subject: Re: [PHP-DEV] TracingPHP From: nlopess@php.net ("Nuno Lopes") > On Mon Aug 25 06:28 PM, steve wrote: >> Has anyone had success compiling PHP with LLVM? >> > > I haven't tried it, here is a good summary: > http://llvm.org/devmtg/2008-08/Lopes_PHP-JIT-InTwoDays.pdf > > In short, it is 'slower' but that seems to be without any caching of the > "bytecode" So yes, we were able to make a JIT compiler for PHP, that is able to produce (and execute) binary code out of PHP scripts. It integrates nicely with the Zend VM and requires no modifications to it. The project is nowhere near completion, as caching of the code isn't implemented yet. Also, off-line compilation (i.e. producing standalone executables) is not working yet as well. There's also another project (completely unrelated and independent) that aims to compile PHP scripts to .NET bytecode (MSIL), but the approach is quite different. > That's from my research, maybe someone can correct me here. > Isn't using something like Zend Guard (converts code into opcode) then > caching the opcodes essentially JIT? The products available out there do not produce machine code, so I wouldn't call them JIT compilers. Nuno