Skip to content
  1. Oct 27, 2012
  2. Sep 25, 2012
    • John McCall's avatar
      During jump-scope checking, build an ExprWithCleanups immediately · b0433eeb
      John McCall authored
      into the enclosing scope;  this is a more accurate model but is
      (I believe) unnecessary in my test case due to other flaws.
      However, one of those flaws is now intentional:  blocks which
      appear in return statements can be trivially observed to not
      extend in lifetime past the return, and so we can allow a jump
      past them.  Do the necessary magic in IR-generation to make
      this work.
      
      llvm-svn: 164589
      b0433eeb
  3. Mar 11, 2012
  4. Feb 22, 2012
  5. Oct 20, 2011
  6. Sep 18, 2011
  7. Sep 17, 2011
  8. Sep 13, 2011
  9. Sep 09, 2011
  10. Jul 23, 2011
  11. Jul 11, 2011
  12. Jun 24, 2011
  13. Jun 16, 2011
    • John McCall's avatar
      Automatic Reference Counting. · 31168b07
      John McCall authored
      Language-design credit goes to a lot of people, but I particularly want
      to single out Blaine Garst and Patrick Beard for their contributions.
      
      Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
      in no particular order.
      
      llvm-svn: 133103
      31168b07
  14. Jun 15, 2011
  15. May 28, 2011
  16. May 27, 2011
  17. Apr 15, 2011
  18. Feb 17, 2011
    • Chris Lattner's avatar
      Step #1/N of implementing support for __label__: split labels into · c8e630e4
      Chris Lattner authored
      LabelDecl and LabelStmt.  There is a 1-1 correspondence between the
      two, but this simplifies a bunch of code by itself.  This is because
      labels are the only place where we previously had references to random
      other statements, causing grief for AST serialization and other stuff.
      
      This does cause one regression (attr(unused) doesn't silence unused
      label warnings) which I'll address next.
      
      This does fix some minor bugs:
      1. "The only valid attribute " diagnostic was capitalized.
      2. Various diagnostics printed as ''labelname'' instead of 'labelname'
      3. This reduces duplication of label checking between functions and blocks.
      
      Review appreciated, particularly for the cindex and template bits.
      
      llvm-svn: 125733
      c8e630e4
  19. Feb 13, 2011
  20. Oct 28, 2010
    • John McCall's avatar
      Implement an indirect-goto optimization for goto *&&lbl and respect this · 9de9160d
      John McCall authored
      in the scope checker.  With that done, turn an indirect goto into a
      protected scope into a hard error;  otherwise IR generation has to start
      worrying about declarations not dominating their scopes, as exemplified
      in PR8473.
      
      If this really affects anyone, I can probably adjust this to only hard-error
      on possible indirect gotos into VLA scopes rather than arbitrary scopes.
      But we'll see how people cope with the aggressive change on the marginal
      feature.
      
      llvm-svn: 117539
      9de9160d
  21. Aug 26, 2010
  22. Aug 25, 2010
  23. Aug 12, 2010
  24. Aug 03, 2010
  25. Jul 01, 2010
  26. Jun 22, 2010
    • Douglas Gregor's avatar
      Alter the internal representation of the condition variable in · 27b98eae
      Douglas Gregor authored
      if/while/switch/for statements to ensure that walking the children of
      these statements actually works. Previously, we stored the condition
      variable as a VarDecl. However, StmtIterator isn't able to walk from a
      VarDecl to a set of statements, and would (in some circumstances) walk
      beyond the end of the list of statements, cause Bad Behavior.
      
      In this change, we've gone back to representing the condition
      variables as DeclStmts. While not as memory-efficient as VarDecls, it
      greatly simplifies iteration over the children. 
      
      Fixes the remainder of <rdar://problem/8104754>.
      
      llvm-svn: 106504
      27b98eae
  27. May 12, 2010
    • John McCall's avatar
      Improve commentary on the indirect-goto jump scope checker and extract · 42f9f1f1
      John McCall authored
      a convenience routine to find the innermost common ancestor of two scopes.
      
      llvm-svn: 103565
      42f9f1f1
    • John McCall's avatar
      When checking scopes for indirect goto, be more permissive (but still safe) · cf819ab3
      John McCall authored
      about the permitted scopes.  Specifically:
        1) Permit labels and gotos to appear after a prologue of variable initializations.
        2) Permit indirect gotos to jump out of scopes that don't require cleanup.
        3) Diagnose possible attempts to indirect-jump out of scopes that do require
           cleanup.
      This requires a substantial reinvention of the algorithm for checking indirect
      goto.  The current algorithm is Omega(M*N), with M = the number of unique
      scopes being jumped from and N = the number of unique scopes being jumped to,
      with an additional factor that is probably (worst-case) linear in the depth
      of scopes.  Thus the entire thing is likely cubic given some truly bizarre
      ill-formed code;  on well-formed code the additional factor collapses to
      an amortized constant (when amortized over the entire function) and so
      the algorithm is quadratic.  Even this requires every label to appear in
      its own scope, which would be very unusual for indirect-goto code (and
      extremely unlikely for well-formed code);  it is far more likely that
      all labels will be in the same scope and so the algorithm becomes linear.
      For such a marginal feature, I am fairly happy with this result.
      
      (this is using JumpDiagnostic's definition of scope, where successive
      variables in a block appear in their own scope)
      
      llvm-svn: 103536
      cf819ab3
  28. Apr 24, 2010
    • Douglas Gregor's avatar
      Improve the AST representation of Objective-C @try/@catch/@finally · 96c79498
      Douglas Gregor authored
      statements. Instead of the @try having a single @catch, where all of
      the @catch's were chained (using an O(n^2) algorithm nonetheless),
      @try just holds an array of its @catch blocks. The resulting AST is
      slightly more compact (not important) and better represents the actual
      language semantics (good).
      
      llvm-svn: 102221
      96c79498
  29. Mar 08, 2010
  30. Mar 01, 2010
    • Chris Lattner's avatar
      Implement jump checking for initialized c++ variables, implementing · 30d0cfda
      Chris Lattner authored
      a fixme and PR6451.
      
      Only perform jump checking if the containing function has no errors,
      and add the infrastructure needed to do this.
      
      On the testcase in the PR, we produce:
      
      t.cc:6:3: error: illegal goto into protected scope
        goto later;
        ^
      t.cc:7:5: note: jump bypasses variable initialization
        X x;
          ^
      
      llvm-svn: 97497
      30d0cfda
  31. Nov 17, 2009
  32. Sep 09, 2009
  33. Jul 19, 2009
Loading