Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
254f3bc4
Commit
254f3bc4
authored
Nov 14, 2015
by
Rudi Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tb_next attribute to traceback.
parent
4eec398c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
src/runtime/traceback.cpp
src/runtime/traceback.cpp
+16
-0
No files found.
src/runtime/traceback.cpp
View file @
254f3bc4
...
@@ -119,6 +119,13 @@ void BoxedTraceback::here(LineInfo lineInfo, Box** tb) {
...
@@ -119,6 +119,13 @@ void BoxedTraceback::here(LineInfo lineInfo, Box** tb) {
*
tb
=
new
BoxedTraceback
(
std
::
move
(
lineInfo
),
*
tb
);
*
tb
=
new
BoxedTraceback
(
std
::
move
(
lineInfo
),
*
tb
);
}
}
static
Box
*
traceback_tb_next
(
Box
*
self
,
void
*
)
{
assert
(
self
->
cls
==
traceback_cls
);
BoxedTraceback
*
traceback
=
static_cast
<
BoxedTraceback
*>
(
self
);
return
traceback
->
tb_next
;
}
void
setupTraceback
()
{
void
setupTraceback
()
{
traceback_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
BoxedTraceback
::
gcHandler
,
0
,
0
,
sizeof
(
BoxedTraceback
),
traceback_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
BoxedTraceback
::
gcHandler
,
0
,
0
,
sizeof
(
BoxedTraceback
),
false
,
"traceback"
);
false
,
"traceback"
);
...
@@ -126,6 +133,15 @@ void setupTraceback() {
...
@@ -126,6 +133,15 @@ void setupTraceback() {
traceback_cls
->
giveAttr
(
"getLines"
,
traceback_cls
->
giveAttr
(
"getLines"
,
new
BoxedFunction
(
FunctionMetadata
::
create
((
void
*
)
BoxedTraceback
::
getLines
,
UNKNOWN
,
1
)));
new
BoxedFunction
(
FunctionMetadata
::
create
((
void
*
)
BoxedTraceback
::
getLines
,
UNKNOWN
,
1
)));
/*
* Currently not supported.
traceback_cls->giveAttr("tb_frame", new (pyston_getset_cls) BoxedGetsetDescriptor(traceback_tb_frame, NULL, NULL));
traceback_cls->giveAttr("tb_lasti", new (pyston_getset_cls) BoxedGetsetDescriptor(traceback_tb_lasti, NULL, NULL));
traceback_cls->giveAttr("tb_lineno", new (pyston_getset_cls) BoxedGetsetDescriptor(traceback_tb_lineno, NULL,
NULL));
*/
traceback_cls
->
giveAttr
(
"tb_next"
,
new
(
pyston_getset_cls
)
BoxedGetsetDescriptor
(
traceback_tb_next
,
NULL
,
NULL
));
traceback_cls
->
freeze
();
traceback_cls
->
freeze
();
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment