-I
to the pyston process, which forces it to stay in the AST interpreter
-I
will force it to stay in codegen/ast_interpreter.cpp
and make things much simpler
$ ./pyston_dbg -I
Pyston v0.7.0 (rev f7e8fcf7d57c624da5ac8a8be7d0d55c260ff32e), targeting Python 2.7.8
>>
>>
>> escal x
reached an escal statement
>>
>>
>> def foo():
... escal y
... return 4
...
../../src/core/ast.h:1151: virtual bool pyston::ASTVisitor::visit_escal(pyston::AST_Escal *): Assertion `0' failed:
Someone called abort!
Aborted (core dumped)
(gdb) run happytest.py
Starting program: /home/escal3/debug_pyston/pyston/pyston_dbg happytest.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
reached an escal statement
../../src/core/ast.h:1151: virtual bool pyston::ASTVisitor::visit_escal(pyston::AST_Escal *): Assertion `0' failed:
Someone called abort!
Program received signal SIGABRT, Aborted.
0x00007ffff5185c37 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0 0x00007ffff5185c37 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff5189028 in __GI_abort () at abort.c:89
#2 0x00000000007d0245 in abort () at ../../src/codegen/unwinding.cpp:1158
#3 0x00000000006167b7 in pyston::ASTVisitor::visit_escal (this=0x7fffffffaa88,
node=0x21f22d8) at ../../src/core/ast.h:1151
#4 0x00000000007dd1d1 in pyston::AST_Escal::accept (this=0x21f22d8,
v=0x7fffffffaa88) at ../../src/core/ast.cpp:557
#5 0x00000000014afdbc in pyston::NameCollectorVisitor::visit_functiondef (
this=0x7fffffffaa88, node=0x21f2190)
at ../../src/analysis/scoping_analysis.cpp:683
#6 0x00000000014e4ca5 in pyston::AST_FunctionDef::accept (this=0x21f2190,
v=0x7fffffffaa88) at ../../src/core/ast.cpp:521
#7 0x00000000014afcdb in pyston::NameCollectorVisitor::collect (node=0x21f2190,
map=0x7fffffffab18, scoping=0x7fffffffc3b0)
at ../../src/analysis/scoping_analysis.cpp:795
#8 0x0000000000612f9e in pyston::ScopingAnalysis::analyzeSubtree (
this=0x7fffffffc3b0, node=0x21f2190)
at ../../src/analysis/scoping_analysis.cpp:977
#9 0x00000000014b0e85 in pyston::ScopingAnalysis::getScopeInfoForNode (
this=0x7fffffffc3b0, node=0x21f2190)
at ../../src/analysis/scoping_analysis.cpp:986
#10 0x00000000014f3142 in pyston::ModuleCFGProcessor::runRecursively (
this=0x7fffffffc3b0, body=..., name=0x7ffff49af2e0, lineno=3, args=0x21f21f0,
orig_node=0x21f2190) at ../../src/core/cfg.cpp:3538
#11 0x00000000014f4271 in pyston::CFGVisitor::visit_functiondef (
this=0x7fffffffbba8, node=0x21f2190) at ../../src/core/cfg.cpp:1966
#12 0x00000000014e4ca5 in pyston::AST_FunctionDef::accept (this=0x21f2190,
v=0x7fffffffbba8) at ../../src/core/ast.cpp:521
#13 0x00000000007f217f in pyston::computeCFG (body=...,
ast_type=pyston::AST_TYPE::Module, lineno=1, args=0x0, filename=0x7ffff49adf48,
source=0x251de40, param_names=..., scoping=0x23ed9c0, cfgizer=0x7fffffffc3b0)
at ../../src/core/cfg.cpp:3380
#14 0x00000000014f36ec in pyston::ModuleCFGProcessor::runRecursively (
this=0x7fffffffc3b0, body=..., name=0x7ffff7e8f2b0, lineno=1, args=0x0,
orig_node=0x21f20a0) at ../../src/core/cfg.cpp:3581
#15 0x00000000014f3d3f in pyston::computeAllCFGs (ast=0x21f20a0,
globals_from_module=true, future_flags=16, fn=0x7ffff49adf48, bm=0x23686e0)
at ../../src/core/cfg.cpp:3597
#16 0x0000000000752df2 in pyston::compileAndRunModule (m=0x21f20a0, bm=0x23686e0)
at ../../src/codegen/irgen/hooks.cpp:234
#17 0x00000000005fa84b in pyston::main (argc=2, argv=0x7fffffffdfc8)
at ../../src/jit.cpp:536
#18 0x00000000005f95e2 in main (argc=2, argv=0x7fffffffdfc8)
at ../../src/jit.cpp:591
src/analysis/scoping_analysis.cpp
where I didn't realize I needed to make additions
python
will end up running Pyston
pip install
things as well