Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLDefineFunctionBuiltin.java @ 13943:89ac75425681
SL: small cleanups
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Wed, 12 Feb 2014 10:30:42 -0800 |
parents | afd6fa5e8229 |
children | 09ac9ac9c4fc |
comparison
equal
deleted
inserted
replaced
13942:1ee27cd07ed0 | 13943:89ac75425681 |
---|---|
36 @NodeInfo(shortName = "defineFunction") | 36 @NodeInfo(shortName = "defineFunction") |
37 public abstract class SLDefineFunctionBuiltin extends SLBuiltinNode { | 37 public abstract class SLDefineFunctionBuiltin extends SLBuiltinNode { |
38 | 38 |
39 @Specialization | 39 @Specialization |
40 public String defineFunction(String code) { | 40 public String defineFunction(String code) { |
41 return doDefineFunction(getContext(), code); | 41 doDefineFunction(getContext(), code); |
42 return code; | |
42 } | 43 } |
43 | 44 |
44 @SlowPath | 45 @SlowPath |
45 private static String doDefineFunction(SLContext context, String code) { | 46 private static void doDefineFunction(SLContext context, String code) { |
46 Source source = context.getSourceManager().get("[defineFunction]", code); | 47 Source source = context.getSourceManager().get("[defineFunction]", code); |
47 /* The same parsing code as for parsing the initial source. */ | 48 /* The same parsing code as for parsing the initial source. */ |
48 Parser.parseSL(context, source); | 49 Parser.parseSL(context, source); |
49 return code; | |
50 } | 50 } |
51 } | 51 } |