[svn r135] * Merged DMD 1.025 *

* Fixed a minor linking order mishap *
* Added an command line option -annotate *
* Fixed some problems with running optimizations *
* Added std.stdio and dependencies to lphobos (still not 100% working, but compiles and links) *
* Fixed problems with passing aggregate types to variadic functions *
* Added initial code towards full GC support, currently based on malloc and friends, not all the runtime calls the GC yet for memory *
* Fixed problems with resolving nested function context pointers for some heavily nested cases *
* Redid function argument passing + other minor code cleanups, still lots to do on this end... *
This commit is contained in:
Tomas Lindquist Olsen
2008-01-04 01:38:42 +01:00
parent 4428e47a66
commit bc08c6fcb1
44 changed files with 4587 additions and 592 deletions

View File

@@ -13,30 +13,30 @@ namespace Logger
static std::string indent_str;
static std::ofstream null_out("/dev/null");
static bool enabled = false;
static bool _enabled = false;
void indent()
{
if (enabled) {
if (_enabled) {
indent_str += "* ";
}
}
void undent()
{
if (enabled) {
if (_enabled) {
assert(!indent_str.empty());
indent_str.resize(indent_str.size()-2);
}
}
std::ostream& cout()
{
if (enabled)
if (_enabled)
return std::cout << indent_str;
else
return null_out;
}
void println(const char* fmt,...)
{
if (enabled) {
if (_enabled) {
printf(indent_str.c_str());
va_list va;
va_start(va,fmt);
@@ -47,7 +47,7 @@ namespace Logger
}
void print(const char* fmt,...)
{
if (enabled) {
if (_enabled) {
printf(indent_str.c_str());
va_list va;
va_start(va,fmt);
@@ -57,11 +57,15 @@ namespace Logger
}
void enable()
{
enabled = true;
_enabled = true;
}
void disable()
{
enabled = false;
_enabled = false;
}
bool enabled()
{
return _enabled;
}
void attention(const char* fmt,...)
{