Re: New exception type needed for Java 7?

2007-10-20 Thread Charles Oliver Nutter
Patrick Wright wrote: The idea is interesting, but, two points Good points... 1) Where does it jump to? The next line after the method invocation? Or a finally block, if there is on? What if I haven't defined a finally block in the enclosing (method-calling) scope? Does it bubble up to

Re: New exception type needed for Java 7?

2007-10-20 Thread Charles Oliver Nutter
Neal Gafter wrote: I like this. The exception tables presumably would be allowed to contain entries for subtypes of Jump. And if possible, optimized to only be interested in jumps generated immediately within the interesting scope, to filter out jumps generated at deeper scopes not directly

Re: Lessons learned from JRuby compiler work

2007-11-02 Thread Charles Oliver Nutter
John Wilson wrote: I wonder how feasible it would be to define a standard AST as well? I'm thinking in terms of a set of interfaces/abstract classes which represent a class. Each language implementation would implement/subclass these to produce a concrete AST (a rather confusing term I'm

Re: Using NailGun to defeat JVM startup woes

2007-11-07 Thread Charles Oliver Nutter
John Cowan wrote: On 11/7/07, Jochen Theodorou [EMAIL PROTECTED] wrote: well there is at last the problem that you will need root rights to start the server. Root rights are to be avoided as much as possible. that's a general rule. If it is not possible, then there must be a very good

Re: JVM Dynamic Languages Metaobject Protocol now released

2007-11-24 Thread Charles Oliver Nutter
Charles Oliver Nutter wrote: And now I've completed the implementation for the moment. I've attached a patch to our RubyClass object that shows the implementations, and they're also available here: Forgot the attachment. - Charlie --~--~-~--~~~---~--~~ You

Re: Group prefix on messages

2007-12-01 Thread Charles Oliver Nutter
Daniel Green wrote: For some users in certain environments/clients it is clear that a prefix would provide clarity. Don't make the assumption that everyone is able to use the gmail web interface. So if some will be helped, as many responders to this post have claimed, the question becomes,

[jvm-l] Re: selecting overloaded methods at runtime

2007-12-07 Thread Charles Oliver Nutter
Jochen Theodorou wrote: ... 1) build a list of all methods with the name of the method we want to calls 2) remove the methods that are not valid for the call 3) if more than one method remains calculate the method distance between the call and the method 4) the method with my minimum

[jvm-l] Re: selecting overloaded methods at runtime

2007-12-07 Thread Charles Oliver Nutter
John Wilson wrote: Note *none* of the above require the dynamic language to support optional static typing so I think it's an issue for Jython and JRuby too. It's not nearly as much of an issue as you think. I tend to see categories of types here: integral types and composite types. When

[jvm-l] Re: selecting overloaded methods at runtime

2007-12-07 Thread Charles Oliver Nutter
Attila Szegedi wrote: Also, I'm talking solely about the problem of selecting among overloaded Java methods invoked from a dynamic language here. Dynamic languages are better off without a concept of an overloaded method altogether, as they can mostly have a single method accepting any

[jvm-l] Re: selecting overloaded methods at runtime

2007-12-07 Thread Charles Oliver Nutter
Jochen Theodorou wrote: if you say E#foo overwrites all older foo methods with the same number of parameters, then your problem is solved, or not? This is how it would be in JRuby as well...there's no capability in Ruby or in Java to explicitly invoke the superclass foo. The affordance we

[jvm-l] Re: Catching by object identity

2007-12-22 Thread Charles Oliver Nutter
John Wilson wrote: On Dec 22, 2007 3:48 AM, John Cowan [EMAIL PROTECTED] wrote: In the language Im implementing, catching is done not based on the class of the thrown object but on its identity. That is, in the general case, the throw will have to wrap the object in a descendant of

[jvm-l] A better solution for artificial call frames?

2008-01-06 Thread Charles Oliver Nutter
In developing JRuby, studying IronPython and IronRuby's commit logs, and talking with the Jython guys it's becoming more and more apparent that non-JVM-based languages ported to JVM are always incurring a lot of framing cost. In JRuby, we need to allocate frames to present a Ruby stack trace

[jvm-l] Ability to force class unloading in JDK 6 Update 4?

2008-01-13 Thread Charles Oliver Nutter
I stumbled across a blog post mentioning a new feature in an experimental VM...but perhaps it's now in JDK 6 Update 4? -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses Anyone know about it? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6541037 I would expect that it doesn't change the

[jvm-l] Re: Ability to force class unloading in JDK 6 Update 4?

2008-01-14 Thread Charles Oliver Nutter
Attila Szegedi wrote: On 2008.01.14., at 14:26, Matthias Ernst wrote: On Jan 14, 2008 2:06 PM, Kresten Krab Thorup [EMAIL PROTECTED] wrote: I think that the best way to improve this would be to add a new kind of class loader that would permit unloading classes loaded by it. That would

[jvm-l] Re: Ability to force class unloading in JDK 6 Update 4?

2008-01-15 Thread Charles Oliver Nutter
Ted Neward wrote: Hate to say it, Kresten, but I don't think you'll ever see this--the semantics of unloading classes, except by GC, would need to be worked out and codified someplace before this could happen. I think the thing Kresten is looking for is an ability to unload classes (or make

[jvm-l] Re: Ability to force class unloading in JDK 6 Update 4?

2008-01-15 Thread Charles Oliver Nutter
Matthias Ernst wrote: On Jan 14, 2008 10:25 PM, Charles Oliver Nutter [EMAIL PROTECTED] wrote: In really large applications, this footprint can become a real pain though. Should an application that compiles 10k methods need 10k classloaders taking up heap space? That is about 6MB

[jvm-l] Re: Ability to force class unloading in JDK 6 Update 4?

2008-01-17 Thread Charles Oliver Nutter
Adam Bouhenguel wrote: Why not only allow class unloading only for classes without static fields, static methods, or static initializers? That side-steps the initialization issues and means that you need an instance in order to use it (no static elements + no references = no problem

[jvm-l] Re: Ability to force class unloading in JDK 6 Update 4?

2008-01-17 Thread Charles Oliver Nutter
John Wilson wrote: wasn't there a problem with Singletons getting GCd? Like you I think I once knew and have now forgotten. Getting old If so this would be solved by the no statics requirement. It's certainly a possible reason why the hard reference exists. - Charlie

[jvm-l] Re: Ability to force class unloading in JDK 6 Update 4?

2008-01-17 Thread Charles Oliver Nutter
John Cowan wrote: On Jan 17, 2008 6:30 AM, John Wilson [EMAIL PROTECTED] wrote: One thing I have considered is aggregating all these closures/lambda/etc in a compilation unit as static methods on a single class. This means that you amortise the cost of a classloader over several methods.

[jvm-l] Re: Ability to force class unloading in JDK 6 Update 4?

2008-01-18 Thread Charles Oliver Nutter
Kresten Krab Thorup wrote: So what I suggest is to have a new special kind of class loader (TransientClassLoader maybe) which doesn't have the strong link to classes loaded by it. If this was a new class, then no existing code would be broken by it; and so the new semantics for when a class

[jvm-l] Re: Ability to force class unloading in JDK 6 Update 4?

2008-01-18 Thread Charles Oliver Nutter
John Cowan wrote: On Jan 17, 2008 1:06 PM, Charles Oliver Nutter [EMAIL PROTECTED] wrote: * Then we used a hand-written indexed method handle like you describe. Again, it worked (albeit a bit slower than individual methods), but it was too much effort to implement by hand and wouldn't work

[jvm-l] Re: InfoQ short note on DLR

2008-01-23 Thread Charles Oliver Nutter
Patrick Wright wrote: The DLR Trees are essentially the DLR representation of programs so every language that targets DLR produces the DLR Trees. ToyScript's design is similar to that of all the other DLR based languages, such as IronPython or IronRuby in the sense that it first parses into

[jvm-l] Re: InfoQ short note on DLR

2008-01-23 Thread Charles Oliver Nutter
Ted Neward wrote: John Lam is a friend of mine; is it OK to forward this thread to him for comment/answers? Hey, it's a public forum...I'd love to hear his input. If others have pointers to papers or presentations on DLR trees, I'd also like to see those. - Charlie

[jvm-l] Re: The Da Vinci Machine

2008-01-23 Thread Charles Oliver Nutter
Rémi Forax wrote: John rose post a new blog entry: http://blogs.sun.com/jrose/entry/anonymous_classes_in_the_vm i can't wait to write da vinci code :) Ha! :) This is driven (at least in part) by feedback I've been giving John about the pain points of implementing a dynamic language on the

[jvm-l] Re: selecting overloaded methods at runtime

2008-03-06 Thread Charles Oliver Nutter
Attila Szegedi wrote: And, just three months later, there it is! :-) I just committed a batch of code modifications that now ensure that there are no undue strong references to Class objects anywhere in the code. The MOP framework should now no longer interfere with the lifecycle of

[jvm-l] Re: Performance characteristics of mutable static primitives?

2008-04-02 Thread Charles Oliver Nutter
John Wilson wrote: On 4/2/08, Charles Oliver Nutter [EMAIL PROTECTED] wrote: I ran into a very strange effect when some Sun folks tried to benchmark JRuby's multi-thread scalability. In short, adding more threads actually caused the benchmarks to take longer. The source of the problem

[jvm-l] Performance characteristics of mutable static primitives?

2008-04-02 Thread Charles Oliver Nutter
I ran into a very strange effect when some Sun folks tried to benchmark JRuby's multi-thread scalability. In short, adding more threads actually caused the benchmarks to take longer. The source of the problem (at least the source that, when fixed, allowed normal thread scaling), was an

[jvm-l] Re: Performance characteristics of mutable static primitives?

2008-04-02 Thread Charles Oliver Nutter
Attila Szegedi wrote: No. You know your JVM bytecodes, Charlie - the only incrementing bytecode in existence is IINC and it only works on an integer local variable. Yes, I know that...but I hadn't dug into what code was actually being generated for a field++. Looking now they don't

[jvm-l] Re: Performance characteristics of mutable static primitives?

2008-04-02 Thread Charles Oliver Nutter
Jochen Theodorou wrote: I think there is not enough data to see a trend. I modified your test, made it run from 1-20 threads and for 50 loops, making an average time containing the time it took to execute all threads and put these in a diagram. I used a Q6600 Quadcore intel CPU with java

[jvm-l] Re: Performance characteristics of mutable static primitives?

2008-04-03 Thread Charles Oliver Nutter
Charles Oliver Nutter wrote: I'm writing up a blog post on this now, so any additional information is very welcome. And I'm not necessarily blaming the JVM...but slower is slower. http://headius.blogspot.com/2008/04/shared-data-considered-harmful.html - Charlie

[jvm-l] Re: Performance characteristics of mutable static primitives?

2008-04-03 Thread Charles Oliver Nutter
Matthias Ernst wrote: Charles, what do you expect? That the VM spread out all global variables throughout the heap so that any broken access pattern cause not too many cache flushes? You're hammering a global from multiple threads, I don't think you can blame the JVM for that, be it for a

[jvm-l] Re: Swapping in better libraries

2008-04-06 Thread Charles Oliver Nutter
John Rose wrote: The OpenJDK regex is a tree-walking interpreter, and needs to be updated in a future release to a Gnu-style backtracking bytecode engine. This is not an architectural problem, but an implementation weakness in the first release. I think we should consider a modified

[jvm-l] Re: Emulating interruptible threads on the JVM

2008-04-09 Thread Charles Oliver Nutter
easieste wrote: Working in Common Lisp on the JVM, I wish to emulate the semantics of a typical thread library (there is nothing in ANSI about such interfaces, they vary widely) (WITH-TIMEOUT timeout REST body) which runs an arbitrary BODY of code on a new thread until TIMEOUT seconds

[jvm-l] Re: Emulating interruptible threads on the JVM

2008-04-09 Thread Charles Oliver Nutter
Charles Oliver Nutter wrote: FWIW, in JRuby we checkpoint, and we hate having to do it. Essentially we set up heartbeat checks at the same points where normal Ruby calls into its thread scheduler. That gives us roughly the same granularity of events, and so we can emulate interruptible

[jvm-l] Re: Emulating interruptible threads on the JVM

2008-04-10 Thread Charles Oliver Nutter
Christian Vest Hansen wrote: On 4/10/08, Colin Walters [EMAIL PROTECTED] wrote: Can't you just Thread.interrupt()? Interrupting a thread does not, to the best of my knowledge, guarentee that an arbitrary body of code will actually stop running. If the code does not invoke any method that

[jvm-l] CommunityOne talk on JVM language implementers

2008-04-18 Thread Charles Oliver Nutter
I've been approved to do a talk at CommunityOne this year on how we all have been trying to bring JVM language implementers together. The general idea is to show that the sleeping giant of languages on the JVM is starting to wake up and will really be a force to reckon with. So now I have to

[jvm-l] Re: CommunityOne talk on JVM language implementers

2008-04-18 Thread Charles Oliver Nutter
Per Bothner wrote: Charles Oliver Nutter wrote: - Discussion of a few key languages that could be arguably considered popular and where they stand in their development processes - Other languages that are up and coming and their status. What about a non-popular language that have been

[jvm-l] Re: CommunityOne talk on JVM language implementers

2008-04-21 Thread Charles Oliver Nutter
Rich Hickey wrote: I'll be at JavaOne, but not in SF until late Monday. I'd be happy to do a writeup on the status of Clojure, and would love to meet with any other JVM language implementors at the show. Yes, please do... and I'd love to talk with all of you about your work and progress over

[jvm-l] Re: Top five languages

2008-04-24 Thread Charles Oliver Nutter
Ola Bini wrote: My top five: JRuby Scala Clojure ioke Duby. You want justifications for those? =) No, but how about a description and status update for ioke I can use in the talk :) - Charlie --~--~-~--~~~---~--~~ You received this message because

[jvm-l] Re: Top five languages

2008-04-24 Thread Charles Oliver Nutter
Jim White wrote: Scala has the right machinery for implementing a prototype for Java 3. Alas it suffers from the problem of other JVM languages like JRuby, Jython, and JavaFX in that it has gratuitous syntax deviation from Java for features that are the same as in Java. Them's fightin

[jvm-l] Re: Top five languages

2008-04-24 Thread Charles Oliver Nutter
Randall R Schulz wrote: On Thursday 24 April 2008 19:47, Jim White wrote: Randall R Schulz wrote: On Thursday 24 April 2008 17:08, Jim White wrote: Charles Oliver Nutter wrote: For my CommunityOne talk...how about everyone posts five interesting JVM language projects... Groovy Kawa ANTLR

[jvm-l] Re: Fan Programing Language

2008-04-27 Thread Charles Oliver Nutter
Steven Shaw wrote: 2008/4/24 Jon Harrop [EMAIL PROTECTED]: You may like the book Compiling with continuations by Appel. Thanks Jon. I really appreciate your whole reply. Appel's book is on my todo list :) I believe the designs of the JVM and (to a lesser extent) the CLR were much

[jvm-l] Re: Top five languages

2008-04-29 Thread Charles Oliver Nutter
raybaq wrote: Hi, Couldn't resist delurking to mention the JVM language I'm working on: JoyJ (Joy in Java, available at http://appforge2.apc.edu.ph/gf/project/joyj/scmsvn/), an interpreter for the concatenative programming language Joy (http://

[jvm-l] Re: avoiding boxing

2008-04-29 Thread Charles Oliver Nutter
A few JRuby techniques to reduce argument boxing: * We have specific-arity call paths for up to three arguments and with or without a block. The compiler calls one of those when it can do so, and calls the default [] version otherwise. This means that from the call site down, there's 10 paths

[jvm-l] Re: Choosing a Scripting Language for a Java Application

2008-04-30 Thread Charles Oliver Nutter
Rich Hickey wrote: On Apr 30, 2:06 am, Per Bothner [EMAIL PROTECTED] wrote: Perhaps a friendly merger might be possible? I think peaceful coexistence is more likely. Clojure has certainly ceded the backwards-compatibility ground. There was a time (you may not remember) when I was

[jvm-l] Re: avoiding boxing

2008-04-30 Thread Charles Oliver Nutter
Jochen Theodorou wrote: Charles Oliver Nutter schrieb: [...] I see... maybe the JRuby problem is just very different from the Groovy problem here Well, not really...you box all arguments in arrays too, and you're paying a cost for that. Whether that cost is measurable in the face

[jvm-l] Re: Choosing a Scripting Language for a Java Application

2008-04-30 Thread Charles Oliver Nutter
Rodrigo B. de Oliveira wrote: On Wed, Apr 30, 2008 at 4:17 PM, Brian Frank [EMAIL PROTECTED] wrote: projects now I can't imagine being that statically bound. My impression is that C#/.NET has similar (if perhaps slightly lessened) restrictions. I don't think .NET is any less dynamic

[jvm-l] Re: avoiding boxing

2008-05-01 Thread Charles Oliver Nutter
John Rose wrote: Or (I don't know if it could be made to work, but it's worth thinking about) method handles could interoperate more tightly with closures, by having each individual method handle somehow take on the appropriate function interface type. I think this could lead to some kind

[jvm-l] Re: Meetup at JavaOne?

2008-05-02 Thread Charles Oliver Nutter
JodaStephen wrote: Hi all, I'd like to suggest a meetup at JavaOne for anyone who is interested in the many different languages on the JVM, and who would be interested in discussing what a JavaNG/Java3 might look like. This would be informal - just a sharing of thoughts and ideas. I'm

[jvm-l] Re: invokedynamic: Is It What We Really Need?

2008-05-09 Thread Charles Oliver Nutter
Alex Tkachman wrote: I have a lot of sympathy for the position that you outline in your blog post but I would like to wait for the EDR to be published before coming to a settled view on the matter. The devil is in the details and I have not seem all the details yet. I am totally agree. At

[jvm-l] Re: Backport invokedynamic

2008-05-25 Thread Charles Oliver Nutter
Done. Also have a look at my primitive handle generator: svn.codehaus.org/jruby/trunk/jruby/src/org/jruby/compiler/util (somewhere in there...I am on my phone right now) - Charlie On May 25, 2008, at 16:24, Rémi Forax [EMAIL PROTECTED] wrote: Charles Oliver Nutter a écrit : Rémi Forax

[jvm-l] Re: invokedynamic and invalidation

2008-05-27 Thread Charles Oliver Nutter
Rémi Forax wrote: Hi gang, In section Target method processing, The second sentence says that you need a reference to a call site to update the target but it's possible to call Linkage.invalidateAll() to invalidate target of all callsite ? I wonder if Linkage.invalidate* are really

[jvm-l] Re: JSR 292 backport poll

2008-06-02 Thread Charles Oliver Nutter
Rémi Forax wrote: Hi all, I've just pushed a new implementation of the backport. CallSites are now created dynamically as needed and can be garbaged if there are no longer used. I've planned to release two tools. - one that can be used at compile time, just after your compiler or as

[jvm-l] Re: Kilim: Actor framework for Java (in bytecode)

2008-06-21 Thread Charles Oliver Nutter
Patrick Wright wrote: This popped up on one of the Scala mailing lists today: Kilim [1] Kilim is a message-passing framwork for Java that provides ultra-lightweight threads and facilities for fast, safe, zero-copy messaging between these threads. I wonder if it isn't time to reconsider an

[jvm-l] Annotation processing without Sun dependency

2008-07-20 Thread Charles Oliver Nutter
Ok, I've got a problem. In JRuby 1.1.3 we started using a compile-time annotation processor to pre-generate a bunch of code. This has helped startup time, since before we did this processing at runtime using Java reflection classes, and just using those classes increased both memory and

[jvm-l] Re: Annotation processing without Sun dependency

2008-07-21 Thread Charles Oliver Nutter
of the bytecode toolkits taken up the slack on some of this yet? Ted Neward Java, .NET, XML Services Consulting, Teaching, Speaking, Writing http://www.tedneward.com -Original Message- From: jvm-languages@googlegroups.com [mailto:jvm- [EMAIL PROTECTED] On Behalf Of Charles Oliver

[jvm-l] JVM Language Summit agenda is up

2008-08-24 Thread Charles Oliver Nutter
FYI, registrations are filling up pretty quick, and now the agenda is published so I expect them go fast. I'm really excited about the set of talks in the draft agenda: http://openjdk.java.net/projects/mlvm/jvmlangsummit/agenda.html And there's a few more slots we're holding open for late

[jvm-l] Re: JVM Language Summit agenda is up

2008-08-24 Thread Charles Oliver Nutter
Patrick Wright wrote: On Sun, Aug 24, 2008 at 10:21 AM, Charles Oliver Nutter [EMAIL PROTECTED] wrote: I'll have to look into that, I'm not sure if we'd made such plans or not. It sure would be nice, but then there's also the hassle of getting all speakers to sign off on their content. I'll

[jvm-l] Re: Yesterday was the International Invokedynamic Day

2008-08-27 Thread Charles Oliver Nutter
John Rose wrote: Folks, invokedynamic, continuations and tailcalls are brewing (in three different locations) and interface injection will (I hope) become real after method handles go mainstream. Great things are happening with the JVM. Oh, and we on the HotSpot team continue to

[jvm-l] Re: Yesterday was the International Invokedynamic Day

2008-08-28 Thread Charles Oliver Nutter
Ben Loud wrote: Attila, I've been wondering, are you planning on trying to do version of Rhino with invokedynamic/ACL etc? There's been a lot of buzz about TraceMonkey recently, and alot of people promoting it by arguing that HotSpot is 'too heavyweight' and because JavaScript is

[jvm-l] Re: Yesterday was the International Invokedynamic Day

2008-08-28 Thread Charles Oliver Nutter
Attila Szegedi wrote: That's actually a very promising direction to go in -- there's a bunch of bytecode-level optimizations that apply across the board for all (or at least, most) dynamic languages. I'm not referring only to calling Java from a dynalang, but rather to optimizing the

[jvm-l] Re: Yesterday was the International Invokedynamic Day

2008-08-28 Thread Charles Oliver Nutter
John Rose wrote: On Aug 28, 2008, at 9:51 AM, Charles Oliver Nutter wrote: With more research and time and unboxing smarts, it could approach Java perf. The invokedynamic instruction removes signature-related bottlenecks from dynamically typed JVM calls, allowing dynamic calls

[jvm-l] Re: Coming up with better defaults on HotSpot

2008-09-03 Thread Charles Oliver Nutter
Eugene Kuleshov wrote: In my subjective tests, the StackMap calculation overhead is much higher then performance gain you'll get from the new verifier. This is actually by design of the new verifier, so pre-verification step when StackMap is generated runs off line and can take long, but

[jvm-l] Re: Coming up with better defaults on HotSpot

2008-09-03 Thread Charles Oliver Nutter
Rémi Forax wrote: I use ASM that is able to generate StackMap using flag |COMPUTE_FRAMES| when creating a ClassWriter. The algorithme used by ASM is described here: http://asm.objectweb.org/doc/developer-guide.html#controlflow Unlike JRuby, I don't generate code at runtime so I have no

[jvm-l] Re: Coming up with better defaults on HotSpot

2008-09-03 Thread Charles Oliver Nutter
Eugene Kuleshov wrote: Correct. However it is just my observation and it may also depend on what methods are being analyzed. I've been testing computation of StackMap when transforming all classes from rt.jar, and on my machine, with Java 6, it takes ~2.5 extra seconds to compute frames for

[jvm-l] Re: Trying to apply various techniques of new JS runtimes to JVM dynamic languages

2008-09-03 Thread Charles Oliver Nutter
Randall R Schulz wrote: I read the press release yesterday (probably the most informative comic I've ever seen, not that I'm a big comic book... I mean graphic novel reader) but I don't think I can see right off how inferring a class structure from a lot of instances with similar attribute

[jvm-l] Re: Trying to apply various techniques of new JS runtimes to JVM dynamic languages

2008-09-03 Thread Charles Oliver Nutter
John Rose wrote: The V8 technique sounds like a successor to Self's internal classing mechanism; it sounds more retroactive. A key advantage of such things is removal of indirections and search. If you want the foo slot of an object in a prototype based language, it's better if the

[jvm-l] Re: Trying to apply various techniques of new JS runtimes to JVM dynamic languages

2008-09-04 Thread Charles Oliver Nutter
Martin Probst wrote: Now when you have a class based language like Python or Ruby, you already have these sets of similar things where the same property names resolve to the same things (the classes). I.e. if your foo.bar statements gets hit with foo being a specific instance, you can

[jvm-l] Re: Trying to apply various techniques of new JS runtimes to JVM dynamic languages

2008-09-05 Thread Charles Oliver Nutter
Randall R Schulz wrote: Given the heavy use of Maps in Groovy and Grails, this sort of technique would seem to benefit them, too, if it or something like it is applicable or can be adapted. It definitely could, but only in places where those maps aren't being directly exposed as maps. The

[jvm-l] Dynlang caching strategies

2008-09-07 Thread Charles Oliver Nutter
Hello again friends! I'm looking to start a discussion about caching strategies for dynamic languages. Probably focused mostly around inline caches, but also mechanisms for per-class or global caches to supplement the inline cache. A description of Ruby's class structure may help frame the

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-09 Thread Charles Oliver Nutter
Jochen Theodorou wrote: Now this gives me several problems... for once I would like to have more control over the serialization and deserialization process, but with the standard deserialization there is no chance it seems. We have had to deal with a similar problem in JRuby, where in our

[jvm-l] Re: Dynlang caching strategies

2008-09-09 Thread Charles Oliver Nutter
Jochen Theodorou wrote: Charles Oliver Nutter schrieb: Hello again friends! I'm looking to start a discussion about caching strategies for dynamic languages. Probably focused mostly around inline caches, but also mechanisms for per-class or global caches to supplement the inline cache

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-09 Thread Charles Oliver Nutter
Jochen Theodorou wrote: oh, ok, so I looked at the wrong method Class.forName(String) is related, but not the same. Which reminds me... I didn't work much with frameworks using java standard serialization, but is it possible, that no such frame work really exists? I mean without doing

[jvm-l] Re: Dynlang caching strategies

2008-09-09 Thread Charles Oliver Nutter
Jochen Theodorou wrote: We had in Groovy a per class cache for method lookups. But the cache was too slow (the generation of the key did cost too much) and if we have inline caches we don't need that kind of caches. Now I don't what kind of relation your cache uses. I guess you use a

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-10 Thread Charles Oliver Nutter
Attila Szegedi wrote: Well, overriding resolveClass() seems like a good solution to me. What problems do you have with that? I can give you one reason that it's not good enough, at least for the JRuby use case of needing to do our own initialization of objects as they're deserialized: I

[jvm-l] Re: Dynlang caching strategies

2008-09-10 Thread Charles Oliver Nutter
Jochen Theodorou wrote: Charles Oliver Nutter schrieb:[...] Perhaps there's some confusion here. To me, an inline cache is a specific type of call site cache. I considered Groovy's call site cache to be an inline cache. What do you feel is the difference? nothing, just a mixup on my side

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-10 Thread Charles Oliver Nutter
Jochen Theodorou wrote: Charles Oliver Nutter schrieb: Jochen Theodorou wrote: hmm... In my example with flyby and ricochet (if I used them correctly) both use the stack directly without creating new frames. I am no VM implementor, so I don't know if that is possible. But given, that my

[jvm-l] Re: Dynlang caching strategies

2008-09-10 Thread Charles Oliver Nutter
Jochen Theodorou wrote: I asked, because I am searching for a way to make the call site cache less thread sensitive.. for example to be able to get the method while updating the cache at the same time... I also considered a event listener system for meta classes in Groovy... a call site

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-10 Thread Charles Oliver Nutter
Charles Oliver Nutter wrote: Try to see the big picture :) I was showing a simple example; method handles are typed just like anything else, and so you should be able to adapt any set of arguments to any other set of arguments. And yes, I could also see a flyby pattern where you specify

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-10 Thread Charles Oliver Nutter
Jochen Theodorou wrote: John Rose schrieb: [...] on the operand stack I have the GString, which needs to become a String by calling its toString() method, which can be done by for example MyRuntime.coerceToString(Object o). And I want to call Foo#foo (String). What this method looks to

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-11 Thread Charles Oliver Nutter
John Rose wrote: On Sep 10, 2008, at 6:11 PM, Charles Oliver Nutter wrote: I'd expect you can have a single argument return converter that converts the value on the way out. Being able to convert only incoming arguments and not outgoing values wouldn't be useful. It's useful

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-11 Thread Charles Oliver Nutter
Jochen Theodorou wrote: Charles Oliver Nutter schrieb: I'd expect you can have a single argument return converter that converts the value on the way out. Being able to convert only incoming arguments and not outgoing values wouldn't be useful. well, of course: class

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-11 Thread Charles Oliver Nutter
Charles Oliver Nutter wrote: - First compiled output produces the most generate invokedynamic sites possible, which get bound to handles that inspect arg lists, do full lookup, and so on. I meant to say generic, not generate here...kinda important to the meaning of the sentence. - Charlie

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-11 Thread Charles Oliver Nutter
Jochen Theodorou wrote: Charles Oliver Nutter schrieb: Jochen Theodorou wrote: null and I want to call a method foo(), that means null is the receiver. But instead of using the unreflected MH for foo() I use something that replaces the receiver in a BMH.. so inside it will be a valid

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-11 Thread Charles Oliver Nutter
Jochen Theodorou wrote: ok, now I see the test... but that is no test with the receiver being null Notice my output shows the bootstrapped method getting null for the receiver argument, and also look at line 61: return fake(null).target(b); This gets rewritten by

[jvm-l] Re: my friend Class.forName(String) (also invokedynamic related)

2008-09-11 Thread Charles Oliver Nutter
Jochen Theodorou wrote: why do we discuss that? You are talking about the development process of the spec itself. I not. It is simply a difference if you specify something, write tests for that and then test if your implementation works according to the spec, or if you use an

[jvm-l] A First Taste of InvokeDynamic

2008-09-12 Thread Charles Oliver Nutter
I've done as I promised and blogged an extensive treatment of my brief InvokeDynamic experience. Some of it will be old news for many of you, including the historical reasons for why invokedynamic is importand. But there's probably a section in there you'll find useful.

[jvm-l] Re: 'cuz the vandals took the handles.

2008-09-12 Thread Charles Oliver Nutter
Nice catch. I locked down the whole group and have had at least 10 bogus accounts try to join in the past month. Such a sad state of affairs. easieste wrote: Clever vandals had redone the links in this doc: corrected. Click on

[jvm-l] Re: 'cuz the vandals took the handles.

2008-09-12 Thread Charles Oliver Nutter
easieste wrote: You're quite welcome. My compliments on your blog article A first taste of InvokeDynamic: I learned an incredible amount about what JSR-292 means for dynamic language implementers. Thanks! Let me know if there's anything that needs clarification. - Charlie

[jvm-l] Re: Looking for submissions in JVM languages, performance benchmarking

2008-09-21 Thread Charles Oliver Nutter
Patrick Wright wrote: Hi (I already posted this to the Scala mailing lists) Cliff Click, of Azul Systems, is looking for code submissions [1] in non-Java JVM languages to use in JVM performance testing/profiling for a talk he's giving next week. He'll post analysis and performance

[jvm-l] Re: Discussion on docs-from-jvm-language-authors

2008-09-22 Thread Charles Oliver Nutter
Thank you. I've been screening new signups, so hopefully there won't be future problems. kristian wrote: Fixed the URLs. They were all pointing to movie4u.com... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[jvm-l] Re: which assembler

2008-10-10 Thread Charles Oliver Nutter
René Jansen wrote: Just a quick question: which assembler are you guys using for experimentation? I find myself wanting to try out some things, but I am in a bind between ooLong and Jasmin or maybe ASM. Is there an unofficial official assembler, preferably something with macros (old s/370

[jvm-l] Re: Single return point important?

2008-10-13 Thread Charles Oliver Nutter
, since each JVM has to accept the output of any bytecode generator. -- John On Oct 13, 2008, at 2:26 AM, Charles Oliver Nutter wrote: I was examining the bytecode output of Duby this morning, comparing it to javac output, and noticed that for fib() there's only one small difference

[jvm-l] Re: which assembler

2008-10-14 Thread Charles Oliver Nutter
PM, Charles Oliver Nutter [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: René Jansen wrote: Just a quick question: which assembler are you guys using for experimentation? I find myself wanting to try out some things, but I am in a bind between ooLong

[jvm-l] Re: which assembler

2008-10-15 Thread Charles Oliver Nutter
). Let me know if it is this forum or somewhere else. Thanks for the tool and your help, best regards, René. On Tue, Oct 14, 2008 at 1:19 PM, Charles Oliver Nutter [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I need to provide some better examples, but the missing bit

[jvm-l] Re: which assembler

2008-10-27 Thread Charles Oliver Nutter
the things I though to be for the testcase only, and have it execute outside of a method. It executes ok, but Erik Meijer would be very happy: there are no side-effects. That I know of. best regards and thanks in advance. René. On Fri, Oct 10, 2008 at 7:58 PM, Charles Oliver Nutter [EMAIL

[jvm-l] Re: Calling non-Java languages from JavaScript

2008-10-30 Thread Charles Oliver Nutter
Kenneth Russell wrote: Java SE 6 Update 10 exposes some new interfaces from the Java Plug-In's LiveConnect implementation that allows a non-Java language runtime to hook in to the dispatch sequence for JavaScript operations coming in from the web browser. This lets you, the language

[jvm-l] Re: Calling non-Java languages from JavaScript

2008-11-11 Thread Charles Oliver Nutter
Greg Brown wrote: Is there a way to run Groovy so that it would not need to be signed? I think this is the key question. The idea that apps can be written for the Java Plugin using any JVM scripting language is very compelling; somewhat less so if the code needs to be signed in order for

[jvm-l] Re: Improving (default) support for non-Java languages in Netbeans

2008-11-16 Thread Charles Oliver Nutter
Jochen Theodorou wrote: groovyc can compile java and groovy files in most cases. So it is no long way off Correct me if I'm wrong, but the joint compilation in groovyc doesn't actually compile both at the same time; it compiles stubs for the Groovy code so the Java code will compile (using

[jvm-l] Re: Improving (default) support for non-Java languages in Netbeans

2008-11-16 Thread Charles Oliver Nutter
Per Bothner wrote: Chas Emerick schrieb: [...] The scope of the current discussion/bug report is not visibility of code within the same project to support interleaving dependencies. This is a much simpler issue about recognizing any classfiles generated by any source other than javac

  1   2   3   >