Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLStackTraceBuiltin.java @ 18130:b4e38f4ca414
Truffle: rename @SlowPath to @TruffleBoundary.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 21 Oct 2014 00:22:51 +0200 |
parents | d45951ac3ce9 |
children | 3286fb5fea4a |
comparison
equal
deleted
inserted
replaced
18129:b3adab5f01a2 | 18130:b4e38f4ca414 |
---|---|
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.truffle.sl.builtins; | 23 package com.oracle.truffle.sl.builtins; |
24 | 24 |
25 import com.oracle.truffle.api.*; | 25 import com.oracle.truffle.api.*; |
26 import com.oracle.truffle.api.CompilerDirectives.SlowPath; | 26 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; |
27 import com.oracle.truffle.api.dsl.*; | 27 import com.oracle.truffle.api.dsl.*; |
28 import com.oracle.truffle.api.frame.*; | 28 import com.oracle.truffle.api.frame.*; |
29 import com.oracle.truffle.api.frame.FrameInstance.FrameAccess; | 29 import com.oracle.truffle.api.frame.FrameInstance.FrameAccess; |
30 import com.oracle.truffle.api.nodes.*; | 30 import com.oracle.truffle.api.nodes.*; |
31 import com.oracle.truffle.api.source.*; | 31 import com.oracle.truffle.api.source.*; |
45 @Specialization | 45 @Specialization |
46 public String trace() { | 46 public String trace() { |
47 return createStackTrace(); | 47 return createStackTrace(); |
48 } | 48 } |
49 | 49 |
50 @SlowPath | 50 @TruffleBoundary |
51 private static String createStackTrace() { | 51 private static String createStackTrace() { |
52 StringBuilder str = new StringBuilder(); | 52 StringBuilder str = new StringBuilder(); |
53 | 53 |
54 Truffle.getRuntime().iterateFrames(frameInstance -> { | 54 Truffle.getRuntime().iterateFrames(frameInstance -> { |
55 dumpFrame(str, frameInstance.getCallTarget(), frameInstance.getFrame(FrameAccess.READ_ONLY, true)); | 55 dumpFrame(str, frameInstance.getCallTarget(), frameInstance.getFrame(FrameAccess.READ_ONLY, true)); |