merged in latest cython-devel
authorStefan Behnel <scoder@users.berlios.de>
Thu, 28 Jan 2010 22:27:58 +0000 (23:27 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 28 Jan 2010 22:27:58 +0000 (23:27 +0100)
1  2 
Cython/Compiler/ExprNodes.py
Cython/Compiler/Lexicon.py
Cython/Compiler/Main.py
Cython/Compiler/ModuleNode.py
Cython/Compiler/Nodes.py
Cython/Compiler/Optimize.py
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/Parsing.py
Cython/Compiler/Symtab.py

Simple merge
Simple merge
index fcac64e18d7d0ab642723571086cb5cbd96a65f8,04f4bc2cbc7ee1aed7fd503d2b941ba32999c2a7..c36f34429018913f1cac2e5b8fe4033d1fe8ec93
@@@ -130,9 -130,9 +131,10 @@@ class Context(object)
              WithTransform(self),
              DecoratorTransform(self),
              AnalyseDeclarationsTransform(self),
 +            CreateClosureClasses(self),
              AutoTestDictTransform(self),
              EmbedSignature(self),
+             EarlyReplaceBuiltinCalls(self),
              MarkAssignments(self),
              TransformBuiltinMethods(self),
              IntroduceBufferAuxiliaryVars(self),
Simple merge
index e77ebf904103b1f7289a800cbf4fe13310599a20,5cd40d7617935dea9c2dc9541b6c37ee409704e3..a87d1af0fde21fa009dbfedd9b625a9082a5533e
@@@ -597,8 -597,8 +597,9 @@@ class CArgDeclNode(Node)
      # not_none       boolean            Tagged with 'not None'
      # default        ExprNode or None
      # default_value  PyObjectConst      constant for default value
 +    # annotation     ExprNode or None   Py3 function arg annotation
      # is_self_arg    boolean            Is the "self" arg of an extension type method
+     # is_type_arg    boolean            Is the "class" arg of an extension type classmethod
      # is_kw_only     boolean            Is a keyword-only argument
  
      child_attrs = ["base_type", "declarator", "default"]
@@@ -1646,10 -1605,9 +1657,10 @@@ class DefNode(FuncDefNode)
      reqd_kw_flags_cname = "0"
      is_wrapper = 0
      decorators = None
 +    return_type_annotation = None
      entry = None
      acquire_gil = 0
-     
+     self_in_stararg = 0
  
      def __init__(self, pos, **kwds):
          FuncDefNode.__init__(self, pos, **kwds)
                              directive_locals = getattr(cfunc, 'directive_locals', {}))
      
      def analyse_declarations(self, env):
 -        self.declare_pyfunction(env)
+         self.is_classmethod = self.is_staticmethod = False
+         if self.decorators:
+             for decorator in self.decorators:
+                 func = decorator.decorator
+                 if func.is_name:
+                     self.is_classmethod |= func.name == 'classmethod'
+                     self.is_staticmethod |= func.name == 'staticmethod'
+         if self.is_classmethod and env.lookup_here('classmethod'):
+             # classmethod() was overridden - not much we can do here ...
+             self.is_classmethod = False
+         if self.is_staticmethod and env.lookup_here('staticmethod'):
+             # staticmethod() was overridden - not much we can do here ...
+             self.is_staticmethod = False
+         self.analyse_argument_types(env)
++        if self.name == '<lambda>':
++            self.declare_lambda_function(env)
++        else:
++            self.declare_pyfunction(env)
+         self.analyse_signature(env)
+         self.return_type = self.entry.signature.return_type()
+         self.create_local_scope(env)
+     def analyse_argument_types(self, env):
          directive_locals = self.directive_locals = env.directives['locals']
          for arg in self.args:
              if hasattr(arg, 'name'):
Simple merge
Simple merge
Simple merge