Groovy Documentation

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, java.lang.String message, Expression arguments, boolean safe, boolean implicitThis, boolean callCurrent, boolean callStatic)

void makeCallSiteArrayInitializer()

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

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

void makeSingleArgumentCall(Expression receiver, java.lang.String message, Expression arguments)

void makeSiteEntry()

void prepareCallSite(java.lang.String message)

 
Methods inherited from class CallSiteWriter
makeCallSiteArrayInitializer, getCallSites, makeSiteEntry, generateCallSiteArray, prepareCallSite, makeGroovyObjectGetPropertySite, makeGetPropertySite, makeSingleArgumentCall, makeCallSite, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

StaticTypesCallSiteWriter

public StaticTypesCallSiteWriter(StaticTypesWriterController controller)


 
Method Detail

generateCallSiteArray

@java.lang.Override
public void generateCallSiteArray()


makeCallSite

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


makeCallSiteArrayInitializer

@java.lang.Override}
public void makeCallSiteArrayInitializer()


makeGetPropertySite

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


makeGroovyObjectGetPropertySite

@java.lang.Overrideif (currentCall != null && currentCall.getNodeMetaData(StaticTypesMarker.IMPLICIT_RECEIVER) != null) {
public void makeGroovyObjectGetPropertySite(Expression receiver, java.lang.String methodName, boolean safe, boolean implicitThis)


makeSingleArgumentCall

@java.lang.OverrideClassNode current = rType;
public void makeSingleArgumentCall(Expression receiver, java.lang.String message, Expression arguments)


makeSiteEntry

@java.lang.OverridewriteStringPlusCall(receiver, message, arguments);
public void makeSiteEntry()


prepareCallSite

@java.lang.Overridereturn;
public void prepareCallSite(java.lang.String message)


 

Groovy Documentation