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
653433da
Commit
653433da
authored
Nov 05, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add back trashcan macros
parent
fa20017e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
from_cpython/Include/object.h
from_cpython/Include/object.h
+0
-6
from_cpython/Include/pystate.h
from_cpython/Include/pystate.h
+3
-0
src/capi/object.cpp
src/capi/object.cpp
+7
-0
src/core/threading.cpp
src/core/threading.cpp
+3
-1
No files found.
from_cpython/Include/object.h
View file @
653433da
...
...
@@ -1054,9 +1054,6 @@ PyAPI_FUNC(void) _PyTrash_thread_destroy_chain(void) PYSTON_NOEXCEPT;
#define PyTrash_UNWIND_LEVEL 50
// Pyston change: I don't think we need this since destructors
// are run differently
#if 0
/* Note the workaround for when the thread state is NULL (issue #17703) */
#define Py_TRASHCAN_SAFE_BEGIN(op) \
do { \
...
...
@@ -1077,9 +1074,6 @@ PyAPI_FUNC(void) _PyTrash_thread_destroy_chain(void) PYSTON_NOEXCEPT;
else \
_PyTrash_thread_deposit_object((PyObject*)op); \
} while (0);
#endif
#define Py_TRASHCAN_SAFE_BEGIN(op) do {
#define Py_TRASHCAN_SAFE_END(op) } while (0);
#ifdef __cplusplus
}
...
...
from_cpython/Include/pystate.h
View file @
653433da
...
...
@@ -120,6 +120,9 @@ typedef struct _ts {
PyObject
*
dict
;
/* Stores per-thread state */
int
trash_delete_nesting
;
PyObject
*
trash_delete_later
;
// Pyston note: additions in here need to be mirrored in ThreadStateInternal::accept
}
PyThreadState
;
...
...
src/capi/object.cpp
View file @
653433da
...
...
@@ -1108,4 +1108,11 @@ extern "C" void _Py_NegativeRefcount(const char* fname, int lineno, PyObject* op
}
#endif
/* Py_REF_DEBUG */
extern
"C"
void
_PyTrash_thread_deposit_object
(
PyObject
*
op
)
noexcept
{
Py_FatalError
(
"unimplemented"
);
}
extern
"C"
void
_PyTrash_thread_destroy_chain
()
noexcept
{
Py_FatalError
(
"unimplemented"
);
}
}
src/core/threading.cpp
View file @
653433da
...
...
@@ -38,7 +38,7 @@ std::unordered_set<PerThreadSetBase*> PerThreadSetBase::all_instances;
extern
"C"
{
__thread
PyThreadState
cur_thread_state
=
{
0
,
1
,
NULL
,
NULL
,
NULL
,
NULL
};
// not sure if we need to explicitly request zero-initialization
=
{
0
,
1
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
NULL
};
// not sure if we need to explicitly request zero-initialization
}
PthreadFastMutex
threading_lock
;
...
...
@@ -142,6 +142,8 @@ public:
v
->
visit
(
&
pub_state
->
curexc_traceback
);
if
(
pub_state
->
dict
)
v
->
visit
(
&
pub_state
->
dict
);
if
(
pub_state
->
trash_delete_later
)
v
->
visit
(
&
pub_state
->
trash_delete_later
);
for
(
auto
&
stack_info
:
previous_stacks
)
{
v
->
visit
(
&
stack_info
.
next_generator
);
...
...
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