comparison gen/statements.cpp @ 206:cd2c9f4010e4 trunk

[svn r222] Forgot to remove volatile ATTENTION. Fixed a few comment types. Forgot to add makefile for the basic GC.
author lindquist
date Tue, 13 May 2008 18:07:03 +0200
parents 9d44ec83acd1
children 7816aafeea3c
comparison
equal deleted inserted replaced
205:9d44ec83acd1 206:cd2c9f4010e4
1155 void VolatileStatement::toIR(IRState* p) 1155 void VolatileStatement::toIR(IRState* p)
1156 { 1156 {
1157 Logger::println("VolatileStatement::toIR(): %s", loc.toChars()); 1157 Logger::println("VolatileStatement::toIR(): %s", loc.toChars());
1158 LOG_SCOPE; 1158 LOG_SCOPE;
1159 1159
1160 Logger::attention(loc, "volatile is currently ignored. only the body will be emitted"); 1160 // mark in-volatile
1161
1162 // mark in volate
1163 bool old = gIR->func()->inVolatile; 1161 bool old = gIR->func()->inVolatile;
1164 gIR->func()->inVolatile = true; 1162 gIR->func()->inVolatile = true;
1165 1163
1166 // has statement 1164 // has statement
1167 if (statement != NULL) 1165 if (statement != NULL)
1170 DtoMemoryBarrier(false, true, false, false); 1168 DtoMemoryBarrier(false, true, false, false);
1171 1169
1172 // do statement 1170 // do statement
1173 statement->toIR(p); 1171 statement->toIR(p);
1174 1172
1175 // not point in a unreachable barrier, terminating statements should insert this themselves. 1173 // no point in a unreachable barrier, terminating statements should insert this themselves.
1176 if (statement->fallOffEnd()) 1174 if (statement->fallOffEnd())
1177 { 1175 {
1178 // store-load 1176 // store-load
1179 DtoMemoryBarrier(false, false, true, false); 1177 DtoMemoryBarrier(false, false, true, false);
1180 } 1178 }