Commit 9f3c472a authored by Kevin Modzelewski's avatar Kevin Modzelewski

Some fixes

parent bd1e4b54
......@@ -83,6 +83,12 @@ Usually this is just a matter of calling PyGC_RegisterStaticConstant() around an
Similarly, this can happen in our code. If you store sometihng in a `static` variable, you will typically have to call PyGC_RegisterStaticConstant. There is a helper function for the common case -- getStaticString() is equivalent to `PyGC_RegisterStaticConstant(PyString_InternFromString())`, which happens a decent amount.
## Testing
Some misc testing notes:
- Most literals will get interned. This also includes the constants produced via some simple constant folding. This means that it is hard to use them as the object that you think might get collected or not (ie `does_this_get_freed_too_early(1)`). I tend to use something like `2.0 ** 5`, since this is something that the JITs will not try to constant-fold.
## Debugging
First, this is all much much much easier when everything is super deterministic.
......
......@@ -1717,7 +1717,6 @@ void Rewriter::_allocateAndCopy(RewriterVar* result, RewriterVar* array_ptr, int
}
RewriterVar* Rewriter::allocateAndCopyPlus1(RewriterVar* first_elem, RewriterVar* rest_ptr, int n_rest) {
assert(0 && "check refcounting");
STAT_TIMER(t0, "us_timer_rewriter", 10);
if (n_rest > 0)
......
......@@ -195,7 +195,6 @@ extern "C" void raise0_capi(ExcInfo* frame_exc_info) noexcept {
}
extern "C" void raise3(STOLEN(Box*) arg0, STOLEN(Box*) arg1, STOLEN(Box*) arg2) {
assert(0 && "Check refcounting");
bool reraise = arg2 != NULL && arg2 != None;
auto exc_info = excInfoForRaise(arg0, arg1, arg2);
......
......@@ -143,7 +143,6 @@ extern "C" Box* deopt(AST_expr* expr, Box* value) {
}
extern "C" void printHelper(Box* w, Box* v, bool nl) {
assert(0 && "is this tested?");
// copied from cpythons PRINT_ITEM and PRINT_NEWLINE op handling code
if (w == NULL || w == None) {
w = PySys_GetObject("stdout");
......
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