Commit 05fcd11f authored by Kevin Modzelewski's avatar Kevin Modzelewski

getting tired :/

parent a3acb92b
......@@ -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();
}
}
......@@ -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)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment