These are chat archives for dropbox/pyston

10th
Oct 2015
Sun
@Daetalus
Oct 10 2015 00:06
It need import.c, and import.c need Python-ast.c the latter is WIP.I am tring to enable part of import.c. But encounter some problems.
Kevin Modzelewski
@kmod
Oct 10 2015 00:25
can we use the code already in import.cpp?
we should probably be migrating the code in import.cpp towards cpython's implementation over time
oh, looks like we already copied over get_path_importer, which is what does most of the work of PyImport_GetImporter
Sun
@Daetalus
Oct 10 2015 00:28
Ah, thanks for point the way.
Kevin Modzelewski
@kmod
Oct 10 2015 00:28
so maybe we just need to copy PyImport_GetImporter
Sun
@Daetalus
Oct 10 2015 00:28
Yes, just find it.
I find that there has a lot "dead" code in from_cpython.
Kevin Modzelewski
@kmod
Oct 10 2015 00:30
like in Modules?
Sun
@Daetalus
Oct 10 2015 00:32
Yes, just checking
Kevin Modzelewski
@kmod
Oct 10 2015 00:39
oh, yeah maybe we should have only copied in the parts that we're using :/
Sun
@Daetalus
Oct 10 2015 01:44
Some functions in from_cpython/Python/pythonrun.c could help Pyston command line interpreter to process multiline. @kmod would you mind to give a professional suggestion about where those functions can copy to?
Kevin Modzelewski
@kmod
Oct 10 2015 02:27
I guess it depends on how much you're thinking to copy
if it's a lot, we could do from_cpython/Python/pythonrun.c
another option is to put them into src/jit.cpp
which is probably our closest equivalent to their pythonrun.c