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
05fcd11f
Commit
05fcd11f
authored
Nov 14, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getting tired :/
parent
a3acb92b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
+23
-10
src/codegen/unwinding.cpp
src/codegen/unwinding.cpp
+1
-8
src/runtime/types.cpp
src/runtime/types.cpp
+22
-2
No files found.
src/codegen/unwinding.cpp
View file @
05fcd11f
...
...
@@ -60,8 +60,6 @@ struct uw_table_entry {
namespace
pyston
{
static
BoxedClass
*
unwind_session_cls
;
// Parse an .eh_frame section, and construct a "binary search table" such as you would find in a .eh_frame_hdr section.
// Currently only supports .eh_frame sections with exactly one fde.
// See http://www.airs.com/blog/archives/460 for some useful info.
...
...
@@ -531,15 +529,13 @@ public:
}
};
class
PythonUnwindSession
:
public
Box
{
class
PythonUnwindSession
{
ExcInfo
exc_info
;
PythonStackExtractor
pystack_extractor
;
Timer
t
;
public:
DEFAULT_CLASS_SIMPLE
(
unwind_session_cls
,
true
);
PythonUnwindSession
()
:
exc_info
(
NULL
,
NULL
,
NULL
),
t
(
/*min_usec=*/
10000
)
{}
ExcInfo
*
getExcInfoStorage
()
{
return
&
exc_info
;
}
...
...
@@ -1229,8 +1225,5 @@ llvm::JITEventListener* makeTracebacksListener() {
}
void
setupUnwinding
()
{
unwind_session_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
0
,
0
,
sizeof
(
PythonUnwindSession
),
false
,
"unwind_session"
);
unwind_session_cls
->
freeze
();
}
}
src/runtime/types.cpp
View file @
05fcd11f
...
...
@@ -2064,6 +2064,9 @@ public:
static
Box
*
hasnext
(
Box
*
_self
);
static
Box
*
next
(
Box
*
_self
);
static
Box
*
next_capi
(
Box
*
_self
)
noexcept
;
static
void
dealloc
(
Box
*
b
)
noexcept
;
static
int
traverse
(
Box
*
self
,
visitproc
visit
,
void
*
arg
)
noexcept
;
};
// A dictionary-like wrapper around the attributes array.
...
...
@@ -3537,6 +3540,22 @@ int HCAttrs::traverse(visitproc visit, void* arg) noexcept {
Py_FatalError
(
"unimplemented"
);
}
void
AttrWrapperIter
::
dealloc
(
Box
*
_o
)
noexcept
{
AttrWrapperIter
*
o
=
(
AttrWrapperIter
*
)
_o
;
Py_FatalError
(
"unimplemented?"
);
o
->
cls
->
tp_free
(
o
);
}
int
AttrWrapperIter
::
traverse
(
Box
*
_o
,
visitproc
visit
,
void
*
arg
)
noexcept
{
AttrWrapperIter
*
o
=
(
AttrWrapperIter
*
)
_o
;
Py_FatalError
(
"unimplemented?"
);
return
0
;
}
void
BoxedClosure
::
dealloc
(
Box
*
_o
)
noexcept
{
BoxedClosure
*
o
=
(
BoxedClosure
*
)
_o
;
...
...
@@ -3818,8 +3837,9 @@ void setupRuntime() {
classmethod_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
0
,
0
,
sizeof
(
BoxedClassmethod
),
false
,
"classmethod"
,
BoxedClassmethod
::
dealloc
,
NULL
,
true
,
BoxedClassmethod
::
traverse
,
BoxedClassmethod
::
clear
);
attrwrapperiter_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
0
,
0
,
sizeof
(
AttrWrapperIter
),
false
,
"attrwrapperiter"
);
attrwrapperiter_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
0
,
0
,
sizeof
(
AttrWrapperIter
),
false
,
"attrwrapperiter"
,
AttrWrapperIter
::
dealloc
,
NULL
,
true
,
AttrWrapperIter
::
traverse
,
NOCLEAR
);
pyston_getset_cls
->
giveAttr
(
"__get__"
,
new
BoxedFunction
(
FunctionMetadata
::
create
((
void
*
)
getsetGet
,
UNKNOWN
,
3
)));
capi_getset_cls
->
giveAttr
(
"__get__"
,
new
BoxedFunction
(
FunctionMetadata
::
create
((
void
*
)
getsetGet
,
UNKNOWN
,
3
)));
...
...
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