annotate dmd/arrayop.c @ 837:331a176c1f4f

Removed error on naked, not fully complete, but I'll be doing more work on it during this Christmas, and some things do work. Fixed taking delegate of final class method. see mini/delegate3.d.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 09 Dec 2008 14:07:30 +0100
parents 06576ece1a1b
children b30fe7e1dbb9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
1
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
2 // Copyright (c) 1999-2008 by Digital Mars
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
3 // All Rights Reserved
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
4 // written by Walter Bright
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
5 // http://www.digitalmars.com
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
6 // License for redistribution is by either the Artistic License
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
7 // in artistic.txt, or the GNU General Public License in gnu.txt.
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
8 // See the included readme.txt for details.
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
9
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
10 #include <stdio.h>
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
11 #include <string.h>
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
12 #include <assert.h>
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
13
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
14 #if _WIN32 || IN_GCC || IN_LLVM
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
15 #include "mem.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
16 #else
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
17 #include "../root/mem.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
18 #endif
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
19
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
20 #include "stringtable.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
21
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
22 #include "expression.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
23 #include "statement.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
24 #include "mtype.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
25 #include "declaration.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
26 #include "scope.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
27 #include "id.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
28 #include "module.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
29 #include "init.h"
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
30
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
31
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
32 /***********************************
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
33 * Construct the array operation expression.
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
34 */
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
35
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
36 Expression *BinExp::arrayOp(Scope *sc)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
37 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
38 Expressions *arguments = new Expressions();
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
39
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
40 /* The expression to generate an array operation for is mangled
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
41 * into a name to use as the array operation function name.
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
42 * Mangle in the operands and operators in RPN order, and type.
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
43 */
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
44 OutBuffer buf;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
45 buf.writestring("_array");
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
46 buildArrayIdent(&buf, arguments);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
47 buf.writeByte('_');
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
48
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
49 /* Append deco of array element type
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
50 */
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
51 #if DMDV2
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
52 buf.writestring(type->toBasetype()->nextOf()->toBasetype()->mutableOf()->deco);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
53 #else
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
54 buf.writestring(type->toBasetype()->nextOf()->toBasetype()->deco);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
55 #endif
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
56
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
57 size_t namelen = buf.offset;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
58 buf.writeByte(0);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
59 char *name = (char *)buf.extractData();
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
60
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
61 /* Look up name in hash table
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
62 */
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
63 StringValue *sv = sc->module->arrayfuncs.update(name, namelen);
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
64 FuncDeclaration *fd = (FuncDeclaration *)sv->ptrvalue;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
65 if (!fd)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
66 {
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
67 // /* Some of the array op functions are written as library functions,
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
68 // * presumably to optimize them with special CPU vector instructions.
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
69 // * List those library functions here, in alpha order.
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
70 // */
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
71 // static const char *libArrayopFuncs[] =
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
72 // {
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
73 // "_arrayExpSliceAddass_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
74 // "_arrayExpSliceAddass_d", // T[]+=T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
75 // "_arrayExpSliceAddass_f", // T[]+=T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
76 // "_arrayExpSliceAddass_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
77 // "_arrayExpSliceAddass_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
78 // "_arrayExpSliceAddass_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
79 // "_arrayExpSliceAddass_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
80 // "_arrayExpSliceAddass_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
81 // "_arrayExpSliceAddass_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
82 // "_arrayExpSliceAddass_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
83 // "_arrayExpSliceAddass_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
84 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
85 // "_arrayExpSliceDivass_d", // T[]/=T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
86 // "_arrayExpSliceDivass_f", // T[]/=T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
87 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
88 // "_arrayExpSliceMinSliceAssign_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
89 // "_arrayExpSliceMinSliceAssign_d", // T[]=T-T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
90 // "_arrayExpSliceMinSliceAssign_f", // T[]=T-T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
91 // "_arrayExpSliceMinSliceAssign_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
92 // "_arrayExpSliceMinSliceAssign_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
93 // "_arrayExpSliceMinSliceAssign_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
94 // "_arrayExpSliceMinSliceAssign_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
95 // "_arrayExpSliceMinSliceAssign_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
96 // "_arrayExpSliceMinSliceAssign_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
97 // "_arrayExpSliceMinSliceAssign_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
98 // "_arrayExpSliceMinSliceAssign_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
99 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
100 // "_arrayExpSliceMinass_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
101 // "_arrayExpSliceMinass_d", // T[]-=T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
102 // "_arrayExpSliceMinass_f", // T[]-=T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
103 // "_arrayExpSliceMinass_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
104 // "_arrayExpSliceMinass_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
105 // "_arrayExpSliceMinass_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
106 // "_arrayExpSliceMinass_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
107 // "_arrayExpSliceMinass_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
108 // "_arrayExpSliceMinass_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
109 // "_arrayExpSliceMinass_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
110 // "_arrayExpSliceMinass_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
111 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
112 // "_arrayExpSliceMulass_d", // T[]*=T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
113 // "_arrayExpSliceMulass_f", // T[]*=T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
114 // "_arrayExpSliceMulass_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
115 // "_arrayExpSliceMulass_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
116 // "_arrayExpSliceMulass_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
117 // "_arrayExpSliceMulass_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
118 // "_arrayExpSliceMulass_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
119 // "_arrayExpSliceMulass_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
120 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
121 // "_arraySliceExpAddSliceAssign_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
122 // "_arraySliceExpAddSliceAssign_d", // T[]=T[]+T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
123 // "_arraySliceExpAddSliceAssign_f", // T[]=T[]+T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
124 // "_arraySliceExpAddSliceAssign_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
125 // "_arraySliceExpAddSliceAssign_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
126 // "_arraySliceExpAddSliceAssign_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
127 // "_arraySliceExpAddSliceAssign_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
128 // "_arraySliceExpAddSliceAssign_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
129 // "_arraySliceExpAddSliceAssign_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
130 // "_arraySliceExpAddSliceAssign_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
131 // "_arraySliceExpAddSliceAssign_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
132 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
133 // "_arraySliceExpDivSliceAssign_d", // T[]=T[]/T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
134 // "_arraySliceExpDivSliceAssign_f", // T[]=T[]/T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
135 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
136 // "_arraySliceExpMinSliceAssign_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
137 // "_arraySliceExpMinSliceAssign_d", // T[]=T[]-T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
138 // "_arraySliceExpMinSliceAssign_f", // T[]=T[]-T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
139 // "_arraySliceExpMinSliceAssign_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
140 // "_arraySliceExpMinSliceAssign_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
141 // "_arraySliceExpMinSliceAssign_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
142 // "_arraySliceExpMinSliceAssign_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
143 // "_arraySliceExpMinSliceAssign_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
144 // "_arraySliceExpMinSliceAssign_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
145 // "_arraySliceExpMinSliceAssign_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
146 // "_arraySliceExpMinSliceAssign_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
147 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
148 // "_arraySliceExpMulSliceAddass_d", // T[] += T[]*T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
149 // "_arraySliceExpMulSliceAddass_f",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
150 // "_arraySliceExpMulSliceAddass_r",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
151 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
152 // "_arraySliceExpMulSliceAssign_d", // T[]=T[]*T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
153 // "_arraySliceExpMulSliceAssign_f", // T[]=T[]*T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
154 // "_arraySliceExpMulSliceAssign_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
155 // "_arraySliceExpMulSliceAssign_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
156 // "_arraySliceExpMulSliceAssign_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
157 // "_arraySliceExpMulSliceAssign_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
158 // "_arraySliceExpMulSliceAssign_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
159 // "_arraySliceExpMulSliceAssign_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
160 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
161 // "_arraySliceExpMulSliceMinass_d", // T[] -= T[]*T
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
162 // "_arraySliceExpMulSliceMinass_f",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
163 // "_arraySliceExpMulSliceMinass_r",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
164 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
165 // "_arraySliceSliceAddSliceAssign_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
166 // "_arraySliceSliceAddSliceAssign_d", // T[]=T[]+T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
167 // "_arraySliceSliceAddSliceAssign_f", // T[]=T[]+T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
168 // "_arraySliceSliceAddSliceAssign_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
169 // "_arraySliceSliceAddSliceAssign_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
170 // "_arraySliceSliceAddSliceAssign_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
171 // "_arraySliceSliceAddSliceAssign_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
172 // "_arraySliceSliceAddSliceAssign_r", // T[]=T[]+T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
173 // "_arraySliceSliceAddSliceAssign_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
174 // "_arraySliceSliceAddSliceAssign_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
175 // "_arraySliceSliceAddSliceAssign_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
176 // "_arraySliceSliceAddSliceAssign_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
177 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
178 // "_arraySliceSliceAddass_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
179 // "_arraySliceSliceAddass_d", // T[]+=T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
180 // "_arraySliceSliceAddass_f", // T[]+=T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
181 // "_arraySliceSliceAddass_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
182 // "_arraySliceSliceAddass_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
183 // "_arraySliceSliceAddass_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
184 // "_arraySliceSliceAddass_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
185 // "_arraySliceSliceAddass_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
186 // "_arraySliceSliceAddass_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
187 // "_arraySliceSliceAddass_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
188 // "_arraySliceSliceAddass_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
189 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
190 // "_arraySliceSliceMinSliceAssign_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
191 // "_arraySliceSliceMinSliceAssign_d", // T[]=T[]-T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
192 // "_arraySliceSliceMinSliceAssign_f", // T[]=T[]-T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
193 // "_arraySliceSliceMinSliceAssign_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
194 // "_arraySliceSliceMinSliceAssign_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
195 // "_arraySliceSliceMinSliceAssign_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
196 // "_arraySliceSliceMinSliceAssign_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
197 // "_arraySliceSliceMinSliceAssign_r", // T[]=T[]-T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
198 // "_arraySliceSliceMinSliceAssign_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
199 // "_arraySliceSliceMinSliceAssign_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
200 // "_arraySliceSliceMinSliceAssign_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
201 // "_arraySliceSliceMinSliceAssign_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
202 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
203 // "_arraySliceSliceMinass_a",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
204 // "_arraySliceSliceMinass_d", // T[]-=T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
205 // "_arraySliceSliceMinass_f", // T[]-=T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
206 // "_arraySliceSliceMinass_g",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
207 // "_arraySliceSliceMinass_h",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
208 // "_arraySliceSliceMinass_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
209 // "_arraySliceSliceMinass_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
210 // "_arraySliceSliceMinass_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
211 // "_arraySliceSliceMinass_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
212 // "_arraySliceSliceMinass_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
213 // "_arraySliceSliceMinass_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
214 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
215 // "_arraySliceSliceMulSliceAssign_d", // T[]=T[]*T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
216 // "_arraySliceSliceMulSliceAssign_f", // T[]=T[]*T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
217 // "_arraySliceSliceMulSliceAssign_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
218 // "_arraySliceSliceMulSliceAssign_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
219 // "_arraySliceSliceMulSliceAssign_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
220 // "_arraySliceSliceMulSliceAssign_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
221 // "_arraySliceSliceMulSliceAssign_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
222 // "_arraySliceSliceMulSliceAssign_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
223 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
224 // "_arraySliceSliceMulass_d", // T[]*=T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
225 // "_arraySliceSliceMulass_f", // T[]*=T[]
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
226 // "_arraySliceSliceMulass_i",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
227 // "_arraySliceSliceMulass_k",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
228 // "_arraySliceSliceMulass_s",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
229 // "_arraySliceSliceMulass_t",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
230 // "_arraySliceSliceMulass_u",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
231 // "_arraySliceSliceMulass_w",
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
232 // };
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
233 //
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
234 // int i = binary(name, libArrayopFuncs, sizeof(libArrayopFuncs) / sizeof(char *));
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
235 // if (i == -1)
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
236 // {
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
237 // #ifdef DEBUG // Make sure our array is alphabetized
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
238 // for (i = 0; i < sizeof(libArrayopFuncs) / sizeof(char *); i++)
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
239 // {
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
240 // if (strcmp(name, libArrayopFuncs[i]) == 0)
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
241 // assert(0);
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
242 // }
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
243 // #endif
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
244
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
245 /* Not in library, so generate it.
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
246 * Construct the function body:
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
247 * foreach (i; 0 .. p.length) for (size_t i = 0; i < p.length; i++)
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
248 * loopbody;
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
249 * return p;
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
250 */
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
251
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
252 Arguments *fparams = new Arguments();
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
253 Expression *loopbody = buildArrayLoop(fparams);
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
254 Argument *p = (Argument *)fparams->data[0 /*fparams->dim - 1*/];
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
255 #if DMDV1
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
256 // for (size_t i = 0; i < p.length; i++)
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
257 Initializer *init = new ExpInitializer(0, new IntegerExp(0, 0, Type::tsize_t));
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
258 Dsymbol *d = new VarDeclaration(0, Type::tsize_t, Id::p, init);
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
259 Statement *s1 = new ForStatement(0,
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
260 new DeclarationStatement(0, d),
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
261 new CmpExp(TOKlt, 0, new IdentifierExp(0, Id::p), new ArrayLengthExp(0, new IdentifierExp(0, p->ident))),
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
262 new PostExp(TOKplusplus, 0, new IdentifierExp(0, Id::p)),
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
263 new ExpStatement(0, loopbody));
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
264 #else
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
265 // foreach (i; 0 .. p.length)
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
266 Statement *s1 = new ForeachRangeStatement(0, TOKforeach,
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
267 new Argument(0, NULL, Id::p, NULL),
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
268 new IntegerExp(0, 0, Type::tint32),
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
269 new ArrayLengthExp(0, new IdentifierExp(0, p->ident)),
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
270 new ExpStatement(0, loopbody));
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
271 #endif
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
272 Statement *s2 = new ReturnStatement(0, new IdentifierExp(0, p->ident));
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
273 //printf("s2: %s\n", s2->toChars());
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
274 Statement *fbody = new CompoundStatement(0, s1, s2);
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
275
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
276 /* Construct the function
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
277 */
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
278 TypeFunction *ftype = new TypeFunction(fparams, type, 0, LINKc);
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
279 //printf("ftype: %s\n", ftype->toChars());
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
280 fd = new FuncDeclaration(0, 0, Lexer::idPool(name), STCundefined, ftype);
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
281 fd->fbody = fbody;
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
282 fd->protection = PROTprotected;
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
283 fd->linkage = LINKd;
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
284
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
285 // special attention for array ops
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
286 fd->isArrayOp = true;
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
287
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
288 sc->module->members->push(fd);
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
289
703
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
290 sc = sc->push();
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
291 sc->parent = sc->module;
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
292 sc->stc = 0;
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
293 sc->linkage = LINKd;
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
294 fd->semantic(sc);
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
295 sc->pop();
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
296 // }
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
297 // else
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
298 // { /* In library, refer to it.
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
299 // */
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
300 // // FIXME
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
301 // fd = FuncDeclaration::genCfunc(NULL, type, name);
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
302 // }
06576ece1a1b Changed premake.lua to work with mingw.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 664
diff changeset
303 sv->ptrvalue = fd; // cache symbol in hash table
510
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
304 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
305
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
306 /* Call the function fd(arguments)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
307 */
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
308 Expression *ec = new VarExp(0, fd);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
309 Expression *e = new CallExp(loc, ec, arguments);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
310 e->type = type;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
311 return e;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
312 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
313
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
314 /******************************************
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
315 * Construct the identifier for the array operation function,
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
316 * and build the argument list to pass to it.
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
317 */
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
318
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
319 void Expression::buildArrayIdent(OutBuffer *buf, Expressions *arguments)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
320 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
321 buf->writestring("Exp");
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
322 arguments->shift(this);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
323 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
324
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
325 void SliceExp::buildArrayIdent(OutBuffer *buf, Expressions *arguments)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
326 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
327 buf->writestring("Slice");
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
328 arguments->shift(this);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
329 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
330
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
331 void AssignExp::buildArrayIdent(OutBuffer *buf, Expressions *arguments)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
332 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
333 /* Evaluate assign expressions right to left
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
334 */
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
335 e2->buildArrayIdent(buf, arguments);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
336 e1->buildArrayIdent(buf, arguments);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
337 buf->writestring("Assign");
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
338 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
339
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
340 #define X(Str) \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
341 void Str##AssignExp::buildArrayIdent(OutBuffer *buf, Expressions *arguments) \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
342 { \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
343 /* Evaluate assign expressions right to left \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
344 */ \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
345 e2->buildArrayIdent(buf, arguments); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
346 e1->buildArrayIdent(buf, arguments); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
347 buf->writestring(#Str); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
348 buf->writestring("ass"); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
349 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
350
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
351 X(Add)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
352 X(Min)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
353 X(Mul)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
354 X(Div)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
355 X(Mod)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
356 X(Xor)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
357 X(And)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
358 X(Or)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
359
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
360 #undef X
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
361
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
362 void NegExp::buildArrayIdent(OutBuffer *buf, Expressions *arguments)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
363 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
364 e1->buildArrayIdent(buf, arguments);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
365 buf->writestring("Neg");
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
366 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
367
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
368 void ComExp::buildArrayIdent(OutBuffer *buf, Expressions *arguments)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
369 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
370 e1->buildArrayIdent(buf, arguments);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
371 buf->writestring("Com");
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
372 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
373
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
374 #define X(Str) \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
375 void Str##Exp::buildArrayIdent(OutBuffer *buf, Expressions *arguments) \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
376 { \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
377 /* Evaluate assign expressions left to right \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
378 */ \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
379 e1->buildArrayIdent(buf, arguments); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
380 e2->buildArrayIdent(buf, arguments); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
381 buf->writestring(#Str); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
382 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
383
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
384 X(Add)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
385 X(Min)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
386 X(Mul)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
387 X(Div)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
388 X(Mod)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
389 X(Xor)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
390 X(And)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
391 X(Or)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
392
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
393 #undef X
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
394
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
395 /******************************************
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
396 * Construct the inner loop for the array operation function,
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
397 * and build the parameter list.
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
398 */
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
399
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
400 Expression *Expression::buildArrayLoop(Arguments *fparams)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
401 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
402 Identifier *id = Identifier::generateId("c", fparams->dim);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
403 Argument *param = new Argument(0, type, id, NULL);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
404 fparams->shift(param);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
405 Expression *e = new IdentifierExp(0, id);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
406 return e;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
407 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
408
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
409 Expression *SliceExp::buildArrayLoop(Arguments *fparams)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
410 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
411 Identifier *id = Identifier::generateId("p", fparams->dim);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
412 Argument *param = new Argument(STCconst, type, id, NULL);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
413 fparams->shift(param);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
414 Expression *e = new IdentifierExp(0, id);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
415 Expressions *arguments = new Expressions();
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
416 Expression *index = new IdentifierExp(0, Id::p);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
417 arguments->push(index);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
418 e = new ArrayExp(0, e, arguments);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
419 return e;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
420 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
421
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
422 Expression *AssignExp::buildArrayLoop(Arguments *fparams)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
423 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
424 /* Evaluate assign expressions right to left
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
425 */
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
426 Expression *ex2 = e2->buildArrayLoop(fparams);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
427 Expression *ex1 = e1->buildArrayLoop(fparams);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
428 Argument *param = (Argument *)fparams->data[0];
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
429 param->storageClass = 0;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
430 Expression *e = new AssignExp(0, ex1, ex2);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
431 return e;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
432 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
433
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
434 #define X(Str) \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
435 Expression *Str##AssignExp::buildArrayLoop(Arguments *fparams) \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
436 { \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
437 /* Evaluate assign expressions right to left \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
438 */ \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
439 Expression *ex2 = e2->buildArrayLoop(fparams); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
440 Expression *ex1 = e1->buildArrayLoop(fparams); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
441 Argument *param = (Argument *)fparams->data[0]; \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
442 param->storageClass = 0; \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
443 Expression *e = new Str##AssignExp(0, ex1, ex2); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
444 return e; \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
445 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
446
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
447 X(Add)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
448 X(Min)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
449 X(Mul)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
450 X(Div)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
451 X(Mod)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
452 X(Xor)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
453 X(And)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
454 X(Or)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
455
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
456 #undef X
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
457
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
458 Expression *NegExp::buildArrayLoop(Arguments *fparams)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
459 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
460 Expression *ex1 = e1->buildArrayLoop(fparams);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
461 Expression *e = new NegExp(0, ex1);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
462 return e;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
463 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
464
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
465 Expression *ComExp::buildArrayLoop(Arguments *fparams)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
466 {
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
467 Expression *ex1 = e1->buildArrayLoop(fparams);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
468 Expression *e = new ComExp(0, ex1);
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
469 return e;
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
470 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
471
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
472 #define X(Str) \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
473 Expression *Str##Exp::buildArrayLoop(Arguments *fparams) \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
474 { \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
475 /* Evaluate assign expressions left to right \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
476 */ \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
477 Expression *ex1 = e1->buildArrayLoop(fparams); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
478 Expression *ex2 = e2->buildArrayLoop(fparams); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
479 Expression *e = new Str##Exp(0, ex1, ex2); \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
480 return e; \
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
481 }
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
482
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
483 X(Add)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
484 X(Min)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
485 X(Mul)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
486 X(Div)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
487 X(Mod)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
488 X(Xor)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
489 X(And)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
490 X(Or)
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
491
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
492 #undef X
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
493
6aee82889553 Merged DMD 1.034, array operations are not yet implemented ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
494