[swift-dev] Build on s390x error for swift-4.0-branch

2017-07-17 Thread Sam Ding via swift-dev
Hi, I am trying to build swift-4.0-branch on s390x. 1) The 1st error is in stdlib/public/core/UTF8.swift, line 51, failed at " _sanityCheck(source.count ==4 ) ". In fact, the test shows "source.count" = "0" on s390x, Note "stdlib/public/core/UTF8.swift" is a new code in swift-4.0-branch, wh

[swift-dev] Builtin.loadRaw

2017-09-28 Thread Sam Ding via swift-dev
I am testing a test case "KeyPath.swift" on s390x for v4.0 . It is found that " Builtin.loadRaw" as the below of "stdlib/public/core/UnsafeRawPointer.swift.gyb" returns a different value than that on x86-64. @_inlineable public func load(fromByteOffset offset: Int = 0, as type: T.Type)

Re: [swift-dev] Builtin.loadRaw

2017-09-29 Thread Sam Ding via swift-dev
in lib/SILGen/SILGenBuiltin.cpp, look for the function named emitBuiltinLoadRaw(). However I suspect the problem in this case is not that the builtin is implemented incorrectly (it eventually lowers to an LLVM load instruction) but that something further upstream is going wrong, perhaps with alig

[swift-dev] Debugger (lldb or gdb) does not show variable value in swift code

2017-10-06 Thread Sam Ding via swift-dev
Hi, I build swift compiler (v4.0) with debug mode ("-d"), however when debugging compiler swift code, it can not show the variable value. Here is an example: frame #0: 0x7761d50c libswiftCore.so`_allocateUninitializedArray(builtinCount=1) at Arrays.swift:3347

Re: [swift-dev] Debugger (lldb or gdb) does not show variable value in swift code

2017-10-12 Thread Sam Ding via swift-dev
On 7 Oct 2017, at 00:30, Sam Ding via swift-dev wrote: Hi, I build swift compiler (v4.0) with debug mode ("-d"), however when debugging compiler swift code, it can not show the variable value. Here is an example:

[swift-dev] Test case "tuple_arguments.swift" failed when compiler is built in debug mode on x86_64

2017-10-16 Thread Sam Ding via swift-dev
Hi all, I test the case "tuple_arguments.swift" for v4.0 and found it is failed when the swift compiler is built in "-d" debug mode, but it is passed when built in release mode. Here is a simple test case: // SR-4738 let sr4738 = (1, (2, 3)) [sr4738].map { (x, (y, z)) -> Int in x + y

[swift-dev] "For" loop iterator and "enum"

2017-10-24 Thread Sam Ding via swift-dev
Hi, It is found that "for" loop iterate and "enum" does not work on s390x. Here is a sample code: enum IntKey : Int { case a = 3 case b = 4 // Implicitly 4 case c = 1 } for ( a1, a2) in [(IntKey.a, 1)] { print ("+ test \n") } T