Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/CoreSourceSection.java @ 13745:978587c91373
Merge
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Thu, 23 Jan 2014 16:35:57 -0800 |
parents | f29a358cf3da |
children |
rev | line source |
---|---|
13514 | 1 /* |
13568
f29a358cf3da
Ruby: minor tweaks to implementation nodes for debugging access
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
13514
diff
changeset
|
2 * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved. This |
13514 | 3 * code is released under a tri EPL/GPL/LGPL license. You can use it, |
4 * redistribute it and/or modify it under the terms of the: | |
5 * | |
6 * Eclipse Public License version 1.0 | |
7 * GNU General Public License version 2 | |
8 * GNU Lesser General Public License version 2.1 | |
9 */ | |
10 package com.oracle.truffle.ruby.nodes; | |
11 | |
12 import com.oracle.truffle.api.*; | |
13 | |
14 /** | |
13568
f29a358cf3da
Ruby: minor tweaks to implementation nodes for debugging access
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
13514
diff
changeset
|
15 * Source sections used for core method nodes. |
13514 | 16 */ |
13568
f29a358cf3da
Ruby: minor tweaks to implementation nodes for debugging access
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
13514
diff
changeset
|
17 public final class CoreSourceSection implements NullSourceSection { |
13514 | 18 |
19 private final String name; | |
20 | |
21 public CoreSourceSection(String name) { | |
22 this.name = name; | |
23 } | |
24 | |
25 public Source getSource() { | |
26 return new CoreSource(name); | |
27 } | |
28 | |
29 public int getStartLine() { | |
30 return 0; | |
31 } | |
32 | |
33 public int getStartColumn() { | |
34 return 0; | |
35 } | |
36 | |
37 public int getCharIndex() { | |
38 return 0; | |
39 } | |
40 | |
41 @Override | |
42 public int getCharLength() { | |
43 return 0; | |
44 } | |
45 | |
46 public int getCharEndIndex() { | |
47 return 0; | |
48 } | |
49 | |
50 public String getIdentifier() { | |
51 return null; | |
52 } | |
53 | |
54 public String getCode() { | |
55 return name; | |
56 } | |
57 | |
58 @Override | |
59 public String toString() { | |
60 return name; | |
61 } | |
62 | |
63 } |