Mercurial > projects > ldc
comparison gen/functions.cpp @ 275:665b81613475 trunk
[svn r296] Removed: the 'suite' dir, it never took off!
Fixed: foreach statement, key-type checks were buggy.
Fixed: setting LLVMDC versions on the command line is now an error.
Fixed: array compare runtime had incorrect param attrs on call.
Fixed: index expressions on dynamic array slices w/o storage was broken.
Fixed: scope classes had incorrect finalization in some cases.
Fixed: when outputting !ClassInfoS !OffsetTypeInfoS, static class members were trying to be included, crashing the compiler.
Fixed: calling LLVMDC with -inline but not any -O option caused assertion failure.
Changed: the runtime now uses a single interface to "get" to !TypeInfoS, part of eliminating duplicate !TypeInfo codegen.
author | lindquist |
---|---|
date | Thu, 19 Jun 2008 17:30:32 +0200 |
parents | 88252a1af660 |
children | 7086a84ab3d6 |
comparison
equal
deleted
inserted
replaced
274:9f228c1e5311 | 275:665b81613475 |
---|---|
103 | 103 |
104 size_t n = Argument::dim(f->parameters); | 104 size_t n = Argument::dim(f->parameters); |
105 | 105 |
106 int nbyval = 0; | 106 int nbyval = 0; |
107 | 107 |
108 llvm::PAListPtr palist; | |
109 | |
110 for (int i=0; i < n; ++i) { | 108 for (int i=0; i < n; ++i) { |
111 Argument* arg = Argument::getNth(f->parameters, i); | 109 Argument* arg = Argument::getNth(f->parameters, i); |
112 // ensure scalar | 110 // ensure scalar |
113 Type* argT = DtoDType(arg->type); | 111 Type* argT = DtoDType(arg->type); |
114 assert(argT); | 112 assert(argT); |
120 Logger::println("struct param"); | 118 Logger::println("struct param"); |
121 paramvec.push_back(getPtrToType(at)); | 119 paramvec.push_back(getPtrToType(at)); |
122 arg->llvmByVal = !refOrOut; | 120 arg->llvmByVal = !refOrOut; |
123 } | 121 } |
124 else if (isaArray(at)) { | 122 else if (isaArray(at)) { |
123 // static array are passed by reference | |
125 Logger::println("sarray param"); | 124 Logger::println("sarray param"); |
126 assert(argT->ty == Tsarray); | 125 assert(argT->ty == Tsarray); |
127 //paramvec.push_back(getPtrToType(at->getContainedType(0))); | |
128 paramvec.push_back(getPtrToType(at)); | 126 paramvec.push_back(getPtrToType(at)); |
129 //arg->llvmByVal = !refOrOut; // static array are passed by reference | |
130 } | 127 } |
131 else if (llvm::isa<llvm::OpaqueType>(at)) { | 128 else if (llvm::isa<llvm::OpaqueType>(at)) { |
132 Logger::println("opaque param"); | 129 Logger::println("opaque param"); |
133 assert(argT->ty == Tstruct || argT->ty == Tclass); | 130 assert(argT->ty == Tstruct || argT->ty == Tclass); |
134 paramvec.push_back(getPtrToType(at)); | 131 paramvec.push_back(getPtrToType(at)); |