Mercurial > projects > ldc
comparison gen/arrays.h @ 213:7816aafeea3c trunk
[svn r229] Updated the object.d implementation to the latest Tango.
Fixed a bunch of the built-in typeinfos for arrays, they did not inherit TypeInfo_Array.
Applied patch to tango/text/convert/Layout.d by fvbommel, closes #47 .
Cleaned up some type code.
Replaced uses of llvm::Type with LLType (a typedef), same for Value and Constant.
Fixed a few cases where typeinfo for user structs could be emitted multiple times, seems to still be some cases of this :/
author | lindquist |
---|---|
date | Fri, 30 May 2008 19:32:04 +0200 |
parents | e881c9b1c738 |
children | 9760f54af0b7 |
comparison
equal
deleted
inserted
replaced
212:4c2689d57ba4 | 213:7816aafeea3c |
---|---|
4 struct DSliceValue; | 4 struct DSliceValue; |
5 | 5 |
6 const llvm::StructType* DtoArrayType(Type* t); | 6 const llvm::StructType* DtoArrayType(Type* t); |
7 const llvm::ArrayType* DtoStaticArrayType(Type* t); | 7 const llvm::ArrayType* DtoStaticArrayType(Type* t); |
8 | 8 |
9 llvm::Constant* DtoConstArrayInitializer(ArrayInitializer* si); | 9 LLConstant* DtoConstArrayInitializer(ArrayInitializer* si); |
10 llvm::Constant* DtoConstSlice(llvm::Constant* dim, llvm::Constant* ptr); | 10 LLConstant* DtoConstSlice(LLConstant* dim, LLConstant* ptr); |
11 llvm::Constant* DtoConstStaticArray(const llvm::Type* t, llvm::Constant* c); | 11 LLConstant* DtoConstStaticArray(const llvm::Type* t, LLConstant* c); |
12 | 12 |
13 void DtoArrayCopySlices(DSliceValue* dst, DSliceValue* src); | 13 void DtoArrayCopySlices(DSliceValue* dst, DSliceValue* src); |
14 void DtoArrayCopyToSlice(DSliceValue* dst, DValue* src); | 14 void DtoArrayCopyToSlice(DSliceValue* dst, DValue* src); |
15 | 15 |
16 void DtoArrayInit(llvm::Value* l, llvm::Value* r); | 16 void DtoArrayInit(LLValue* l, LLValue* r); |
17 void DtoArrayInit(llvm::Value* ptr, llvm::Value* dim, llvm::Value* val); | 17 void DtoArrayInit(LLValue* ptr, LLValue* dim, LLValue* val); |
18 void DtoArrayAssign(llvm::Value* l, llvm::Value* r); | 18 void DtoArrayAssign(LLValue* l, LLValue* r); |
19 void DtoSetArray(llvm::Value* arr, llvm::Value* dim, llvm::Value* ptr); | 19 void DtoSetArray(LLValue* arr, LLValue* dim, LLValue* ptr); |
20 void DtoSetArrayToNull(llvm::Value* v); | 20 void DtoSetArrayToNull(LLValue* v); |
21 | 21 |
22 DSliceValue* DtoNewDynArray(Type* arrayType, DValue* dim, bool defaultInit=true); | 22 DSliceValue* DtoNewDynArray(Type* arrayType, DValue* dim, bool defaultInit=true); |
23 DSliceValue* DtoResizeDynArray(Type* arrayType, DValue* array, DValue* newdim); | 23 DSliceValue* DtoResizeDynArray(Type* arrayType, DValue* array, DValue* newdim); |
24 | 24 |
25 DSliceValue* DtoCatAssignElement(DValue* arr, Expression* exp); | 25 DSliceValue* DtoCatAssignElement(DValue* arr, Expression* exp); |
26 DSliceValue* DtoCatAssignArray(DValue* arr, Expression* exp); | 26 DSliceValue* DtoCatAssignArray(DValue* arr, Expression* exp); |
27 DSliceValue* DtoCatArrays(Type* type, Expression* e1, Expression* e2); | 27 DSliceValue* DtoCatArrays(Type* type, Expression* e1, Expression* e2); |
28 DSliceValue* DtoCatArrayElement(Type* type, Expression* exp1, Expression* exp2); | 28 DSliceValue* DtoCatArrayElement(Type* type, Expression* exp1, Expression* exp2); |
29 | 29 |
30 void DtoStaticArrayCopy(llvm::Value* dst, llvm::Value* src); | 30 void DtoStaticArrayCopy(LLValue* dst, LLValue* src); |
31 | 31 |
32 llvm::Value* DtoArrayEquals(TOK op, DValue* l, DValue* r); | 32 LLValue* DtoArrayEquals(TOK op, DValue* l, DValue* r); |
33 llvm::Value* DtoArrayCompare(TOK op, DValue* l, DValue* r); | 33 LLValue* DtoArrayCompare(TOK op, DValue* l, DValue* r); |
34 | 34 |
35 llvm::Value* DtoDynArrayIs(TOK op, llvm::Value* l, llvm::Value* r); | 35 LLValue* DtoDynArrayIs(TOK op, LLValue* l, LLValue* r); |
36 | 36 |
37 llvm::Value* DtoArrayCastLength(llvm::Value* len, const llvm::Type* elemty, const llvm::Type* newelemty); | 37 LLValue* DtoArrayCastLength(LLValue* len, const llvm::Type* elemty, const llvm::Type* newelemty); |
38 | 38 |
39 llvm::Value* DtoArrayLen(DValue* v); | 39 LLValue* DtoArrayLen(DValue* v); |
40 llvm::Value* DtoArrayPtr(DValue* v); | 40 LLValue* DtoArrayPtr(DValue* v); |
41 | 41 |
42 DValue* DtoCastArray(DValue* val, Type* to); | 42 DValue* DtoCastArray(DValue* val, Type* to); |
43 | 43 |
44 #endif // LLVMC_GEN_ARRAYS_H | 44 #endif // LLVMC_GEN_ARRAYS_H |