org.jruby.runtime
Class CompiledBlock19

java.lang.Object
  extended by org.jruby.runtime.BlockBody
      extended by org.jruby.runtime.CompiledBlock19
All Implemented Interfaces:
JumpTarget
Direct Known Subclasses:
CompiledBlockLight19

public class CompiledBlock19
extends BlockBody

A Block implemented using a Java-based BlockCallback implementation rather than with an ICallable. For lightweight block logic within Java code.


Field Summary
protected  Arity arity
           
protected  CompiledBlockCallback19 callback
           
protected  boolean hasMultipleArgsHead
           
protected  StaticScope scope
           
 
Fields inherited from class org.jruby.runtime.BlockBody
argumentType, ARRAY, MULTIPLE_ASSIGNMENT, NULL_BODY, SINGLE_RESTARG, ZERO_ARGS
 
Constructor Summary
protected CompiledBlock19(Arity arity, StaticScope scope, CompiledBlockCallback19 callback, boolean hasMultipleArgsHead, int argumentType)
           
 
Method Summary
 Arity arity()
          What is the arity of this block?
 IRubyObject call(ThreadContext context, IRubyObject[] args, Binding binding, Block.Type type)
           
 IRubyObject call(ThreadContext context, IRubyObject[] args, Binding binding, Block.Type type, Block block)
           
 Block cloneBlock(Binding binding)
           
 StaticScope getStaticScope()
           
static BlockBody newCompiledBlock(Arity arity, StaticScope scope, CompiledBlockCallback19 callback, boolean hasMultipleArgsHead, int argumentType)
           
static Block newCompiledClosure(ThreadContext context, IRubyObject self, Arity arity, StaticScope scope, CompiledBlockCallback19 callback, boolean hasMultipleArgsHead, int argumentType)
           
static Block newCompiledClosure(ThreadContext context, IRubyObject self, BlockBody body)
           
protected  void post(ThreadContext context, Binding binding, Visibility vis, Frame lastFrame)
           
protected  Frame pre(ThreadContext context, RubyModule klass, Binding binding)
           
 void setStaticScope(StaticScope newScope)
           
protected  IRubyObject[] setupBlockArg(Ruby ruby, IRubyObject value, IRubyObject self)
           
 IRubyObject yield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type)
           
 IRubyObject yield(ThreadContext context, IRubyObject args, IRubyObject self, RubyModule klass, boolean aValue, Binding binding, Block.Type type)
           
 IRubyObject yield(ThreadContext context, IRubyObject args, IRubyObject self, RubyModule klass, boolean aValue, Binding binding, Block.Type type, Block block)
           
 IRubyObject yieldSpecific(ThreadContext context, Binding binding, Block.Type type)
           
 IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, Binding binding, Block.Type type)
           
 IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Binding binding, Block.Type type)
           
 IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Binding binding, Block.Type type)
           
 
Methods inherited from class org.jruby.runtime.BlockBody
asArgumentType, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, isGiven, prepareArgumentsForCall, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callback

protected final CompiledBlockCallback19 callback

hasMultipleArgsHead

protected final boolean hasMultipleArgsHead

arity

protected final Arity arity

scope

protected StaticScope scope
Constructor Detail

CompiledBlock19

protected CompiledBlock19(Arity arity,
                          StaticScope scope,
                          CompiledBlockCallback19 callback,
                          boolean hasMultipleArgsHead,
                          int argumentType)
Method Detail

newCompiledClosure

public static Block newCompiledClosure(ThreadContext context,
                                       IRubyObject self,
                                       Arity arity,
                                       StaticScope scope,
                                       CompiledBlockCallback19 callback,
                                       boolean hasMultipleArgsHead,
                                       int argumentType)

newCompiledClosure

public static Block newCompiledClosure(ThreadContext context,
                                       IRubyObject self,
                                       BlockBody body)

newCompiledBlock

public static BlockBody newCompiledBlock(Arity arity,
                                         StaticScope scope,
                                         CompiledBlockCallback19 callback,
                                         boolean hasMultipleArgsHead,
                                         int argumentType)

call

public IRubyObject call(ThreadContext context,
                        IRubyObject[] args,
                        Binding binding,
                        Block.Type type)
Overrides:
call in class BlockBody

call

public IRubyObject call(ThreadContext context,
                        IRubyObject[] args,
                        Binding binding,
                        Block.Type type,
                        Block block)
Overrides:
call in class BlockBody

yieldSpecific

public IRubyObject yieldSpecific(ThreadContext context,
                                 Binding binding,
                                 Block.Type type)
Overrides:
yieldSpecific in class BlockBody

yieldSpecific

public IRubyObject yieldSpecific(ThreadContext context,
                                 IRubyObject arg0,
                                 Binding binding,
                                 Block.Type type)
Overrides:
yieldSpecific in class BlockBody

yieldSpecific

public IRubyObject yieldSpecific(ThreadContext context,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 Binding binding,
                                 Block.Type type)
Overrides:
yieldSpecific in class BlockBody

yieldSpecific

public IRubyObject yieldSpecific(ThreadContext context,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 IRubyObject arg2,
                                 Binding binding,
                                 Block.Type type)
Overrides:
yieldSpecific in class BlockBody

yield

public IRubyObject yield(ThreadContext context,
                         IRubyObject value,
                         Binding binding,
                         Block.Type type)
Specified by:
yield in class BlockBody

yield

public IRubyObject yield(ThreadContext context,
                         IRubyObject args,
                         IRubyObject self,
                         RubyModule klass,
                         boolean aValue,
                         Binding binding,
                         Block.Type type)
Specified by:
yield in class BlockBody

yield

public IRubyObject yield(ThreadContext context,
                         IRubyObject args,
                         IRubyObject self,
                         RubyModule klass,
                         boolean aValue,
                         Binding binding,
                         Block.Type type,
                         Block block)

pre

protected Frame pre(ThreadContext context,
                    RubyModule klass,
                    Binding binding)

post

protected void post(ThreadContext context,
                    Binding binding,
                    Visibility vis,
                    Frame lastFrame)

setupBlockArg

protected IRubyObject[] setupBlockArg(Ruby ruby,
                                      IRubyObject value,
                                      IRubyObject self)

getStaticScope

public StaticScope getStaticScope()
Specified by:
getStaticScope in class BlockBody

setStaticScope

public void setStaticScope(StaticScope newScope)
Specified by:
setStaticScope in class BlockBody

cloneBlock

public Block cloneBlock(Binding binding)
Specified by:
cloneBlock in class BlockBody

arity

public Arity arity()
Description copied from class: BlockBody
What is the arity of this block?

Specified by:
arity in class BlockBody
Returns:
the arity


Copyright © 2002-2007 JRuby Team. All Rights Reserved.