Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/RubyParserResult.java @ 13706:232eb6708943
Ruby: required fixes for moving FrameDescriptor to the RootNode.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 20 Jan 2014 13:44:54 +0100 |
parents | 0fbee3eb71f0 |
children |
comparison
equal
deleted
inserted
replaced
13705:ac5b0f31f7a2 | 13706:232eb6708943 |
---|---|
7 * GNU General Public License version 2 | 7 * GNU General Public License version 2 |
8 * GNU Lesser General Public License version 2.1 | 8 * GNU Lesser General Public License version 2.1 |
9 */ | 9 */ |
10 package com.oracle.truffle.ruby.runtime; | 10 package com.oracle.truffle.ruby.runtime; |
11 | 11 |
12 import com.oracle.truffle.api.frame.*; | |
13 import com.oracle.truffle.api.nodes.*; | 12 import com.oracle.truffle.api.nodes.*; |
14 | 13 |
15 /** | 14 /** |
16 * The result of parsing Ruby code is a root node and a frame descriptor for the method in that | 15 * The result of parsing Ruby code is a root node and a frame descriptor for the method in that |
17 * root. The root node will always be a {@code RubyRootNode}, but this package is below the nodes | 16 * root. The root node will always be a {@code RubyRootNode}, but this package is below the nodes |
18 * package so currently cannot refer to it. | 17 * package so currently cannot refer to it. |
19 */ | 18 */ |
20 public class RubyParserResult { | 19 public class RubyParserResult { |
21 | 20 |
22 private RootNode rootNode; | 21 private final RootNode rootNode; |
23 private FrameDescriptor frameDescriptor; | |
24 | 22 |
25 public RubyParserResult(RootNode rootNode, FrameDescriptor frameDescriptor) { | 23 public RubyParserResult(RootNode rootNode) { |
26 assert rootNode != null; | 24 assert rootNode != null; |
27 assert frameDescriptor != null; | |
28 | |
29 this.rootNode = rootNode; | 25 this.rootNode = rootNode; |
30 this.frameDescriptor = frameDescriptor; | |
31 } | 26 } |
32 | 27 |
33 public RootNode getRootNode() { | 28 public RootNode getRootNode() { |
34 return rootNode; | 29 return rootNode; |
35 } | 30 } |
36 | 31 |
37 public FrameDescriptor getFrameDescriptor() { | |
38 return frameDescriptor; | |
39 } | |
40 | |
41 } | 32 } |