Mercurial > hg > truffle
diff graal/com.oracle.graal.examples/src/examples/HelloWorld.java @ 5233:efbb1e33e2f3
removed XIR prologue and epilogues - architecture and runtime specific subclass of Backend is now used instead
removed XIR ops: Align, StackOverflowCheck, PushFrame, PopFrame, RawBytes
enhanced disassembly to annotate marks
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 12 Apr 2012 15:55:03 +0200 |
parents | e808627bd16f |
children |
line wrap: on
line diff
--- a/graal/com.oracle.graal.examples/src/examples/HelloWorld.java Thu Apr 12 14:20:51 2012 +0200 +++ b/graal/com.oracle.graal.examples/src/examples/HelloWorld.java Thu Apr 12 15:55:03 2012 +0200 @@ -25,6 +25,20 @@ public class HelloWorld { public static void main(String[] args) { - System.out.println("hello world!"); + new HelloWorld(args).greet(); + } + + public HelloWorld(String[] args) { + name = args.length == 0 ? "world" : args[0]; + } + + public String name; + + public String getName() { + return name; + } + + public void greet() { + System.out.println("hello " + getName() + "!"); } }