File tree Expand file tree Collapse file tree 5 files changed +20
-13
lines changed
src/main/java/org/truffleruby Expand file tree Collapse file tree 5 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 9
9
*/
10
10
package org .truffleruby .debug ;
11
11
12
+ import com .oracle .truffle .api .dsl .Bind ;
12
13
import com .oracle .truffle .api .dsl .Cached ;
13
14
import com .oracle .truffle .api .interop .InteropLibrary ;
14
15
import com .oracle .truffle .api .interop .InvalidArrayIndexException ;
15
16
import com .oracle .truffle .api .interop .TruffleObject ;
16
17
import com .oracle .truffle .api .library .ExportLibrary ;
17
18
import com .oracle .truffle .api .library .ExportMessage ;
18
- import com .oracle .truffle .api .profiles .BranchProfile ;
19
+ import com .oracle .truffle .api .nodes .Node ;
20
+ import com .oracle .truffle .api .profiles .InlinedBranchProfile ;
19
21
20
22
@ ExportLibrary (InteropLibrary .class )
21
23
public class SingleElementArray implements TruffleObject {
@@ -38,11 +40,12 @@ protected long getArraySize() {
38
40
39
41
@ ExportMessage
40
42
protected Object readArrayElement (long index ,
41
- @ Cached BranchProfile errorProfile ) throws InvalidArrayIndexException {
43
+ @ Cached InlinedBranchProfile errorProfile ,
44
+ @ Bind ("$node" ) Node node ) throws InvalidArrayIndexException {
42
45
if (isArrayElementReadable (index )) {
43
46
return element ;
44
47
} else {
45
- errorProfile .enter ();
48
+ errorProfile .enter (node );
46
49
throw InvalidArrayIndexException .create (index );
47
50
}
48
51
}
Original file line number Diff line number Diff line change 9
9
*/
10
10
package org .truffleruby .debug ;
11
11
12
+ import com .oracle .truffle .api .dsl .Bind ;
12
13
import com .oracle .truffle .api .dsl .Cached ;
13
14
import com .oracle .truffle .api .interop .InteropLibrary ;
14
15
import com .oracle .truffle .api .interop .TruffleObject ;
15
16
import com .oracle .truffle .api .interop .UnknownIdentifierException ;
16
17
import com .oracle .truffle .api .library .ExportLibrary ;
17
18
import com .oracle .truffle .api .library .ExportMessage ;
18
- import com .oracle .truffle .api .profiles .BranchProfile ;
19
+ import com .oracle .truffle .api .nodes .Node ;
20
+ import com .oracle .truffle .api .profiles .InlinedBranchProfile ;
19
21
20
22
@ ExportLibrary (InteropLibrary .class )
21
23
public class SingleMemberDescriptor implements TruffleObject {
@@ -45,11 +47,12 @@ protected boolean isMemberReadable(String member) {
45
47
46
48
@ ExportMessage
47
49
protected Object readMember (String member ,
48
- @ Cached BranchProfile errorProfile ) throws UnknownIdentifierException {
50
+ @ Cached InlinedBranchProfile errorProfile ,
51
+ @ Bind ("$node" ) Node node ) throws UnknownIdentifierException {
49
52
if (isMemberReadable (member )) {
50
53
return value ;
51
54
} else {
52
- errorProfile .enter ();
55
+ errorProfile .enter (node );
53
56
throw UnknownIdentifierException .create (member );
54
57
}
55
58
}
Original file line number Diff line number Diff line change 9
9
*/
10
10
package org .truffleruby .debug ;
11
11
12
+ import com .oracle .truffle .api .dsl .Bind ;
12
13
import com .oracle .truffle .api .dsl .Cached ;
13
14
import com .oracle .truffle .api .interop .InteropLibrary ;
14
15
import com .oracle .truffle .api .interop .InvalidArrayIndexException ;
15
16
import com .oracle .truffle .api .interop .TruffleObject ;
16
17
import com .oracle .truffle .api .library .ExportLibrary ;
17
18
import com .oracle .truffle .api .library .ExportMessage ;
18
- import com .oracle .truffle .api .profiles .BranchProfile ;
19
+ import com .oracle .truffle .api .nodes .Node ;
20
+ import com .oracle .truffle .api .profiles .InlinedBranchProfile ;
19
21
20
22
@ ExportLibrary (InteropLibrary .class )
21
23
public class VariableNamesObject implements TruffleObject {
@@ -38,11 +40,12 @@ protected long getArraySize() {
38
40
39
41
@ ExportMessage
40
42
protected Object readArrayElement (long index ,
41
- @ Cached BranchProfile errorProfile ) throws InvalidArrayIndexException {
43
+ @ Cached InlinedBranchProfile errorProfile ,
44
+ @ Bind ("$node" ) Node node ) throws InvalidArrayIndexException {
42
45
if (isArrayElementReadable (index )) {
43
46
return names [(int ) index ];
44
47
} else {
45
- errorProfile .enter ();
48
+ errorProfile .enter (node );
46
49
throw InvalidArrayIndexException .create (index );
47
50
}
48
51
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
package org .truffleruby .language ;
11
11
12
12
import com .oracle .truffle .api .CompilerAsserts ;
13
+ import com .oracle .truffle .api .dsl .GenerateInline ;
13
14
import com .oracle .truffle .api .dsl .Idempotent ;
14
15
import com .oracle .truffle .api .dsl .ImportStatic ;
15
16
import com .oracle .truffle .api .dsl .TypeSystemReference ;
41
42
import java .math .BigInteger ;
42
43
43
44
/** Base of all Ruby nodes */
45
+ @ GenerateInline (value = false , inherit = true )
44
46
@ TypeSystemReference (RubyTypes .class )
45
47
@ ImportStatic (RubyGuards .class )
46
48
public abstract class RubyBaseNode extends Node {
You can’t perform that action at this time.
0 commit comments