Tuesday May 06, 2008
Monday May 05, 2008
By john.rose on May 05, 2008
Interface injection (in the JVM) is the ability to modify old classes just enough for them to implement new interfaces which they have not encountered before. Here are the key design points, in brief... [Read More]
Sunday May 04, 2008
By john.rose on May 04, 2008
Or, anything worth starting is anything worth starting is anything worth starting is anything worth starting is ...
A continuation, simply put, is a reference to the rest of some program P, as of some given point in the midst of P. It is an interesting design problem to introduce continuations into the JVM. I don't know of a full design for JVM continuations, yet, but it's possible to observe both the easy and the hard parts, and to survey some of the reasons we should care. [Read More]
Wednesday Apr 16, 2008
By john.rose on Apr 16, 2008
Wednesday Apr 09, 2008
By john.rose on Apr 09, 2008
Kudos to Vladimir Sizikov for a nice collection of follow-up links. I was very glad for the introduction to Ulrich Drepper’s paper. He also refers to a new wiki on Hotspot implementation, inspired by and serving the OpenJDK, in which I and others are collecting information to help language and JVM implementors understand how Hotspot works, how to make it better, and how to byte-compile for performance.
Finally, if like me you’ve heard but never quite believed the story about how functional languages fix all the problems with side effects and you laugh at the funny papers, you’ll like this little fable about the perils of mutability, in programming languages. It provides an arresting, hard-hitting, and ultimately crushing new perspective on Hindley-Milner type checkers.
Saturday Mar 29, 2008
By john.rose on Mar 29, 2008
Wednesday Mar 12, 2008
By john.rose on Mar 12, 2008
Language-specific VMs often use pseudo-pointers with an immediate “payload” to represent a commonly used subset of numbers, and also “headerless” representations for small but ever-present types like Lisp’s cons cell. The JVM can support fixnums and other headerless objects for the sake of these languages, and even for Java. The idea is to make ordinary object pointers (sometimes called oops) coexist with more specialized formats for headerless objects, which we will call iops and xops. The techniques are mature and well-known, and the overheads (of extra tag checking before pointer usage) can be controlled by optimizations already used widely in JVMs.
We will examine low-level encoding techniques, and investigated how to integrate these concepts into the JVM. Although a language implementor might prefer to try these techniques in the closed environment of a from-scratch, specialized VM, it is probably more profitable in the end to incorporate them into an optimized, mature JIT and GC, such as the Open JDK project. [Read More]
By john.rose on Mar 12, 2008
That certainly got my attention and that of many friends, since (dare I now admit?) I've been home schooling my children since 1987. Two have finished with honors at good universities and are now productive taxpayers, two more are now making their way through college, and the rest are ahead of grade level and nicely socialized, thank you. Who knew my wife and I were guilty of Parental Denial of a Legal Education? (Gotta get some of that Legal Education. It must make you as wise as a Judge.) To those of us in the home schooling community, the general consensus is more adequately phrased in a San Francisco Chronicle Op-Ed: “What planet are those judges coming from?” I realize the education of one’s children is a culturally subversive thing to do, but since when is California suddenly shy of cultural deviancy?
One can only wince in wonder at the ideal California those judges are contemplating. The state has an interest in many children’s rights beyond mere education, such as nutrition. Perhaps we should require parents to be certified dieticians before they cook their children’s lunch. Or, let’s just go all the way and eliminate the inconvenient families, by requiring a parental license before the first child is brought to term. That would bring everything nicely under control, and our Wise Judges could rule a utopian, aristocratic Plato’s Republic—which is really a nice place to study, but a terrible home.
In my own home town of San Jose, I just noticed a reasonable Mercury News editorial on the subject. Common sense still rules in San Jose!
I make one key exception to the Merc.’s editorial position: All else being equal, I as a private citizen greatly prefer benign neglect to any form of regulation. But unlike us private citizens, editorial writers and politicians seem to have a professional rule: Never make ringing calls to do nothing. (And the corollary: Never be without a ringing call.) I am thankful that, somehow despite all the political fidgeting, life goes on anyway.
Also, I’m proud to say that the two debaters the Mercury mentions are from our group’s debate club. I think it is not too much to hope that, in their day as judges or other community leaders, they will write better opinions.
In the end, my advice to judges, and even to friendly editorialists and politicians, is: Leave parenting to us parents. It worked when all of us were growing up, and it works now.
August 2008 Update: The court has reversed its decision. Here is Governor Schwarzenegger's take on it:
This is a victory for California's students, parents and education community. This decision confirms the right every California child has to a quality education and the right parents have to decide what is best for their children," he said. "I hope the ruling settles this matter for parents and home-schooled children once and for all in California, but assure them that we, as elected officials, will continue to defend parents' rights.And Superintendant Jack O'Connell says,
As head of California's public school system, it would be my wish that all children attend public school, but I understand that a traditional public school environment may not be the right setting for each and every child... I recognize and understand the consternation that the earlier court ruling caused for many parents and associations involved in home schooling. It is my hope that today's ruling will allay many of those fears and resolve much of the confusion.(Source: LA Times.)
Friday Feb 01, 2008
By john.rose on Feb 01, 2008
Why am I suddenly excited about Microsoft technology? Two or three reasons. First, the DLR (with IronPython and IronRuby) is another evidence that we are in some sort of renaissance or resurgence of programming language design. The second thing that excited me at Redmond was a striking case of parallel evolution between the DLR over the CLR on one hand and the Da Vinci Machine over the JVM on the other side... The final reason is that I am excited for the customers of the JVM, because they will also enjoy the new languages in an expansive open-source community, and on their choice of blazingly fast Java virtual machines. [Read More]
Wednesday Jan 23, 2008
By john.rose on Jan 23, 2008
The JVM uses symbolic names to link together the many hundreds of classes that make up an application. Symbols in the JVM are represented in a uniform syntax, a counted sequence of Unicode characters. The JVM can readily accept class, package, method, field, and type names which could be any string, not just the strings accepted by the Java compiler. Let's call such names “exotic names”.
The JVM originally inherited symbol spelling restrictions from the Java language, but in recent years it has removed most restrictions. This note describes how to remove the remaining restrictions, by presenting a universal mangling convention to encode arbitrary spelling strings. (Updated 9/01/2012.)[Read More]
Tuesday Jan 22, 2008
By john.rose on Jan 22, 2008
One pain point in dynamic language implementation is managing code dynamically. While implementor’s focus is on the body of a method, and the linkage of that body to some desired calling sequence, there is a host of surrounding details required by the JVM to properly place that code. These details add noise to the implementor’s task, and often enough they cause various execution overheads. Anonymous classes can partially address these problems... [Read More]
Thursday Dec 13, 2007
By john.rose on Dec 13, 2007
In a previous post I enumerated the various parts that go into a call site in the JVM. In order to support the program structure of other languages, especially dynamic languages, the JVM must extend the present schemes of method definition, invocation, and linkage.
The key new requirements are dynamic relinking, programmable linkage, programmable guards, descriptor polymorphism, and method handles.
- dynamic relinking allows dynamic linkage decisions to be revoked
- programmable linkage allows dynamic linkage decisions to be made reflectively by “bootstrap methods”
- programmable guards allows call sites to select among overloaded methods according to language-specific rules
- descriptor polymorphism allows call sites and adapters to be managed and connected generically
- method handles let bootstrap code and call sites refer directly to bytecoded methods
Monday Dec 10, 2007
By john.rose on Dec 10, 2007
My grandmother, Evenlyn Ashbrook, has been giving us "kids" Heifer gifts for Christmas over the last half century. (Bless her, she keeps us supplied with National Geographic subscriptions too.) When we were very young we were disappointed that we got just a slim envelope, and some other family elsewhere got a farm animal. But soon enough we saw the wisdom of redeeming the process of gift-giving from the passions of acquisitiveness, by giving gifts to people that need them. Rather than to us kids (of whatever age) with full toy boxes.
This year, at the instigation of relatives (thanks, cousin Kris!) there's a little old lady in Texas who is going to get a menagerie from her family... Shhh, don't tell her.
Merry Christmas, all!
Tuesday Nov 13, 2007
By john.rose on Nov 13, 2007
Here are some bits from the conversation that stick in my memory...[Read More]
Monday Oct 29, 2007
By john.rose on Oct 29, 2007
In the Java Virtual Machine, method calls are the way work gets done. This note is a slightly simplified description of the parts of a call site and what they do. I will also sketch some of the implications of this design on the JVM’s support for languages other than Java.
Call, in Fourteen Parts
Here are the parts that make up any method call, as found in the JVM bytecodes:
- bytecode instruction — the actual calling instruction in the bytecode stream
- symbolic name — a fixed identifier (a string)
- symbolic descriptor — a fixed tuple of argument and return types (a formatted string)
- symbolic type — a fixed symbolic reference to a type (class, array, or interface)
- symbolic method — symbolic reference to the method (if any) of the given symbolic type, name, and descriptor
- resolved type — a fixed, loaded type which matches the symbolic type
- resolved method — a fixed, loaded method which matches the symbolic method
- receiver — optional, a variable object reference
- receiver type — optional, a variable class or array type, derived from the receiver
- arguments — a variable tuple of primitive or reference values (types derived from the descriptor)
- actual method — a variable method, the actual entry point of the call (not symbolic)
- return value — an optional variable primitive or reference value (type derived from the descriptor)
- thrown exception — an optional variable exception (or other throwable) produced instead of a return value
- exception handlers — zero or more continuation points in the same method, marked by exception types
John R. Rose
Java maven, HotSpot developer, Mac user, Scheme refugee.
Once Sun and present Oracle engineer.