I've recently picked up a Mac Mini, my first move into the mac world. Of course one of my first tests was to see if Raven would compile. It didn't, but I was surprised at how little work it took to make it (hats off to cmake, macports, and llvm).
I will now be testing builds on linux x86 and x86_64, and OSX.
In addition to committing a patch that fixes the build on OSX, I've updated the tree to include the latest lexertl release, as well as removing the "driver" library, which was unnecessary and integrated into the IR library.
Tuesday, June 2, 2009
Thursday, May 14, 2009
Downtime
Hi Folks, just a quick post to let you know that the project has not been abandoned, I've simply spent the last month moving continents and doing some design work in the process. Expect some progress and commits soon.
Saturday, April 4, 2009
March Madness
March has come and gone. and rphp advanced a little more.
LLVM 2.5, released in early March, is now supported. As we ended up in the release notes (thanks Chris!), a few people were interested in trying to compile an early version. To make this easier, we switched to using environment variables so that rphp can find its library files, and updated the docs on the wiki.
A new rphp specific test suite was also added. This is based on the pcc (classic) testsuite. It only contains two tests so far, but does test both JIT interpreted and native compiled binaries. This will help prevent regressions as the code undergoes heavy development.
The biggest item that made it in to code generation was basic user defined functions. These now work up to arity 5 (excluding passing by reference, type hints, defaults... ).
Attention also turned back to the runtime. Hash tables now take unicode keys. We switched back to using the ICU UnicodeString as the main unicode string object in the runtime. The header files went through a large cleanup, and received some much needed documentation (more left to do here). Some basic benchmarks were added to examine the speed of runtime variable creation and destruction.
x86-64 is now supported and tested in the build, runtime, and compiler. Both JIT and native compilation work.
Finally, the ASIO networking library headers and a sample HTTP server were added as the base for the microserver and HTTP frontend.
In other news, the unladen-swallow project was announced. This is good news for rphp, as they plan to work on several projects that Roadsend PHP can benefit from, including a new garbage collector and thread-safe code generation in LLVM.
LLVM 2.5, released in early March, is now supported. As we ended up in the release notes (thanks Chris!), a few people were interested in trying to compile an early version. To make this easier, we switched to using environment variables so that rphp can find its library files, and updated the docs on the wiki.
A new rphp specific test suite was also added. This is based on the pcc (classic) testsuite. It only contains two tests so far, but does test both JIT interpreted and native compiled binaries. This will help prevent regressions as the code undergoes heavy development.
The biggest item that made it in to code generation was basic user defined functions. These now work up to arity 5 (excluding passing by reference, type hints, defaults... ).
Attention also turned back to the runtime. Hash tables now take unicode keys. We switched back to using the ICU UnicodeString as the main unicode string object in the runtime. The header files went through a large cleanup, and received some much needed documentation (more left to do here). Some basic benchmarks were added to examine the speed of runtime variable creation and destruction.
x86-64 is now supported and tested in the build, runtime, and compiler. Both JIT and native compilation work.
Finally, the ASIO networking library headers and a sample HTTP server were added as the base for the microserver and HTTP frontend.
In other news, the unladen-swallow project was announced. This is good news for rphp, as they plan to work on several projects that Roadsend PHP can benefit from, including a new garbage collector and thread-safe code generation in LLVM.
Saturday, February 28, 2009
Squawk
After a light January, rphp saw quite a few improvements in February.
We've switched the lexer from the beta Boost::Spirit2 to Ben Hanson's Boost::Lexer submission (lexertl). They are actually related, as Spirit2 uses lexertl itself, but as we weren't using the parse functionality of Spirit (we're using lemon), there was no reason to endure the extra compile time overhead (it's heavily template based) and complexity.
Speaking of the lexer, it now properly tokenizes (nearly) all PHP tokens, in any charset. Proper double quote string parsing is yet to be completed, however.
Literal array support was added to the parser and code generator, which means all the basic types (null, int, float, bool, string, unicode string, array) have some support.
Some other miscellaneous advances include implementing var_dump and initial support for if blocks and function declarations in the parser.
We've switched the lexer from the beta Boost::Spirit2 to Ben Hanson's Boost::Lexer submission (lexertl). They are actually related, as Spirit2 uses lexertl itself, but as we weren't using the parse functionality of Spirit (we're using lemon), there was no reason to endure the extra compile time overhead (it's heavily template based) and complexity.
Speaking of the lexer, it now properly tokenizes (nearly) all PHP tokens, in any charset. Proper double quote string parsing is yet to be completed, however.
Literal array support was added to the parser and code generator, which means all the basic types (null, int, float, bool, string, unicode string, array) have some support.
Some other miscellaneous advances include implementing var_dump and initial support for if blocks and function declarations in the parser.
Tuesday, December 2, 2008
Project Raven
We've been working for a few months now on a project that we're ready to take the wraps off of a bit. It's ambitious, but Roadsend PHP always has been.
We've started a complete rewrite of Roadsend PHP. The rewrite will address some of the problems we've had with the old code base, and hopefully open up the project to a wider range of programmers who would like to contribute.
The new code base is written in C++ and uses LLVM for code generation. LLVM stands for Low Level Vritual Machine and provides a complete set of tools that allow us to implement a highly optimized code generator, JIT and static (native) compiler. For more information, see the LLVM website.
We're also relying on the Boost C++ libraries. These are well know, portable, peer-reviewed libraries providing lots of the low level functionality needed for the runtime. See the Boost website for details.
Rounding out the major third-party libraries we've chosen is ICU: International Components for Unicode. This library provides all the necessary tools for full unicode and internationalization support.
Some of the goals of this rewrite include:
You can checkout or browse the codebase at the new development site:
http://code.roadsend.com/rphp
We're looking for contributors so if you'd like to help, please speak up! You can find us in #roadsend on FreeNode IRC.
We've started a complete rewrite of Roadsend PHP. The rewrite will address some of the problems we've had with the old code base, and hopefully open up the project to a wider range of programmers who would like to contribute.
The new code base is written in C++ and uses LLVM for code generation. LLVM stands for Low Level Vritual Machine and provides a complete set of tools that allow us to implement a highly optimized code generator, JIT and static (native) compiler. For more information, see the LLVM website.
We're also relying on the Boost C++ libraries. These are well know, portable, peer-reviewed libraries providing lots of the low level functionality needed for the runtime. See the Boost website for details.
Rounding out the major third-party libraries we've chosen is ICU: International Components for Unicode. This library provides all the necessary tools for full unicode and internationalization support.
Some of the goals of this rewrite include:
- Highly optimized code generation
- Full unicode support
- Latest PHP language features (namespaces, lamda functions, etc)
- Clean, easy runtime API
- Portability
You can checkout or browse the codebase at the new development site:
http://code.roadsend.com/rphp
We're looking for contributors so if you'd like to help, please speak up! You can find us in #roadsend on FreeNode IRC.
Saturday, October 4, 2008
How It Started
Recently, while writing a talk proposal for Roadsend PHP, I wrote down a brief history of how it got started. On a new blog intended to discuss the development and future of Roadsend PHP, it seems appropriate to start with a recap of the past. So, here it is:
-
Roadsend, Inc. is a programming and hosting company founded by Jon Michel and Shannon Weyrick and based in Fishkill, NY that has been in business since 1999. Roadsend has used PHP as its main server-side programming language since before the release of PHP 4.0.
Roadsend released its first open source project, the PHP SiteManager Web Framework in 2001. Roadsend SiteManager and the succeeding Roadsend Portal CMS have been in development and use for all company projects since that time.
The idea for Roadsend PHP began life at Roadsend in 2002 while investigating the creation of a Zend extension for speeding up Roadsend SiteManager by replacing some of the functionality with equivalent C code. Roadsend employee Tim Daly, Jr. (now at Yahoo) had the alternative idea of creating our own implementation of PHP that would compile the existing PHP version of SiteManager to native binary.
For a time, both the C extension and the compiler were developed simultaneously. However it was decided to abandon the C extension and instead focus all effort on the new compiler implementation, which (it was hoped) would not only fulfill the desire for more speed but also offer functionality that the original PHP could not offer.
Over the next several years we managed to develop a full implementation of the PHP language, including native compiler, interpreter, runtime, extensions, debugger, and full blown Windows IDE. It could do things the original PHP couldn't, like compile a site to a single FastCGI binary, or with an embedded web server so that it could serve itself.
Roadsend PHP was originally offered as a commercial (closed source) solution. It was re-released as an open source project in 2007 under the GPL and LGPL licenses.
-
Of course, it hasn't yet taken over the PHP world, and there are several reasons for that. We intend to address these reasons, and that will be the focus of this blog. Stay tuned.
-
Roadsend, Inc. is a programming and hosting company founded by Jon Michel and Shannon Weyrick and based in Fishkill, NY that has been in business since 1999. Roadsend has used PHP as its main server-side programming language since before the release of PHP 4.0.
Roadsend released its first open source project, the PHP SiteManager Web Framework in 2001. Roadsend SiteManager and the succeeding Roadsend Portal CMS have been in development and use for all company projects since that time.
The idea for Roadsend PHP began life at Roadsend in 2002 while investigating the creation of a Zend extension for speeding up Roadsend SiteManager by replacing some of the functionality with equivalent C code. Roadsend employee Tim Daly, Jr. (now at Yahoo) had the alternative idea of creating our own implementation of PHP that would compile the existing PHP version of SiteManager to native binary.
For a time, both the C extension and the compiler were developed simultaneously. However it was decided to abandon the C extension and instead focus all effort on the new compiler implementation, which (it was hoped) would not only fulfill the desire for more speed but also offer functionality that the original PHP could not offer.
Over the next several years we managed to develop a full implementation of the PHP language, including native compiler, interpreter, runtime, extensions, debugger, and full blown Windows IDE. It could do things the original PHP couldn't, like compile a site to a single FastCGI binary, or with an embedded web server so that it could serve itself.
Roadsend PHP was originally offered as a commercial (closed source) solution. It was re-released as an open source project in 2007 under the GPL and LGPL licenses.
-
Of course, it hasn't yet taken over the PHP world, and there are several reasons for that. We intend to address these reasons, and that will be the focus of this blog. Stay tuned.
Subscribe to:
Posts (Atom)