1. 17 1月, 2014 1 次提交
  2. 16 1月, 2014 2 次提交
    • N
      Use as_slice() method on option · e71571a3
      Niko Matsakis 提交于
      e71571a3
    • N
      Issue #3511 - Rationalize temporary lifetimes. · 419ac4a1
      Niko Matsakis 提交于
      Major changes:
      
      - Define temporary scopes in a syntax-based way that basically defaults
        to the innermost statement or conditional block, except for in
        a `let` initializer, where we default to the innermost block. Rules
        are documented in the code, but not in the manual (yet).
        See new test run-pass/cleanup-value-scopes.rs for examples.
      - Refactors Datum to better define cleanup roles.
      - Refactor cleanup scopes to not be tied to basic blocks, permitting
        us to have a very large number of scopes (one per AST node).
      - Introduce nascent documentation in trans/doc.rs covering datums and
        cleanup in a more comprehensive way.
      419ac4a1
  3. 15 1月, 2014 1 次提交
  4. 11 1月, 2014 1 次提交
  5. 10 1月, 2014 1 次提交
  6. 08 1月, 2014 1 次提交
  7. 04 1月, 2014 1 次提交
  8. 27 12月, 2013 4 次提交
  9. 19 12月, 2013 1 次提交
  10. 30 11月, 2013 1 次提交
  11. 29 11月, 2013 1 次提交
  12. 27 11月, 2013 1 次提交
  13. 20 11月, 2013 1 次提交
  14. 19 11月, 2013 2 次提交
  15. 10 11月, 2013 1 次提交
    • A
      Add a "system" ABI · 2fcc70ec
      Alex Crichton 提交于
      This adds an other ABI option which allows a custom selection over the target
      architecture and OS. The only current candidate for this change is that kernel32
      on win32 uses stdcall, but on win64 it uses the cdecl calling convention.
      Otherwise everywhere else this is defined as using the Cdecl calling convention.
      
      cc #10049
      Closes #8774
      2fcc70ec
  16. 05 11月, 2013 1 次提交
  17. 22 10月, 2013 1 次提交
  18. 20 10月, 2013 1 次提交
    • A
      Use __morestack to detect stack overflow · 6d8330af
      Alex Crichton 提交于
      This commit resumes management of the stack boundaries and limits when switching
      between tasks. This additionally leverages the __morestack function to run code
      on "stack overflow". The current behavior is to abort the process, but this is
      probably not the best behavior in the long term (for deails, see the comment I
      wrote up in the stack exhaustion routine).
      6d8330af
  19. 11 10月, 2013 1 次提交
    • J
      improve C ABI · 95fc31ae
      Jyun-Yan You 提交于
      I borrow some ideas from clang's ABIInfo.h and TargetInfo.cpp.
      LLVMType is replaced with ArgType, which is similar to clang's ABIArgInfo,
      and I also merge attrs of FnType into it.
      
      Now ABI implementation doesn't need to insert hidden return pointer
      to arg_tys of FnType. Instead it is handled in foreign.rs.
      
      This change also fixes LLVM assertion failure when compiling MIPS target.
      95fc31ae
  20. 09 10月, 2013 1 次提交
  21. 03 10月, 2013 1 次提交
    • D
      make C-like enums immediate · f504461a
      Daniel Micay 提交于
      This fixes two existing bugs along the way:
      
      * The `transmute` intrinsic did not correctly handle casts of immediate
        aggregates like newtype structs and tuples.
      * The code for calling foreign functions used the wrong type to create
        an `alloca` temporary
      
          enum Foo { A, B }
          fn foo() -> Foo { A }
      
      Before:
      
          ; Function Attrs: nounwind uwtable
          define void @_ZN3foo18hbedc642d5d9cf5aag4v0.0E(%enum.Foo* noalias nocapture sret, { i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
          "function top level":
            %2 = getelementptr inbounds %enum.Foo* %0, i64 0, i32 0
            store i64 0, i64* %2, align 8
            ret void
          }
      
      After:
      
          ; Function Attrs: nounwind readnone uwtable
          define %enum.Foo @_ZN3foo18hbedc642d5d9cf5aag4v0.0E({ i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
          "function top level":
            ret %enum.Foo zeroinitializer
          }
      f504461a
  22. 02 10月, 2013 1 次提交
  23. 01 10月, 2013 2 次提交
    • D
      make small (<= size_of::<int>()) tuples immediate · 5e4ae4f4
      Daniel Micay 提交于
          fn foo() -> (u32, u8, u8, u8, u8) {
              (4, 5, 6, 7, 8)
          }
      
      Before:
      
          ; Function Attrs: nounwind uwtable
          define void @_ZN3foo18hbb616262f874f8daf4v0.0E({ i32, i8, i8, i8, i8 }* noalias nocapture sret, { i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
          "function top level":
            %2 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 0
            store i32 4, i32* %2, align 4
            %3 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 1
            store i8 5, i8* %3, align 4
            %4 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 2
            store i8 6, i8* %4, align 1
            %5 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 3
            store i8 7, i8* %5, align 2
            %6 = getelementptr inbounds { i32, i8, i8, i8, i8 }* %0, i64 0, i32 4
            store i8 8, i8* %6, align 1
            ret void
          }
      
      After:
      
          ; Function Attrs: nounwind readnone uwtable
          define { i32, i8, i8, i8, i8 } @_ZN3foo18hbb616262f874f8daf4v0.0E({ i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
          "function top level":
            ret { i32, i8, i8, i8, i8 } { i32 4, i8 5, i8 6, i8 7, i8 8 }
          }
      5e4ae4f4
    • A
      rustc: Remove usage of fmt! · 1b80558b
      Alex Crichton 提交于
      1b80558b
  24. 27 9月, 2013 1 次提交
  25. 17 9月, 2013 3 次提交
    • D
      document why attributes are set on CallInst · 22b6f748
      Daniel Micay 提交于
      22b6f748
    • D
      add sret + noalias to the out pointer parameter · b2eb1c01
      Daniel Micay 提交于
      This brings Rust in line with how `clang` handles return pointers.
      
      Example:
      
          pub fn bar() -> [uint, .. 8] {
              let a = [0, .. 8];
              a
          }
      
      Before:
      
          ; Function Attrs: nounwind uwtable
          define void @_ZN3bar17ha4635c6f704bfa334v0.0E([8 x i64]* nocapture, { i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #1 {
          "function top level":
            %a = alloca [8 x i64], align 8
            %2 = bitcast [8 x i64]* %a to i8*
            call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 64, i32 8, i1 false)
            %3 = bitcast [8 x i64]* %0 to i8*
            call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 64, i32 8, i1 false)
            ret void
          }
      
      After:
      
          ; Function Attrs: nounwind uwtable
          define void @_ZN3bar17ha4635c6f704bfa334v0.0E([8 x i64]* noalias nocapture sret, { i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #1 {
          "function top level":
            %2 = bitcast [8 x i64]* %0 to i8*
            call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 64, i32 8, i1 false)
            ret void
          }
      
      Closes #9072
      Closes #7298
      Closes #9154
      b2eb1c01
    • D
      fix handling of function attributes · 3c31cf25
      Daniel Micay 提交于
      The `noalias` attributes were being set only on function definitions,
      not on all declarations. This is harmless for `noalias`, but prevented
      some optimization opportunities and is *not* harmless for other
      attributes like `sret` with ABI implications.
      
      Closes #9104
      3c31cf25
  26. 16 9月, 2013 2 次提交
  27. 14 9月, 2013 1 次提交
  28. 01 9月, 2013 1 次提交
  29. 21 8月, 2013 1 次提交
  30. 19 8月, 2013 1 次提交
  31. 12 8月, 2013 1 次提交