Source

pypy / pypy / translator / cli / class_.py

Author Commit Message Labels Comments Date
Antonio Cuni
argh, really check for *all* subclasses of Exception
Antonio Cuni
use .NET System.Exception as the base class for RPython Exception, and do not override the default ToString() of exceptions. This should let us to get nice traceback when rpython exceptions are not caught
Antonio Cuni
various fixes to make minimal/test/test_zrpy_exception working on CLI. It still doesn't work because it triggers a bug in the cli backend
Antonio Cuni
(in-progress) copy the cli backend from the oo-jit branch
Antonio Cuni
we can't use null as default value for valuetypes
Antonio Cuni
refactor how gencli represent .NET types: instead of using strings, use instances of our own class hierarchy; this add an additional layer between ootype's types and .NET types which will allow for much more flexibility in the future.
Antonio Cuni
oops! we must do the lookup *before* we mangle the name!
Antonio Cuni
Fix both test_overridden_classattr_as_defaults and the translation on windows.
Antonio Cuni
Fix an ootypesystem bug that prevented the thunk object space to run with gencli: - add support for overridden default values for fields to ootype.Instance - add logic that detect overridden default values on ootypesystem/rclass - fix gencli and genjs to cope with the new concept of overridden default values - skip the new test in genjvm because it's not trivial to fix it
Antonio Cuni
remove print debug.
nikomatsakis
(antocuni, niko) fix a number of errors from test_dict
nikomatsakis
1. adapt the JVM code to the changes I made in cli/oosupport; though I checked this in before, but apparently not. 2. make the CLI constants for Records and Instances rely only upon the generic setup code in oosupport; others remain the same
nikomatsakis
Next iteration of unified JVM/CLI constant support. In this version, the CLI code uses the same constant code as JVM, but the CLI has its own version of the methods which generate bytecode. Final iteration is to remove those methods by implementing them generically in oosupport and implementing the required methods in the "metavm" generator interface. Towards that end, this check-in also includes a "CLIBaseGenerator" class that includes most of the metavm generator implementation, but not those parts that are specific to a particular function (like loading a variable). All tests continue to pass in CLI and JS on my machine.
Antonio Cuni
(antocuni, niko) Refactor of oosupport so that gencli, genjs and (later) genjvm can share more code.
Antonio Cuni
Python2.3 compatibility
Antonio Cuni
When using 'specialize:ctr_location' it could happen that INSTANCE contains a method whose first argument is of a type not related to INSTANCE. Don't render such a method, else peverify fails.
Antonio Cuni
It seems there are problem with classes containing abstract methods, because it can happen they are instantiated. Thus, we can't mark as abstract neither the class nor the methods. For methods, we have to provide a default implementation that returns a default value to make the verifier happy.
Antonio Cuni
Mark classes as abstract when they don't override abstract methods defined in superclasses.
Antonio Cuni
Mark classes with abstract methods as abstract.
Antonio Cuni
A bit of refactoring: - make sure that classes and records have an unique name when in the same namespace; - rename all the 'classdef' attributes into 'INSTANCE': classdef was there for historical reasons; - don't use a global cts and database for EntryPoints, but let GenCli passing it to them.
Antonio Cuni
oops... last checkin was buggy.
Antonio Cuni
Make sure to use unique names for classes in the same namespace.
Antonio Cuni
General refactoring of constants generation. Now AbstractConst is an instance of Node and constants are treated as other pending nodes. The difference is that they are not render()ed, but instead they are stored in the db to be rendered all togheter at the end of code generation.
Antonio Cuni
Added *very* primitive support for os.write
Antonio Cuni
Added support for abstract methods, and a test.
Antonio Cuni
Add __ne__ when there is an __eq__
Antonio Cuni
It could happen that first argument of a method of a class is annotated with the tyoe of a subclass: in this case don't render the method, else there would be a type mismatch.
Antonio Cuni
Escape field names, too.
Antonio Cuni
bugfix.
Antonio Cuni
Constructors now set the default value for class fields.
  1. Prev
  2. 1
  3. 2
  4. Next