- 25 Jul, 2014 2 commits
-
-
Marius Wachtler authored
-
Kevin Modzelewski authored
Implement Python Generators
-
- 24 Jul, 2014 11 commits
-
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Marius Wachtler authored
-
Marius Wachtler authored
-
https://github.com/dropbox/pystonMarius Wachtler authored
Conflicts: src/codegen/compvars.h src/codegen/runtime_hooks.h src/runtime/objmodel.h
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Just do it by putting a different class object on the same C-level structure. Not too hard right now to defeat the frozen-ness, please don't try.
-
Kevin Modzelewski authored
Ended up not being too bad, except for some more fun around classdefs having different rules, and making sure to generate the correct error type and messages.
-
Kevin Modzelewski authored
Not worth producing CPython's error messages exactly: some delattr messages depend on whether or not the object has a __dict__ allocated or not. Just canonicalize those in the tester.
-
- 23 Jul, 2014 14 commits
-
-
https://github.com/xiafan68/pystonKevin Modzelewski authored
Merges #101 Conflicts: src/codegen/runtime_hooks.h
-
https://github.com/dropbox/pystonMarius Wachtler authored
Conflicts: src/codegen/runtime_hooks.h src/runtime/builtin_modules/builtins.cpp
-
Kevin Modzelewski authored
Just convert them to ints and strings, failing if the conversion isn't possible. Unicode and str are the same thing, right? :/
-
Kevin Modzelewski authored
-
https://github.com/dropbox/pystonMarius Wachtler authored
Conflicts: src/codegen/irgen/irgenerator.cpp src/codegen/runtime_hooks.h
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Marius Wachtler authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Oh, no this was the issue: we were writing out valid-looking but corrupt pyc files if the parser crashed. Now leave the files as corrupt if the parser crashes
-
Kevin Modzelewski authored
Before was throwing AttributeError, since we were just translating it to: import a b = a.b Now there's a special importFrom runtime function that does essentially the same thing, but throws the proper exception.
-
Kevin Modzelewski authored
Now more resilient to truncated pyc files; got into a bad situation where the parser crashed, wrote out a half-pyc file, which wasn't judged to be invalid.
-
Kevin Modzelewski authored
Previously, a non-satisfied except filter would cause the traceback to be lost, since we were using the one-argument 'raise exc' form.
-
Kevin Modzelewski authored
For os.py. Currently just do it by inspecting the set of modules at the end of the runtime setup; CPython does it by examining the "import inittab". Required adding str comparison methods so they can be sorted. bonus: add errno module.
-
- 22 Jul, 2014 11 commits
-
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
The python stdlib apparently uses a bunch of old-style ways of doing things. Instead of doing the throwing directly in the generated IR, call a runtime function raise1 which will take care of the semantics of checking the type of the raised object, etc.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
Ie if a class is defined in a function, and that class contains a function which references variables from the enclosing function, previously the classdef would not pass the closure through and things would fail. Now classdefs (and other scopes) can pass through closures even if they don't add their own variables to the closured-set. Also, fix some bugs along the way.
-
Kevin Modzelewski authored
Before we would write all local names into the class dict; this is close, but was including undefined names. Have to get help from the IR generator to determine the live names, so add a LOCALS opcode (CPython has a similar one), and use that to generate the dict that a classdef returns. The current support is not quite enough to support the locals() function, since even though we have that information available at the IR generator, it's not easy to make it available to the runtime.
-
Kevin Modzelewski authored
thanks Marius for the report
-
Kevin Modzelewski authored
Before it was part of the (type-agnostic) AST-walker, which didn't make sense.
-
Kevin Modzelewski authored
Not sure how these didn't show up before...
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
- 21 Jul, 2014 2 commits
-
-
Kevin Modzelewski authored
Fixed a bug causing unit tests to fail in my installation
-
Travis Hance authored
Fixed a bug causing unit tests to fail in my installation: the declaration of runtimeCall in stdlib.bc had a different name in place of `class.std::vector`, so looking the type up by hard-coding its name results in a type error when the instruction calling `runtimeCall` is constructed.
-