comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLPrintlnBuiltin.java @ 16512:abe7128ca473

SL: upgrade source attribution
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Mon, 14 Jul 2014 16:51:41 -0700
parents afd6fa5e8229
children b4e38f4ca414
comparison
equal deleted inserted replaced
16511:aee02665e505 16512:abe7128ca473
25 import java.io.*; 25 import java.io.*;
26 26
27 import com.oracle.truffle.api.CompilerDirectives.SlowPath; 27 import com.oracle.truffle.api.CompilerDirectives.SlowPath;
28 import com.oracle.truffle.api.dsl.*; 28 import com.oracle.truffle.api.dsl.*;
29 import com.oracle.truffle.api.nodes.*; 29 import com.oracle.truffle.api.nodes.*;
30 import com.oracle.truffle.api.source.*;
30 import com.oracle.truffle.sl.runtime.*; 31 import com.oracle.truffle.sl.runtime.*;
31 32
32 /** 33 /**
33 * Builtin function to write a value to the {@link SLContext#getOutput() standard output}. The 34 * Builtin function to write a value to the {@link SLContext#getOutput() standard output}. The
34 * different specialization leverage the typed {@code println} methods available in Java, i.e., 35 * different specialization leverage the typed {@code println} methods available in Java, i.e.,
38 * unconditionally inline everything reachable from the println() method. This is done via the 39 * unconditionally inline everything reachable from the println() method. This is done via the
39 * {@link SlowPath} annotations. 40 * {@link SlowPath} annotations.
40 */ 41 */
41 @NodeInfo(shortName = "println") 42 @NodeInfo(shortName = "println")
42 public abstract class SLPrintlnBuiltin extends SLBuiltinNode { 43 public abstract class SLPrintlnBuiltin extends SLBuiltinNode {
44
45 public SLPrintlnBuiltin() {
46 super(new NullSourceSection("SL builtin", "println"));
47 }
43 48
44 @Specialization 49 @Specialization
45 public long println(long value) { 50 public long println(long value) {
46 doPrint(getContext().getOutput(), value); 51 doPrint(getContext().getOutput(), value);
47 return value; 52 return value;