Class SLPrintlnBuiltin

java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.sl.builtins.SLBuiltinNode
com.oracle.truffle.sl.builtins.SLPrintlnBuiltin
All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable

public abstract class SLPrintlnBuiltin extends SLBuiltinNode
Builtin function to write a value to the standard output. The different specialization leverage the typed println methods available in Java, i.e., primitive values are printed without converting them to a String first.

Printing involves a lot of Java code, so we need to tell the optimizing system that it should not unconditionally inline everything reachable from the println() method. This is done via the CompilerDirectives.TruffleBoundary annotations.

  • Nested Class Summary

    Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node

    com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.Children
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    println(Object value, com.oracle.truffle.api.interop.InteropLibrary interop, SLContext context)
     

    Methods inherited from class com.oracle.truffle.sl.builtins.SLBuiltinNode

    execute

    Methods inherited from class com.oracle.truffle.api.nodes.Node

    accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SLPrintlnBuiltin

      public SLPrintlnBuiltin()
  • Method Details

    • println

      public Object println(Object value, com.oracle.truffle.api.interop.InteropLibrary interop, SLContext context)