commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kohsuke Kawaguchi ...@kohsuke.org>
Subject [javaflow] byte code instrumentation
Date Tue, 02 Aug 2005 04:59:26 GMT

I've been looking at the disassembled byte code casually.

One thing I noticed is that we are adding two variables to every method; 
one is Continuation and the other is Stack.

I wonder if we can reduce this to just one, namely to Stack. Instead of 
remembering Thread->Continuation association, we can remember 
Thread->Stack association. We then replace 
Continuation.currentContinuation() with Stack.currentStack(), and we can 
also move relevant flags (like restoring/capturing) to a Stack object.

This also has a nice side-effect of moving methods like 
isCapturing/isRestoring to a non-API package. Today, those methods are 
defined as public methods of Continuation, as a part of the API class, 
even though they aren't supposed to be called by applications.

In this way, we can also make the Continuation truly immutable.

Does this sound reasonable?
-- 
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message