aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-12-08 10:40:55 +0100
committerGitHub <[email protected]>2017-12-08 10:40:55 +0100
commit70c5dccad3d839a455682e22ac187e325c792112 (patch)
tree2e507e879306ee5dc89d270b69f87fac76e6a5eb /erts/emulator/beam
parent842d3c0be0d2095c8d1e79ea3d672e191f7f954e (diff)
parent9dce8fe582cecb586375dafff4b84c11a1b3ac7e (diff)
downloadotp-70c5dccad3d839a455682e22ac187e325c792112.tar.gz
otp-70c5dccad3d839a455682e22ac187e325c792112.tar.bz2
otp-70c5dccad3d839a455682e22ac187e325c792112.zip
Merge pull request #1634 from bjorng/bjorn/get_stacktrace-syntax/OTP-14692
Add syntax in try/catch to retrieve the stacktrace directly
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/instrs.tab5
-rw-r--r--erts/emulator/beam/ops.tab6
2 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/instrs.tab b/erts/emulator/beam/instrs.tab
index d934abb217..b92152238e 100644
--- a/erts/emulator/beam/instrs.tab
+++ b/erts/emulator/beam/instrs.tab
@@ -931,3 +931,8 @@ i_raise() {
//| -no_next
}
+build_stacktrace() {
+ SWAPOUT;
+ x(0) = build_stacktrace(c_p, x(0));
+ SWAPIN;
+}
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index c30af029ce..fd1b3b9c74 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -1578,3 +1578,9 @@ i_recv_mark
recv_set Fail | label Lbl | loop_rec Lf Reg => \
i_recv_set | label Lbl | loop_rec Lf Reg
i_recv_set
+
+#
+# OTP 21.
+#
+
+build_stacktrace