Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/StringLiteralNode.java @ 12390:5151a7588384
SL: fixed literals generate unnecessary code.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 02 Oct 2013 15:57:17 +0200 |
parents | 79041ab43660 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/StringLiteralNode.java Wed Oct 02 15:33:25 2013 +0200 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/StringLiteralNode.java Wed Oct 02 15:57:17 2013 +0200 @@ -22,9 +22,9 @@ */ package com.oracle.truffle.sl.nodes; -import com.oracle.truffle.api.dsl.*; +import com.oracle.truffle.api.frame.*; -public abstract class StringLiteralNode extends TypedNode { +public final class StringLiteralNode extends TypedNode { private final String value; @@ -32,8 +32,14 @@ this.value = value; } - @Specialization - protected String doString() { + @Override + public String executeString(VirtualFrame frame) { return value; } + + @Override + public Object executeGeneric(VirtualFrame frame) { + return value; + } + }