Groovy 2.0.0-rc-3

org.codehaus.groovy.classgen.asm.sc
[Java] Class StaticTypesCallSiteWriter

java.lang.Object
  org.codehaus.groovy.classgen.asm.CallSiteWriter
      org.codehaus.groovy.classgen.asm.sc.StaticTypesCallSiteWriter
All Implemented Interfaces:
org.objectweb.asm.Opcodes

public class StaticTypesCallSiteWriter
extends CallSiteWriter

A call site writer which replaces call site caching with static calls. This means that the generated code looks more like Java code than dynamic Groovy code. Best effort is made to use JVM instructions instead of calls to helper methods.

Authors:
Cedric Champeau


Field Summary
 
Fields inherited from class CallSiteWriter
CONSTRUCTOR
 
Constructor Summary
StaticTypesCallSiteWriter(StaticTypesWriterController controller)

 
Method Summary
void generateCallSiteArray()

void makeCallSite(Expression receiver, String message, Expression arguments, boolean safe, boolean implicitThis, boolean callCurrent, boolean callStatic)

void makeCallSiteArrayInitializer()

void makeGetPropertySite(Expression receiver, String methodName, boolean safe, boolean implicitThis)

void makeGroovyObjectGetPropertySite(Expression receiver, String methodName, boolean safe, boolean implicitThis)

void makeSingleArgumentCall(Expression receiver, String message, Expression arguments)

void makeSiteEntry()

void prepareCallSite(String message)

 
Methods inherited from class CallSiteWriter
generateCallSiteArray, getCallSites, makeCallSite, makeCallSiteArrayInitializer, makeGetPropertySite, makeGroovyObjectGetPropertySite, makeSingleArgumentCall, makeSiteEntry, prepareCallSite, prepareSiteAndReceiver, visitBoxedArgument
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

StaticTypesCallSiteWriter

public StaticTypesCallSiteWriter(StaticTypesWriterController controller)


 
Method Detail

generateCallSiteArray

@Override
public void generateCallSiteArray()


makeCallSite

@Override
public void makeCallSite(Expression receiver, String message, Expression arguments, boolean safe, boolean implicitThis, boolean callCurrent, boolean callStatic)


makeCallSiteArrayInitializer

private boolean makeGetPropertyWithGetter(final Expression receiver, final ClassNode receiverType, final String methodName) {
public void makeCallSiteArrayInitializer()


makeGetPropertySite

@Override
public void makeGetPropertySite(Expression receiver, String methodName, boolean safe, boolean implicitThis)


makeGroovyObjectGetPropertySite

ClassNode classNode = controller.getClassNode();
public void makeGroovyObjectGetPropertySite(Expression receiver, String methodName, boolean safe, boolean implicitThis)


makeSingleArgumentCall

if (ClassHelper.getWrapper(rType).isDerivedFrom(ClassHelper.Number_TYPE)
public void makeSingleArgumentCall(Expression receiver, String message, Expression arguments)


makeSiteEntry

}
public void makeSiteEntry()


prepareCallSite

TypeChooser typeChooser = controller.getTypeChooser();
public void prepareCallSite(String message)


 

Copyright © 2003-2012 The Codehaus. All rights reserved.