merged in latest cython-unstable
authorStefan Behnel <scoder@users.berlios.de>
Tue, 6 Oct 2009 08:03:44 +0000 (10:03 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 6 Oct 2009 08:03:44 +0000 (10:03 +0200)
1  2 
Cython/Compiler/ExprNodes.py
Cython/Compiler/Main.py
Cython/Compiler/ModuleNode.py
Cython/Compiler/Naming.py
Cython/Compiler/Nodes.py
Cython/Compiler/Optimize.py
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/Parsing.pxd
Cython/Compiler/Parsing.py
Cython/Compiler/Symtab.py

Simple merge
index 4e687d9f084da13823fd62c9ba0ffe38bd19315b,7f43c94f88b3829089d51b9b5800fb78b557d6cc..289979711945347591fe815db77b19b9f950cef0
@@@ -112,15 -120,14 +120,16 @@@ class Context(object)
              NormalizeTree(self),
              PostParse(self),
              _specific_post_parse,
-             InterpretCompilerDirectives(self, self.pragma_overrides),
+             InterpretCompilerDirectives(self, self.compiler_directives),
              _align_function_definitions,
 +            MarkClosureVisitor(self),
              ConstantFolding(),
              FlattenInListTransform(),
              WithTransform(self),
              DecoratorTransform(self),
              AnalyseDeclarationsTransform(self),
 +            CreateClosureClasses(self),
+             AutoTestDictTransform(self),
              EmbedSignature(self),
              TransformBuiltinMethods(self),
              IntroduceBufferAuxiliaryVars(self),
index 4bbfe99998d541a6349a7f184712640f01ccaed3,dd3161b7a6c3d9f868ebf2f1f1e4fec440e93bec..70341f69cd3f8eac3e5c50517031303106666906
@@@ -253,13 -268,9 +268,13 @@@ class ModuleNode(Nodes.Node, Nodes.Bloc
          code.putln("")
          code.putln("/* Implementation of %s */" % env.qualified_name)
  
-         code.globalstate.insert_global_var_declarations_into(code)
+         code = globalstate['all_the_rest']
  
          self.generate_cached_builtins_decls(env, code)
 +        # generate lambda function definitions
 +        for node in env.lambda_defs:
 +            node.generate_function_definitions(env, code)
 +        # generate normal function definitions
          self.body.generate_function_definitions(env, code)
          code.mark_pos(None)
          self.generate_typeobj_definitions(env, code)
index c1d73123fcbf3b79bc901dd82227945d7c1e4a45,059779d6c0adbcd7b412a9b5a69523017dc71dd7..7c4e465f4eb4322cce73874cdef4e14720b472f0
@@@ -44,9 -44,7 +44,10 @@@ vtabptr_prefix    = pyrex_prefix + "vta
  vtabstruct_prefix = pyrex_prefix + "vtabstruct_"
  opt_arg_prefix    = pyrex_prefix + "opt_args_"
  convert_func_prefix = pyrex_prefix + "convert_"
 +closure_scope_prefix = pyrex_prefix + "scope_"
 +closure_class_prefix = pyrex_prefix + "scope_struct_"
 +lambda_func_prefix = pyrex_prefix + "lambda_"
+ module_is_main   = pyrex_prefix + "module_is_main_"
  
  args_cname       = pyrex_prefix + "args"
  pykwdlist_cname  = pyrex_prefix + "pyargnames"
@@@ -84,8 -83,10 +86,11 @@@ pymoduledef_cname = pyrex_prefix + "mod
  optional_args_cname = pyrex_prefix + "optional_args"
  import_star      = pyrex_prefix + "import_star"
  import_star_set  = pyrex_prefix + "import_star_set"
- cur_scope_cname  = pyrex_prefix + "scope"
 +outer_scope_cname= pyrex_prefix + "outer_scope"
+ cur_scope_cname  = pyrex_prefix + "cur_scope"
+ enc_scope_cname  = pyrex_prefix + "enc_scope"
+ frame_cname      = pyrex_prefix + "frame"
+ frame_code_cname = pyrex_prefix + "frame_code"
  
  line_c_macro = "__LINE__"
  
index 183a6faf1874fac104c8592b8dc6bfd8021441f4,4873ace4d862373ef1356f0da1812279985194bb..71bf63ccf9ef9233d915545663dac52748ab19a4
@@@ -11,9 -11,10 +11,10 @@@ import Namin
  import PyrexTypes
  import TypeSlots
  from PyrexTypes import py_object_type, error_type, CTypedefType, CFuncType
 -from Symtab import ModuleScope, LocalScope, GeneratorLocalScope, \
 +from Symtab import ModuleScope, LocalScope, ClosureScope, \
      StructOrUnionScope, PyClassScope, CClassScope
- from Cython.Utils import open_new_file, replace_suffix, UtilityCode
+ from Cython.Utils import open_new_file, replace_suffix
+ from Code import UtilityCode
  from StringEncoding import EncodedString, escape_byte_string, split_docstring
  import Options
  import ControlFlow
Simple merge
index 7af84501f04f3c4d7a769215cf6e412c1dcf6a66,047b2e7fd546b8ae8bfc987b12a7996603357d4b..bca87ddf22856fae3caf937cbaabbc7e05c722bc
@@@ -142,10 -139,9 +142,10 @@@ cpdef p_c_modifiers(PyrexScanner s
  cpdef p_c_func_or_var_declaration(PyrexScanner s, pos, ctx)
  cpdef p_ctypedef_statement(PyrexScanner s, ctx)
  cpdef p_decorators(PyrexScanner s)
 -cpdef p_def_statement(PyrexScanner s, decorators = *)
 +cpdef p_def_statement(PyrexScanner s, list decorators = *)
 +cpdef p_varargslist(PyrexScanner s, terminator=*)
  cpdef p_py_arg_decl(PyrexScanner s)
- cpdef p_class_statement(PyrexScanner s)
+ cpdef p_class_statement(PyrexScanner s, decorators)
  cpdef p_c_class_definition(PyrexScanner s, pos,  ctx)
  cpdef p_c_class_options(PyrexScanner s)
  cpdef p_property_decl(PyrexScanner s)
Simple merge
index a6b5165f820e7c8392fc5d21b0fc33200d8d792f,39115b71d6d846b943e539820cdcc995da6b3690..4fc5031be0871d2be36dcc9a9968b5f2ff11666a
@@@ -247,8 -242,8 +248,9 @@@ class Scope(object)
          self.obj_to_entry = {}
          self.pystring_entries = []
          self.buffer_entries = []
 +        self.lambda_defs = []
          self.control_flow = ControlFlow.LinearControlFlow()
+         self.return_type = None
          
      def start_branching(self, pos):
          self.control_flow = self.control_flow.start_branch(pos)