Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

root/gen/arrays.h

Revision 1643:8f121883bce8, 1.9 kB (checked in by Kelly Wilson <wilsonk cpsc.ucalgary.ca>, 2 years ago)

Apply patch from klickverbot. This is his 'proper fix' patch for bug #395.

Line 
1 #ifndef LLVMC_GEN_ARRAYS_H
2 #define LLVMC_GEN_ARRAYS_H
3
4 struct ArrayInitializer;
5
6 struct DSliceValue;
7
8 const llvm::StructType* DtoArrayType(Type* arrayTy);
9 const llvm::StructType* DtoArrayType(const LLType* elemTy);
10 const llvm::ArrayType* DtoStaticArrayType(Type* sarrayTy);
11
12 LLConstant* DtoConstArrayInitializer(ArrayInitializer* si);
13 LLConstant* DtoConstSlice(LLConstant* dim, LLConstant* ptr);
14
15 void DtoArrayCopySlices(DSliceValue* dst, DSliceValue* src);
16 void DtoArrayCopyToSlice(DSliceValue* dst, DValue* src);
17
18 void DtoArrayInit(Loc& loc, DValue* array, DValue* value);
19 void DtoArrayAssign(LLValue* l, LLValue* r);
20 void DtoSetArray(LLValue* arr, LLValue* dim, LLValue* ptr);
21 void DtoSetArrayToNull(LLValue* v);
22
23 DSliceValue* DtoNewDynArray(Loc& loc, Type* arrayType, DValue* dim, bool defaultInit=true);
24 DSliceValue* DtoNewMulDimDynArray(Loc& loc, Type* arrayType, DValue** dims, size_t ndims, bool defaultInit=true);
25 DSliceValue* DtoResizeDynArray(Type* arrayType, DValue* array, DValue* newdim);
26
27 void DtoCatAssignElement(Loc& loc, Type* type, DValue* arr, Expression* exp);
28 DSliceValue* DtoCatAssignArray(DValue* arr, Expression* exp);
29 DSliceValue* DtoCatArrays(Type* type, Expression* e1, Expression* e2);
30 DSliceValue* DtoCatArrayElement(Type* type, Expression* exp1, Expression* exp2);
31
32 void DtoStaticArrayCopy(LLValue* dst, LLValue* src);
33
34 LLValue* DtoArrayEquals(Loc& loc, TOK op, DValue* l, DValue* r);
35 LLValue* DtoArrayCompare(Loc& loc, TOK op, DValue* l, DValue* r);
36
37 LLValue* DtoDynArrayIs(TOK op, DValue* l, DValue* r);
38
39 LLValue* DtoArrayCastLength(LLValue* len, const LLType* elemty, const LLType* newelemty);
40
41 LLValue* DtoArrayLen(DValue* v);
42 LLValue* DtoArrayPtr(DValue* v);
43
44 DValue* DtoCastArray(Loc& loc, DValue* val, Type* to);
45
46 // generates an array bounds check
47 void DtoArrayBoundsCheck(Loc& loc, DValue* arr, DValue* index, bool isslice);
48
49 #endif // LLVMC_GEN_ARRAYS_H
Note: See TracBrowser for help on using the browser.
Copyright © 2008, LDC Development Team.