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
751f2ac4
Commit
751f2ac4
authored
Nov 12, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc stuff
parent
3bd1c068
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
30 deletions
+9
-30
from_cpython/Modules/gcmodule.c
from_cpython/Modules/gcmodule.c
+5
-1
src/capi/typeobject.cpp
src/capi/typeobject.cpp
+0
-1
src/runtime/capi.cpp
src/runtime/capi.cpp
+0
-28
src/runtime/util.cpp
src/runtime/util.cpp
+4
-0
No files found.
from_cpython/Modules/gcmodule.c
View file @
751f2ac4
...
...
@@ -742,6 +742,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
static
void
debug_instance
(
char
*
msg
,
PyInstanceObject
*
inst
)
{
Py_FatalError
(
"unimplemented"
);
#if 0
char *cname;
/* simple version of instance_repr */
PyObject *classname = inst->in_class->cl_name;
...
...
@@ -751,6 +753,7 @@ debug_instance(char *msg, PyInstanceObject *inst)
cname = "?";
PySys_WriteStderr("gc: %.100s <%.100s instance at %p>\n",
msg, cname, inst);
#endif
}
static
void
...
...
@@ -838,7 +841,8 @@ static void
clear_freelists
(
void
)
{
(
void
)
PyMethod_ClearFreeList
();
(
void
)
PyFrame_ClearFreeList
();
Py_FatalError
(
"unimplemented"
);
//(void)PyFrame_ClearFreeList();
(
void
)
PyCFunction_ClearFreeList
();
(
void
)
PyTuple_ClearFreeList
();
#ifdef Py_USING_UNICODE
...
...
src/capi/typeobject.cpp
View file @
751f2ac4
...
...
@@ -3409,7 +3409,6 @@ extern "C" int PyType_Ready(PyTypeObject* cls) noexcept {
gc
::
registerNonheapRootObject
(
cls
,
sizeof
(
PyTypeObject
));
classes
.
push_back
(
cls
);
_Py_INC_REFTOTAL
;
// unhandled fields:
int
ALLOWABLE_FLAGS
=
Py_TPFLAGS_DEFAULT
|
Py_TPFLAGS_BASETYPE
|
Py_TPFLAGS_HAVE_GC
|
Py_TPFLAGS_CHECKTYPES
...
...
src/runtime/capi.cpp
View file @
751f2ac4
...
...
@@ -1939,34 +1939,6 @@ extern "C" int PyErr_WarnExplicit(PyObject* category, const char* text, const ch
#undef PyObject_GC_Del
#undef _PyObject_GC_Malloc
extern
"C"
PyObject
*
_PyObject_GC_Malloc
(
size_t
basicsize
)
noexcept
{
Box
*
r
=
((
PyObject
*
)
PyObject_MALLOC
(
basicsize
));
RELEASE_ASSERT
(
gc
::
isValidGCMemory
(
r
),
""
);
return
r
;
}
#undef _PyObject_GC_New
extern
"C"
PyObject
*
_PyObject_GC_New
(
PyTypeObject
*
tp
)
noexcept
{
PyObject
*
op
=
_PyObject_GC_Malloc
(
_PyObject_SIZE
(
tp
));
if
(
op
!=
NULL
)
op
=
PyObject_INIT
(
op
,
tp
);
RELEASE_ASSERT
(
gc
::
isValidGCObject
(
op
),
""
);
return
op
;
}
extern
"C"
PyVarObject
*
_PyObject_GC_NewVar
(
PyTypeObject
*
tp
,
Py_ssize_t
nitems
)
noexcept
{
const
size_t
size
=
_PyObject_VAR_SIZE
(
tp
,
nitems
);
PyVarObject
*
op
=
(
PyVarObject
*
)
_PyObject_GC_Malloc
(
size
);
if
(
op
!=
NULL
)
op
=
PyObject_INIT_VAR
(
op
,
tp
,
nitems
);
RELEASE_ASSERT
(
gc
::
isValidGCObject
(
op
),
""
);
return
op
;
}
extern
"C"
void
PyObject_GC_Del
(
void
*
op
)
noexcept
{
PyObject_FREE
(
op
);
}
#ifdef HAVE_GCC_ASM_FOR_X87
/* inline assembly for getting and setting the 387 FPU control word on
...
...
src/runtime/util.cpp
View file @
751f2ac4
...
...
@@ -121,6 +121,10 @@ extern "C" bool hasnext(Box* o) {
return
o
->
cls
->
tpp_hasnext
(
o
);
}
extern
"C"
void
_PyObject_Dump
(
Box
*
b
)
noexcept
{
dump
(
b
);
}
extern
"C"
void
dump
(
void
*
p
)
{
dumpEx
(
p
,
0
);
}
...
...
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