comparison dmd/Scope.d @ 129:010eb8f0e18d

further work on dmd test suite
author korDen
date Sun, 05 Sep 2010 15:32:22 +0400
parents e28b18c23469
children 206db751bd4c
comparison
equal deleted inserted replaced
128:e6e542f37b94 129:010eb8f0e18d
169 assert(this !is enclosing); /// huh? 169 assert(this !is enclosing); /// huh?
170 } 170 }
171 171
172 Scope clone() 172 Scope clone()
173 { 173 {
174 // similar code is used in Type.clone() 174 return cloneThis(this);
175 // TODO: move to Util or something...
176 size_t size = __traits(classInstanceSize, typeof(this));
177 void* mem = GC.malloc(size);
178 memcpy(mem, cast(void*)this, size);
179
180 return cast(typeof(this))mem;
181 } 175 }
182 176
183 Scope push() 177 Scope push()
184 { 178 {
185 //printf("Scope.push()\n"); 179 //printf("Scope.push()\n");